From 5dc953fca52fe1822d684b71e8cb8087c3ed403d Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 13 Jan 2022 14:51:48 -0500 Subject: [PATCH 001/124] Fix glob for NRF building (#13550) --- integrations/cloudbuild/smoke-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index 2c5b2073725e97..6117998834a2c5 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -35,7 +35,7 @@ steps: args: - >- ./scripts/build/build_examples.py --enable-flashbundle - --target-glob '*-nrf52840-{lock,light}*' build --create-archives + --target-glob '*-nrf52840*{lock,light}*' build --create-archives /workspace/artifacts/ waitFor: - Bootstrap From 4e7c5e9ad1e7b8aaa11aa18c8dbcb9b0b9214eed Mon Sep 17 00:00:00 2001 From: Yuanyao Zhong <82843247+yyzhong-g@users.noreply.github.com> Date: Thu, 13 Jan 2022 14:58:00 -0500 Subject: [PATCH 002/124] Add trace events to CASE and PASE Sessions (#13238) * Add trace events to CASE and PASE Sessions * Add get trace script python deps to BUILD.gn * Replace pw_trace macro to proper ones * Add trace header to isolate the dependency to pw_trace * Restyle with gn and clang-format --- BUILD.gn | 3 + config/esp32/components/chip/CMakeLists.txt | 2 + config/esp32/components/chip/component.mk | 1 + examples/platform/esp32/Rpc.cpp | 2 + examples/platform/nrfconnect/Rpc.cpp | 2 + src/protocols/secure_channel/BUILD.gn | 1 + src/protocols/secure_channel/CASESession.cpp | 12 ++++ src/protocols/secure_channel/PASESession.cpp | 13 +++- src/trace/BUILD.gn | 28 +++++++++ src/trace/trace.h | 65 ++++++++++++++++++++ 10 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 src/trace/BUILD.gn create mode 100644 src/trace/trace.h diff --git a/BUILD.gn b/BUILD.gn index 85f7dfc9dd2208..258ea4852ff27f 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -47,12 +47,15 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { "$dir_pw_doctor/py", "$dir_pw_env_setup/py", "$dir_pw_hdlc/py", + "$dir_pw_log:protos.python", "$dir_pw_module/py", "$dir_pw_protobuf/py", "$dir_pw_protobuf_compiler/py", "$dir_pw_rpc/py", "$dir_pw_status/py", "$dir_pw_toolchain/py", + "$dir_pw_trace/py", + "$dir_pw_trace_tokenized/py", "$dir_pw_unit_test/py", "$dir_pw_watch/py", "integrations/mobly:chip_mobly", diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index 94153fa20085ac..2fcfd0a899cf58 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -80,9 +80,11 @@ if(CONFIG_ENABLE_PW_RPC) string(APPEND chip_gn_args "import(\"//build_overrides/pigweed.gni\")\n") chip_gn_arg_append("remove_default_configs" "[\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_build:cpp17\"]") chip_gn_arg_append("chip_build_pw_rpc_lib" "true") + chip_gn_arg_append("chip_build_pw_trace_lib" "true") chip_gn_arg_append("pw_log_BACKEND" "\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_log_basic\"") chip_gn_arg_append("pw_assert_BACKEND" "\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_assert_log\"") chip_gn_arg_append("pw_sys_io_BACKEND" "\"//third_party/connectedhomeip/examples/platform/esp32/pw_sys_io:pw_sys_io_esp32\"") + chip_gn_arg_append("pw_trace_BACKEND" "\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_trace_tokenized\"") chip_gn_arg_append("dir_pw_third_party_nanopb" "\"//third_party/connectedhomeip/third_party/nanopb/repo\"") chip_gn_arg_append("pw_build_LINK_DEPS" "[\"\$dir_pw_assert:impl\", \"\$dir_pw_log:impl\"]") endif() diff --git a/config/esp32/components/chip/component.mk b/config/esp32/components/chip/component.mk index 21339e3bc3f95c..6b8714b1db620e 100644 --- a/config/esp32/components/chip/component.mk +++ b/config/esp32/components/chip/component.mk @@ -140,6 +140,7 @@ endif echo "pw_log_BACKEND = \"//third_party/connectedhomeip/third_party/pigweed/repo/pw_log_basic\"" >> $(OUTPUT_DIR)/args.gn ;\ echo "pw_assert_BACKEND = \"//third_party/connectedhomeip/third_party/pigweed/repo/pw_assert_log\"" >> $(OUTPUT_DIR)/args.gn ;\ echo "pw_sys_io_BACKEND = \"//third_party/connectedhomeip/examples/platform/esp32/pw_sys_io:pw_sys_io_esp32\"" >> $(OUTPUT_DIR)/args.gn ;\ + echo "pw_trace_BACKEND = \"//third_party/connectedhomeip/third_party/pigweed/repo/pw_trace_tokenized\"" >> $(OUTPUT_DIR)/args.gn ;\ echo "dir_pw_third_party_nanopb = \"//third_party/connectedhomeip/third_party/nanopb/repo\"" >>$(OUTPUT_DIR)/args.gn ;\ fi if [[ "$(CONFIG_ENABLE_CHIP_SHELL)" = "y" ]]; then \ diff --git a/examples/platform/esp32/Rpc.cpp b/examples/platform/esp32/Rpc.cpp index 9286191dc4eeca..a0fa1530731c6c 100644 --- a/examples/platform/esp32/Rpc.cpp +++ b/examples/platform/esp32/Rpc.cpp @@ -53,6 +53,7 @@ #endif // defined(PW_RPC_LOCKING_SERVICE) && PW_RPC_LOCKING_SERVICE #if defined(PW_RPC_TRACING_SERVICE) && PW_RPC_TRACING_SERVICE +#define PW_TRACE_BUFFER_SIZE_BYTES 1024 #include "pw_trace/trace.h" #include "pw_trace_tokenized/trace_rpc_service_nanopb.h" @@ -167,6 +168,7 @@ void RegisterServices(pw::rpc::Server & server) #if defined(PW_RPC_TRACING_SERVICE) && PW_RPC_TRACING_SERVICE server.RegisterService(trace_service); + PW_TRACE_SET_ENABLED(true); #endif // defined(PW_RPC_TRACING_SERVICE) && PW_RPC_TRACING_SERVICE } diff --git a/examples/platform/nrfconnect/Rpc.cpp b/examples/platform/nrfconnect/Rpc.cpp index 580c925d883465..23feea30b8c552 100644 --- a/examples/platform/nrfconnect/Rpc.cpp +++ b/examples/platform/nrfconnect/Rpc.cpp @@ -46,6 +46,7 @@ LOG_MODULE_DECLARE(app); #endif // defined(PW_RPC_LOCKING_SERVICE) && PW_RPC_LOCKING_SERVICE #if defined(PW_RPC_TRACING_SERVICE) && PW_RPC_TRACING_SERVICE +#define PW_TRACE_BUFFER_SIZE_BYTES 1024 #include "pw_trace/trace.h" #include "pw_trace_tokenized/trace_rpc_service_nanopb.h" @@ -155,6 +156,7 @@ void RegisterServices(pw::rpc::Server & server) #if defined(PW_RPC_TRACING_SERVICE) && PW_RPC_TRACING_SERVICE server.RegisterService(trace_service); + PW_TRACE_SET_ENABLED(true); #endif // defined(PW_RPC_TRACING_SERVICE) && PW_RPC_TRACING_SERVICE } diff --git a/src/protocols/secure_channel/BUILD.gn b/src/protocols/secure_channel/BUILD.gn index 5b4c9ef9580cd2..ed9bf68b9dd28e 100644 --- a/src/protocols/secure_channel/BUILD.gn +++ b/src/protocols/secure_channel/BUILD.gn @@ -29,5 +29,6 @@ static_library("secure_channel") { "${chip_root}/src/lib/support", "${chip_root}/src/messaging", "${chip_root}/src/system", + "${chip_root}/src/trace", ] } diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index 90a0326d5a3cbe..15df65fa573855 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -225,6 +226,7 @@ CHIP_ERROR CASESession::EstablishSession(const Transport::PeerAddress peerAddres uint16_t localSessionId, ExchangeContext * exchangeCtxt, SessionEstablishmentDelegate * delegate, Optional mrpConfig) { + TRACE_EVENT_SCOPE("EstablishSession", "CASESession"); CHIP_ERROR err = CHIP_NO_ERROR; // Return early on error here, as we have not initialized any state yet @@ -303,6 +305,7 @@ CHIP_ERROR CASESession::DeriveSecureSession(CryptoContext & session, CryptoConte CHIP_ERROR CASESession::SendSigma1() { + TRACE_EVENT_SCOPE("SendSigma1", "CASESession"); const size_t mrpParamsSize = mLocalMRPConfig.HasValue() ? TLV::EstimateStructOverhead(sizeof(uint16_t), sizeof(uint16_t)) : 0; size_t data_len = TLV::EstimateStructOverhead(kSigmaParamRandomNumberSize, // initiatorRandom sizeof(uint16_t), // initiatorSessionId, @@ -385,6 +388,7 @@ CHIP_ERROR CASESession::SendSigma1() CHIP_ERROR CASESession::HandleSigma1_and_SendSigma2(System::PacketBufferHandle && msg) { + TRACE_EVENT_SCOPE("HandleSigma1_and_SendSigma2", "CASESession"); ReturnErrorOnFailure(HandleSigma1(std::move(msg))); return CHIP_NO_ERROR; @@ -392,6 +396,7 @@ CHIP_ERROR CASESession::HandleSigma1_and_SendSigma2(System::PacketBufferHandle & CHIP_ERROR CASESession::HandleSigma1(System::PacketBufferHandle && msg) { + TRACE_EVENT_SCOPE("HandleSigma1", "CASESession"); CHIP_ERROR err = CHIP_NO_ERROR; System::PacketBufferTLVReader tlvReader; @@ -469,6 +474,7 @@ CHIP_ERROR CASESession::HandleSigma1(System::PacketBufferHandle && msg) CHIP_ERROR CASESession::SendSigma2Resume(const ByteSpan & initiatorRandom) { + TRACE_EVENT_SCOPE("SendSigma2Resume", "CASESession"); const size_t mrpParamsSize = mLocalMRPConfig.HasValue() ? TLV::EstimateStructOverhead(sizeof(uint16_t), sizeof(uint16_t)) : 0; size_t max_sigma2_resume_data_len = TLV::EstimateStructOverhead(kCASEResumptionIDSize, CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES, sizeof(uint16_t), mrpParamsSize); @@ -519,6 +525,7 @@ CHIP_ERROR CASESession::SendSigma2Resume(const ByteSpan & initiatorRandom) CHIP_ERROR CASESession::SendSigma2() { + TRACE_EVENT_SCOPE("SendSigma2", "CASESession"); VerifyOrReturnError(mFabricInfo != nullptr, CHIP_ERROR_INCORRECT_STATE); ByteSpan icaCert; @@ -649,6 +656,7 @@ CHIP_ERROR CASESession::SendSigma2() CHIP_ERROR CASESession::HandleSigma2Resume(System::PacketBufferHandle && msg) { + TRACE_EVENT_SCOPE("HandleSigma2Resume", "CASESession"); CHIP_ERROR err = CHIP_NO_ERROR; System::PacketBufferTLVReader tlvReader; TLV::TLVType containerType = TLV::kTLVType_Structure; @@ -715,6 +723,7 @@ CHIP_ERROR CASESession::HandleSigma2Resume(System::PacketBufferHandle && msg) CHIP_ERROR CASESession::HandleSigma2_and_SendSigma3(System::PacketBufferHandle && msg) { + TRACE_EVENT_SCOPE("HandleSigma2_and_SendSigma3", "CASESession"); ReturnErrorOnFailure(HandleSigma2(std::move(msg))); ReturnErrorOnFailure(SendSigma3()); @@ -723,6 +732,7 @@ CHIP_ERROR CASESession::HandleSigma2_and_SendSigma3(System::PacketBufferHandle & CHIP_ERROR CASESession::HandleSigma2(System::PacketBufferHandle && msg) { + TRACE_EVENT_SCOPE("HandleSigma2", "CASESession"); CHIP_ERROR err = CHIP_NO_ERROR; System::PacketBufferTLVReader tlvReader; TLV::TLVReader decryptedDataTlvReader; @@ -876,6 +886,7 @@ CHIP_ERROR CASESession::HandleSigma2(System::PacketBufferHandle && msg) CHIP_ERROR CASESession::SendSigma3() { + TRACE_EVENT_SCOPE("SendSigma3", "CASESession"); CHIP_ERROR err = CHIP_NO_ERROR; MutableByteSpan messageDigestSpan(mMessageDigest); @@ -1010,6 +1021,7 @@ CHIP_ERROR CASESession::SendSigma3() CHIP_ERROR CASESession::HandleSigma3(System::PacketBufferHandle && msg) { + TRACE_EVENT_SCOPE("HandleSigma3", "CASESession"); CHIP_ERROR err = CHIP_NO_ERROR; MutableByteSpan messageDigestSpan(mMessageDigest); System::PacketBufferTLVReader tlvReader; diff --git a/src/protocols/secure_channel/PASESession.cpp b/src/protocols/secure_channel/PASESession.cpp index 3f1d29cadc146e..260dc47e8d7990 100644 --- a/src/protocols/secure_channel/PASESession.cpp +++ b/src/protocols/secure_channel/PASESession.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include namespace chip { @@ -218,6 +219,7 @@ CHIP_ERROR PASESession::Init(uint16_t mySessionId, uint32_t setupCode, SessionEs CHIP_ERROR PASESession::ComputePASEVerifier(uint32_t setUpPINCode, uint32_t pbkdf2IterCount, const ByteSpan & salt, PASEVerifier & verifier) { + TRACE_EVENT_SCOPE("ComputePASEVerifier", "PASESession"); ReturnErrorCodeIf(salt.empty(), CHIP_ERROR_INVALID_ARGUMENT); ReturnErrorCodeIf(salt.data() == nullptr, CHIP_ERROR_INVALID_ARGUMENT); ReturnErrorCodeIf(setUpPINCode >= (1 << kSetupPINCodeFieldLengthInBits), CHIP_ERROR_INVALID_ARGUMENT); @@ -246,6 +248,7 @@ CHIP_ERROR PASESession::GeneratePASEVerifier(PASEVerifier & verifier, uint32_t p CHIP_ERROR PASESession::SetupSpake2p(uint32_t pbkdf2IterCount, const ByteSpan & salt) { + TRACE_EVENT_SCOPE("SetupSpake2p", "PASESession"); uint8_t context[kSHA256_Hash_Length] = { 0, }; @@ -329,6 +332,7 @@ CHIP_ERROR PASESession::Pair(const Transport::PeerAddress peerAddress, uint32_t Optional mrpConfig, Messaging::ExchangeContext * exchangeCtxt, SessionEstablishmentDelegate * delegate) { + TRACE_EVENT_SCOPE("Pair", "PASESession"); ReturnErrorCodeIf(exchangeCtxt == nullptr, CHIP_ERROR_INVALID_ARGUMENT); CHIP_ERROR err = Init(mySessionId, peerSetUpPINCode, delegate); SuccessOrExit(err); @@ -379,6 +383,7 @@ CHIP_ERROR PASESession::DeriveSecureSession(CryptoContext & session, CryptoConte CHIP_ERROR PASESession::SendPBKDFParamRequest() { + TRACE_EVENT_SCOPE("SendPBKDFParamRequest", "PASESession"); ReturnErrorOnFailure(DRBG_get_bytes(mPBKDFLocalRandomData, sizeof(mPBKDFLocalRandomData))); const size_t mrpParamsSize = mLocalMRPConfig.HasValue() ? TLV::EstimateStructOverhead(sizeof(uint16_t), sizeof(uint16_t)) : 0; @@ -424,6 +429,7 @@ CHIP_ERROR PASESession::SendPBKDFParamRequest() CHIP_ERROR PASESession::HandlePBKDFParamRequest(System::PacketBufferHandle && msg) { + TRACE_EVENT_SCOPE("HandlePBKDFParamRequest", "PASESession"); CHIP_ERROR err = CHIP_NO_ERROR; System::PacketBufferTLVReader tlvReader; @@ -483,6 +489,7 @@ CHIP_ERROR PASESession::HandlePBKDFParamRequest(System::PacketBufferHandle && ms CHIP_ERROR PASESession::SendPBKDFParamResponse(ByteSpan initiatorRandom, bool initiatorHasPBKDFParams) { + TRACE_EVENT_SCOPE("SendPBKDFParamResponse", "PASESession"); ReturnErrorOnFailure(DRBG_get_bytes(mPBKDFLocalRandomData, sizeof(mPBKDFLocalRandomData))); const size_t mrpParamsSize = mLocalMRPConfig.HasValue() ? TLV::EstimateStructOverhead(sizeof(uint16_t), sizeof(uint16_t)) : 0; @@ -543,7 +550,7 @@ CHIP_ERROR PASESession::SendPBKDFParamResponse(ByteSpan initiatorRandom, bool in CHIP_ERROR PASESession::HandlePBKDFParamResponse(System::PacketBufferHandle && msg) { - + TRACE_EVENT_SCOPE("HandlePBKDFParamResponse", "PASESession"); CHIP_ERROR err = CHIP_NO_ERROR; System::PacketBufferTLVReader tlvReader; @@ -633,6 +640,7 @@ CHIP_ERROR PASESession::HandlePBKDFParamResponse(System::PacketBufferHandle && m CHIP_ERROR PASESession::SendMsg1() { + TRACE_EVENT_SCOPE("SendMsg1", "PASESession"); const size_t max_msg_len = TLV::EstimateStructOverhead(kMAX_Point_Length); System::PacketBufferHandle msg = System::PacketBufferHandle::New(max_msg_len); VerifyOrReturnError(!msg.IsNull(), CHIP_ERROR_NO_MEMORY); @@ -667,6 +675,7 @@ CHIP_ERROR PASESession::SendMsg1() CHIP_ERROR PASESession::HandleMsg1_and_SendMsg2(System::PacketBufferHandle && msg1) { + TRACE_EVENT_SCOPE("HandleMsg1_and_SendMsg2", "PASESession"); CHIP_ERROR err = CHIP_NO_ERROR; uint8_t Y[kMAX_Point_Length]; @@ -736,6 +745,7 @@ CHIP_ERROR PASESession::HandleMsg1_and_SendMsg2(System::PacketBufferHandle && ms CHIP_ERROR PASESession::HandleMsg2_and_SendMsg3(System::PacketBufferHandle && msg2) { + TRACE_EVENT_SCOPE("HandleMsg2_and_SendMsg3", "PASESession"); CHIP_ERROR err = CHIP_NO_ERROR; uint8_t verifier[kMAX_Hash_Length]; @@ -811,6 +821,7 @@ CHIP_ERROR PASESession::HandleMsg2_and_SendMsg3(System::PacketBufferHandle && ms CHIP_ERROR PASESession::HandleMsg3(System::PacketBufferHandle && msg) { + TRACE_EVENT_SCOPE("HandleMsg3", "PASESession"); CHIP_ERROR err = CHIP_NO_ERROR; ChipLogDetail(SecureChannel, "Received spake2p msg3"); diff --git a/src/trace/BUILD.gn b/src/trace/BUILD.gn new file mode 100644 index 00000000000000..546107ad45ce67 --- /dev/null +++ b/src/trace/BUILD.gn @@ -0,0 +1,28 @@ +# Copyright (c) 2022 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/pigweed.gni") + +declare_args() { + chip_build_pw_trace_lib = false +} + +source_set("trace") { + sources = [ "trace.h" ] + + if (chip_build_pw_trace_lib) { + cflags = [ "-DPW_TRACE_BACKEND_SET=1" ] + public_deps = [ "${dir_pigweed}/pw_trace" ] + } +} diff --git a/src/trace/trace.h b/src/trace/trace.h new file mode 100644 index 00000000000000..f6e23134d0191a --- /dev/null +++ b/src/trace/trace.h @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#if defined(PW_TRACE_BACKEND_SET) && PW_TRACE_BACKEND_SET + +#include + +#define TRACE_EVENT_INSTANT(...) PW_TRACE_INSTANT(__VA_ARGS__) +#define TRACE_EVENT_INSTANT_FLAG(...) PW_TRACE_INSTANT_FLAG(__VA_ARGS__) +#define TRACE_EVENT_INSTANT_DATA(...) PW_TRACE_INSTANT_DATA(__VA_ARGS__) +#define TRACE_EVENT_INSTANT_DATA_FLAG(...) PW_TRACE_INSTANT_DATA_FLAG(__VA_ARGS__) +#define TRACE_EVENT_START(...) PW_TRACE_START(__VA_ARGS__) +#define TRACE_EVENT_START_FLAG(...) PW_TRACE_START_FLAG(__VA_ARGS__) +#define TRACE_EVENT_START_DATA(...) PW_TRACE_START_DATA(__VA_ARGS__) +#define TRACE_EVENT_START_DATA_FLAG(...) PW_TRACE_START_DATA_FLAG(__VA_ARGS__) +#define TRACE_EVENT_END(...) PW_TRACE_END(__VA_ARGS__) +#define TRACE_EVENT_END_FLAG(...) PW_TRACE_END_FLAG(__VA_ARGS__) +#define TRACE_EVENT_END_DATA(...) PW_TRACE_END_DATA(__VA_ARGS__) +#define TRACE_EVENT_END_DATA_FLAG(...) PW_TRACE_END_DATA_FLAG(__VA_ARGS__) +#define TRACE_EVENT_SCOPE(...) PW_TRACE_SCOPE(__VA_ARGS__) +#define TRACE_EVENT_SCOPE_FLAG(...) PW_TRACE_SCOPE_FLAG(__VA_ARGS__) +#define TRACE_EVENT_FUNCTION(...) PW_TRACE_FUNCTION(__VA_ARGS__) +#define TRACE_EVENT_FUNCTION_FLAG(...) PW_TRACE_FUNCTION_FLAG(__VA_ARGS__) + +#else // defined(PW_TRACE_BACKEND_SET) && PW_TRACE_BACKEND_SET + +#define _TRACE_EVENT_DISABLE(...) \ + do \ + { \ + } while (0) + +#define TRACE_EVENT_INSTANT(...) _TRACE_EVENT_DISABLE(__VA_ARGS__) +#define TRACE_EVENT_INSTANT_FLAG(...) _TRACE_EVENT_DISABLE(__VA_ARGS__) +#define TRACE_EVENT_INSTANT_DATA(...) _TRACE_EVENT_DISABLE(__VA_ARGS__) +#define TRACE_EVENT_INSTANT_DATA_FLAG(...) _TRACE_EVENT_DISABLE(__VA_ARGS__) +#define TRACE_EVENT_START(...) _TRACE_EVENT_DISABLE(__VA_ARGS__) +#define TRACE_EVENT_START_FLAG(...) _TRACE_EVENT_DISABLE(__VA_ARGS__) +#define TRACE_EVENT_START_DATA(...) _TRACE_EVENT_DISABLE(__VA_ARGS__) +#define TRACE_EVENT_START_DATA_FLAG(...) _TRACE_EVENT_DISABLE(__VA_ARGS__) +#define TRACE_EVENT_END(...) _TRACE_EVENT_DISABLE(__VA_ARGS__) +#define TRACE_EVENT_END_FLAG(...) _TRACE_EVENT_DISABLE(__VA_ARGS__) +#define TRACE_EVENT_END_DATA(...) _TRACE_EVENT_DISABLE(__VA_ARGS__) +#define TRACE_EVENT_END_DATA_FLAG(...) _TRACE_EVENT_DISABLE(__VA_ARGS__) +#define TRACE_EVENT_SCOPE(...) _TRACE_EVENT_DISABLE(__VA_ARGS__) +#define TRACE_EVENT_SCOPE_FLAG(...) _TRACE_EVENT_DISABLE(__VA_ARGS__) +#define TRACE_EVENT_FUNCTION(...) _TRACE_EVENT_DISABLE(__VA_ARGS__) +#define TRACE_EVENT_FUNCTION_FLAG(...) _TRACE_EVENT_DISABLE(__VA_ARGS__) + +#endif // defined(PW_TRACE_BACKEND_SET) && PW_TRACE_BACKEND_SET From 0414c8f6d8396b5d04f96712aedff266a6e694b1 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 13 Jan 2022 15:03:36 -0500 Subject: [PATCH 003/124] Ensure all fields in cluster-objects structs are default-initialized. (#13432) Otherwise we can end up reading random values from un-initialized memory (e.g. if a mandatory command/struct/event field is not sent by the other side). Fixes https://github.com/project-chip/connectedhomeip/issues/10271 --- .../network-commissioning.cpp | 2 - src/app/common/templates/templates.json | 4 + src/app/data-model/DecodableList.h | 6 + .../partials/cluster-objects-field-init.zapt | 17 + .../templates/app/cluster-objects.zapt | 12 +- .../zap-generated/cluster-objects.h | 4725 +++++++++-------- 6 files changed, 2417 insertions(+), 2349 deletions(-) create mode 100644 src/app/zap-templates/partials/cluster-objects-field-init.zapt diff --git a/src/app/clusters/network-commissioning/network-commissioning.cpp b/src/app/clusters/network-commissioning/network-commissioning.cpp index 50b276aa388d67..572aa2e2a789ff 100644 --- a/src/app/clusters/network-commissioning/network-commissioning.cpp +++ b/src/app/clusters/network-commissioning/network-commissioning.cpp @@ -262,8 +262,6 @@ void Instance::HandleRemoveNetwork(HandlerContext & ctx, const Commands::RemoveN void Instance::HandleConnectNetwork(HandlerContext & ctx, const Commands::ConnectNetwork::DecodableType & req) { - Commands::ConnectNetworkResponse::Type response; - mAsyncCommandHandle = app::CommandHandler::Handle(&ctx.mCommandHandler); mpWirelessDriver->ConnectNetwork(req.networkID, this); } diff --git a/src/app/common/templates/templates.json b/src/app/common/templates/templates.json index a91a71c88b3af1..366ef0457fff13 100644 --- a/src/app/common/templates/templates.json +++ b/src/app/common/templates/templates.json @@ -17,6 +17,10 @@ { "name": "cluster_objects_struct", "path": "../../zap-templates/partials/cluster-objects-struct.zapt" + }, + { + "name": "cluster_objects_field_init", + "path": "../../zap-templates/partials/cluster-objects-field-init.zapt" } ], "templates": [ diff --git a/src/app/data-model/DecodableList.h b/src/app/data-model/DecodableList.h index ac1075c9ab594f..064a55a0ca6176 100644 --- a/src/app/data-model/DecodableList.h +++ b/src/app/data-model/DecodableList.h @@ -38,6 +38,12 @@ template class DecodableList { public: + DecodableList() + { + // Init to an empty list. + mReader.Init(nullptr, 0); + } + /* * @brief * diff --git a/src/app/zap-templates/partials/cluster-objects-field-init.zapt b/src/app/zap-templates/partials/cluster-objects-field-init.zapt new file mode 100644 index 00000000000000..b6729e7eac3d7e --- /dev/null +++ b/src/app/zap-templates/partials/cluster-objects-field-init.zapt @@ -0,0 +1,17 @@ +{{! For now, just initialize fields to type defaults. Longer-term, we + may want to use spec-defined default values here. }} +{{#unless isOptional}} {{! Optionals inited by constructor }} + {{~#unless isNullable}} {{! Nullables inited by constructor }} + {{~#unless isArray}} {{! DataModel lists inited by constructor }} + {{~#unless entryType}} {{! DataModel lists (for attributes) inited by constructor }} + {{~#unless (isString type)}} {{! Strings are Spans, inited by constructor }} + {{~#if_is_struct type}} + {{! Structs have their own initializers }} + {{~else~}} + = static_cast<{{zapTypeToEncodableClusterObjectType type}}>(0) + {{~/if_is_struct}} + {{~/unless}} + {{~/unless}} + {{~/unless}} + {{~/unless}} +{{~/unless}} \ No newline at end of file diff --git a/src/app/zap-templates/templates/app/cluster-objects.zapt b/src/app/zap-templates/templates/app/cluster-objects.zapt index 762649454499e3..d6684e20ddb768 100644 --- a/src/app/zap-templates/templates/app/cluster-objects.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects.zapt @@ -111,7 +111,7 @@ public: static constexpr ClusterId GetClusterId() { return Clusters::{{asUpperCamelCase parent.name}}::Id; } {{#zcl_command_arguments}} - {{zapTypeToEncodableClusterObjectType type}} {{asLowerCamelCase label}}; + {{zapTypeToEncodableClusterObjectType type}} {{asLowerCamelCase label}}{{> cluster_objects_field_init}}; {{/zcl_command_arguments}} CHIP_ERROR Encode(TLV::TLVWriter &writer, TLV::Tag tag) const; @@ -132,7 +132,7 @@ public: static constexpr ClusterId GetClusterId() { return Clusters::{{asUpperCamelCase parent.name}}::Id; } {{#zcl_command_arguments}} - {{zapTypeToDecodableClusterObjectType type}} {{asLowerCamelCase label}}; + {{zapTypeToDecodableClusterObjectType type}} {{asLowerCamelCase label}}{{> cluster_objects_field_init}}; {{/zcl_command_arguments}} CHIP_ERROR Decode(TLV::TLVReader &reader); }; @@ -174,7 +174,9 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader &reader, const ConcreteAttributePath &path); {{#zcl_attributes_server}} - Attributes::{{asUpperCamelCase label}}::TypeInfo::DecodableType {{asLowerCamelCase label}}; + {{! isOptional=false because optional attributes don't get represented + as Optional types here. }} + Attributes::{{asUpperCamelCase label}}::TypeInfo::DecodableType {{asLowerCamelCase label}}{{> cluster_objects_field_init isOptional=false}}; {{/zcl_attributes_server}} }; }; @@ -201,7 +203,7 @@ public: static constexpr ClusterId GetClusterId() { return Clusters::{{asUpperCamelCase parent.name}}::Id; } {{#zcl_event_fields}} - {{zapTypeToEncodableClusterObjectType type}} {{asLowerCamelCase name}}; + {{zapTypeToEncodableClusterObjectType type}} {{asLowerCamelCase name}}{{> cluster_objects_field_init}}; {{/zcl_event_fields}} CHIP_ERROR Encode(TLV::TLVWriter &writer, TLV::Tag tag) const; @@ -214,7 +216,7 @@ public: static constexpr ClusterId GetClusterId() { return Clusters::{{asUpperCamelCase parent.name}}::Id; } {{#zcl_event_fields}} - {{zapTypeToDecodableClusterObjectType type}} {{asLowerCamelCase name}}; + {{zapTypeToDecodableClusterObjectType type}} {{asLowerCamelCase name}}{{> cluster_objects_field_init}}; {{/zcl_event_fields}} CHIP_ERROR Decode(TLV::TLVReader &reader); 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 21153d7c5137cf..eac0efeb0fa85b 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 @@ -796,66 +796,68 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MainsVoltage::TypeInfo::DecodableType mainsVoltage; - Attributes::MainsFrequency::TypeInfo::DecodableType mainsFrequency; - Attributes::MainsAlarmMask::TypeInfo::DecodableType mainsAlarmMask; - Attributes::MainsVoltageMinThreshold::TypeInfo::DecodableType mainsVoltageMinThreshold; - Attributes::MainsVoltageMaxThreshold::TypeInfo::DecodableType mainsVoltageMaxThreshold; - Attributes::MainsVoltageDwellTrip::TypeInfo::DecodableType mainsVoltageDwellTrip; - Attributes::BatteryVoltage::TypeInfo::DecodableType batteryVoltage; - Attributes::BatteryPercentageRemaining::TypeInfo::DecodableType batteryPercentageRemaining; + Attributes::MainsVoltage::TypeInfo::DecodableType mainsVoltage = static_cast(0); + Attributes::MainsFrequency::TypeInfo::DecodableType mainsFrequency = static_cast(0); + Attributes::MainsAlarmMask::TypeInfo::DecodableType mainsAlarmMask = static_cast(0); + Attributes::MainsVoltageMinThreshold::TypeInfo::DecodableType mainsVoltageMinThreshold = static_cast(0); + Attributes::MainsVoltageMaxThreshold::TypeInfo::DecodableType mainsVoltageMaxThreshold = static_cast(0); + Attributes::MainsVoltageDwellTrip::TypeInfo::DecodableType mainsVoltageDwellTrip = static_cast(0); + Attributes::BatteryVoltage::TypeInfo::DecodableType batteryVoltage = static_cast(0); + Attributes::BatteryPercentageRemaining::TypeInfo::DecodableType batteryPercentageRemaining = static_cast(0); Attributes::BatteryManufacturer::TypeInfo::DecodableType batteryManufacturer; - Attributes::BatterySize::TypeInfo::DecodableType batterySize; - Attributes::BatteryAhrRating::TypeInfo::DecodableType batteryAhrRating; - Attributes::BatteryQuantity::TypeInfo::DecodableType batteryQuantity; - Attributes::BatteryRatedVoltage::TypeInfo::DecodableType batteryRatedVoltage; - Attributes::BatteryAlarmMask::TypeInfo::DecodableType batteryAlarmMask; - Attributes::BatteryVoltageMinThreshold::TypeInfo::DecodableType batteryVoltageMinThreshold; - Attributes::BatteryVoltageThreshold1::TypeInfo::DecodableType batteryVoltageThreshold1; - Attributes::BatteryVoltageThreshold2::TypeInfo::DecodableType batteryVoltageThreshold2; - Attributes::BatteryVoltageThreshold3::TypeInfo::DecodableType batteryVoltageThreshold3; - Attributes::BatteryPercentageMinThreshold::TypeInfo::DecodableType batteryPercentageMinThreshold; - Attributes::BatteryPercentageThreshold1::TypeInfo::DecodableType batteryPercentageThreshold1; - Attributes::BatteryPercentageThreshold2::TypeInfo::DecodableType batteryPercentageThreshold2; - Attributes::BatteryPercentageThreshold3::TypeInfo::DecodableType batteryPercentageThreshold3; - Attributes::BatteryAlarmState::TypeInfo::DecodableType batteryAlarmState; - Attributes::Battery2Voltage::TypeInfo::DecodableType battery2Voltage; - Attributes::Battery2PercentageRemaining::TypeInfo::DecodableType battery2PercentageRemaining; + Attributes::BatterySize::TypeInfo::DecodableType batterySize = static_cast(0); + Attributes::BatteryAhrRating::TypeInfo::DecodableType batteryAhrRating = static_cast(0); + Attributes::BatteryQuantity::TypeInfo::DecodableType batteryQuantity = static_cast(0); + Attributes::BatteryRatedVoltage::TypeInfo::DecodableType batteryRatedVoltage = static_cast(0); + Attributes::BatteryAlarmMask::TypeInfo::DecodableType batteryAlarmMask = static_cast(0); + Attributes::BatteryVoltageMinThreshold::TypeInfo::DecodableType batteryVoltageMinThreshold = static_cast(0); + Attributes::BatteryVoltageThreshold1::TypeInfo::DecodableType batteryVoltageThreshold1 = static_cast(0); + Attributes::BatteryVoltageThreshold2::TypeInfo::DecodableType batteryVoltageThreshold2 = static_cast(0); + Attributes::BatteryVoltageThreshold3::TypeInfo::DecodableType batteryVoltageThreshold3 = static_cast(0); + Attributes::BatteryPercentageMinThreshold::TypeInfo::DecodableType batteryPercentageMinThreshold = static_cast(0); + Attributes::BatteryPercentageThreshold1::TypeInfo::DecodableType batteryPercentageThreshold1 = static_cast(0); + Attributes::BatteryPercentageThreshold2::TypeInfo::DecodableType batteryPercentageThreshold2 = static_cast(0); + Attributes::BatteryPercentageThreshold3::TypeInfo::DecodableType batteryPercentageThreshold3 = static_cast(0); + Attributes::BatteryAlarmState::TypeInfo::DecodableType batteryAlarmState = static_cast(0); + Attributes::Battery2Voltage::TypeInfo::DecodableType battery2Voltage = static_cast(0); + Attributes::Battery2PercentageRemaining::TypeInfo::DecodableType battery2PercentageRemaining = static_cast(0); Attributes::Battery2Manufacturer::TypeInfo::DecodableType battery2Manufacturer; - Attributes::Battery2Size::TypeInfo::DecodableType battery2Size; - Attributes::Battery2AhrRating::TypeInfo::DecodableType battery2AhrRating; - Attributes::Battery2Quantity::TypeInfo::DecodableType battery2Quantity; - Attributes::Battery2RatedVoltage::TypeInfo::DecodableType battery2RatedVoltage; - Attributes::Battery2AlarmMask::TypeInfo::DecodableType battery2AlarmMask; - Attributes::Battery2VoltageMinThreshold::TypeInfo::DecodableType battery2VoltageMinThreshold; - Attributes::Battery2VoltageThreshold1::TypeInfo::DecodableType battery2VoltageThreshold1; - Attributes::Battery2VoltageThreshold2::TypeInfo::DecodableType battery2VoltageThreshold2; - Attributes::Battery2VoltageThreshold3::TypeInfo::DecodableType battery2VoltageThreshold3; - Attributes::Battery2PercentageMinThreshold::TypeInfo::DecodableType battery2PercentageMinThreshold; - Attributes::Battery2PercentageThreshold1::TypeInfo::DecodableType battery2PercentageThreshold1; - Attributes::Battery2PercentageThreshold2::TypeInfo::DecodableType battery2PercentageThreshold2; - Attributes::Battery2PercentageThreshold3::TypeInfo::DecodableType battery2PercentageThreshold3; - Attributes::Battery2AlarmState::TypeInfo::DecodableType battery2AlarmState; - Attributes::Battery3Voltage::TypeInfo::DecodableType battery3Voltage; - Attributes::Battery3PercentageRemaining::TypeInfo::DecodableType battery3PercentageRemaining; + Attributes::Battery2Size::TypeInfo::DecodableType battery2Size = static_cast(0); + Attributes::Battery2AhrRating::TypeInfo::DecodableType battery2AhrRating = static_cast(0); + Attributes::Battery2Quantity::TypeInfo::DecodableType battery2Quantity = static_cast(0); + Attributes::Battery2RatedVoltage::TypeInfo::DecodableType battery2RatedVoltage = static_cast(0); + Attributes::Battery2AlarmMask::TypeInfo::DecodableType battery2AlarmMask = static_cast(0); + Attributes::Battery2VoltageMinThreshold::TypeInfo::DecodableType battery2VoltageMinThreshold = static_cast(0); + Attributes::Battery2VoltageThreshold1::TypeInfo::DecodableType battery2VoltageThreshold1 = static_cast(0); + Attributes::Battery2VoltageThreshold2::TypeInfo::DecodableType battery2VoltageThreshold2 = static_cast(0); + Attributes::Battery2VoltageThreshold3::TypeInfo::DecodableType battery2VoltageThreshold3 = static_cast(0); + Attributes::Battery2PercentageMinThreshold::TypeInfo::DecodableType battery2PercentageMinThreshold = + static_cast(0); + Attributes::Battery2PercentageThreshold1::TypeInfo::DecodableType battery2PercentageThreshold1 = static_cast(0); + Attributes::Battery2PercentageThreshold2::TypeInfo::DecodableType battery2PercentageThreshold2 = static_cast(0); + Attributes::Battery2PercentageThreshold3::TypeInfo::DecodableType battery2PercentageThreshold3 = static_cast(0); + Attributes::Battery2AlarmState::TypeInfo::DecodableType battery2AlarmState = static_cast(0); + Attributes::Battery3Voltage::TypeInfo::DecodableType battery3Voltage = static_cast(0); + Attributes::Battery3PercentageRemaining::TypeInfo::DecodableType battery3PercentageRemaining = static_cast(0); Attributes::Battery3Manufacturer::TypeInfo::DecodableType battery3Manufacturer; - Attributes::Battery3Size::TypeInfo::DecodableType battery3Size; - Attributes::Battery3AhrRating::TypeInfo::DecodableType battery3AhrRating; - Attributes::Battery3Quantity::TypeInfo::DecodableType battery3Quantity; - Attributes::Battery3RatedVoltage::TypeInfo::DecodableType battery3RatedVoltage; - Attributes::Battery3AlarmMask::TypeInfo::DecodableType battery3AlarmMask; - Attributes::Battery3VoltageMinThreshold::TypeInfo::DecodableType battery3VoltageMinThreshold; - Attributes::Battery3VoltageThreshold1::TypeInfo::DecodableType battery3VoltageThreshold1; - Attributes::Battery3VoltageThreshold2::TypeInfo::DecodableType battery3VoltageThreshold2; - Attributes::Battery3VoltageThreshold3::TypeInfo::DecodableType battery3VoltageThreshold3; - Attributes::Battery3PercentageMinThreshold::TypeInfo::DecodableType battery3PercentageMinThreshold; - Attributes::Battery3PercentageThreshold1::TypeInfo::DecodableType battery3PercentageThreshold1; - Attributes::Battery3PercentageThreshold2::TypeInfo::DecodableType battery3PercentageThreshold2; - Attributes::Battery3PercentageThreshold3::TypeInfo::DecodableType battery3PercentageThreshold3; - Attributes::Battery3AlarmState::TypeInfo::DecodableType battery3AlarmState; + Attributes::Battery3Size::TypeInfo::DecodableType battery3Size = static_cast(0); + Attributes::Battery3AhrRating::TypeInfo::DecodableType battery3AhrRating = static_cast(0); + Attributes::Battery3Quantity::TypeInfo::DecodableType battery3Quantity = static_cast(0); + Attributes::Battery3RatedVoltage::TypeInfo::DecodableType battery3RatedVoltage = static_cast(0); + Attributes::Battery3AlarmMask::TypeInfo::DecodableType battery3AlarmMask = static_cast(0); + Attributes::Battery3VoltageMinThreshold::TypeInfo::DecodableType battery3VoltageMinThreshold = static_cast(0); + Attributes::Battery3VoltageThreshold1::TypeInfo::DecodableType battery3VoltageThreshold1 = static_cast(0); + Attributes::Battery3VoltageThreshold2::TypeInfo::DecodableType battery3VoltageThreshold2 = static_cast(0); + Attributes::Battery3VoltageThreshold3::TypeInfo::DecodableType battery3VoltageThreshold3 = static_cast(0); + Attributes::Battery3PercentageMinThreshold::TypeInfo::DecodableType battery3PercentageMinThreshold = + static_cast(0); + Attributes::Battery3PercentageThreshold1::TypeInfo::DecodableType battery3PercentageThreshold1 = static_cast(0); + Attributes::Battery3PercentageThreshold2::TypeInfo::DecodableType battery3PercentageThreshold2 = static_cast(0); + Attributes::Battery3PercentageThreshold3::TypeInfo::DecodableType battery3PercentageThreshold3 = static_cast(0); + Attributes::Battery3AlarmState::TypeInfo::DecodableType battery3AlarmState = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -1017,18 +1019,18 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::CurrentTemperature::TypeInfo::DecodableType currentTemperature; - Attributes::MinTempExperienced::TypeInfo::DecodableType minTempExperienced; - Attributes::MaxTempExperienced::TypeInfo::DecodableType maxTempExperienced; - Attributes::OverTempTotalDwell::TypeInfo::DecodableType overTempTotalDwell; - Attributes::DeviceTempAlarmMask::TypeInfo::DecodableType deviceTempAlarmMask; - Attributes::LowTempThreshold::TypeInfo::DecodableType lowTempThreshold; - Attributes::HighTempThreshold::TypeInfo::DecodableType highTempThreshold; - Attributes::LowTempDwellTripPoint::TypeInfo::DecodableType lowTempDwellTripPoint; - Attributes::HighTempDwellTripPoint::TypeInfo::DecodableType highTempDwellTripPoint; + Attributes::CurrentTemperature::TypeInfo::DecodableType currentTemperature = static_cast(0); + Attributes::MinTempExperienced::TypeInfo::DecodableType minTempExperienced = static_cast(0); + Attributes::MaxTempExperienced::TypeInfo::DecodableType maxTempExperienced = static_cast(0); + Attributes::OverTempTotalDwell::TypeInfo::DecodableType overTempTotalDwell = static_cast(0); + Attributes::DeviceTempAlarmMask::TypeInfo::DecodableType deviceTempAlarmMask = static_cast(0); + Attributes::LowTempThreshold::TypeInfo::DecodableType lowTempThreshold = static_cast(0); + Attributes::HighTempThreshold::TypeInfo::DecodableType highTempThreshold = static_cast(0); + Attributes::LowTempDwellTripPoint::TypeInfo::DecodableType lowTempDwellTripPoint = static_cast(0); + Attributes::HighTempDwellTripPoint::TypeInfo::DecodableType highTempDwellTripPoint = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -1117,7 +1119,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Identify::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Identify::Id; } - uint16_t identifyTime; + uint16_t identifyTime = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1132,7 +1134,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::Identify::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Identify::Id; } - uint16_t identifyTime; + uint16_t identifyTime = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Identify @@ -1149,7 +1151,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::IdentifyQueryResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Identify::Id; } - uint16_t timeout; + uint16_t timeout = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1164,7 +1166,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::IdentifyQueryResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Identify::Id; } - uint16_t timeout; + uint16_t timeout = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace IdentifyQueryResponse @@ -1210,8 +1212,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::TriggerEffect::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Identify::Id; } - IdentifyEffectIdentifier effectIdentifier; - IdentifyEffectVariant effectVariant; + IdentifyEffectIdentifier effectIdentifier = static_cast(0); + IdentifyEffectVariant effectVariant = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1226,8 +1228,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::TriggerEffect::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Identify::Id; } - IdentifyEffectIdentifier effectIdentifier; - IdentifyEffectVariant effectVariant; + IdentifyEffectIdentifier effectIdentifier = static_cast(0); + IdentifyEffectVariant effectVariant = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace TriggerEffect @@ -1304,11 +1306,11 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::IdentifyTime::TypeInfo::DecodableType identifyTime; - Attributes::IdentifyType::TypeInfo::DecodableType identifyType; + Attributes::IdentifyTime::TypeInfo::DecodableType identifyTime = static_cast(0); + Attributes::IdentifyType::TypeInfo::DecodableType identifyType = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -1385,7 +1387,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::AddGroup::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - uint16_t groupId; + uint16_t groupId = static_cast(0); chip::CharSpan groupName; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1401,7 +1403,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::AddGroup::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - uint16_t groupId; + uint16_t groupId = static_cast(0); chip::CharSpan groupName; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -1420,8 +1422,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::AddGroupResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - uint8_t status; - uint16_t groupId; + uint8_t status = static_cast(0); + uint16_t groupId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1436,8 +1438,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::AddGroupResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - uint8_t status; - uint16_t groupId; + uint8_t status = static_cast(0); + uint16_t groupId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace AddGroupResponse @@ -1454,7 +1456,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ViewGroup::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - uint16_t groupId; + uint16_t groupId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1469,7 +1471,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ViewGroup::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - uint16_t groupId; + uint16_t groupId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ViewGroup @@ -1488,8 +1490,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ViewGroupResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - uint8_t status; - uint16_t groupId; + uint8_t status = static_cast(0); + uint16_t groupId = static_cast(0); chip::CharSpan groupName; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1505,8 +1507,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ViewGroupResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - uint8_t status; - uint16_t groupId; + uint8_t status = static_cast(0); + uint16_t groupId = static_cast(0); chip::CharSpan groupName; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -1557,7 +1559,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetGroupMembershipResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - uint8_t capacity; + uint8_t capacity = static_cast(0); DataModel::List groupList; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1573,7 +1575,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetGroupMembershipResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - uint8_t capacity; + uint8_t capacity = static_cast(0); DataModel::DecodableList groupList; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -1591,7 +1593,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::RemoveGroup::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - uint16_t groupId; + uint16_t groupId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1606,7 +1608,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::RemoveGroup::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - uint16_t groupId; + uint16_t groupId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace RemoveGroup @@ -1624,8 +1626,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::RemoveGroupResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - uint8_t status; - uint16_t groupId; + uint8_t status = static_cast(0); + uint16_t groupId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1640,8 +1642,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::RemoveGroupResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - uint8_t status; - uint16_t groupId; + uint8_t status = static_cast(0); + uint16_t groupId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace RemoveGroupResponse @@ -1687,7 +1689,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::AddGroupIfIdentifying::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - uint16_t groupId; + uint16_t groupId = static_cast(0); chip::CharSpan groupName; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1703,7 +1705,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::AddGroupIfIdentifying::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } - uint16_t groupId; + uint16_t groupId = static_cast(0); chip::CharSpan groupName; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -1769,10 +1771,10 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::NameSupport::TypeInfo::DecodableType nameSupport; + Attributes::NameSupport::TypeInfo::DecodableType nameSupport = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -1928,9 +1930,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::AddScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint16_t groupId; - uint8_t sceneId; - uint16_t transitionTime; + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); + uint16_t transitionTime = static_cast(0); chip::CharSpan sceneName; DataModel::List extensionFieldSets; @@ -1947,9 +1949,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::AddScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint16_t groupId; - uint8_t sceneId; - uint16_t transitionTime; + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); + uint16_t transitionTime = static_cast(0); chip::CharSpan sceneName; DataModel::DecodableList extensionFieldSets; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -1970,9 +1972,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::AddSceneResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint8_t status; - uint16_t groupId; - uint8_t sceneId; + uint8_t status = static_cast(0); + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1987,9 +1989,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::AddSceneResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint8_t status; - uint16_t groupId; - uint8_t sceneId; + uint8_t status = static_cast(0); + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace AddSceneResponse @@ -2007,8 +2009,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ViewScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint16_t groupId; - uint8_t sceneId; + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2023,8 +2025,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ViewScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint16_t groupId; - uint8_t sceneId; + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ViewScene @@ -2046,10 +2048,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ViewSceneResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint8_t status; - uint16_t groupId; - uint8_t sceneId; - uint16_t transitionTime; + uint8_t status = static_cast(0); + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); + uint16_t transitionTime = static_cast(0); chip::CharSpan sceneName; DataModel::List extensionFieldSets; @@ -2066,10 +2068,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ViewSceneResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint8_t status; - uint16_t groupId; - uint8_t sceneId; - uint16_t transitionTime; + uint8_t status = static_cast(0); + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); + uint16_t transitionTime = static_cast(0); chip::CharSpan sceneName; DataModel::DecodableList extensionFieldSets; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -2089,8 +2091,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::RemoveScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint16_t groupId; - uint8_t sceneId; + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2105,8 +2107,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::RemoveScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint16_t groupId; - uint8_t sceneId; + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace RemoveScene @@ -2125,9 +2127,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::RemoveSceneResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint8_t status; - uint16_t groupId; - uint8_t sceneId; + uint8_t status = static_cast(0); + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2142,9 +2144,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::RemoveSceneResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint8_t status; - uint16_t groupId; - uint8_t sceneId; + uint8_t status = static_cast(0); + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace RemoveSceneResponse @@ -2161,7 +2163,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::RemoveAllScenes::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint16_t groupId; + uint16_t groupId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2176,7 +2178,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::RemoveAllScenes::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint16_t groupId; + uint16_t groupId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace RemoveAllScenes @@ -2194,8 +2196,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::RemoveAllScenesResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint8_t status; - uint16_t groupId; + uint8_t status = static_cast(0); + uint16_t groupId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2210,8 +2212,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::RemoveAllScenesResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint8_t status; - uint16_t groupId; + uint8_t status = static_cast(0); + uint16_t groupId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace RemoveAllScenesResponse @@ -2229,8 +2231,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StoreScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint16_t groupId; - uint8_t sceneId; + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2245,8 +2247,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StoreScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint16_t groupId; - uint8_t sceneId; + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StoreScene @@ -2265,9 +2267,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StoreSceneResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint8_t status; - uint16_t groupId; - uint8_t sceneId; + uint8_t status = static_cast(0); + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2282,9 +2284,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StoreSceneResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint8_t status; - uint16_t groupId; - uint8_t sceneId; + uint8_t status = static_cast(0); + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StoreSceneResponse @@ -2303,9 +2305,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::RecallScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint16_t groupId; - uint8_t sceneId; - uint16_t transitionTime; + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); + uint16_t transitionTime = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2320,9 +2322,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::RecallScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint16_t groupId; - uint8_t sceneId; - uint16_t transitionTime; + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); + uint16_t transitionTime = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace RecallScene @@ -2339,7 +2341,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetSceneMembership::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint16_t groupId; + uint16_t groupId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2354,7 +2356,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetSceneMembership::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint16_t groupId; + uint16_t groupId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetSceneMembership @@ -2375,10 +2377,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetSceneMembershipResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint8_t status; - uint8_t capacity; - uint16_t groupId; - uint8_t sceneCount; + uint8_t status = static_cast(0); + uint8_t capacity = static_cast(0); + uint16_t groupId = static_cast(0); + uint8_t sceneCount = static_cast(0); DataModel::List sceneList; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2394,10 +2396,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetSceneMembershipResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint8_t status; - uint8_t capacity; - uint16_t groupId; - uint8_t sceneCount; + uint8_t status = static_cast(0); + uint8_t capacity = static_cast(0); + uint16_t groupId = static_cast(0); + uint8_t sceneCount = static_cast(0); DataModel::DecodableList sceneList; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -2419,9 +2421,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnhancedAddScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint16_t groupId; - uint8_t sceneId; - uint16_t transitionTime; + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); + uint16_t transitionTime = static_cast(0); chip::CharSpan sceneName; DataModel::List extensionFieldSets; @@ -2438,9 +2440,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnhancedAddScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint16_t groupId; - uint8_t sceneId; - uint16_t transitionTime; + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); + uint16_t transitionTime = static_cast(0); chip::CharSpan sceneName; DataModel::DecodableList extensionFieldSets; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -2461,9 +2463,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnhancedAddSceneResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint8_t status; - uint16_t groupId; - uint8_t sceneId; + uint8_t status = static_cast(0); + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2478,9 +2480,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnhancedAddSceneResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint8_t status; - uint16_t groupId; - uint8_t sceneId; + uint8_t status = static_cast(0); + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace EnhancedAddSceneResponse @@ -2498,8 +2500,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnhancedViewScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint16_t groupId; - uint8_t sceneId; + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2514,8 +2516,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnhancedViewScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint16_t groupId; - uint8_t sceneId; + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace EnhancedViewScene @@ -2537,10 +2539,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnhancedViewSceneResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint8_t status; - uint16_t groupId; - uint8_t sceneId; - uint16_t transitionTime; + uint8_t status = static_cast(0); + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); + uint16_t transitionTime = static_cast(0); chip::CharSpan sceneName; DataModel::List extensionFieldSets; @@ -2557,10 +2559,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnhancedViewSceneResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint8_t status; - uint16_t groupId; - uint8_t sceneId; - uint16_t transitionTime; + uint8_t status = static_cast(0); + uint16_t groupId = static_cast(0); + uint8_t sceneId = static_cast(0); + uint16_t transitionTime = static_cast(0); chip::CharSpan sceneName; DataModel::DecodableList extensionFieldSets; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -2583,11 +2585,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::CopyScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - chip::BitFlags mode; - uint16_t groupIdFrom; - uint8_t sceneIdFrom; - uint16_t groupIdTo; - uint8_t sceneIdTo; + chip::BitFlags mode = static_cast>(0); + uint16_t groupIdFrom = static_cast(0); + uint8_t sceneIdFrom = static_cast(0); + uint16_t groupIdTo = static_cast(0); + uint8_t sceneIdTo = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2602,11 +2604,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::CopyScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - chip::BitFlags mode; - uint16_t groupIdFrom; - uint8_t sceneIdFrom; - uint16_t groupIdTo; - uint8_t sceneIdTo; + chip::BitFlags mode = static_cast>(0); + uint16_t groupIdFrom = static_cast(0); + uint8_t sceneIdFrom = static_cast(0); + uint16_t groupIdTo = static_cast(0); + uint8_t sceneIdTo = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace CopyScene @@ -2625,9 +2627,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::CopySceneResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint8_t status; - uint16_t groupIdFrom; - uint8_t sceneIdFrom; + uint8_t status = static_cast(0); + uint16_t groupIdFrom = static_cast(0); + uint8_t sceneIdFrom = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2642,9 +2644,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::CopySceneResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint8_t status; - uint16_t groupIdFrom; - uint8_t sceneIdFrom; + uint8_t status = static_cast(0); + uint16_t groupIdFrom = static_cast(0); + uint8_t sceneIdFrom = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace CopySceneResponse @@ -2769,15 +2771,15 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::SceneCount::TypeInfo::DecodableType sceneCount; - Attributes::CurrentScene::TypeInfo::DecodableType currentScene; - Attributes::CurrentGroup::TypeInfo::DecodableType currentGroup; - Attributes::SceneValid::TypeInfo::DecodableType sceneValid; - Attributes::NameSupport::TypeInfo::DecodableType nameSupport; - Attributes::LastConfiguredBy::TypeInfo::DecodableType lastConfiguredBy; + Attributes::SceneCount::TypeInfo::DecodableType sceneCount = static_cast(0); + Attributes::CurrentScene::TypeInfo::DecodableType currentScene = static_cast(0); + Attributes::CurrentGroup::TypeInfo::DecodableType currentGroup = static_cast(0); + Attributes::SceneValid::TypeInfo::DecodableType sceneValid = static_cast(0); + Attributes::NameSupport::TypeInfo::DecodableType nameSupport = static_cast(0); + Attributes::LastConfiguredBy::TypeInfo::DecodableType lastConfiguredBy = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -2960,8 +2962,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::OffWithEffect::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - OnOffEffectIdentifier effectId; - OnOffDelayedAllOffEffectVariant effectVariant; + OnOffEffectIdentifier effectId = static_cast(0); + OnOffDelayedAllOffEffectVariant effectVariant = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -2976,8 +2978,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::OffWithEffect::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - OnOffEffectIdentifier effectId; - OnOffDelayedAllOffEffectVariant effectVariant; + OnOffEffectIdentifier effectId = static_cast(0); + OnOffDelayedAllOffEffectVariant effectVariant = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace OffWithEffect @@ -3024,9 +3026,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::OnWithTimedOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - chip::BitFlags onOffControl; - uint16_t onTime; - uint16_t offWaitTime; + chip::BitFlags onOffControl = static_cast>(0); + uint16_t onTime = static_cast(0); + uint16_t offWaitTime = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -3041,9 +3043,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::OnWithTimedOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - chip::BitFlags onOffControl; - uint16_t onTime; - uint16_t offWaitTime; + chip::BitFlags onOffControl = static_cast>(0); + uint16_t onTime = static_cast(0); + uint16_t offWaitTime = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace OnWithTimedOff @@ -3156,14 +3158,14 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::OnOff::TypeInfo::DecodableType onOff; - Attributes::GlobalSceneControl::TypeInfo::DecodableType globalSceneControl; - Attributes::OnTime::TypeInfo::DecodableType onTime; - Attributes::OffWaitTime::TypeInfo::DecodableType offWaitTime; - Attributes::StartUpOnOff::TypeInfo::DecodableType startUpOnOff; + Attributes::OnOff::TypeInfo::DecodableType onOff = static_cast(0); + Attributes::GlobalSceneControl::TypeInfo::DecodableType globalSceneControl = static_cast(0); + Attributes::OnTime::TypeInfo::DecodableType onTime = static_cast(0); + Attributes::OffWaitTime::TypeInfo::DecodableType offWaitTime = static_cast(0); + Attributes::StartUpOnOff::TypeInfo::DecodableType startUpOnOff = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -3241,11 +3243,11 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::SwitchType::TypeInfo::DecodableType switchType; - Attributes::SwitchActions::TypeInfo::DecodableType switchActions; + Attributes::SwitchType::TypeInfo::DecodableType switchType = static_cast(0); + Attributes::SwitchActions::TypeInfo::DecodableType switchActions = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -3338,10 +3340,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveToLevel::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - uint8_t level; - uint16_t transitionTime; - uint8_t optionMask; - uint8_t optionOverride; + uint8_t level = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionMask = static_cast(0); + uint8_t optionOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -3356,10 +3358,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveToLevel::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - uint8_t level; - uint16_t transitionTime; - uint8_t optionMask; - uint8_t optionOverride; + uint8_t level = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionMask = static_cast(0); + uint8_t optionOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveToLevel @@ -3379,10 +3381,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Move::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - MoveMode moveMode; - uint8_t rate; - uint8_t optionMask; - uint8_t optionOverride; + MoveMode moveMode = static_cast(0); + uint8_t rate = static_cast(0); + uint8_t optionMask = static_cast(0); + uint8_t optionOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -3397,10 +3399,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::Move::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - MoveMode moveMode; - uint8_t rate; - uint8_t optionMask; - uint8_t optionOverride; + MoveMode moveMode = static_cast(0); + uint8_t rate = static_cast(0); + uint8_t optionMask = static_cast(0); + uint8_t optionOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Move @@ -3421,11 +3423,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Step::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - StepMode stepMode; - uint8_t stepSize; - uint16_t transitionTime; - uint8_t optionMask; - uint8_t optionOverride; + StepMode stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionMask = static_cast(0); + uint8_t optionOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -3440,11 +3442,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::Step::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - StepMode stepMode; - uint8_t stepSize; - uint16_t transitionTime; - uint8_t optionMask; - uint8_t optionOverride; + StepMode stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionMask = static_cast(0); + uint8_t optionOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Step @@ -3462,8 +3464,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - uint8_t optionMask; - uint8_t optionOverride; + uint8_t optionMask = static_cast(0); + uint8_t optionOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -3478,8 +3480,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - uint8_t optionMask; - uint8_t optionOverride; + uint8_t optionMask = static_cast(0); + uint8_t optionOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Stop @@ -3497,8 +3499,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveToLevelWithOnOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - uint8_t level; - uint16_t transitionTime; + uint8_t level = static_cast(0); + uint16_t transitionTime = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -3513,8 +3515,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveToLevelWithOnOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - uint8_t level; - uint16_t transitionTime; + uint8_t level = static_cast(0); + uint16_t transitionTime = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveToLevelWithOnOff @@ -3532,8 +3534,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveWithOnOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - MoveMode moveMode; - uint8_t rate; + MoveMode moveMode = static_cast(0); + uint8_t rate = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -3548,8 +3550,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveWithOnOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - MoveMode moveMode; - uint8_t rate; + MoveMode moveMode = static_cast(0); + uint8_t rate = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveWithOnOff @@ -3568,9 +3570,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StepWithOnOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - StepMode stepMode; - uint8_t stepSize; - uint16_t transitionTime; + StepMode stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); + uint16_t transitionTime = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -3585,9 +3587,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StepWithOnOff::Id; } static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - StepMode stepMode; - uint8_t stepSize; - uint16_t transitionTime; + StepMode stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); + uint16_t transitionTime = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StepWithOnOff @@ -3836,23 +3838,23 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::CurrentLevel::TypeInfo::DecodableType currentLevel; - Attributes::RemainingTime::TypeInfo::DecodableType remainingTime; - Attributes::MinLevel::TypeInfo::DecodableType minLevel; - Attributes::MaxLevel::TypeInfo::DecodableType maxLevel; - Attributes::CurrentFrequency::TypeInfo::DecodableType currentFrequency; - Attributes::MinFrequency::TypeInfo::DecodableType minFrequency; - Attributes::MaxFrequency::TypeInfo::DecodableType maxFrequency; - Attributes::Options::TypeInfo::DecodableType options; - Attributes::OnOffTransitionTime::TypeInfo::DecodableType onOffTransitionTime; + Attributes::CurrentLevel::TypeInfo::DecodableType currentLevel = static_cast(0); + Attributes::RemainingTime::TypeInfo::DecodableType remainingTime = static_cast(0); + Attributes::MinLevel::TypeInfo::DecodableType minLevel = static_cast(0); + Attributes::MaxLevel::TypeInfo::DecodableType maxLevel = static_cast(0); + Attributes::CurrentFrequency::TypeInfo::DecodableType currentFrequency = static_cast(0); + Attributes::MinFrequency::TypeInfo::DecodableType minFrequency = static_cast(0); + Attributes::MaxFrequency::TypeInfo::DecodableType maxFrequency = static_cast(0); + Attributes::Options::TypeInfo::DecodableType options = static_cast(0); + Attributes::OnOffTransitionTime::TypeInfo::DecodableType onOffTransitionTime = static_cast(0); Attributes::OnLevel::TypeInfo::DecodableType onLevel; Attributes::OnTransitionTime::TypeInfo::DecodableType onTransitionTime; Attributes::OffTransitionTime::TypeInfo::DecodableType offTransitionTime; Attributes::DefaultMoveRate::TypeInfo::DecodableType defaultMoveRate; - Attributes::StartUpCurrentLevel::TypeInfo::DecodableType startUpCurrentLevel; + Attributes::StartUpCurrentLevel::TypeInfo::DecodableType startUpCurrentLevel = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -3909,8 +3911,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ResetAlarm::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Alarms::Id; } - uint8_t alarmCode; - chip::ClusterId clusterId; + uint8_t alarmCode = static_cast(0); + chip::ClusterId clusterId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -3925,8 +3927,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ResetAlarm::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Alarms::Id; } - uint8_t alarmCode; - chip::ClusterId clusterId; + uint8_t alarmCode = static_cast(0); + chip::ClusterId clusterId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ResetAlarm @@ -3944,8 +3946,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Alarm::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Alarms::Id; } - uint8_t alarmCode; - chip::ClusterId clusterId; + uint8_t alarmCode = static_cast(0); + chip::ClusterId clusterId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -3960,8 +3962,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::Alarm::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Alarms::Id; } - uint8_t alarmCode; - chip::ClusterId clusterId; + uint8_t alarmCode = static_cast(0); + chip::ClusterId clusterId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Alarm @@ -4009,10 +4011,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetAlarmResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Alarms::Id; } - uint8_t status; - uint8_t alarmCode; - chip::ClusterId clusterId; - uint32_t timeStamp; + uint8_t status = static_cast(0); + uint8_t alarmCode = static_cast(0); + chip::ClusterId clusterId = static_cast(0); + uint32_t timeStamp = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -4027,10 +4029,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetAlarmResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Alarms::Id; } - uint8_t status; - uint8_t alarmCode; - chip::ClusterId clusterId; - uint32_t timeStamp; + uint8_t status = static_cast(0); + uint8_t alarmCode = static_cast(0); + chip::ClusterId clusterId = static_cast(0); + uint32_t timeStamp = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetAlarmResponse @@ -4151,10 +4153,10 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::AlarmCount::TypeInfo::DecodableType alarmCount; + Attributes::AlarmCount::TypeInfo::DecodableType alarmCount = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -4328,19 +4330,19 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::Time::TypeInfo::DecodableType time; - Attributes::TimeStatus::TypeInfo::DecodableType timeStatus; - Attributes::TimeZone::TypeInfo::DecodableType timeZone; - Attributes::DstStart::TypeInfo::DecodableType dstStart; - Attributes::DstEnd::TypeInfo::DecodableType dstEnd; - Attributes::DstShift::TypeInfo::DecodableType dstShift; - Attributes::StandardTime::TypeInfo::DecodableType standardTime; - Attributes::LocalTime::TypeInfo::DecodableType localTime; - Attributes::LastSetTime::TypeInfo::DecodableType lastSetTime; - Attributes::ValidUntilTime::TypeInfo::DecodableType validUntilTime; + Attributes::Time::TypeInfo::DecodableType time = static_cast(0); + Attributes::TimeStatus::TypeInfo::DecodableType timeStatus = static_cast(0); + Attributes::TimeZone::TypeInfo::DecodableType timeZone = static_cast(0); + Attributes::DstStart::TypeInfo::DecodableType dstStart = static_cast(0); + Attributes::DstEnd::TypeInfo::DecodableType dstEnd = static_cast(0); + Attributes::DstShift::TypeInfo::DecodableType dstShift = static_cast(0); + Attributes::StandardTime::TypeInfo::DecodableType standardTime = static_cast(0); + Attributes::LocalTime::TypeInfo::DecodableType localTime = static_cast(0); + Attributes::LastSetTime::TypeInfo::DecodableType lastSetTime = static_cast(0); + Attributes::ValidUntilTime::TypeInfo::DecodableType validUntilTime = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -4505,15 +4507,15 @@ struct TypeInfo Attributes::ActiveText::TypeInfo::DecodableType activeText; Attributes::Description::TypeInfo::DecodableType description; Attributes::InactiveText::TypeInfo::DecodableType inactiveText; - Attributes::OutOfService::TypeInfo::DecodableType outOfService; - Attributes::Polarity::TypeInfo::DecodableType polarity; - Attributes::PresentValue::TypeInfo::DecodableType presentValue; - Attributes::Reliability::TypeInfo::DecodableType reliability; - Attributes::StatusFlags::TypeInfo::DecodableType statusFlags; - Attributes::ApplicationType::TypeInfo::DecodableType applicationType; + Attributes::OutOfService::TypeInfo::DecodableType outOfService = static_cast(0); + Attributes::Polarity::TypeInfo::DecodableType polarity = static_cast(0); + Attributes::PresentValue::TypeInfo::DecodableType presentValue = static_cast(0); + Attributes::Reliability::TypeInfo::DecodableType reliability = static_cast(0); + Attributes::StatusFlags::TypeInfo::DecodableType statusFlags = static_cast(0); + Attributes::ApplicationType::TypeInfo::DecodableType applicationType = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -4719,7 +4721,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::PowerProfileRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; + uint8_t powerProfileId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -4734,7 +4736,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::PowerProfileRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; + uint8_t powerProfileId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace PowerProfileRequest @@ -4754,9 +4756,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::PowerProfileNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t totalProfileNum; - uint8_t powerProfileId; - uint8_t numOfTransferredPhases; + uint8_t totalProfileNum = static_cast(0); + uint8_t powerProfileId = static_cast(0); + uint8_t numOfTransferredPhases = static_cast(0); DataModel::List transferredPhases; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -4772,9 +4774,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::PowerProfileNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t totalProfileNum; - uint8_t powerProfileId; - uint8_t numOfTransferredPhases; + uint8_t totalProfileNum = static_cast(0); + uint8_t powerProfileId = static_cast(0); + uint8_t numOfTransferredPhases = static_cast(0); DataModel::DecodableList transferredPhases; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -4823,9 +4825,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::PowerProfileResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t totalProfileNum; - uint8_t powerProfileId; - uint8_t numOfTransferredPhases; + uint8_t totalProfileNum = static_cast(0); + uint8_t powerProfileId = static_cast(0); + uint8_t numOfTransferredPhases = static_cast(0); DataModel::List transferredPhases; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -4841,9 +4843,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::PowerProfileResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t totalProfileNum; - uint8_t powerProfileId; - uint8_t numOfTransferredPhases; + uint8_t totalProfileNum = static_cast(0); + uint8_t powerProfileId = static_cast(0); + uint8_t numOfTransferredPhases = static_cast(0); DataModel::DecodableList transferredPhases; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -4864,10 +4866,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetPowerProfilePriceResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; - uint16_t currency; - uint32_t price; - uint8_t priceTrailingDigit; + uint8_t powerProfileId = static_cast(0); + uint16_t currency = static_cast(0); + uint32_t price = static_cast(0); + uint8_t priceTrailingDigit = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -4882,10 +4884,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetPowerProfilePriceResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; - uint16_t currency; - uint32_t price; - uint8_t priceTrailingDigit; + uint8_t powerProfileId = static_cast(0); + uint16_t currency = static_cast(0); + uint32_t price = static_cast(0); + uint8_t priceTrailingDigit = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetPowerProfilePriceResponse @@ -4903,7 +4905,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::PowerProfileStateResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileCount; + uint8_t powerProfileCount = static_cast(0); DataModel::List powerProfileRecords; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -4919,7 +4921,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::PowerProfileStateResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileCount; + uint8_t powerProfileCount = static_cast(0); DataModel::DecodableList powerProfileRecords; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -4939,9 +4941,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetOverallSchedulePriceResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint16_t currency; - uint32_t price; - uint8_t priceTrailingDigit; + uint16_t currency = static_cast(0); + uint32_t price = static_cast(0); + uint8_t priceTrailingDigit = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -4956,9 +4958,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetOverallSchedulePriceResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint16_t currency; - uint32_t price; - uint8_t priceTrailingDigit; + uint16_t currency = static_cast(0); + uint32_t price = static_cast(0); + uint8_t priceTrailingDigit = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetOverallSchedulePriceResponse @@ -4975,7 +4977,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetPowerProfilePrice::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; + uint8_t powerProfileId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -4990,7 +4992,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetPowerProfilePrice::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; + uint8_t powerProfileId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetPowerProfilePrice @@ -5009,8 +5011,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnergyPhasesScheduleNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; - uint8_t numOfScheduledPhases; + uint8_t powerProfileId = static_cast(0); + uint8_t numOfScheduledPhases = static_cast(0); DataModel::List scheduledPhases; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -5026,8 +5028,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnergyPhasesScheduleNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; - uint8_t numOfScheduledPhases; + uint8_t powerProfileId = static_cast(0); + uint8_t numOfScheduledPhases = static_cast(0); DataModel::DecodableList scheduledPhases; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -5046,7 +5048,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::PowerProfilesStateNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileCount; + uint8_t powerProfileCount = static_cast(0); DataModel::List powerProfileRecords; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -5062,7 +5064,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::PowerProfilesStateNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileCount; + uint8_t powerProfileCount = static_cast(0); DataModel::DecodableList powerProfileRecords; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -5082,8 +5084,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnergyPhasesScheduleResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; - uint8_t numOfScheduledPhases; + uint8_t powerProfileId = static_cast(0); + uint8_t numOfScheduledPhases = static_cast(0); DataModel::List scheduledPhases; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -5099,8 +5101,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnergyPhasesScheduleResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; - uint8_t numOfScheduledPhases; + uint8_t powerProfileId = static_cast(0); + uint8_t numOfScheduledPhases = static_cast(0); DataModel::DecodableList scheduledPhases; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -5146,7 +5148,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::PowerProfileScheduleConstraintsRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; + uint8_t powerProfileId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -5161,7 +5163,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::PowerProfileScheduleConstraintsRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; + uint8_t powerProfileId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace PowerProfileScheduleConstraintsRequest @@ -5178,7 +5180,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnergyPhasesScheduleRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; + uint8_t powerProfileId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -5193,7 +5195,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnergyPhasesScheduleRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; + uint8_t powerProfileId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace EnergyPhasesScheduleRequest @@ -5210,7 +5212,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnergyPhasesScheduleStateRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; + uint8_t powerProfileId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -5225,7 +5227,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnergyPhasesScheduleStateRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; + uint8_t powerProfileId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace EnergyPhasesScheduleStateRequest @@ -5244,8 +5246,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnergyPhasesScheduleStateResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; - uint8_t numOfScheduledPhases; + uint8_t powerProfileId = static_cast(0); + uint8_t numOfScheduledPhases = static_cast(0); DataModel::List scheduledPhases; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -5261,8 +5263,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnergyPhasesScheduleStateResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; - uint8_t numOfScheduledPhases; + uint8_t powerProfileId = static_cast(0); + uint8_t numOfScheduledPhases = static_cast(0); DataModel::DecodableList scheduledPhases; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -5283,10 +5285,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetPowerProfilePriceExtendedResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; - uint16_t currency; - uint32_t price; - uint8_t priceTrailingDigit; + uint8_t powerProfileId = static_cast(0); + uint16_t currency = static_cast(0); + uint32_t price = static_cast(0); + uint8_t priceTrailingDigit = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -5301,10 +5303,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetPowerProfilePriceExtendedResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; - uint16_t currency; - uint32_t price; - uint8_t priceTrailingDigit; + uint8_t powerProfileId = static_cast(0); + uint16_t currency = static_cast(0); + uint32_t price = static_cast(0); + uint8_t priceTrailingDigit = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetPowerProfilePriceExtendedResponse @@ -5323,8 +5325,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnergyPhasesScheduleStateNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; - uint8_t numOfScheduledPhases; + uint8_t powerProfileId = static_cast(0); + uint8_t numOfScheduledPhases = static_cast(0); DataModel::List scheduledPhases; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -5340,8 +5342,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnergyPhasesScheduleStateNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; - uint8_t numOfScheduledPhases; + uint8_t powerProfileId = static_cast(0); + uint8_t numOfScheduledPhases = static_cast(0); DataModel::DecodableList scheduledPhases; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -5361,9 +5363,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::PowerProfileScheduleConstraintsNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; - uint16_t startAfter; - uint16_t stopBefore; + uint8_t powerProfileId = static_cast(0); + uint16_t startAfter = static_cast(0); + uint16_t stopBefore = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -5378,9 +5380,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::PowerProfileScheduleConstraintsNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; - uint16_t startAfter; - uint16_t stopBefore; + uint8_t powerProfileId = static_cast(0); + uint16_t startAfter = static_cast(0); + uint16_t stopBefore = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace PowerProfileScheduleConstraintsNotification @@ -5399,9 +5401,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::PowerProfileScheduleConstraintsResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; - uint16_t startAfter; - uint16_t stopBefore; + uint8_t powerProfileId = static_cast(0); + uint16_t startAfter = static_cast(0); + uint16_t stopBefore = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -5416,9 +5418,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::PowerProfileScheduleConstraintsResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t powerProfileId; - uint16_t startAfter; - uint16_t stopBefore; + uint8_t powerProfileId = static_cast(0); + uint16_t startAfter = static_cast(0); + uint16_t stopBefore = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace PowerProfileScheduleConstraintsResponse @@ -5437,9 +5439,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetPowerProfilePriceExtended::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t options; - uint8_t powerProfileId; - uint16_t powerProfileStartTime; + uint8_t options = static_cast(0); + uint8_t powerProfileId = static_cast(0); + uint16_t powerProfileStartTime = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -5454,9 +5456,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetPowerProfilePriceExtended::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } - uint8_t options; - uint8_t powerProfileId; - uint16_t powerProfileStartTime; + uint8_t options = static_cast(0); + uint8_t powerProfileId = static_cast(0); + uint16_t powerProfileStartTime = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetPowerProfilePriceExtended @@ -5569,14 +5571,14 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::TotalProfileNum::TypeInfo::DecodableType totalProfileNum; - Attributes::MultipleScheduling::TypeInfo::DecodableType multipleScheduling; - Attributes::EnergyFormatting::TypeInfo::DecodableType energyFormatting; - Attributes::EnergyRemote::TypeInfo::DecodableType energyRemote; - Attributes::ScheduleMode::TypeInfo::DecodableType scheduleMode; + Attributes::TotalProfileNum::TypeInfo::DecodableType totalProfileNum = static_cast(0); + Attributes::MultipleScheduling::TypeInfo::DecodableType multipleScheduling = static_cast(0); + Attributes::EnergyFormatting::TypeInfo::DecodableType energyFormatting = static_cast(0); + Attributes::EnergyRemote::TypeInfo::DecodableType energyRemote = static_cast(0); + Attributes::ScheduleMode::TypeInfo::DecodableType scheduleMode = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -5692,7 +5694,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ExecutionOfACommand::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceControl::Id; } - CommandIdentification commandId; + CommandIdentification commandId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -5707,7 +5709,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ExecutionOfACommand::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceControl::Id; } - CommandIdentification commandId; + CommandIdentification commandId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ExecutionOfACommand @@ -5726,9 +5728,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SignalStateResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceControl::Id; } - ApplianceStatus applianceStatus; - chip::BitFlags remoteEnableFlagsAndDeviceStatus2; - ApplianceStatus applianceStatus2; + ApplianceStatus applianceStatus = static_cast(0); + chip::BitFlags remoteEnableFlagsAndDeviceStatus2 = + static_cast>(0); + ApplianceStatus applianceStatus2 = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -5743,9 +5746,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SignalStateResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceControl::Id; } - ApplianceStatus applianceStatus; - chip::BitFlags remoteEnableFlagsAndDeviceStatus2; - ApplianceStatus applianceStatus2; + ApplianceStatus applianceStatus = static_cast(0); + chip::BitFlags remoteEnableFlagsAndDeviceStatus2 = + static_cast>(0); + ApplianceStatus applianceStatus2 = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SignalStateResponse @@ -5792,9 +5796,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SignalStateNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceControl::Id; } - ApplianceStatus applianceStatus; - chip::BitFlags remoteEnableFlagsAndDeviceStatus2; - ApplianceStatus applianceStatus2; + ApplianceStatus applianceStatus = static_cast(0); + chip::BitFlags remoteEnableFlagsAndDeviceStatus2 = + static_cast>(0); + ApplianceStatus applianceStatus2 = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -5809,9 +5814,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SignalStateNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceControl::Id; } - ApplianceStatus applianceStatus; - chip::BitFlags remoteEnableFlagsAndDeviceStatus2; - ApplianceStatus applianceStatus2; + ApplianceStatus applianceStatus = static_cast(0); + chip::BitFlags remoteEnableFlagsAndDeviceStatus2 = + static_cast>(0); + ApplianceStatus applianceStatus2 = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SignalStateNotification @@ -5830,8 +5836,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::WriteFunctions::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceControl::Id; } - uint16_t functionId; - uint8_t functionDataType; + uint16_t functionId = static_cast(0); + uint8_t functionDataType = static_cast(0); DataModel::List functionData; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -5847,8 +5853,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::WriteFunctions::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceControl::Id; } - uint16_t functionId; - uint8_t functionDataType; + uint16_t functionId = static_cast(0); + uint8_t functionDataType = static_cast(0); DataModel::DecodableList functionData; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -5922,7 +5928,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::OverloadWarning::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceControl::Id; } - WarningEvent warningEvent; + WarningEvent warningEvent = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -5937,7 +5943,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::OverloadWarning::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceControl::Id; } - WarningEvent warningEvent; + WarningEvent warningEvent = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace OverloadWarning @@ -6026,12 +6032,12 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::StartTime::TypeInfo::DecodableType startTime; - Attributes::FinishTime::TypeInfo::DecodableType finishTime; - Attributes::RemainingTime::TypeInfo::DecodableType remainingTime; + Attributes::StartTime::TypeInfo::DecodableType startTime = static_cast(0); + Attributes::FinishTime::TypeInfo::DecodableType finishTime = static_cast(0); + Attributes::RemainingTime::TypeInfo::DecodableType remainingTime = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -6086,8 +6092,8 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -6218,8 +6224,8 @@ struct TypeInfo Attributes::ClientList::TypeInfo::DecodableType clientList; Attributes::PartsList::TypeInfo::DecodableType partsList; Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -6258,10 +6264,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Bind::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } - chip::NodeId nodeId; - chip::GroupId groupId; - chip::EndpointId endpointId; - chip::ClusterId clusterId; + chip::NodeId nodeId = static_cast(0); + chip::GroupId groupId = static_cast(0); + chip::EndpointId endpointId = static_cast(0); + chip::ClusterId clusterId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -6276,10 +6282,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::Bind::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } - chip::NodeId nodeId; - chip::GroupId groupId; - chip::EndpointId endpointId; - chip::ClusterId clusterId; + chip::NodeId nodeId = static_cast(0); + chip::GroupId groupId = static_cast(0); + chip::EndpointId endpointId = static_cast(0); + chip::ClusterId clusterId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Bind @@ -6299,10 +6305,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Unbind::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } - chip::NodeId nodeId; - chip::GroupId groupId; - chip::EndpointId endpointId; - chip::ClusterId clusterId; + chip::NodeId nodeId = static_cast(0); + chip::GroupId groupId = static_cast(0); + chip::EndpointId endpointId = static_cast(0); + chip::ClusterId clusterId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -6317,10 +6323,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::Unbind::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } - chip::NodeId nodeId; - chip::GroupId groupId; - chip::EndpointId endpointId; - chip::ClusterId clusterId; + chip::NodeId nodeId = static_cast(0); + chip::GroupId groupId = static_cast(0); + chip::EndpointId endpointId = static_cast(0); + chip::ClusterId clusterId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Unbind @@ -6374,8 +6380,8 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -6557,8 +6563,8 @@ struct TypeInfo Attributes::Acl::TypeInfo::DecodableType acl; Attributes::Extension::TypeInfo::DecodableType extension; Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -6638,8 +6644,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::CheckInResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PollControl::Id; } - bool startFastPolling; - uint16_t fastPollTimeout; + bool startFastPolling = static_cast(0); + uint16_t fastPollTimeout = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -6654,8 +6660,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::CheckInResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PollControl::Id; } - bool startFastPolling; - uint16_t fastPollTimeout; + bool startFastPolling = static_cast(0); + uint16_t fastPollTimeout = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace CheckInResponse @@ -6700,7 +6706,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetLongPollInterval::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PollControl::Id; } - uint32_t newLongPollInterval; + uint32_t newLongPollInterval = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -6715,7 +6721,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetLongPollInterval::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PollControl::Id; } - uint32_t newLongPollInterval; + uint32_t newLongPollInterval = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SetLongPollInterval @@ -6732,7 +6738,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetShortPollInterval::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PollControl::Id; } - uint16_t newShortPollInterval; + uint16_t newShortPollInterval = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -6747,7 +6753,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetShortPollInterval::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PollControl::Id; } - uint16_t newShortPollInterval; + uint16_t newShortPollInterval = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SetShortPollInterval @@ -6884,16 +6890,16 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::CheckInInterval::TypeInfo::DecodableType checkInInterval; - Attributes::LongPollInterval::TypeInfo::DecodableType longPollInterval; - Attributes::ShortPollInterval::TypeInfo::DecodableType shortPollInterval; - Attributes::FastPollTimeout::TypeInfo::DecodableType fastPollTimeout; - Attributes::CheckInIntervalMin::TypeInfo::DecodableType checkInIntervalMin; - Attributes::LongPollIntervalMin::TypeInfo::DecodableType longPollIntervalMin; - Attributes::FastPollTimeoutMax::TypeInfo::DecodableType fastPollTimeoutMax; + Attributes::CheckInInterval::TypeInfo::DecodableType checkInInterval = static_cast(0); + Attributes::LongPollInterval::TypeInfo::DecodableType longPollInterval = static_cast(0); + Attributes::ShortPollInterval::TypeInfo::DecodableType shortPollInterval = static_cast(0); + Attributes::FastPollTimeout::TypeInfo::DecodableType fastPollTimeout = static_cast(0); + Attributes::CheckInIntervalMin::TypeInfo::DecodableType checkInIntervalMin = static_cast(0); + Attributes::LongPollIntervalMin::TypeInfo::DecodableType longPollIntervalMin = static_cast(0); + Attributes::FastPollTimeoutMax::TypeInfo::DecodableType fastPollTimeoutMax = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -7091,7 +7097,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::InstantAction::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -7107,7 +7113,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::InstantAction::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -7127,9 +7133,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::InstantActionWithTransition::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; - uint16_t transitionTime; + uint16_t transitionTime = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -7144,9 +7150,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::InstantActionWithTransition::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; - uint16_t transitionTime; + uint16_t transitionTime = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace InstantActionWithTransition @@ -7164,7 +7170,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StartAction::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -7180,7 +7186,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StartAction::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -7200,9 +7206,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StartActionWithDuration::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; - uint32_t duration; + uint32_t duration = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -7217,9 +7223,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StartActionWithDuration::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; - uint32_t duration; + uint32_t duration = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StartActionWithDuration @@ -7237,7 +7243,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StopAction::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -7253,7 +7259,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StopAction::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -7272,7 +7278,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::PauseAction::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -7288,7 +7294,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::PauseAction::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -7308,9 +7314,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::PauseActionWithDuration::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; - uint32_t duration; + uint32_t duration = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -7325,9 +7331,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::PauseActionWithDuration::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; - uint32_t duration; + uint32_t duration = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace PauseActionWithDuration @@ -7345,7 +7351,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ResumeAction::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -7361,7 +7367,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ResumeAction::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -7380,7 +7386,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnableAction::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -7396,7 +7402,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnableAction::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -7416,9 +7422,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnableActionWithDuration::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; - uint32_t duration; + uint32_t duration = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -7433,9 +7439,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnableActionWithDuration::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; - uint32_t duration; + uint32_t duration = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace EnableActionWithDuration @@ -7453,7 +7459,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::DisableAction::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -7469,7 +7475,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::DisableAction::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -7489,9 +7495,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::DisableActionWithDuration::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; - uint32_t duration; + uint32_t duration = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -7506,9 +7512,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::DisableActionWithDuration::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; + uint16_t actionID = static_cast(0); Optional invokeID; - uint32_t duration; + uint32_t duration = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace DisableActionWithDuration @@ -7605,8 +7611,8 @@ struct TypeInfo Attributes::EndpointList::TypeInfo::DecodableType endpointList; Attributes::SetupUrl::TypeInfo::DecodableType setupUrl; Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -7629,9 +7635,9 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; - uint32_t invokeID; - ActionStateEnum newState; + uint16_t actionID = static_cast(0); + uint32_t invokeID = static_cast(0); + ActionStateEnum newState = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -7643,9 +7649,9 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; - uint32_t invokeID; - ActionStateEnum newState; + uint16_t actionID = static_cast(0); + uint32_t invokeID = static_cast(0); + ActionStateEnum newState = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -7669,10 +7675,10 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; - uint32_t invokeID; - ActionStateEnum newState; - ActionErrorEnum error; + uint16_t actionID = static_cast(0); + uint32_t invokeID = static_cast(0); + ActionStateEnum newState = static_cast(0); + ActionErrorEnum error = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -7684,10 +7690,10 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } - uint16_t actionID; - uint32_t invokeID; - ActionStateEnum newState; - ActionErrorEnum error; + uint16_t actionID = static_cast(0); + uint32_t invokeID = static_cast(0); + ActionStateEnum newState = static_cast(0); + ActionErrorEnum error = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -8012,28 +8018,28 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::InteractionModelVersion::TypeInfo::DecodableType interactionModelVersion; + Attributes::InteractionModelVersion::TypeInfo::DecodableType interactionModelVersion = static_cast(0); Attributes::VendorName::TypeInfo::DecodableType vendorName; - Attributes::VendorID::TypeInfo::DecodableType vendorID; + Attributes::VendorID::TypeInfo::DecodableType vendorID = static_cast(0); Attributes::ProductName::TypeInfo::DecodableType productName; - Attributes::ProductID::TypeInfo::DecodableType productID; + Attributes::ProductID::TypeInfo::DecodableType productID = static_cast(0); Attributes::NodeLabel::TypeInfo::DecodableType nodeLabel; Attributes::Location::TypeInfo::DecodableType location; - Attributes::HardwareVersion::TypeInfo::DecodableType hardwareVersion; + Attributes::HardwareVersion::TypeInfo::DecodableType hardwareVersion = static_cast(0); Attributes::HardwareVersionString::TypeInfo::DecodableType hardwareVersionString; - Attributes::SoftwareVersion::TypeInfo::DecodableType softwareVersion; + Attributes::SoftwareVersion::TypeInfo::DecodableType softwareVersion = static_cast(0); Attributes::SoftwareVersionString::TypeInfo::DecodableType softwareVersionString; Attributes::ManufacturingDate::TypeInfo::DecodableType manufacturingDate; Attributes::PartNumber::TypeInfo::DecodableType partNumber; Attributes::ProductURL::TypeInfo::DecodableType productURL; Attributes::ProductLabel::TypeInfo::DecodableType productLabel; Attributes::SerialNumber::TypeInfo::DecodableType serialNumber; - Attributes::LocalConfigDisabled::TypeInfo::DecodableType localConfigDisabled; - Attributes::Reachable::TypeInfo::DecodableType reachable; + Attributes::LocalConfigDisabled::TypeInfo::DecodableType localConfigDisabled = static_cast(0); + Attributes::Reachable::TypeInfo::DecodableType reachable = static_cast(0); Attributes::UniqueID::TypeInfo::DecodableType uniqueID; Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -8054,7 +8060,7 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::Basic::Id; } - uint32_t softwareVersion; + uint32_t softwareVersion = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -8066,7 +8072,7 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::Basic::Id; } - uint32_t softwareVersion; + uint32_t softwareVersion = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -8143,7 +8149,7 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::Basic::Id; } - bool reachableNewValue; + bool reachableNewValue = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -8155,7 +8161,7 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::Basic::Id; } - bool reachableNewValue; + bool reachableNewValue = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -8238,9 +8244,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::QueryImage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - chip::VendorId vendorId; - uint16_t productId; - uint32_t softwareVersion; + chip::VendorId vendorId = static_cast(0); + uint16_t productId = static_cast(0); + uint32_t softwareVersion = static_cast(0); DataModel::List protocolsSupported; Optional hardwareVersion; Optional location; @@ -8260,9 +8266,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::QueryImage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - chip::VendorId vendorId; - uint16_t productId; - uint32_t softwareVersion; + chip::VendorId vendorId = static_cast(0); + uint16_t productId = static_cast(0); + uint32_t softwareVersion = static_cast(0); DataModel::DecodableList protocolsSupported; Optional hardwareVersion; Optional location; @@ -8291,7 +8297,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::QueryImageResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - OTAQueryStatus status; + OTAQueryStatus status = static_cast(0); Optional delayedActionTime; Optional imageURI; Optional softwareVersion; @@ -8313,7 +8319,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::QueryImageResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - OTAQueryStatus status; + OTAQueryStatus status = static_cast(0); Optional delayedActionTime; Optional imageURI; Optional softwareVersion; @@ -8339,7 +8345,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } chip::ByteSpan updateToken; - uint32_t newVersion; + uint32_t newVersion = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -8355,7 +8361,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } chip::ByteSpan updateToken; - uint32_t newVersion; + uint32_t newVersion = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ApplyUpdateRequest @@ -8373,8 +8379,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ApplyUpdateResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - OTAApplyUpdateAction action; - uint32_t delayedActionTime; + OTAApplyUpdateAction action = static_cast(0); + uint32_t delayedActionTime = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -8389,8 +8395,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ApplyUpdateResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - OTAApplyUpdateAction action; - uint32_t delayedActionTime; + OTAApplyUpdateAction action = static_cast(0); + uint32_t delayedActionTime = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ApplyUpdateResponse @@ -8409,7 +8415,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } chip::ByteSpan updateToken; - uint32_t softwareVersion; + uint32_t softwareVersion = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -8425,7 +8431,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } chip::ByteSpan updateToken; - uint32_t softwareVersion; + uint32_t softwareVersion = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace NotifyUpdateApplied @@ -8479,8 +8485,8 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -8570,11 +8576,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::AnnounceOtaProvider::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - chip::NodeId providerNodeId; - chip::VendorId vendorId; - OTAAnnouncementReason announcementReason; + chip::NodeId providerNodeId = static_cast(0); + chip::VendorId vendorId = static_cast(0); + OTAAnnouncementReason announcementReason = static_cast(0); Optional metadataForNode; - chip::EndpointId endpoint; + chip::EndpointId endpoint = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -8589,11 +8595,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::AnnounceOtaProvider::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - chip::NodeId providerNodeId; - chip::VendorId vendorId; - OTAAnnouncementReason announcementReason; + chip::NodeId providerNodeId = static_cast(0); + chip::VendorId vendorId = static_cast(0); + OTAAnnouncementReason announcementReason = static_cast(0); Optional metadataForNode; - chip::EndpointId endpoint; + chip::EndpointId endpoint = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace AnnounceOtaProvider @@ -8697,12 +8703,12 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::DefaultOtaProviders::TypeInfo::DecodableType defaultOtaProviders; - Attributes::UpdatePossible::TypeInfo::DecodableType updatePossible; - Attributes::UpdateState::TypeInfo::DecodableType updateState; + Attributes::UpdatePossible::TypeInfo::DecodableType updatePossible = static_cast(0); + Attributes::UpdateState::TypeInfo::DecodableType updateState = static_cast(0); Attributes::UpdateStateProgress::TypeInfo::DecodableType updateStateProgress; Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -8727,8 +8733,8 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } DataModel::Nullable previousState; - OTAUpdateStateEnum newState; - OTAChangeReasonEnum reason; + OTAUpdateStateEnum newState = static_cast(0); + OTAChangeReasonEnum reason = static_cast(0); DataModel::Nullable targetSoftwareVersion; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -8742,8 +8748,8 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } DataModel::Nullable previousState; - OTAUpdateStateEnum newState; - OTAChangeReasonEnum reason; + OTAUpdateStateEnum newState = static_cast(0); + OTAChangeReasonEnum reason = static_cast(0); DataModel::Nullable targetSoftwareVersion; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -8766,8 +8772,8 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - uint32_t softwareVersion; - uint16_t productID; + uint32_t softwareVersion = static_cast(0); + uint16_t productID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -8779,8 +8785,8 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - uint32_t softwareVersion; - uint16_t productID; + uint32_t softwareVersion = static_cast(0); + uint16_t productID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -8804,9 +8810,9 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - uint32_t softwareVersion; - uint64_t bytesDownloaded; - uint8_t progressPercent; + uint32_t softwareVersion = static_cast(0); + uint64_t bytesDownloaded = static_cast(0); + uint8_t progressPercent = static_cast(0); DataModel::Nullable platformCode; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -8819,9 +8825,9 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - uint32_t softwareVersion; - uint64_t bytesDownloaded; - uint8_t progressPercent; + uint32_t softwareVersion = static_cast(0); + uint64_t bytesDownloaded = static_cast(0); + uint8_t progressPercent = static_cast(0); DataModel::Nullable platformCode; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -8905,8 +8911,8 @@ struct TypeInfo Attributes::ActiveLocale::TypeInfo::DecodableType activeLocale; Attributes::SupportedLocales::TypeInfo::DecodableType supportedLocales; Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -9018,12 +9024,12 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::HourFormat::TypeInfo::DecodableType hourFormat; - Attributes::CalendarType::TypeInfo::DecodableType calendarType; + Attributes::HourFormat::TypeInfo::DecodableType hourFormat = static_cast(0); + Attributes::CalendarType::TypeInfo::DecodableType calendarType = static_cast(0); Attributes::SupportedCalendarTypes::TypeInfo::DecodableType supportedCalendarTypes; Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -9091,8 +9097,8 @@ struct TypeInfo Attributes::Sources::TypeInfo::DecodableType sources; Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -9527,40 +9533,40 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::Status::TypeInfo::DecodableType status; - Attributes::Order::TypeInfo::DecodableType order; + Attributes::Status::TypeInfo::DecodableType status = static_cast(0); + Attributes::Order::TypeInfo::DecodableType order = static_cast(0); Attributes::Description::TypeInfo::DecodableType description; - Attributes::WiredAssessedInputVoltage::TypeInfo::DecodableType wiredAssessedInputVoltage; - Attributes::WiredAssessedInputFrequency::TypeInfo::DecodableType wiredAssessedInputFrequency; - Attributes::WiredCurrentType::TypeInfo::DecodableType wiredCurrentType; - Attributes::WiredAssessedCurrent::TypeInfo::DecodableType wiredAssessedCurrent; - Attributes::WiredNominalVoltage::TypeInfo::DecodableType wiredNominalVoltage; - Attributes::WiredMaximumCurrent::TypeInfo::DecodableType wiredMaximumCurrent; - Attributes::WiredPresent::TypeInfo::DecodableType wiredPresent; + Attributes::WiredAssessedInputVoltage::TypeInfo::DecodableType wiredAssessedInputVoltage = static_cast(0); + Attributes::WiredAssessedInputFrequency::TypeInfo::DecodableType wiredAssessedInputFrequency = static_cast(0); + Attributes::WiredCurrentType::TypeInfo::DecodableType wiredCurrentType = static_cast(0); + Attributes::WiredAssessedCurrent::TypeInfo::DecodableType wiredAssessedCurrent = static_cast(0); + Attributes::WiredNominalVoltage::TypeInfo::DecodableType wiredNominalVoltage = static_cast(0); + Attributes::WiredMaximumCurrent::TypeInfo::DecodableType wiredMaximumCurrent = static_cast(0); + Attributes::WiredPresent::TypeInfo::DecodableType wiredPresent = static_cast(0); Attributes::ActiveWiredFaults::TypeInfo::DecodableType activeWiredFaults; - Attributes::BatteryVoltage::TypeInfo::DecodableType batteryVoltage; - Attributes::BatteryPercentRemaining::TypeInfo::DecodableType batteryPercentRemaining; - Attributes::BatteryTimeRemaining::TypeInfo::DecodableType batteryTimeRemaining; - Attributes::BatteryChargeLevel::TypeInfo::DecodableType batteryChargeLevel; - Attributes::BatteryReplacementNeeded::TypeInfo::DecodableType batteryReplacementNeeded; - Attributes::BatteryReplaceability::TypeInfo::DecodableType batteryReplaceability; - Attributes::BatteryPresent::TypeInfo::DecodableType batteryPresent; + Attributes::BatteryVoltage::TypeInfo::DecodableType batteryVoltage = static_cast(0); + Attributes::BatteryPercentRemaining::TypeInfo::DecodableType batteryPercentRemaining = static_cast(0); + Attributes::BatteryTimeRemaining::TypeInfo::DecodableType batteryTimeRemaining = static_cast(0); + Attributes::BatteryChargeLevel::TypeInfo::DecodableType batteryChargeLevel = static_cast(0); + Attributes::BatteryReplacementNeeded::TypeInfo::DecodableType batteryReplacementNeeded = static_cast(0); + Attributes::BatteryReplaceability::TypeInfo::DecodableType batteryReplaceability = static_cast(0); + Attributes::BatteryPresent::TypeInfo::DecodableType batteryPresent = static_cast(0); Attributes::ActiveBatteryFaults::TypeInfo::DecodableType activeBatteryFaults; Attributes::BatteryReplacementDescription::TypeInfo::DecodableType batteryReplacementDescription; - Attributes::BatteryCommonDesignation::TypeInfo::DecodableType batteryCommonDesignation; + Attributes::BatteryCommonDesignation::TypeInfo::DecodableType batteryCommonDesignation = static_cast(0); Attributes::BatteryANSIDesignation::TypeInfo::DecodableType batteryANSIDesignation; Attributes::BatteryIECDesignation::TypeInfo::DecodableType batteryIECDesignation; - Attributes::BatteryApprovedChemistry::TypeInfo::DecodableType batteryApprovedChemistry; - Attributes::BatteryCapacity::TypeInfo::DecodableType batteryCapacity; - Attributes::BatteryQuantity::TypeInfo::DecodableType batteryQuantity; - Attributes::BatteryChargeState::TypeInfo::DecodableType batteryChargeState; - Attributes::BatteryTimeToFullCharge::TypeInfo::DecodableType batteryTimeToFullCharge; - Attributes::BatteryFunctionalWhileCharging::TypeInfo::DecodableType batteryFunctionalWhileCharging; - Attributes::BatteryChargingCurrent::TypeInfo::DecodableType batteryChargingCurrent; + Attributes::BatteryApprovedChemistry::TypeInfo::DecodableType batteryApprovedChemistry = static_cast(0); + Attributes::BatteryCapacity::TypeInfo::DecodableType batteryCapacity = static_cast(0); + Attributes::BatteryQuantity::TypeInfo::DecodableType batteryQuantity = static_cast(0); + Attributes::BatteryChargeState::TypeInfo::DecodableType batteryChargeState = static_cast(0); + Attributes::BatteryTimeToFullCharge::TypeInfo::DecodableType batteryTimeToFullCharge = static_cast(0); + Attributes::BatteryFunctionalWhileCharging::TypeInfo::DecodableType batteryFunctionalWhileCharging = static_cast(0); + Attributes::BatteryChargingCurrent::TypeInfo::DecodableType batteryChargingCurrent = static_cast(0); Attributes::ActiveBatteryChargeFaults::TypeInfo::DecodableType activeBatteryChargeFaults; Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -9654,9 +9660,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ArmFailSafe::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - uint16_t expiryLengthSeconds; - uint64_t breadcrumb; - uint32_t timeoutMs; + uint16_t expiryLengthSeconds = static_cast(0); + uint64_t breadcrumb = static_cast(0); + uint32_t timeoutMs = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -9671,9 +9677,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ArmFailSafe::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - uint16_t expiryLengthSeconds; - uint64_t breadcrumb; - uint32_t timeoutMs; + uint16_t expiryLengthSeconds = static_cast(0); + uint64_t breadcrumb = static_cast(0); + uint32_t timeoutMs = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ArmFailSafe @@ -9691,7 +9697,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ArmFailSafeResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - GeneralCommissioningError errorCode; + GeneralCommissioningError errorCode = static_cast(0); chip::CharSpan debugText; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -9707,7 +9713,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ArmFailSafeResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - GeneralCommissioningError errorCode; + GeneralCommissioningError errorCode = static_cast(0); chip::CharSpan debugText; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -9728,10 +9734,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetRegulatoryConfig::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - RegulatoryLocationType location; + RegulatoryLocationType location = static_cast(0); chip::CharSpan countryCode; - uint64_t breadcrumb; - uint32_t timeoutMs; + uint64_t breadcrumb = static_cast(0); + uint32_t timeoutMs = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -9746,10 +9752,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetRegulatoryConfig::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - RegulatoryLocationType location; + RegulatoryLocationType location = static_cast(0); chip::CharSpan countryCode; - uint64_t breadcrumb; - uint32_t timeoutMs; + uint64_t breadcrumb = static_cast(0); + uint32_t timeoutMs = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SetRegulatoryConfig @@ -9767,7 +9773,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetRegulatoryConfigResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - GeneralCommissioningError errorCode; + GeneralCommissioningError errorCode = static_cast(0); chip::CharSpan debugText; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -9783,7 +9789,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetRegulatoryConfigResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - GeneralCommissioningError errorCode; + GeneralCommissioningError errorCode = static_cast(0); chip::CharSpan debugText; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -9830,7 +9836,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::CommissioningCompleteResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - GeneralCommissioningError errorCode; + GeneralCommissioningError errorCode = static_cast(0); chip::CharSpan debugText; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -9846,7 +9852,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::CommissioningCompleteResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - GeneralCommissioningError errorCode; + GeneralCommissioningError errorCode = static_cast(0); chip::CharSpan debugText; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -9951,13 +9957,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::Breadcrumb::TypeInfo::DecodableType breadcrumb; + Attributes::Breadcrumb::TypeInfo::DecodableType breadcrumb = static_cast(0); Attributes::BasicCommissioningInfoList::TypeInfo::DecodableType basicCommissioningInfoList; - Attributes::RegulatoryConfig::TypeInfo::DecodableType regulatoryConfig; - Attributes::LocationCapability::TypeInfo::DecodableType locationCapability; + Attributes::RegulatoryConfig::TypeInfo::DecodableType regulatoryConfig = static_cast(0); + Attributes::LocationCapability::TypeInfo::DecodableType locationCapability = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -10139,7 +10145,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } chip::ByteSpan ssid; - uint64_t breadcrumb; + uint64_t breadcrumb = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -10155,7 +10161,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } chip::ByteSpan ssid; - uint64_t breadcrumb; + uint64_t breadcrumb = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ScanNetworks @@ -10175,7 +10181,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ScanNetworksResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - NetworkCommissioningStatus networkingStatus; + NetworkCommissioningStatus networkingStatus = static_cast(0); chip::CharSpan debugText; Optional> wiFiScanResults; Optional> threadScanResults; @@ -10193,7 +10199,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ScanNetworksResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - NetworkCommissioningStatus networkingStatus; + NetworkCommissioningStatus networkingStatus = static_cast(0); chip::CharSpan debugText; Optional> wiFiScanResults; Optional> threadScanResults; @@ -10217,7 +10223,7 @@ struct Type chip::ByteSpan ssid; chip::ByteSpan credentials; - uint64_t breadcrumb; + uint64_t breadcrumb = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -10234,7 +10240,7 @@ struct DecodableType chip::ByteSpan ssid; chip::ByteSpan credentials; - uint64_t breadcrumb; + uint64_t breadcrumb = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace AddOrUpdateWiFiNetwork @@ -10253,7 +10259,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } chip::ByteSpan operationalDataset; - uint64_t breadcrumb; + uint64_t breadcrumb = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -10269,7 +10275,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } chip::ByteSpan operationalDataset; - uint64_t breadcrumb; + uint64_t breadcrumb = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace AddOrUpdateThreadNetwork @@ -10288,7 +10294,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } chip::ByteSpan networkID; - uint64_t breadcrumb; + uint64_t breadcrumb = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -10304,7 +10310,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } chip::ByteSpan networkID; - uint64_t breadcrumb; + uint64_t breadcrumb = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace RemoveNetwork @@ -10322,7 +10328,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::NetworkConfigResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - NetworkCommissioningStatus networkingStatus; + NetworkCommissioningStatus networkingStatus = static_cast(0); chip::CharSpan debugText; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -10338,7 +10344,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::NetworkConfigResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - NetworkCommissioningStatus networkingStatus; + NetworkCommissioningStatus networkingStatus = static_cast(0); chip::CharSpan debugText; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -10358,7 +10364,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } chip::ByteSpan networkID; - uint64_t breadcrumb; + uint64_t breadcrumb = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -10374,7 +10380,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } chip::ByteSpan networkID; - uint64_t breadcrumb; + uint64_t breadcrumb = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ConnectNetwork @@ -10393,9 +10399,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ConnectNetworkResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - NetworkCommissioningStatus networkingStatus; + NetworkCommissioningStatus networkingStatus = static_cast(0); chip::CharSpan debugText; - int32_t errorValue; + int32_t errorValue = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -10410,9 +10416,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ConnectNetworkResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - NetworkCommissioningStatus networkingStatus; + NetworkCommissioningStatus networkingStatus = static_cast(0); chip::CharSpan debugText; - int32_t errorValue; + int32_t errorValue = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ConnectNetworkResponse @@ -10432,8 +10438,8 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } chip::ByteSpan networkID; - uint8_t networkIndex; - uint64_t breadcrumb; + uint8_t networkIndex = static_cast(0); + uint64_t breadcrumb = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -10449,8 +10455,8 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } chip::ByteSpan networkID; - uint8_t networkIndex; - uint64_t breadcrumb; + uint8_t networkIndex = static_cast(0); + uint64_t breadcrumb = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ReorderNetwork @@ -10601,17 +10607,17 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MaxNetworks::TypeInfo::DecodableType maxNetworks; + Attributes::MaxNetworks::TypeInfo::DecodableType maxNetworks = static_cast(0); Attributes::Networks::TypeInfo::DecodableType networks; - Attributes::ScanMaxTimeSeconds::TypeInfo::DecodableType scanMaxTimeSeconds; - Attributes::ConnectMaxTimeSeconds::TypeInfo::DecodableType connectMaxTimeSeconds; - Attributes::InterfaceEnabled::TypeInfo::DecodableType interfaceEnabled; - Attributes::LastNetworkingStatus::TypeInfo::DecodableType lastNetworkingStatus; + Attributes::ScanMaxTimeSeconds::TypeInfo::DecodableType scanMaxTimeSeconds = static_cast(0); + Attributes::ConnectMaxTimeSeconds::TypeInfo::DecodableType connectMaxTimeSeconds = static_cast(0); + Attributes::InterfaceEnabled::TypeInfo::DecodableType interfaceEnabled = static_cast(0); + Attributes::LastNetworkingStatus::TypeInfo::DecodableType lastNetworkingStatus = static_cast(0); Attributes::LastNetworkID::TypeInfo::DecodableType lastNetworkID; - Attributes::LastConnectErrorValue::TypeInfo::DecodableType lastConnectErrorValue; + Attributes::LastConnectErrorValue::TypeInfo::DecodableType lastConnectErrorValue = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -10671,8 +10677,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::RetrieveLogsRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } - LogsIntent intent; - LogsTransferProtocol requestedProtocol; + LogsIntent intent = static_cast(0); + LogsTransferProtocol requestedProtocol = static_cast(0); chip::ByteSpan transferFileDesignator; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -10688,8 +10694,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::RetrieveLogsRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } - LogsIntent intent; - LogsTransferProtocol requestedProtocol; + LogsIntent intent = static_cast(0); + LogsTransferProtocol requestedProtocol = static_cast(0); chip::ByteSpan transferFileDesignator; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -10710,10 +10716,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::RetrieveLogsResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } - LogsStatus status; + LogsStatus status = static_cast(0); chip::ByteSpan content; - uint32_t timeStamp; - uint32_t timeSinceBoot; + uint32_t timeStamp = static_cast(0); + uint32_t timeSinceBoot = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -10728,10 +10734,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::RetrieveLogsResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } - LogsStatus status; + LogsStatus status = static_cast(0); chip::ByteSpan content; - uint32_t timeStamp; - uint32_t timeSinceBoot; + uint32_t timeStamp = static_cast(0); + uint32_t timeSinceBoot = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace RetrieveLogsResponse @@ -10785,8 +10791,8 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -11054,16 +11060,16 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::NetworkInterfaces::TypeInfo::DecodableType networkInterfaces; - Attributes::RebootCount::TypeInfo::DecodableType rebootCount; - Attributes::UpTime::TypeInfo::DecodableType upTime; - Attributes::TotalOperationalHours::TypeInfo::DecodableType totalOperationalHours; - Attributes::BootReasons::TypeInfo::DecodableType bootReasons; + Attributes::RebootCount::TypeInfo::DecodableType rebootCount = static_cast(0); + Attributes::UpTime::TypeInfo::DecodableType upTime = static_cast(0); + Attributes::TotalOperationalHours::TypeInfo::DecodableType totalOperationalHours = static_cast(0); + Attributes::BootReasons::TypeInfo::DecodableType bootReasons = static_cast(0); Attributes::ActiveHardwareFaults::TypeInfo::DecodableType activeHardwareFaults; Attributes::ActiveRadioFaults::TypeInfo::DecodableType activeRadioFaults; Attributes::ActiveNetworkFaults::TypeInfo::DecodableType activeNetworkFaults; Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -11192,7 +11198,7 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - BootReasonType bootReason; + BootReasonType bootReason = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -11204,7 +11210,7 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - BootReasonType bootReason; + BootReasonType bootReason = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -11403,12 +11409,12 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::ThreadMetrics::TypeInfo::DecodableType threadMetrics; - Attributes::CurrentHeapFree::TypeInfo::DecodableType currentHeapFree; - Attributes::CurrentHeapUsed::TypeInfo::DecodableType currentHeapUsed; - Attributes::CurrentHeapHighWatermark::TypeInfo::DecodableType currentHeapHighWatermark; + Attributes::CurrentHeapFree::TypeInfo::DecodableType currentHeapFree = static_cast(0); + Attributes::CurrentHeapUsed::TypeInfo::DecodableType currentHeapUsed = static_cast(0); + Attributes::CurrentHeapHighWatermark::TypeInfo::DecodableType currentHeapHighWatermark = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -12478,72 +12484,73 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::Channel::TypeInfo::DecodableType channel; - Attributes::RoutingRole::TypeInfo::DecodableType routingRole; + Attributes::Channel::TypeInfo::DecodableType channel = static_cast(0); + Attributes::RoutingRole::TypeInfo::DecodableType routingRole = static_cast(0); Attributes::NetworkName::TypeInfo::DecodableType networkName; - Attributes::PanId::TypeInfo::DecodableType panId; - Attributes::ExtendedPanId::TypeInfo::DecodableType extendedPanId; + Attributes::PanId::TypeInfo::DecodableType panId = static_cast(0); + Attributes::ExtendedPanId::TypeInfo::DecodableType extendedPanId = static_cast(0); Attributes::MeshLocalPrefix::TypeInfo::DecodableType meshLocalPrefix; - Attributes::OverrunCount::TypeInfo::DecodableType overrunCount; + Attributes::OverrunCount::TypeInfo::DecodableType overrunCount = static_cast(0); Attributes::NeighborTableList::TypeInfo::DecodableType neighborTableList; Attributes::RouteTableList::TypeInfo::DecodableType routeTableList; - Attributes::PartitionId::TypeInfo::DecodableType partitionId; - Attributes::Weighting::TypeInfo::DecodableType weighting; - Attributes::DataVersion::TypeInfo::DecodableType dataVersion; - Attributes::StableDataVersion::TypeInfo::DecodableType stableDataVersion; - Attributes::LeaderRouterId::TypeInfo::DecodableType leaderRouterId; - Attributes::DetachedRoleCount::TypeInfo::DecodableType detachedRoleCount; - Attributes::ChildRoleCount::TypeInfo::DecodableType childRoleCount; - Attributes::RouterRoleCount::TypeInfo::DecodableType routerRoleCount; - Attributes::LeaderRoleCount::TypeInfo::DecodableType leaderRoleCount; - Attributes::AttachAttemptCount::TypeInfo::DecodableType attachAttemptCount; - Attributes::PartitionIdChangeCount::TypeInfo::DecodableType partitionIdChangeCount; - Attributes::BetterPartitionAttachAttemptCount::TypeInfo::DecodableType betterPartitionAttachAttemptCount; - Attributes::ParentChangeCount::TypeInfo::DecodableType parentChangeCount; - Attributes::TxTotalCount::TypeInfo::DecodableType txTotalCount; - Attributes::TxUnicastCount::TypeInfo::DecodableType txUnicastCount; - Attributes::TxBroadcastCount::TypeInfo::DecodableType txBroadcastCount; - Attributes::TxAckRequestedCount::TypeInfo::DecodableType txAckRequestedCount; - Attributes::TxAckedCount::TypeInfo::DecodableType txAckedCount; - Attributes::TxNoAckRequestedCount::TypeInfo::DecodableType txNoAckRequestedCount; - Attributes::TxDataCount::TypeInfo::DecodableType txDataCount; - Attributes::TxDataPollCount::TypeInfo::DecodableType txDataPollCount; - Attributes::TxBeaconCount::TypeInfo::DecodableType txBeaconCount; - Attributes::TxBeaconRequestCount::TypeInfo::DecodableType txBeaconRequestCount; - Attributes::TxOtherCount::TypeInfo::DecodableType txOtherCount; - Attributes::TxRetryCount::TypeInfo::DecodableType txRetryCount; - Attributes::TxDirectMaxRetryExpiryCount::TypeInfo::DecodableType txDirectMaxRetryExpiryCount; - Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo::DecodableType txIndirectMaxRetryExpiryCount; - Attributes::TxErrCcaCount::TypeInfo::DecodableType txErrCcaCount; - Attributes::TxErrAbortCount::TypeInfo::DecodableType txErrAbortCount; - Attributes::TxErrBusyChannelCount::TypeInfo::DecodableType txErrBusyChannelCount; - Attributes::RxTotalCount::TypeInfo::DecodableType rxTotalCount; - Attributes::RxUnicastCount::TypeInfo::DecodableType rxUnicastCount; - Attributes::RxBroadcastCount::TypeInfo::DecodableType rxBroadcastCount; - Attributes::RxDataCount::TypeInfo::DecodableType rxDataCount; - Attributes::RxDataPollCount::TypeInfo::DecodableType rxDataPollCount; - Attributes::RxBeaconCount::TypeInfo::DecodableType rxBeaconCount; - Attributes::RxBeaconRequestCount::TypeInfo::DecodableType rxBeaconRequestCount; - Attributes::RxOtherCount::TypeInfo::DecodableType rxOtherCount; - Attributes::RxAddressFilteredCount::TypeInfo::DecodableType rxAddressFilteredCount; - Attributes::RxDestAddrFilteredCount::TypeInfo::DecodableType rxDestAddrFilteredCount; - Attributes::RxDuplicatedCount::TypeInfo::DecodableType rxDuplicatedCount; - Attributes::RxErrNoFrameCount::TypeInfo::DecodableType rxErrNoFrameCount; - Attributes::RxErrUnknownNeighborCount::TypeInfo::DecodableType rxErrUnknownNeighborCount; - Attributes::RxErrInvalidSrcAddrCount::TypeInfo::DecodableType rxErrInvalidSrcAddrCount; - Attributes::RxErrSecCount::TypeInfo::DecodableType rxErrSecCount; - Attributes::RxErrFcsCount::TypeInfo::DecodableType rxErrFcsCount; - Attributes::RxErrOtherCount::TypeInfo::DecodableType rxErrOtherCount; - Attributes::ActiveTimestamp::TypeInfo::DecodableType activeTimestamp; - Attributes::PendingTimestamp::TypeInfo::DecodableType pendingTimestamp; - Attributes::Delay::TypeInfo::DecodableType delay; + Attributes::PartitionId::TypeInfo::DecodableType partitionId = static_cast(0); + Attributes::Weighting::TypeInfo::DecodableType weighting = static_cast(0); + Attributes::DataVersion::TypeInfo::DecodableType dataVersion = static_cast(0); + Attributes::StableDataVersion::TypeInfo::DecodableType stableDataVersion = static_cast(0); + Attributes::LeaderRouterId::TypeInfo::DecodableType leaderRouterId = static_cast(0); + Attributes::DetachedRoleCount::TypeInfo::DecodableType detachedRoleCount = static_cast(0); + Attributes::ChildRoleCount::TypeInfo::DecodableType childRoleCount = static_cast(0); + Attributes::RouterRoleCount::TypeInfo::DecodableType routerRoleCount = static_cast(0); + Attributes::LeaderRoleCount::TypeInfo::DecodableType leaderRoleCount = static_cast(0); + Attributes::AttachAttemptCount::TypeInfo::DecodableType attachAttemptCount = static_cast(0); + Attributes::PartitionIdChangeCount::TypeInfo::DecodableType partitionIdChangeCount = static_cast(0); + Attributes::BetterPartitionAttachAttemptCount::TypeInfo::DecodableType betterPartitionAttachAttemptCount = + static_cast(0); + Attributes::ParentChangeCount::TypeInfo::DecodableType parentChangeCount = static_cast(0); + Attributes::TxTotalCount::TypeInfo::DecodableType txTotalCount = static_cast(0); + Attributes::TxUnicastCount::TypeInfo::DecodableType txUnicastCount = static_cast(0); + Attributes::TxBroadcastCount::TypeInfo::DecodableType txBroadcastCount = static_cast(0); + Attributes::TxAckRequestedCount::TypeInfo::DecodableType txAckRequestedCount = static_cast(0); + Attributes::TxAckedCount::TypeInfo::DecodableType txAckedCount = static_cast(0); + Attributes::TxNoAckRequestedCount::TypeInfo::DecodableType txNoAckRequestedCount = static_cast(0); + Attributes::TxDataCount::TypeInfo::DecodableType txDataCount = static_cast(0); + Attributes::TxDataPollCount::TypeInfo::DecodableType txDataPollCount = static_cast(0); + Attributes::TxBeaconCount::TypeInfo::DecodableType txBeaconCount = static_cast(0); + Attributes::TxBeaconRequestCount::TypeInfo::DecodableType txBeaconRequestCount = static_cast(0); + Attributes::TxOtherCount::TypeInfo::DecodableType txOtherCount = static_cast(0); + Attributes::TxRetryCount::TypeInfo::DecodableType txRetryCount = static_cast(0); + Attributes::TxDirectMaxRetryExpiryCount::TypeInfo::DecodableType txDirectMaxRetryExpiryCount = static_cast(0); + Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo::DecodableType txIndirectMaxRetryExpiryCount = static_cast(0); + Attributes::TxErrCcaCount::TypeInfo::DecodableType txErrCcaCount = static_cast(0); + Attributes::TxErrAbortCount::TypeInfo::DecodableType txErrAbortCount = static_cast(0); + Attributes::TxErrBusyChannelCount::TypeInfo::DecodableType txErrBusyChannelCount = static_cast(0); + Attributes::RxTotalCount::TypeInfo::DecodableType rxTotalCount = static_cast(0); + Attributes::RxUnicastCount::TypeInfo::DecodableType rxUnicastCount = static_cast(0); + Attributes::RxBroadcastCount::TypeInfo::DecodableType rxBroadcastCount = static_cast(0); + Attributes::RxDataCount::TypeInfo::DecodableType rxDataCount = static_cast(0); + Attributes::RxDataPollCount::TypeInfo::DecodableType rxDataPollCount = static_cast(0); + Attributes::RxBeaconCount::TypeInfo::DecodableType rxBeaconCount = static_cast(0); + Attributes::RxBeaconRequestCount::TypeInfo::DecodableType rxBeaconRequestCount = static_cast(0); + Attributes::RxOtherCount::TypeInfo::DecodableType rxOtherCount = static_cast(0); + Attributes::RxAddressFilteredCount::TypeInfo::DecodableType rxAddressFilteredCount = static_cast(0); + Attributes::RxDestAddrFilteredCount::TypeInfo::DecodableType rxDestAddrFilteredCount = static_cast(0); + Attributes::RxDuplicatedCount::TypeInfo::DecodableType rxDuplicatedCount = static_cast(0); + Attributes::RxErrNoFrameCount::TypeInfo::DecodableType rxErrNoFrameCount = static_cast(0); + Attributes::RxErrUnknownNeighborCount::TypeInfo::DecodableType rxErrUnknownNeighborCount = static_cast(0); + Attributes::RxErrInvalidSrcAddrCount::TypeInfo::DecodableType rxErrInvalidSrcAddrCount = static_cast(0); + Attributes::RxErrSecCount::TypeInfo::DecodableType rxErrSecCount = static_cast(0); + Attributes::RxErrFcsCount::TypeInfo::DecodableType rxErrFcsCount = static_cast(0); + Attributes::RxErrOtherCount::TypeInfo::DecodableType rxErrOtherCount = static_cast(0); + Attributes::ActiveTimestamp::TypeInfo::DecodableType activeTimestamp = static_cast(0); + Attributes::PendingTimestamp::TypeInfo::DecodableType pendingTimestamp = static_cast(0); + Attributes::Delay::TypeInfo::DecodableType delay = static_cast(0); Attributes::SecurityPolicy::TypeInfo::DecodableType securityPolicy; Attributes::ChannelMask::TypeInfo::DecodableType channelMask; Attributes::OperationalDatasetComponents::TypeInfo::DecodableType operationalDatasetComponents; Attributes::ActiveNetworkFaultsList::TypeInfo::DecodableType activeNetworkFaultsList; Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -12564,7 +12571,7 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - ThreadConnectionStatus connectionStatus; + ThreadConnectionStatus connectionStatus = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -12576,7 +12583,7 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - ThreadConnectionStatus connectionStatus; + ThreadConnectionStatus connectionStatus = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -12876,21 +12883,21 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::Bssid::TypeInfo::DecodableType bssid; - Attributes::SecurityType::TypeInfo::DecodableType securityType; - Attributes::WiFiVersion::TypeInfo::DecodableType wiFiVersion; - Attributes::ChannelNumber::TypeInfo::DecodableType channelNumber; - Attributes::Rssi::TypeInfo::DecodableType rssi; - Attributes::BeaconLostCount::TypeInfo::DecodableType beaconLostCount; - Attributes::BeaconRxCount::TypeInfo::DecodableType beaconRxCount; - Attributes::PacketMulticastRxCount::TypeInfo::DecodableType packetMulticastRxCount; - Attributes::PacketMulticastTxCount::TypeInfo::DecodableType packetMulticastTxCount; - Attributes::PacketUnicastRxCount::TypeInfo::DecodableType packetUnicastRxCount; - Attributes::PacketUnicastTxCount::TypeInfo::DecodableType packetUnicastTxCount; - Attributes::CurrentMaxRate::TypeInfo::DecodableType currentMaxRate; - Attributes::OverrunCount::TypeInfo::DecodableType overrunCount; + Attributes::SecurityType::TypeInfo::DecodableType securityType = static_cast(0); + Attributes::WiFiVersion::TypeInfo::DecodableType wiFiVersion = static_cast(0); + Attributes::ChannelNumber::TypeInfo::DecodableType channelNumber = static_cast(0); + Attributes::Rssi::TypeInfo::DecodableType rssi = static_cast(0); + Attributes::BeaconLostCount::TypeInfo::DecodableType beaconLostCount = static_cast(0); + Attributes::BeaconRxCount::TypeInfo::DecodableType beaconRxCount = static_cast(0); + Attributes::PacketMulticastRxCount::TypeInfo::DecodableType packetMulticastRxCount = static_cast(0); + Attributes::PacketMulticastTxCount::TypeInfo::DecodableType packetMulticastTxCount = static_cast(0); + Attributes::PacketUnicastRxCount::TypeInfo::DecodableType packetUnicastRxCount = static_cast(0); + Attributes::PacketUnicastTxCount::TypeInfo::DecodableType packetUnicastTxCount = static_cast(0); + Attributes::CurrentMaxRate::TypeInfo::DecodableType currentMaxRate = static_cast(0); + Attributes::OverrunCount::TypeInfo::DecodableType overrunCount = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -12911,7 +12918,7 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } - uint16_t reasonCode; + uint16_t reasonCode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -12923,7 +12930,7 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } - uint16_t reasonCode; + uint16_t reasonCode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -12945,8 +12952,8 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } - AssociationFailureCause associationFailure; - uint16_t status; + AssociationFailureCause associationFailure = static_cast(0); + uint16_t status = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -12958,8 +12965,8 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } - AssociationFailureCause associationFailure; - uint16_t status; + AssociationFailureCause associationFailure = static_cast(0); + uint16_t status = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -12980,7 +12987,7 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } - WiFiConnectionStatus connectionStatus; + WiFiConnectionStatus connectionStatus = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -12992,7 +12999,7 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } - WiFiConnectionStatus connectionStatus; + WiFiConnectionStatus connectionStatus = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -13217,18 +13224,18 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::PHYRate::TypeInfo::DecodableType PHYRate; - Attributes::FullDuplex::TypeInfo::DecodableType fullDuplex; - Attributes::PacketRxCount::TypeInfo::DecodableType packetRxCount; - Attributes::PacketTxCount::TypeInfo::DecodableType packetTxCount; - Attributes::TxErrCount::TypeInfo::DecodableType txErrCount; - Attributes::CollisionCount::TypeInfo::DecodableType collisionCount; - Attributes::OverrunCount::TypeInfo::DecodableType overrunCount; - Attributes::CarrierDetect::TypeInfo::DecodableType carrierDetect; - Attributes::TimeSinceReset::TypeInfo::DecodableType timeSinceReset; + Attributes::PHYRate::TypeInfo::DecodableType PHYRate = static_cast(0); + Attributes::FullDuplex::TypeInfo::DecodableType fullDuplex = static_cast(0); + Attributes::PacketRxCount::TypeInfo::DecodableType packetRxCount = static_cast(0); + Attributes::PacketTxCount::TypeInfo::DecodableType packetTxCount = static_cast(0); + Attributes::TxErrCount::TypeInfo::DecodableType txErrCount = static_cast(0); + Attributes::CollisionCount::TypeInfo::DecodableType collisionCount = static_cast(0); + Attributes::OverrunCount::TypeInfo::DecodableType overrunCount = static_cast(0); + Attributes::CarrierDetect::TypeInfo::DecodableType carrierDetect = static_cast(0); + Attributes::TimeSinceReset::TypeInfo::DecodableType timeSinceReset = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -13283,8 +13290,8 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -13659,23 +13666,23 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::VendorName::TypeInfo::DecodableType vendorName; - Attributes::VendorID::TypeInfo::DecodableType vendorID; + Attributes::VendorID::TypeInfo::DecodableType vendorID = static_cast(0); Attributes::ProductName::TypeInfo::DecodableType productName; Attributes::NodeLabel::TypeInfo::DecodableType nodeLabel; - Attributes::HardwareVersion::TypeInfo::DecodableType hardwareVersion; + Attributes::HardwareVersion::TypeInfo::DecodableType hardwareVersion = static_cast(0); Attributes::HardwareVersionString::TypeInfo::DecodableType hardwareVersionString; - Attributes::SoftwareVersion::TypeInfo::DecodableType softwareVersion; + Attributes::SoftwareVersion::TypeInfo::DecodableType softwareVersion = static_cast(0); Attributes::SoftwareVersionString::TypeInfo::DecodableType softwareVersionString; Attributes::ManufacturingDate::TypeInfo::DecodableType manufacturingDate; Attributes::PartNumber::TypeInfo::DecodableType partNumber; Attributes::ProductURL::TypeInfo::DecodableType productURL; Attributes::ProductLabel::TypeInfo::DecodableType productLabel; Attributes::SerialNumber::TypeInfo::DecodableType serialNumber; - Attributes::Reachable::TypeInfo::DecodableType reachable; + Attributes::Reachable::TypeInfo::DecodableType reachable = static_cast(0); Attributes::UniqueID::TypeInfo::DecodableType uniqueID; Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -13765,12 +13772,12 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::NumberOfPositions::TypeInfo::DecodableType numberOfPositions; - Attributes::CurrentPosition::TypeInfo::DecodableType currentPosition; - Attributes::MultiPressMax::TypeInfo::DecodableType multiPressMax; + Attributes::NumberOfPositions::TypeInfo::DecodableType numberOfPositions = static_cast(0); + Attributes::CurrentPosition::TypeInfo::DecodableType currentPosition = static_cast(0); + Attributes::MultiPressMax::TypeInfo::DecodableType multiPressMax = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -13791,7 +13798,7 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - uint8_t newPosition; + uint8_t newPosition = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -13803,7 +13810,7 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - uint8_t newPosition; + uint8_t newPosition = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -13824,7 +13831,7 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - uint8_t newPosition; + uint8_t newPosition = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -13836,7 +13843,7 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - uint8_t newPosition; + uint8_t newPosition = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -13857,7 +13864,7 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - uint8_t newPosition; + uint8_t newPosition = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -13869,7 +13876,7 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - uint8_t newPosition; + uint8_t newPosition = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -13890,7 +13897,7 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - uint8_t previousPosition; + uint8_t previousPosition = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -13902,7 +13909,7 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - uint8_t previousPosition; + uint8_t previousPosition = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -13923,7 +13930,7 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - uint8_t previousPosition; + uint8_t previousPosition = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -13935,7 +13942,7 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - uint8_t previousPosition; + uint8_t previousPosition = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -13957,8 +13964,8 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - uint8_t newPosition; - uint8_t currentNumberOfPressesCounted; + uint8_t newPosition = static_cast(0); + uint8_t currentNumberOfPressesCounted = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -13970,8 +13977,8 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - uint8_t newPosition; - uint8_t currentNumberOfPressesCounted; + uint8_t newPosition = static_cast(0); + uint8_t currentNumberOfPressesCounted = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -13993,8 +14000,8 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - uint8_t newPosition; - uint8_t totalNumberOfPressesCounted; + uint8_t newPosition = static_cast(0); + uint8_t totalNumberOfPressesCounted = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -14006,8 +14013,8 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - uint8_t newPosition; - uint8_t totalNumberOfPressesCounted; + uint8_t newPosition = static_cast(0); + uint8_t totalNumberOfPressesCounted = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -14075,12 +14082,12 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::OpenCommissioningWindow::Id; } static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } - uint16_t commissioningTimeout; + uint16_t commissioningTimeout = static_cast(0); chip::ByteSpan PAKEVerifier; - uint16_t discriminator; - uint32_t iterations; + uint16_t discriminator = static_cast(0); + uint32_t iterations = static_cast(0); chip::ByteSpan salt; - uint16_t passcodeID; + uint16_t passcodeID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -14095,12 +14102,12 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::OpenCommissioningWindow::Id; } static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } - uint16_t commissioningTimeout; + uint16_t commissioningTimeout = static_cast(0); chip::ByteSpan PAKEVerifier; - uint16_t discriminator; - uint32_t iterations; + uint16_t discriminator = static_cast(0); + uint32_t iterations = static_cast(0); chip::ByteSpan salt; - uint16_t passcodeID; + uint16_t passcodeID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace OpenCommissioningWindow @@ -14117,7 +14124,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::OpenBasicCommissioningWindow::Id; } static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } - uint16_t commissioningTimeout; + uint16_t commissioningTimeout = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -14132,7 +14139,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::OpenBasicCommissioningWindow::Id; } static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } - uint16_t commissioningTimeout; + uint16_t commissioningTimeout = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace OpenBasicCommissioningWindow @@ -14249,12 +14256,12 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::WindowStatus::TypeInfo::DecodableType windowStatus; - Attributes::AdminFabricIndex::TypeInfo::DecodableType adminFabricIndex; - Attributes::AdminVendorId::TypeInfo::DecodableType adminVendorId; + Attributes::WindowStatus::TypeInfo::DecodableType windowStatus = static_cast(0); + Attributes::AdminFabricIndex::TypeInfo::DecodableType adminFabricIndex = static_cast(0); + Attributes::AdminVendorId::TypeInfo::DecodableType adminVendorId = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -14483,7 +14490,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::CertificateChainRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - uint8_t certificateType; + uint8_t certificateType = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -14498,7 +14505,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::CertificateChainRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - uint8_t certificateType; + uint8_t certificateType = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace CertificateChainRequest @@ -14621,8 +14628,8 @@ struct Type chip::ByteSpan NOCValue; Optional ICACValue; chip::ByteSpan IPKValue; - chip::NodeId caseAdminNode; - uint16_t adminVendorId; + chip::NodeId caseAdminNode = static_cast(0); + uint16_t adminVendorId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -14640,8 +14647,8 @@ struct DecodableType chip::ByteSpan NOCValue; Optional ICACValue; chip::ByteSpan IPKValue; - chip::NodeId caseAdminNode; - uint16_t adminVendorId; + chip::NodeId caseAdminNode = static_cast(0); + uint16_t adminVendorId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace AddNOC @@ -14695,8 +14702,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::NOCResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - uint8_t statusCode; - uint8_t fabricIndex; + uint8_t statusCode = static_cast(0); + uint8_t fabricIndex = static_cast(0); chip::CharSpan debugText; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -14712,8 +14719,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::NOCResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - uint8_t statusCode; - uint8_t fabricIndex; + uint8_t statusCode = static_cast(0); + uint8_t fabricIndex = static_cast(0); chip::CharSpan debugText; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -14763,7 +14770,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::RemoveFabric::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - uint8_t fabricIndex; + uint8_t fabricIndex = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -14778,7 +14785,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::RemoveFabric::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - uint8_t fabricIndex; + uint8_t fabricIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace RemoveFabric @@ -14958,13 +14965,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::FabricsList::TypeInfo::DecodableType fabricsList; - Attributes::SupportedFabrics::TypeInfo::DecodableType supportedFabrics; - Attributes::CommissionedFabrics::TypeInfo::DecodableType commissionedFabrics; + Attributes::SupportedFabrics::TypeInfo::DecodableType supportedFabrics = static_cast(0); + Attributes::CommissionedFabrics::TypeInfo::DecodableType commissionedFabrics = static_cast(0); Attributes::TrustedRootCertificates::TypeInfo::DecodableType trustedRootCertificates; - Attributes::CurrentFabricIndex::TypeInfo::DecodableType currentFabricIndex; + Attributes::CurrentFabricIndex::TypeInfo::DecodableType currentFabricIndex = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -15147,7 +15154,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::KeySetRead::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - uint16_t groupKeySetID; + uint16_t groupKeySetID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -15162,7 +15169,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::KeySetRead::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - uint16_t groupKeySetID; + uint16_t groupKeySetID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace KeySetRead @@ -15211,7 +15218,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::KeySetRemove::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - uint16_t groupKeySetID; + uint16_t groupKeySetID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -15226,7 +15233,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::KeySetRemove::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - uint16_t groupKeySetID; + uint16_t groupKeySetID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace KeySetRemove @@ -15397,11 +15404,11 @@ struct TypeInfo Attributes::GroupKeyMap::TypeInfo::DecodableType groupKeyMap; Attributes::GroupTable::TypeInfo::DecodableType groupTable; - Attributes::MaxGroupsPerFabric::TypeInfo::DecodableType maxGroupsPerFabric; - Attributes::MaxGroupKeysPerFabric::TypeInfo::DecodableType maxGroupKeysPerFabric; + Attributes::MaxGroupsPerFabric::TypeInfo::DecodableType maxGroupsPerFabric = static_cast(0); + Attributes::MaxGroupKeysPerFabric::TypeInfo::DecodableType maxGroupKeysPerFabric = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -15474,8 +15481,8 @@ struct TypeInfo Attributes::LabelList::TypeInfo::DecodableType labelList; Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -15548,8 +15555,8 @@ struct TypeInfo Attributes::LabelList::TypeInfo::DecodableType labelList; Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -15604,8 +15611,8 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -15660,8 +15667,8 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -15716,8 +15723,8 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -15783,10 +15790,10 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::StateValue::TypeInfo::DecodableType stateValue; + Attributes::StateValue::TypeInfo::DecodableType stateValue = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -15807,7 +15814,7 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } - bool stateValue; + bool stateValue = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -15819,7 +15826,7 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } - bool stateValue; + bool stateValue = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -15897,7 +15904,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } - uint8_t newMode; + uint8_t newMode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -15912,7 +15919,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } - uint8_t newMode; + uint8_t newMode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ChangeToMode @@ -16027,14 +16034,14 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::CurrentMode::TypeInfo::DecodableType currentMode; + Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; - Attributes::OnMode::TypeInfo::DecodableType onMode; - Attributes::StartUpMode::TypeInfo::DecodableType startUpMode; + Attributes::OnMode::TypeInfo::DecodableType onMode = static_cast(0); + Attributes::StartUpMode::TypeInfo::DecodableType startUpMode = static_cast(0); Attributes::Description::TypeInfo::DecodableType description; Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -16148,14 +16155,14 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::PhysicalClosedLimit::TypeInfo::DecodableType physicalClosedLimit; - Attributes::MotorStepSize::TypeInfo::DecodableType motorStepSize; - Attributes::Status::TypeInfo::DecodableType status; - Attributes::ClosedLimit::TypeInfo::DecodableType closedLimit; - Attributes::Mode::TypeInfo::DecodableType mode; + Attributes::PhysicalClosedLimit::TypeInfo::DecodableType physicalClosedLimit = static_cast(0); + Attributes::MotorStepSize::TypeInfo::DecodableType motorStepSize = static_cast(0); + Attributes::Status::TypeInfo::DecodableType status = static_cast(0); + Attributes::ClosedLimit::TypeInfo::DecodableType closedLimit = static_cast(0); + Attributes::Mode::TypeInfo::DecodableType mode = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -16884,7 +16891,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::UnlockWithTimeout::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t timeout; + uint16_t timeout = static_cast(0); Optional pinCode; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -16900,7 +16907,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::UnlockWithTimeout::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t timeout; + uint16_t timeout = static_cast(0); Optional pinCode; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -16918,7 +16925,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetLogRecord::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t logIndex; + uint16_t logIndex = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -16933,7 +16940,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetLogRecord::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t logIndex; + uint16_t logIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetLogRecord @@ -16956,12 +16963,12 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetLogRecordResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t logEntryId; - uint32_t timestamp; - uint8_t eventType; - uint8_t source; - uint8_t eventIdOrAlarmCode; - uint16_t userId; + uint16_t logEntryId = static_cast(0); + uint32_t timestamp = static_cast(0); + uint8_t eventType = static_cast(0); + uint8_t source = static_cast(0); + uint8_t eventIdOrAlarmCode = static_cast(0); + uint16_t userId = static_cast(0); chip::ByteSpan pin; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -16977,12 +16984,12 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetLogRecordResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t logEntryId; - uint32_t timestamp; - uint8_t eventType; - uint8_t source; - uint8_t eventIdOrAlarmCode; - uint16_t userId; + uint16_t logEntryId = static_cast(0); + uint32_t timestamp = static_cast(0); + uint8_t eventType = static_cast(0); + uint8_t source = static_cast(0); + uint8_t eventIdOrAlarmCode = static_cast(0); + uint16_t userId = static_cast(0); chip::ByteSpan pin; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -17003,9 +17010,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetPINCode::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; - DlUserStatus userStatus; - DlUserType userType; + uint16_t userId = static_cast(0); + DlUserStatus userStatus = static_cast(0); + DlUserType userType = static_cast(0); chip::ByteSpan pin; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17021,9 +17028,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetPINCode::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; - DlUserStatus userStatus; - DlUserType userType; + uint16_t userId = static_cast(0); + DlUserStatus userStatus = static_cast(0); + DlUserType userType = static_cast(0); chip::ByteSpan pin; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -17041,7 +17048,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetPINCode::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; + uint16_t userId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17056,7 +17063,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetPINCode::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; + uint16_t userId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetPINCode @@ -17076,7 +17083,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetPINCodeResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; + uint16_t userId = static_cast(0); DataModel::Nullable userStatus; DataModel::Nullable userType; DataModel::Nullable pin; @@ -17094,7 +17101,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetPINCodeResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; + uint16_t userId = static_cast(0); DataModel::Nullable userStatus; DataModel::Nullable userType; DataModel::Nullable pin; @@ -17114,7 +17121,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ClearPINCode::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t pinSlotIndex; + uint16_t pinSlotIndex = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17129,7 +17136,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ClearPINCode::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t pinSlotIndex; + uint16_t pinSlotIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ClearPINCode @@ -17175,8 +17182,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetUserStatus::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; - DlUserStatus userStatus; + uint16_t userId = static_cast(0); + DlUserStatus userStatus = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17191,8 +17198,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetUserStatus::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; - DlUserStatus userStatus; + uint16_t userId = static_cast(0); + DlUserStatus userStatus = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SetUserStatus @@ -17209,7 +17216,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetUserStatus::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; + uint16_t userId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17224,7 +17231,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetUserStatus::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; + uint16_t userId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetUserStatus @@ -17242,8 +17249,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetUserStatusResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; - DlUserStatus userStatus; + uint16_t userId = static_cast(0); + DlUserStatus userStatus = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17258,8 +17265,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetUserStatusResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; - DlUserStatus userStatus; + uint16_t userId = static_cast(0); + DlUserStatus userStatus = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetUserStatusResponse @@ -17282,13 +17289,13 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetWeekDaySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t weekDayIndex; - uint16_t userIndex; - chip::BitFlags daysMask; - uint8_t startHour; - uint8_t startMinute; - uint8_t endHour; - uint8_t endMinute; + uint8_t weekDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); + chip::BitFlags daysMask = static_cast>(0); + uint8_t startHour = static_cast(0); + uint8_t startMinute = static_cast(0); + uint8_t endHour = static_cast(0); + uint8_t endMinute = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17303,13 +17310,13 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetWeekDaySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t weekDayIndex; - uint16_t userIndex; - chip::BitFlags daysMask; - uint8_t startHour; - uint8_t startMinute; - uint8_t endHour; - uint8_t endMinute; + uint8_t weekDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); + chip::BitFlags daysMask = static_cast>(0); + uint8_t startHour = static_cast(0); + uint8_t startMinute = static_cast(0); + uint8_t endHour = static_cast(0); + uint8_t endMinute = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SetWeekDaySchedule @@ -17327,8 +17334,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetWeekDaySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t weekDayIndex; - uint16_t userIndex; + uint8_t weekDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17343,8 +17350,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetWeekDaySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t weekDayIndex; - uint16_t userIndex; + uint8_t weekDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetWeekDaySchedule @@ -17368,14 +17375,14 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetWeekDayScheduleResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t weekDayIndex; - uint16_t userIndex; - DlStatus status; - chip::BitFlags daysMask; - uint8_t startHour; - uint8_t startMinute; - uint8_t endHour; - uint8_t endMinute; + uint8_t weekDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); + DlStatus status = static_cast(0); + chip::BitFlags daysMask = static_cast>(0); + uint8_t startHour = static_cast(0); + uint8_t startMinute = static_cast(0); + uint8_t endHour = static_cast(0); + uint8_t endMinute = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17390,14 +17397,14 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetWeekDayScheduleResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t weekDayIndex; - uint16_t userIndex; - DlStatus status; - chip::BitFlags daysMask; - uint8_t startHour; - uint8_t startMinute; - uint8_t endHour; - uint8_t endMinute; + uint8_t weekDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); + DlStatus status = static_cast(0); + chip::BitFlags daysMask = static_cast>(0); + uint8_t startHour = static_cast(0); + uint8_t startMinute = static_cast(0); + uint8_t endHour = static_cast(0); + uint8_t endMinute = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetWeekDayScheduleResponse @@ -17415,8 +17422,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ClearWeekDaySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t weekDayIndex; - uint16_t userIndex; + uint8_t weekDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17431,8 +17438,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ClearWeekDaySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t weekDayIndex; - uint16_t userIndex; + uint8_t weekDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ClearWeekDaySchedule @@ -17452,10 +17459,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetYearDaySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t yearDayIndex; - uint16_t userIndex; - uint32_t localStartTime; - uint32_t localEndTime; + uint8_t yearDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); + uint32_t localStartTime = static_cast(0); + uint32_t localEndTime = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17470,10 +17477,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetYearDaySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t yearDayIndex; - uint16_t userIndex; - uint32_t localStartTime; - uint32_t localEndTime; + uint8_t yearDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); + uint32_t localStartTime = static_cast(0); + uint32_t localEndTime = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SetYearDaySchedule @@ -17491,8 +17498,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetYearDaySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t yearDayIndex; - uint16_t userIndex; + uint8_t yearDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17507,8 +17514,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetYearDaySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t yearDayIndex; - uint16_t userIndex; + uint8_t yearDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetYearDaySchedule @@ -17529,11 +17536,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetYearDayScheduleResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t yearDayIndex; - uint16_t userIndex; - DlStatus status; - uint32_t localStartTime; - uint32_t localEndTime; + uint8_t yearDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); + DlStatus status = static_cast(0); + uint32_t localStartTime = static_cast(0); + uint32_t localEndTime = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17548,11 +17555,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetYearDayScheduleResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t yearDayIndex; - uint16_t userIndex; - DlStatus status; - uint32_t localStartTime; - uint32_t localEndTime; + uint8_t yearDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); + DlStatus status = static_cast(0); + uint32_t localStartTime = static_cast(0); + uint32_t localEndTime = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetYearDayScheduleResponse @@ -17570,8 +17577,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ClearYearDaySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t yearDayIndex; - uint16_t userIndex; + uint8_t yearDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17586,8 +17593,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ClearYearDaySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t yearDayIndex; - uint16_t userIndex; + uint8_t yearDayIndex = static_cast(0); + uint16_t userIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ClearYearDaySchedule @@ -17607,10 +17614,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetHolidaySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t holidayIndex; - uint32_t localStartTime; - uint32_t localEndTime; - DlOperatingMode operatingMode; + uint8_t holidayIndex = static_cast(0); + uint32_t localStartTime = static_cast(0); + uint32_t localEndTime = static_cast(0); + DlOperatingMode operatingMode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17625,10 +17632,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetHolidaySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t holidayIndex; - uint32_t localStartTime; - uint32_t localEndTime; - DlOperatingMode operatingMode; + uint8_t holidayIndex = static_cast(0); + uint32_t localStartTime = static_cast(0); + uint32_t localEndTime = static_cast(0); + DlOperatingMode operatingMode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SetHolidaySchedule @@ -17645,7 +17652,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetHolidaySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t holidayIndex; + uint8_t holidayIndex = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17660,7 +17667,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetHolidaySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t holidayIndex; + uint8_t holidayIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetHolidaySchedule @@ -17681,11 +17688,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetHolidayScheduleResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t holidayIndex; - DlStatus status; - uint32_t localStartTime; - uint32_t localEndTime; - DlOperatingMode operatingMode; + uint8_t holidayIndex = static_cast(0); + DlStatus status = static_cast(0); + uint32_t localStartTime = static_cast(0); + uint32_t localEndTime = static_cast(0); + DlOperatingMode operatingMode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17700,11 +17707,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetHolidayScheduleResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t holidayIndex; - DlStatus status; - uint32_t localStartTime; - uint32_t localEndTime; - DlOperatingMode operatingMode; + uint8_t holidayIndex = static_cast(0); + DlStatus status = static_cast(0); + uint32_t localStartTime = static_cast(0); + uint32_t localEndTime = static_cast(0); + DlOperatingMode operatingMode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetHolidayScheduleResponse @@ -17721,7 +17728,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ClearHolidaySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t holidayIndex; + uint8_t holidayIndex = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17736,7 +17743,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ClearHolidaySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t holidayIndex; + uint8_t holidayIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ClearHolidaySchedule @@ -17754,8 +17761,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetUserType::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; - DlUserType userType; + uint16_t userId = static_cast(0); + DlUserType userType = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17770,8 +17777,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetUserType::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; - DlUserType userType; + uint16_t userId = static_cast(0); + DlUserType userType = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SetUserType @@ -17788,7 +17795,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetUserType::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; + uint16_t userId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17803,7 +17810,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetUserType::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; + uint16_t userId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetUserType @@ -17821,8 +17828,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetUserTypeResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; - DlUserType userType; + uint16_t userId = static_cast(0); + DlUserType userType = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17837,8 +17844,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetUserTypeResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; - DlUserType userType; + uint16_t userId = static_cast(0); + DlUserType userType = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetUserTypeResponse @@ -17858,9 +17865,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetRFIDCode::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; - DlUserStatus userStatus; - DlUserType userType; + uint16_t userId = static_cast(0); + DlUserStatus userStatus = static_cast(0); + DlUserType userType = static_cast(0); chip::ByteSpan rfidCode; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17876,9 +17883,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetRFIDCode::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; - DlUserStatus userStatus; - DlUserType userType; + uint16_t userId = static_cast(0); + DlUserStatus userStatus = static_cast(0); + DlUserType userType = static_cast(0); chip::ByteSpan rfidCode; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -17896,7 +17903,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetRFIDCode::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; + uint16_t userId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17911,7 +17918,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetRFIDCode::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; + uint16_t userId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetRFIDCode @@ -17931,7 +17938,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetRFIDCodeResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; + uint16_t userId = static_cast(0); DataModel::Nullable userStatus; DataModel::Nullable userType; DataModel::Nullable rfidCode; @@ -17949,7 +17956,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetRFIDCodeResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userId; + uint16_t userId = static_cast(0); DataModel::Nullable userStatus; DataModel::Nullable userType; DataModel::Nullable rfidCode; @@ -17969,7 +17976,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ClearRFIDCode::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t rfidSlotIndex; + uint16_t rfidSlotIndex = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -17984,7 +17991,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ClearRFIDCode::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t rfidSlotIndex; + uint16_t rfidSlotIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ClearRFIDCode @@ -18035,13 +18042,13 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetUser::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - DlDataOperationType operationType; - uint16_t userIndex; + DlDataOperationType operationType = static_cast(0); + uint16_t userIndex = static_cast(0); DataModel::Nullable userName; DataModel::Nullable userUniqueId; - DlUserStatus userStatus; - DlUserType userType; - DlCredentialRule credentialRule; + DlUserStatus userStatus = static_cast(0); + DlUserType userType = static_cast(0); + DlCredentialRule credentialRule = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -18056,13 +18063,13 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetUser::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - DlDataOperationType operationType; - uint16_t userIndex; + DlDataOperationType operationType = static_cast(0); + uint16_t userIndex = static_cast(0); DataModel::Nullable userName; DataModel::Nullable userUniqueId; - DlUserStatus userStatus; - DlUserType userType; - DlCredentialRule credentialRule; + DlUserStatus userStatus = static_cast(0); + DlUserType userType = static_cast(0); + DlCredentialRule credentialRule = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SetUser @@ -18079,7 +18086,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetUser::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userIndex; + uint16_t userIndex = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -18094,7 +18101,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetUser::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userIndex; + uint16_t userIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetUser @@ -18120,7 +18127,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetUserResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userIndex; + uint16_t userIndex = static_cast(0); DataModel::Nullable userName; DataModel::Nullable userUniqueId; DataModel::Nullable userStatus; @@ -18129,7 +18136,7 @@ struct Type DataModel::Nullable> credentials; DataModel::Nullable creatorFabricIndex; DataModel::Nullable lastModifiedFabricIndex; - uint16_t nextUserIndex; + uint16_t nextUserIndex = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -18144,7 +18151,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetUserResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userIndex; + uint16_t userIndex = static_cast(0); DataModel::Nullable userName; DataModel::Nullable userUniqueId; DataModel::Nullable userStatus; @@ -18153,7 +18160,7 @@ struct DecodableType DataModel::Nullable> credentials; DataModel::Nullable creatorFabricIndex; DataModel::Nullable lastModifiedFabricIndex; - uint16_t nextUserIndex; + uint16_t nextUserIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetUserResponse @@ -18170,7 +18177,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ClearUser::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userIndex; + uint16_t userIndex = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -18185,7 +18192,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ClearUser::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint16_t userIndex; + uint16_t userIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ClearUser @@ -18207,11 +18214,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::OperatingEventNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t operationEventSource; - uint8_t operationEventCode; - uint16_t userId; + uint8_t operationEventSource = static_cast(0); + uint8_t operationEventCode = static_cast(0); + uint16_t userId = static_cast(0); chip::ByteSpan pin; - uint32_t localTime; + uint32_t localTime = static_cast(0); Optional data; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -18227,11 +18234,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::OperatingEventNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t operationEventSource; - uint8_t operationEventCode; - uint16_t userId; + uint8_t operationEventSource = static_cast(0); + uint8_t operationEventCode = static_cast(0); + uint16_t userId = static_cast(0); chip::ByteSpan pin; - uint32_t localTime; + uint32_t localTime = static_cast(0); Optional data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -18256,13 +18263,13 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ProgrammingEventNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t programEventSource; - uint8_t programEventCode; - uint16_t userId; + uint8_t programEventSource = static_cast(0); + uint8_t programEventCode = static_cast(0); + uint16_t userId = static_cast(0); chip::ByteSpan pin; - DlUserType userType; - DlUserStatus userStatus; - uint32_t localTime; + DlUserType userType = static_cast(0); + DlUserStatus userStatus = static_cast(0); + uint32_t localTime = static_cast(0); Optional data; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -18278,13 +18285,13 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ProgrammingEventNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - uint8_t programEventSource; - uint8_t programEventCode; - uint16_t userId; + uint8_t programEventSource = static_cast(0); + uint8_t programEventCode = static_cast(0); + uint16_t userId = static_cast(0); chip::ByteSpan pin; - DlUserType userType; - DlUserStatus userStatus; - uint32_t localTime; + DlUserType userType = static_cast(0); + DlUserStatus userStatus = static_cast(0); + uint32_t localTime = static_cast(0); Optional data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -18306,11 +18313,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetCredential::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - DlDataOperationType operationType; + DlDataOperationType operationType = static_cast(0); Structs::DlCredential::Type credential; chip::ByteSpan credentialData; - uint16_t userIndex; - DlUserStatus userStatus; + uint16_t userIndex = static_cast(0); + DlUserStatus userStatus = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -18325,11 +18332,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetCredential::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - DlDataOperationType operationType; + DlDataOperationType operationType = static_cast(0); Structs::DlCredential::DecodableType credential; chip::ByteSpan credentialData; - uint16_t userIndex; - DlUserStatus userStatus; + uint16_t userIndex = static_cast(0); + DlUserStatus userStatus = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SetCredential @@ -18348,7 +18355,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetCredentialResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - DlStatus status; + DlStatus status = static_cast(0); DataModel::Nullable userIndex; DataModel::Nullable nextCredentialIndex; @@ -18365,7 +18372,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetCredentialResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - DlStatus status; + DlStatus status = static_cast(0); DataModel::Nullable userIndex; DataModel::Nullable nextCredentialIndex; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -18418,7 +18425,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetCredentialStatusResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - bool credentialExists; + bool credentialExists = static_cast(0); DataModel::Nullable userIndex; DataModel::Nullable nextCredentialIndex; @@ -18435,7 +18442,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetCredentialStatusResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - bool credentialExists; + bool credentialExists = static_cast(0); DataModel::Nullable userIndex; DataModel::Nullable nextCredentialIndex; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -19063,53 +19070,56 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::LockState::TypeInfo::DecodableType lockState; - Attributes::LockType::TypeInfo::DecodableType lockType; - Attributes::ActuatorEnabled::TypeInfo::DecodableType actuatorEnabled; + Attributes::LockType::TypeInfo::DecodableType lockType = static_cast(0); + Attributes::ActuatorEnabled::TypeInfo::DecodableType actuatorEnabled = static_cast(0); Attributes::DoorState::TypeInfo::DecodableType doorState; - Attributes::DoorOpenEvents::TypeInfo::DecodableType doorOpenEvents; - Attributes::DoorClosedEvents::TypeInfo::DecodableType doorClosedEvents; - Attributes::OpenPeriod::TypeInfo::DecodableType openPeriod; - Attributes::NumberOfLogRecordsSupported::TypeInfo::DecodableType numberOfLogRecordsSupported; - Attributes::NumberOfTotalUsersSupported::TypeInfo::DecodableType numberOfTotalUsersSupported; - Attributes::NumberOfPINUsersSupported::TypeInfo::DecodableType numberOfPINUsersSupported; - Attributes::NumberOfRFIDUsersSupported::TypeInfo::DecodableType numberOfRFIDUsersSupported; - Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo::DecodableType numberOfWeekDaySchedulesSupportedPerUser; - Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo::DecodableType numberOfYearDaySchedulesSupportedPerUser; - Attributes::NumberOfHolidaySchedulesSupported::TypeInfo::DecodableType numberOfHolidaySchedulesSupported; - Attributes::MaxPINCodeLength::TypeInfo::DecodableType maxPINCodeLength; - Attributes::MinPINCodeLength::TypeInfo::DecodableType minPINCodeLength; - Attributes::MaxRFIDCodeLength::TypeInfo::DecodableType maxRFIDCodeLength; - Attributes::MinRFIDCodeLength::TypeInfo::DecodableType minRFIDCodeLength; - Attributes::CredentialRulesSupport::TypeInfo::DecodableType credentialRulesSupport; - Attributes::EnableLogging::TypeInfo::DecodableType enableLogging; + Attributes::DoorOpenEvents::TypeInfo::DecodableType doorOpenEvents = static_cast(0); + Attributes::DoorClosedEvents::TypeInfo::DecodableType doorClosedEvents = static_cast(0); + Attributes::OpenPeriod::TypeInfo::DecodableType openPeriod = static_cast(0); + Attributes::NumberOfLogRecordsSupported::TypeInfo::DecodableType numberOfLogRecordsSupported = static_cast(0); + Attributes::NumberOfTotalUsersSupported::TypeInfo::DecodableType numberOfTotalUsersSupported = static_cast(0); + Attributes::NumberOfPINUsersSupported::TypeInfo::DecodableType numberOfPINUsersSupported = static_cast(0); + Attributes::NumberOfRFIDUsersSupported::TypeInfo::DecodableType numberOfRFIDUsersSupported = static_cast(0); + Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo::DecodableType numberOfWeekDaySchedulesSupportedPerUser = + static_cast(0); + Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo::DecodableType numberOfYearDaySchedulesSupportedPerUser = + static_cast(0); + Attributes::NumberOfHolidaySchedulesSupported::TypeInfo::DecodableType numberOfHolidaySchedulesSupported = + static_cast(0); + Attributes::MaxPINCodeLength::TypeInfo::DecodableType maxPINCodeLength = static_cast(0); + Attributes::MinPINCodeLength::TypeInfo::DecodableType minPINCodeLength = static_cast(0); + Attributes::MaxRFIDCodeLength::TypeInfo::DecodableType maxRFIDCodeLength = static_cast(0); + Attributes::MinRFIDCodeLength::TypeInfo::DecodableType minRFIDCodeLength = static_cast(0); + Attributes::CredentialRulesSupport::TypeInfo::DecodableType credentialRulesSupport = static_cast(0); + Attributes::EnableLogging::TypeInfo::DecodableType enableLogging = static_cast(0); Attributes::Language::TypeInfo::DecodableType language; - Attributes::LEDSettings::TypeInfo::DecodableType LEDSettings; - Attributes::AutoRelockTime::TypeInfo::DecodableType autoRelockTime; - Attributes::SoundVolume::TypeInfo::DecodableType soundVolume; - Attributes::OperatingMode::TypeInfo::DecodableType operatingMode; - Attributes::SupportedOperatingModes::TypeInfo::DecodableType supportedOperatingModes; - Attributes::DefaultConfigurationRegister::TypeInfo::DecodableType defaultConfigurationRegister; - Attributes::EnableLocalProgramming::TypeInfo::DecodableType enableLocalProgramming; - Attributes::EnableOneTouchLocking::TypeInfo::DecodableType enableOneTouchLocking; - Attributes::EnableInsideStatusLED::TypeInfo::DecodableType enableInsideStatusLED; - Attributes::EnablePrivacyModeButton::TypeInfo::DecodableType enablePrivacyModeButton; - Attributes::LocalProgrammingFeatures::TypeInfo::DecodableType localProgrammingFeatures; - Attributes::WrongCodeEntryLimit::TypeInfo::DecodableType wrongCodeEntryLimit; - Attributes::UserCodeTemporaryDisableTime::TypeInfo::DecodableType userCodeTemporaryDisableTime; - Attributes::SendPINOverTheAir::TypeInfo::DecodableType sendPINOverTheAir; - Attributes::RequirePINforRemoteOperation::TypeInfo::DecodableType requirePINforRemoteOperation; - Attributes::ExpiringUserTimeout::TypeInfo::DecodableType expiringUserTimeout; - Attributes::AlarmMask::TypeInfo::DecodableType alarmMask; - Attributes::KeypadOperationEventMask::TypeInfo::DecodableType keypadOperationEventMask; - Attributes::RemoteOperationEventMask::TypeInfo::DecodableType remoteOperationEventMask; - Attributes::ManualOperationEventMask::TypeInfo::DecodableType manualOperationEventMask; - Attributes::RFIDOperationEventMask::TypeInfo::DecodableType RFIDOperationEventMask; - Attributes::KeypadProgrammingEventMask::TypeInfo::DecodableType keypadProgrammingEventMask; - Attributes::RemoteProgrammingEventMask::TypeInfo::DecodableType remoteProgrammingEventMask; - Attributes::RFIDProgrammingEventMask::TypeInfo::DecodableType RFIDProgrammingEventMask; + Attributes::LEDSettings::TypeInfo::DecodableType LEDSettings = static_cast(0); + Attributes::AutoRelockTime::TypeInfo::DecodableType autoRelockTime = static_cast(0); + Attributes::SoundVolume::TypeInfo::DecodableType soundVolume = static_cast(0); + Attributes::OperatingMode::TypeInfo::DecodableType operatingMode = static_cast(0); + Attributes::SupportedOperatingModes::TypeInfo::DecodableType supportedOperatingModes = static_cast(0); + Attributes::DefaultConfigurationRegister::TypeInfo::DecodableType defaultConfigurationRegister = static_cast(0); + Attributes::EnableLocalProgramming::TypeInfo::DecodableType enableLocalProgramming = static_cast(0); + Attributes::EnableOneTouchLocking::TypeInfo::DecodableType enableOneTouchLocking = static_cast(0); + Attributes::EnableInsideStatusLED::TypeInfo::DecodableType enableInsideStatusLED = static_cast(0); + Attributes::EnablePrivacyModeButton::TypeInfo::DecodableType enablePrivacyModeButton = static_cast(0); + Attributes::LocalProgrammingFeatures::TypeInfo::DecodableType localProgrammingFeatures = static_cast(0); + Attributes::WrongCodeEntryLimit::TypeInfo::DecodableType wrongCodeEntryLimit = static_cast(0); + Attributes::UserCodeTemporaryDisableTime::TypeInfo::DecodableType userCodeTemporaryDisableTime = static_cast(0); + Attributes::SendPINOverTheAir::TypeInfo::DecodableType sendPINOverTheAir = static_cast(0); + Attributes::RequirePINforRemoteOperation::TypeInfo::DecodableType requirePINforRemoteOperation = static_cast(0); + Attributes::ExpiringUserTimeout::TypeInfo::DecodableType expiringUserTimeout = static_cast(0); + Attributes::AlarmMask::TypeInfo::DecodableType alarmMask = static_cast(0); + Attributes::KeypadOperationEventMask::TypeInfo::DecodableType keypadOperationEventMask = static_cast(0); + Attributes::RemoteOperationEventMask::TypeInfo::DecodableType remoteOperationEventMask = static_cast(0); + Attributes::ManualOperationEventMask::TypeInfo::DecodableType manualOperationEventMask = static_cast(0); + Attributes::RFIDOperationEventMask::TypeInfo::DecodableType RFIDOperationEventMask = static_cast(0); + Attributes::KeypadProgrammingEventMask::TypeInfo::DecodableType keypadProgrammingEventMask = static_cast(0); + Attributes::RemoteProgrammingEventMask::TypeInfo::DecodableType remoteProgrammingEventMask = static_cast(0); + Attributes::RFIDProgrammingEventMask::TypeInfo::DecodableType RFIDProgrammingEventMask = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -19130,7 +19140,7 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - DlAlarmCode alarmCode; + DlAlarmCode alarmCode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -19142,7 +19152,7 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - DlAlarmCode alarmCode; + DlAlarmCode alarmCode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -19163,7 +19173,7 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - DlDoorState doorState; + DlDoorState doorState = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -19175,7 +19185,7 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - DlDoorState doorState; + DlDoorState doorState = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -19201,8 +19211,8 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - DlLockOperationType lockOperationType; - DlOperationSource operationSource; + DlLockOperationType lockOperationType = static_cast(0); + DlOperationSource operationSource = static_cast(0); DataModel::Nullable userIndex; DataModel::Nullable fabricIndex; DataModel::Nullable sourceNode; @@ -19218,8 +19228,8 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - DlLockOperationType lockOperationType; - DlOperationSource operationSource; + DlLockOperationType lockOperationType = static_cast(0); + DlOperationSource operationSource = static_cast(0); DataModel::Nullable userIndex; DataModel::Nullable fabricIndex; DataModel::Nullable sourceNode; @@ -19250,9 +19260,9 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - DlLockOperationType lockOperationType; - DlOperationSource operationSource; - DlOperationError operationError; + DlLockOperationType lockOperationType = static_cast(0); + DlOperationSource operationSource = static_cast(0); + DlOperationError operationError = static_cast(0); DataModel::Nullable userIndex; DataModel::Nullable fabricIndex; DataModel::Nullable sourceNode; @@ -19268,9 +19278,9 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - DlLockOperationType lockOperationType; - DlOperationSource operationSource; - DlOperationError operationError; + DlLockOperationType lockOperationType = static_cast(0); + DlOperationSource operationSource = static_cast(0); + DlOperationError operationError = static_cast(0); DataModel::Nullable userIndex; DataModel::Nullable fabricIndex; DataModel::Nullable sourceNode; @@ -19301,9 +19311,9 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - DlLockDataType lockDataType; - DlDataOperationType dataOperationType; - DlOperationSource operationSource; + DlLockDataType lockDataType = static_cast(0); + DlDataOperationType dataOperationType = static_cast(0); + DlOperationSource operationSource = static_cast(0); DataModel::Nullable userIndex; DataModel::Nullable fabricIndex; DataModel::Nullable sourceNode; @@ -19319,9 +19329,9 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } - DlLockDataType lockDataType; - DlDataOperationType dataOperationType; - DlOperationSource operationSource; + DlLockDataType lockDataType = static_cast(0); + DlDataOperationType dataOperationType = static_cast(0); + DlOperationSource operationSource = static_cast(0); DataModel::Nullable userIndex; DataModel::Nullable fabricIndex; DataModel::Nullable sourceNode; @@ -19528,7 +19538,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GoToLiftValue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - uint16_t liftValue; + uint16_t liftValue = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -19543,7 +19553,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GoToLiftValue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - uint16_t liftValue; + uint16_t liftValue = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GoToLiftValue @@ -19561,8 +19571,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GoToLiftPercentage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - chip::Percent liftPercentageValue; - chip::Percent100ths liftPercent100thsValue; + chip::Percent liftPercentageValue = static_cast(0); + chip::Percent100ths liftPercent100thsValue = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -19577,8 +19587,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GoToLiftPercentage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - chip::Percent liftPercentageValue; - chip::Percent100ths liftPercent100thsValue; + chip::Percent liftPercentageValue = static_cast(0); + chip::Percent100ths liftPercent100thsValue = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GoToLiftPercentage @@ -19595,7 +19605,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GoToTiltValue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - uint16_t tiltValue; + uint16_t tiltValue = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -19610,7 +19620,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GoToTiltValue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - uint16_t tiltValue; + uint16_t tiltValue = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GoToTiltValue @@ -19628,8 +19638,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GoToTiltPercentage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - chip::Percent tiltPercentageValue; - chip::Percent100ths tiltPercent100thsValue; + chip::Percent tiltPercentageValue = static_cast(0); + chip::Percent100ths tiltPercent100thsValue = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -19644,8 +19654,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GoToTiltPercentage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - chip::Percent tiltPercentageValue; - chip::Percent100ths tiltPercent100thsValue; + chip::Percent tiltPercentageValue = static_cast(0); + chip::Percent100ths tiltPercent100thsValue = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GoToTiltPercentage @@ -19962,31 +19972,31 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::Type::TypeInfo::DecodableType type; - Attributes::PhysicalClosedLimitLift::TypeInfo::DecodableType physicalClosedLimitLift; - Attributes::PhysicalClosedLimitTilt::TypeInfo::DecodableType physicalClosedLimitTilt; + Attributes::Type::TypeInfo::DecodableType type = static_cast(0); + Attributes::PhysicalClosedLimitLift::TypeInfo::DecodableType physicalClosedLimitLift = static_cast(0); + Attributes::PhysicalClosedLimitTilt::TypeInfo::DecodableType physicalClosedLimitTilt = static_cast(0); Attributes::CurrentPositionLift::TypeInfo::DecodableType currentPositionLift; Attributes::CurrentPositionTilt::TypeInfo::DecodableType currentPositionTilt; - Attributes::NumberOfActuationsLift::TypeInfo::DecodableType numberOfActuationsLift; - Attributes::NumberOfActuationsTilt::TypeInfo::DecodableType numberOfActuationsTilt; - Attributes::ConfigStatus::TypeInfo::DecodableType configStatus; + Attributes::NumberOfActuationsLift::TypeInfo::DecodableType numberOfActuationsLift = static_cast(0); + Attributes::NumberOfActuationsTilt::TypeInfo::DecodableType numberOfActuationsTilt = static_cast(0); + Attributes::ConfigStatus::TypeInfo::DecodableType configStatus = static_cast(0); Attributes::CurrentPositionLiftPercentage::TypeInfo::DecodableType currentPositionLiftPercentage; Attributes::CurrentPositionTiltPercentage::TypeInfo::DecodableType currentPositionTiltPercentage; - Attributes::OperationalStatus::TypeInfo::DecodableType operationalStatus; + Attributes::OperationalStatus::TypeInfo::DecodableType operationalStatus = static_cast(0); Attributes::TargetPositionLiftPercent100ths::TypeInfo::DecodableType targetPositionLiftPercent100ths; Attributes::TargetPositionTiltPercent100ths::TypeInfo::DecodableType targetPositionTiltPercent100ths; - Attributes::EndProductType::TypeInfo::DecodableType endProductType; + Attributes::EndProductType::TypeInfo::DecodableType endProductType = static_cast(0); Attributes::CurrentPositionLiftPercent100ths::TypeInfo::DecodableType currentPositionLiftPercent100ths; Attributes::CurrentPositionTiltPercent100ths::TypeInfo::DecodableType currentPositionTiltPercent100ths; - Attributes::InstalledOpenLimitLift::TypeInfo::DecodableType installedOpenLimitLift; - Attributes::InstalledClosedLimitLift::TypeInfo::DecodableType installedClosedLimitLift; - Attributes::InstalledOpenLimitTilt::TypeInfo::DecodableType installedOpenLimitTilt; - Attributes::InstalledClosedLimitTilt::TypeInfo::DecodableType installedClosedLimitTilt; - Attributes::Mode::TypeInfo::DecodableType mode; - Attributes::SafetyStatus::TypeInfo::DecodableType safetyStatus; + Attributes::InstalledOpenLimitLift::TypeInfo::DecodableType installedOpenLimitLift = static_cast(0); + Attributes::InstalledClosedLimitLift::TypeInfo::DecodableType installedClosedLimitLift = static_cast(0); + Attributes::InstalledOpenLimitTilt::TypeInfo::DecodableType installedOpenLimitTilt = static_cast(0); + Attributes::InstalledClosedLimitTilt::TypeInfo::DecodableType installedClosedLimitTilt = static_cast(0); + Attributes::Mode::TypeInfo::DecodableType mode = static_cast(0); + Attributes::SafetyStatus::TypeInfo::DecodableType safetyStatus = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -20022,7 +20032,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::BarrierControlGoToPercent::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - uint8_t percentOpen; + uint8_t percentOpen = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -20037,7 +20047,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::BarrierControlGoToPercent::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - uint8_t percentOpen; + uint8_t percentOpen = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace BarrierControlGoToPercent @@ -20238,19 +20248,19 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::BarrierMovingState::TypeInfo::DecodableType barrierMovingState; - Attributes::BarrierSafetyStatus::TypeInfo::DecodableType barrierSafetyStatus; - Attributes::BarrierCapabilities::TypeInfo::DecodableType barrierCapabilities; - Attributes::BarrierOpenEvents::TypeInfo::DecodableType barrierOpenEvents; - Attributes::BarrierCloseEvents::TypeInfo::DecodableType barrierCloseEvents; - Attributes::BarrierCommandOpenEvents::TypeInfo::DecodableType barrierCommandOpenEvents; - Attributes::BarrierCommandCloseEvents::TypeInfo::DecodableType barrierCommandCloseEvents; - Attributes::BarrierOpenPeriod::TypeInfo::DecodableType barrierOpenPeriod; - Attributes::BarrierClosePeriod::TypeInfo::DecodableType barrierClosePeriod; - Attributes::BarrierPosition::TypeInfo::DecodableType barrierPosition; + Attributes::BarrierMovingState::TypeInfo::DecodableType barrierMovingState = static_cast(0); + Attributes::BarrierSafetyStatus::TypeInfo::DecodableType barrierSafetyStatus = static_cast(0); + Attributes::BarrierCapabilities::TypeInfo::DecodableType barrierCapabilities = static_cast(0); + Attributes::BarrierOpenEvents::TypeInfo::DecodableType barrierOpenEvents = static_cast(0); + Attributes::BarrierCloseEvents::TypeInfo::DecodableType barrierCloseEvents = static_cast(0); + Attributes::BarrierCommandOpenEvents::TypeInfo::DecodableType barrierCommandOpenEvents = static_cast(0); + Attributes::BarrierCommandCloseEvents::TypeInfo::DecodableType barrierCommandCloseEvents = static_cast(0); + Attributes::BarrierOpenPeriod::TypeInfo::DecodableType barrierOpenPeriod = static_cast(0); + Attributes::BarrierClosePeriod::TypeInfo::DecodableType barrierClosePeriod = static_cast(0); + Attributes::BarrierPosition::TypeInfo::DecodableType barrierPosition = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -20624,33 +20634,33 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MaxPressure::TypeInfo::DecodableType maxPressure; - Attributes::MaxSpeed::TypeInfo::DecodableType maxSpeed; - Attributes::MaxFlow::TypeInfo::DecodableType maxFlow; - Attributes::MinConstPressure::TypeInfo::DecodableType minConstPressure; - Attributes::MaxConstPressure::TypeInfo::DecodableType maxConstPressure; - Attributes::MinCompPressure::TypeInfo::DecodableType minCompPressure; - Attributes::MaxCompPressure::TypeInfo::DecodableType maxCompPressure; - Attributes::MinConstSpeed::TypeInfo::DecodableType minConstSpeed; - Attributes::MaxConstSpeed::TypeInfo::DecodableType maxConstSpeed; - Attributes::MinConstFlow::TypeInfo::DecodableType minConstFlow; - Attributes::MaxConstFlow::TypeInfo::DecodableType maxConstFlow; - Attributes::MinConstTemp::TypeInfo::DecodableType minConstTemp; - Attributes::MaxConstTemp::TypeInfo::DecodableType maxConstTemp; - Attributes::PumpStatus::TypeInfo::DecodableType pumpStatus; - Attributes::EffectiveOperationMode::TypeInfo::DecodableType effectiveOperationMode; - Attributes::EffectiveControlMode::TypeInfo::DecodableType effectiveControlMode; - Attributes::Capacity::TypeInfo::DecodableType capacity; - Attributes::Speed::TypeInfo::DecodableType speed; + Attributes::MaxPressure::TypeInfo::DecodableType maxPressure = static_cast(0); + Attributes::MaxSpeed::TypeInfo::DecodableType maxSpeed = static_cast(0); + Attributes::MaxFlow::TypeInfo::DecodableType maxFlow = static_cast(0); + Attributes::MinConstPressure::TypeInfo::DecodableType minConstPressure = static_cast(0); + Attributes::MaxConstPressure::TypeInfo::DecodableType maxConstPressure = static_cast(0); + Attributes::MinCompPressure::TypeInfo::DecodableType minCompPressure = static_cast(0); + Attributes::MaxCompPressure::TypeInfo::DecodableType maxCompPressure = static_cast(0); + Attributes::MinConstSpeed::TypeInfo::DecodableType minConstSpeed = static_cast(0); + Attributes::MaxConstSpeed::TypeInfo::DecodableType maxConstSpeed = static_cast(0); + Attributes::MinConstFlow::TypeInfo::DecodableType minConstFlow = static_cast(0); + Attributes::MaxConstFlow::TypeInfo::DecodableType maxConstFlow = static_cast(0); + Attributes::MinConstTemp::TypeInfo::DecodableType minConstTemp = static_cast(0); + Attributes::MaxConstTemp::TypeInfo::DecodableType maxConstTemp = static_cast(0); + Attributes::PumpStatus::TypeInfo::DecodableType pumpStatus = static_cast(0); + Attributes::EffectiveOperationMode::TypeInfo::DecodableType effectiveOperationMode = static_cast(0); + Attributes::EffectiveControlMode::TypeInfo::DecodableType effectiveControlMode = static_cast(0); + Attributes::Capacity::TypeInfo::DecodableType capacity = static_cast(0); + Attributes::Speed::TypeInfo::DecodableType speed = static_cast(0); Attributes::LifetimeRunningHours::TypeInfo::DecodableType lifetimeRunningHours; - Attributes::Power::TypeInfo::DecodableType power; + Attributes::Power::TypeInfo::DecodableType power = static_cast(0); Attributes::LifetimeEnergyConsumed::TypeInfo::DecodableType lifetimeEnergyConsumed; - Attributes::OperationMode::TypeInfo::DecodableType operationMode; - Attributes::ControlMode::TypeInfo::DecodableType controlMode; - Attributes::AlarmMask::TypeInfo::DecodableType alarmMask; + Attributes::OperationMode::TypeInfo::DecodableType operationMode = static_cast(0); + Attributes::ControlMode::TypeInfo::DecodableType controlMode = static_cast(0); + Attributes::AlarmMask::TypeInfo::DecodableType alarmMask = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -21234,8 +21244,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetpointRaiseLower::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - SetpointAdjustMode mode; - int8_t amount; + SetpointAdjustMode mode = static_cast(0); + int8_t amount = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -21250,8 +21260,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetpointRaiseLower::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - SetpointAdjustMode mode; - int8_t amount; + SetpointAdjustMode mode = static_cast(0); + int8_t amount = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SetpointRaiseLower @@ -21271,9 +21281,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetWeeklyScheduleResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint8_t numberOfTransitionsForSequence; - chip::BitFlags dayOfWeekForSequence; - chip::BitFlags modeForSequence; + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitFlags dayOfWeekForSequence = static_cast>(0); + chip::BitFlags modeForSequence = static_cast>(0); DataModel::List payload; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -21289,9 +21299,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetWeeklyScheduleResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint8_t numberOfTransitionsForSequence; - chip::BitFlags dayOfWeekForSequence; - chip::BitFlags modeForSequence; + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitFlags dayOfWeekForSequence = static_cast>(0); + chip::BitFlags modeForSequence = static_cast>(0); DataModel::DecodableList payload; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -21312,9 +21322,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetWeeklySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint8_t numberOfTransitionsForSequence; - chip::BitFlags dayOfWeekForSequence; - chip::BitFlags modeForSequence; + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitFlags dayOfWeekForSequence = static_cast>(0); + chip::BitFlags modeForSequence = static_cast>(0); DataModel::List payload; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -21330,9 +21340,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetWeeklySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint8_t numberOfTransitionsForSequence; - chip::BitFlags dayOfWeekForSequence; - chip::BitFlags modeForSequence; + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitFlags dayOfWeekForSequence = static_cast>(0); + chip::BitFlags modeForSequence = static_cast>(0); DataModel::DecodableList payload; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -21355,12 +21365,12 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetRelayStatusLogResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint16_t timeOfDay; - uint16_t relayStatus; - int16_t localTemperature; - uint8_t humidityInPercentage; - int16_t setpoint; - uint16_t unreadEntries; + uint16_t timeOfDay = static_cast(0); + uint16_t relayStatus = static_cast(0); + int16_t localTemperature = static_cast(0); + uint8_t humidityInPercentage = static_cast(0); + int16_t setpoint = static_cast(0); + uint16_t unreadEntries = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -21375,12 +21385,12 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetRelayStatusLogResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint16_t timeOfDay; - uint16_t relayStatus; - int16_t localTemperature; - uint8_t humidityInPercentage; - int16_t setpoint; - uint16_t unreadEntries; + uint16_t timeOfDay = static_cast(0); + uint16_t relayStatus = static_cast(0); + int16_t localTemperature = static_cast(0); + uint8_t humidityInPercentage = static_cast(0); + int16_t setpoint = static_cast(0); + uint16_t unreadEntries = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetRelayStatusLogResponse @@ -21398,8 +21408,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetWeeklySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - chip::BitFlags daysToReturn; - chip::BitFlags modeToReturn; + chip::BitFlags daysToReturn = static_cast>(0); + chip::BitFlags modeToReturn = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -21414,8 +21424,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetWeeklySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - chip::BitFlags daysToReturn; - chip::BitFlags modeToReturn; + chip::BitFlags daysToReturn = static_cast>(0); + chip::BitFlags modeToReturn = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetWeeklySchedule @@ -22040,52 +22050,54 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::LocalTemperature::TypeInfo::DecodableType localTemperature; - Attributes::OutdoorTemperature::TypeInfo::DecodableType outdoorTemperature; - Attributes::Occupancy::TypeInfo::DecodableType occupancy; - Attributes::AbsMinHeatSetpointLimit::TypeInfo::DecodableType absMinHeatSetpointLimit; - Attributes::AbsMaxHeatSetpointLimit::TypeInfo::DecodableType absMaxHeatSetpointLimit; - Attributes::AbsMinCoolSetpointLimit::TypeInfo::DecodableType absMinCoolSetpointLimit; - Attributes::AbsMaxCoolSetpointLimit::TypeInfo::DecodableType absMaxCoolSetpointLimit; - Attributes::PiCoolingDemand::TypeInfo::DecodableType piCoolingDemand; - Attributes::PiHeatingDemand::TypeInfo::DecodableType piHeatingDemand; - Attributes::HvacSystemTypeConfiguration::TypeInfo::DecodableType hvacSystemTypeConfiguration; - Attributes::LocalTemperatureCalibration::TypeInfo::DecodableType localTemperatureCalibration; - Attributes::OccupiedCoolingSetpoint::TypeInfo::DecodableType occupiedCoolingSetpoint; - Attributes::OccupiedHeatingSetpoint::TypeInfo::DecodableType occupiedHeatingSetpoint; - Attributes::UnoccupiedCoolingSetpoint::TypeInfo::DecodableType unoccupiedCoolingSetpoint; - Attributes::UnoccupiedHeatingSetpoint::TypeInfo::DecodableType unoccupiedHeatingSetpoint; - Attributes::MinHeatSetpointLimit::TypeInfo::DecodableType minHeatSetpointLimit; - Attributes::MaxHeatSetpointLimit::TypeInfo::DecodableType maxHeatSetpointLimit; - Attributes::MinCoolSetpointLimit::TypeInfo::DecodableType minCoolSetpointLimit; - Attributes::MaxCoolSetpointLimit::TypeInfo::DecodableType maxCoolSetpointLimit; - Attributes::MinSetpointDeadBand::TypeInfo::DecodableType minSetpointDeadBand; - Attributes::RemoteSensing::TypeInfo::DecodableType remoteSensing; - Attributes::ControlSequenceOfOperation::TypeInfo::DecodableType controlSequenceOfOperation; - Attributes::SystemMode::TypeInfo::DecodableType systemMode; - Attributes::AlarmMask::TypeInfo::DecodableType alarmMask; - Attributes::ThermostatRunningMode::TypeInfo::DecodableType thermostatRunningMode; - Attributes::StartOfWeek::TypeInfo::DecodableType startOfWeek; - Attributes::NumberOfWeeklyTransitions::TypeInfo::DecodableType numberOfWeeklyTransitions; - Attributes::NumberOfDailyTransitions::TypeInfo::DecodableType numberOfDailyTransitions; - Attributes::TemperatureSetpointHold::TypeInfo::DecodableType temperatureSetpointHold; - Attributes::TemperatureSetpointHoldDuration::TypeInfo::DecodableType temperatureSetpointHoldDuration; - Attributes::ThermostatProgrammingOperationMode::TypeInfo::DecodableType thermostatProgrammingOperationMode; - Attributes::ThermostatRunningState::TypeInfo::DecodableType thermostatRunningState; - Attributes::SetpointChangeSource::TypeInfo::DecodableType setpointChangeSource; - Attributes::SetpointChangeAmount::TypeInfo::DecodableType setpointChangeAmount; - Attributes::SetpointChangeSourceTimestamp::TypeInfo::DecodableType setpointChangeSourceTimestamp; - Attributes::AcType::TypeInfo::DecodableType acType; - Attributes::AcCapacity::TypeInfo::DecodableType acCapacity; - Attributes::AcRefrigerantType::TypeInfo::DecodableType acRefrigerantType; - Attributes::AcCompressor::TypeInfo::DecodableType acCompressor; - Attributes::AcErrorCode::TypeInfo::DecodableType acErrorCode; - Attributes::AcLouverPosition::TypeInfo::DecodableType acLouverPosition; - Attributes::AcCoilTemperature::TypeInfo::DecodableType acCoilTemperature; - Attributes::AcCapacityFormat::TypeInfo::DecodableType acCapacityFormat; + Attributes::LocalTemperature::TypeInfo::DecodableType localTemperature = static_cast(0); + Attributes::OutdoorTemperature::TypeInfo::DecodableType outdoorTemperature = static_cast(0); + Attributes::Occupancy::TypeInfo::DecodableType occupancy = static_cast(0); + Attributes::AbsMinHeatSetpointLimit::TypeInfo::DecodableType absMinHeatSetpointLimit = static_cast(0); + Attributes::AbsMaxHeatSetpointLimit::TypeInfo::DecodableType absMaxHeatSetpointLimit = static_cast(0); + Attributes::AbsMinCoolSetpointLimit::TypeInfo::DecodableType absMinCoolSetpointLimit = static_cast(0); + Attributes::AbsMaxCoolSetpointLimit::TypeInfo::DecodableType absMaxCoolSetpointLimit = static_cast(0); + Attributes::PiCoolingDemand::TypeInfo::DecodableType piCoolingDemand = static_cast(0); + Attributes::PiHeatingDemand::TypeInfo::DecodableType piHeatingDemand = static_cast(0); + Attributes::HvacSystemTypeConfiguration::TypeInfo::DecodableType hvacSystemTypeConfiguration = static_cast(0); + Attributes::LocalTemperatureCalibration::TypeInfo::DecodableType localTemperatureCalibration = static_cast(0); + Attributes::OccupiedCoolingSetpoint::TypeInfo::DecodableType occupiedCoolingSetpoint = static_cast(0); + Attributes::OccupiedHeatingSetpoint::TypeInfo::DecodableType occupiedHeatingSetpoint = static_cast(0); + Attributes::UnoccupiedCoolingSetpoint::TypeInfo::DecodableType unoccupiedCoolingSetpoint = static_cast(0); + Attributes::UnoccupiedHeatingSetpoint::TypeInfo::DecodableType unoccupiedHeatingSetpoint = static_cast(0); + Attributes::MinHeatSetpointLimit::TypeInfo::DecodableType minHeatSetpointLimit = static_cast(0); + Attributes::MaxHeatSetpointLimit::TypeInfo::DecodableType maxHeatSetpointLimit = static_cast(0); + Attributes::MinCoolSetpointLimit::TypeInfo::DecodableType minCoolSetpointLimit = static_cast(0); + Attributes::MaxCoolSetpointLimit::TypeInfo::DecodableType maxCoolSetpointLimit = static_cast(0); + Attributes::MinSetpointDeadBand::TypeInfo::DecodableType minSetpointDeadBand = static_cast(0); + Attributes::RemoteSensing::TypeInfo::DecodableType remoteSensing = static_cast(0); + Attributes::ControlSequenceOfOperation::TypeInfo::DecodableType controlSequenceOfOperation = static_cast(0); + Attributes::SystemMode::TypeInfo::DecodableType systemMode = static_cast(0); + Attributes::AlarmMask::TypeInfo::DecodableType alarmMask = static_cast(0); + Attributes::ThermostatRunningMode::TypeInfo::DecodableType thermostatRunningMode = static_cast(0); + Attributes::StartOfWeek::TypeInfo::DecodableType startOfWeek = static_cast(0); + Attributes::NumberOfWeeklyTransitions::TypeInfo::DecodableType numberOfWeeklyTransitions = static_cast(0); + Attributes::NumberOfDailyTransitions::TypeInfo::DecodableType numberOfDailyTransitions = static_cast(0); + Attributes::TemperatureSetpointHold::TypeInfo::DecodableType temperatureSetpointHold = static_cast(0); + Attributes::TemperatureSetpointHoldDuration::TypeInfo::DecodableType temperatureSetpointHoldDuration = + static_cast(0); + Attributes::ThermostatProgrammingOperationMode::TypeInfo::DecodableType thermostatProgrammingOperationMode = + static_cast(0); + Attributes::ThermostatRunningState::TypeInfo::DecodableType thermostatRunningState = static_cast(0); + Attributes::SetpointChangeSource::TypeInfo::DecodableType setpointChangeSource = static_cast(0); + Attributes::SetpointChangeAmount::TypeInfo::DecodableType setpointChangeAmount = static_cast(0); + Attributes::SetpointChangeSourceTimestamp::TypeInfo::DecodableType setpointChangeSourceTimestamp = static_cast(0); + Attributes::AcType::TypeInfo::DecodableType acType = static_cast(0); + Attributes::AcCapacity::TypeInfo::DecodableType acCapacity = static_cast(0); + Attributes::AcRefrigerantType::TypeInfo::DecodableType acRefrigerantType = static_cast(0); + Attributes::AcCompressor::TypeInfo::DecodableType acCompressor = static_cast(0); + Attributes::AcErrorCode::TypeInfo::DecodableType acErrorCode = static_cast(0); + Attributes::AcLouverPosition::TypeInfo::DecodableType acLouverPosition = static_cast(0); + Attributes::AcCoilTemperature::TypeInfo::DecodableType acCoilTemperature = static_cast(0); + Attributes::AcCapacityFormat::TypeInfo::DecodableType acCapacityFormat = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -22163,11 +22175,11 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::FanMode::TypeInfo::DecodableType fanMode; - Attributes::FanModeSequence::TypeInfo::DecodableType fanModeSequence; + Attributes::FanMode::TypeInfo::DecodableType fanMode = static_cast(0); + Attributes::FanModeSequence::TypeInfo::DecodableType fanModeSequence = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -22317,17 +22329,17 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::RelativeHumidity::TypeInfo::DecodableType relativeHumidity; - Attributes::DehumidificationCooling::TypeInfo::DecodableType dehumidificationCooling; - Attributes::RhDehumidificationSetpoint::TypeInfo::DecodableType rhDehumidificationSetpoint; - Attributes::RelativeHumidityMode::TypeInfo::DecodableType relativeHumidityMode; - Attributes::DehumidificationLockout::TypeInfo::DecodableType dehumidificationLockout; - Attributes::DehumidificationHysteresis::TypeInfo::DecodableType dehumidificationHysteresis; - Attributes::DehumidificationMaxCool::TypeInfo::DecodableType dehumidificationMaxCool; - Attributes::RelativeHumidityDisplay::TypeInfo::DecodableType relativeHumidityDisplay; + Attributes::RelativeHumidity::TypeInfo::DecodableType relativeHumidity = static_cast(0); + Attributes::DehumidificationCooling::TypeInfo::DecodableType dehumidificationCooling = static_cast(0); + Attributes::RhDehumidificationSetpoint::TypeInfo::DecodableType rhDehumidificationSetpoint = static_cast(0); + Attributes::RelativeHumidityMode::TypeInfo::DecodableType relativeHumidityMode = static_cast(0); + Attributes::DehumidificationLockout::TypeInfo::DecodableType dehumidificationLockout = static_cast(0); + Attributes::DehumidificationHysteresis::TypeInfo::DecodableType dehumidificationHysteresis = static_cast(0); + Attributes::DehumidificationMaxCool::TypeInfo::DecodableType dehumidificationMaxCool = static_cast(0); + Attributes::RelativeHumidityDisplay::TypeInfo::DecodableType relativeHumidityDisplay = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -22417,12 +22429,12 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::TemperatureDisplayMode::TypeInfo::DecodableType temperatureDisplayMode; - Attributes::KeypadLockout::TypeInfo::DecodableType keypadLockout; - Attributes::ScheduleProgrammingVisibility::TypeInfo::DecodableType scheduleProgrammingVisibility; + Attributes::TemperatureDisplayMode::TypeInfo::DecodableType temperatureDisplayMode = static_cast(0); + Attributes::KeypadLockout::TypeInfo::DecodableType keypadLockout = static_cast(0); + Attributes::ScheduleProgrammingVisibility::TypeInfo::DecodableType scheduleProgrammingVisibility = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -22668,11 +22680,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveToHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint8_t hue; - HueDirection direction; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + uint8_t hue = static_cast(0); + HueDirection direction = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -22687,11 +22699,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveToHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint8_t hue; - HueDirection direction; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + uint8_t hue = static_cast(0); + HueDirection direction = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveToHue @@ -22711,10 +22723,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueMoveMode moveMode; - uint8_t rate; - uint8_t optionsMask; - uint8_t optionsOverride; + HueMoveMode moveMode = static_cast(0); + uint8_t rate = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -22729,10 +22741,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueMoveMode moveMode; - uint8_t rate; - uint8_t optionsMask; - uint8_t optionsOverride; + HueMoveMode moveMode = static_cast(0); + uint8_t rate = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveHue @@ -22753,11 +22765,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StepHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueStepMode stepMode; - uint8_t stepSize; - uint8_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + HueStepMode stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); + uint8_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -22772,11 +22784,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StepHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueStepMode stepMode; - uint8_t stepSize; - uint8_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + HueStepMode stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); + uint8_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StepHue @@ -22796,10 +22808,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveToSaturation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint8_t saturation; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + uint8_t saturation = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -22814,10 +22826,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveToSaturation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint8_t saturation; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + uint8_t saturation = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveToSaturation @@ -22837,10 +22849,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveSaturation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - SaturationMoveMode moveMode; - uint8_t rate; - uint8_t optionsMask; - uint8_t optionsOverride; + SaturationMoveMode moveMode = static_cast(0); + uint8_t rate = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -22855,10 +22867,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveSaturation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - SaturationMoveMode moveMode; - uint8_t rate; - uint8_t optionsMask; - uint8_t optionsOverride; + SaturationMoveMode moveMode = static_cast(0); + uint8_t rate = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveSaturation @@ -22879,11 +22891,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StepSaturation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - SaturationStepMode stepMode; - uint8_t stepSize; - uint8_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + SaturationStepMode stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); + uint8_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -22898,11 +22910,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StepSaturation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - SaturationStepMode stepMode; - uint8_t stepSize; - uint8_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + SaturationStepMode stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); + uint8_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StepSaturation @@ -22923,11 +22935,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveToHueAndSaturation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint8_t hue; - uint8_t saturation; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + uint8_t hue = static_cast(0); + uint8_t saturation = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -22942,11 +22954,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveToHueAndSaturation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint8_t hue; - uint8_t saturation; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + uint8_t hue = static_cast(0); + uint8_t saturation = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveToHueAndSaturation @@ -22967,11 +22979,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveToColor::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint16_t colorX; - uint16_t colorY; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + uint16_t colorX = static_cast(0); + uint16_t colorY = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -22986,11 +22998,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveToColor::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint16_t colorX; - uint16_t colorY; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + uint16_t colorX = static_cast(0); + uint16_t colorY = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveToColor @@ -23010,10 +23022,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveColor::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - int16_t rateX; - int16_t rateY; - uint8_t optionsMask; - uint8_t optionsOverride; + int16_t rateX = static_cast(0); + int16_t rateY = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -23028,10 +23040,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveColor::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - int16_t rateX; - int16_t rateY; - uint8_t optionsMask; - uint8_t optionsOverride; + int16_t rateX = static_cast(0); + int16_t rateY = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveColor @@ -23052,11 +23064,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StepColor::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - int16_t stepX; - int16_t stepY; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + int16_t stepX = static_cast(0); + int16_t stepY = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -23071,11 +23083,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StepColor::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - int16_t stepX; - int16_t stepY; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + int16_t stepX = static_cast(0); + int16_t stepY = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StepColor @@ -23095,10 +23107,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveToColorTemperature::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint16_t colorTemperature; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + uint16_t colorTemperature = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -23113,10 +23125,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveToColorTemperature::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint16_t colorTemperature; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + uint16_t colorTemperature = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveToColorTemperature @@ -23137,11 +23149,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnhancedMoveToHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint16_t enhancedHue; - HueDirection direction; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + uint16_t enhancedHue = static_cast(0); + HueDirection direction = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -23156,11 +23168,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnhancedMoveToHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint16_t enhancedHue; - HueDirection direction; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + uint16_t enhancedHue = static_cast(0); + HueDirection direction = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace EnhancedMoveToHue @@ -23180,10 +23192,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnhancedMoveHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueMoveMode moveMode; - uint16_t rate; - uint8_t optionsMask; - uint8_t optionsOverride; + HueMoveMode moveMode = static_cast(0); + uint16_t rate = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -23198,10 +23210,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnhancedMoveHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueMoveMode moveMode; - uint16_t rate; - uint8_t optionsMask; - uint8_t optionsOverride; + HueMoveMode moveMode = static_cast(0); + uint16_t rate = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace EnhancedMoveHue @@ -23222,11 +23234,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnhancedStepHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueStepMode stepMode; - uint16_t stepSize; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + HueStepMode stepMode = static_cast(0); + uint16_t stepSize = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -23241,11 +23253,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnhancedStepHue::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueStepMode stepMode; - uint16_t stepSize; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + HueStepMode stepMode = static_cast(0); + uint16_t stepSize = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace EnhancedStepHue @@ -23266,11 +23278,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnhancedMoveToHueAndSaturation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint16_t enhancedHue; - uint8_t saturation; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + uint16_t enhancedHue = static_cast(0); + uint8_t saturation = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -23285,11 +23297,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnhancedMoveToHueAndSaturation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint16_t enhancedHue; - uint8_t saturation; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; + uint16_t enhancedHue = static_cast(0); + uint8_t saturation = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace EnhancedMoveToHueAndSaturation @@ -23312,13 +23324,13 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ColorLoopSet::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - chip::BitFlags updateFlags; - ColorLoopAction action; - ColorLoopDirection direction; - uint16_t time; - uint16_t startHue; - uint8_t optionsMask; - uint8_t optionsOverride; + chip::BitFlags updateFlags = static_cast>(0); + ColorLoopAction action = static_cast(0); + ColorLoopDirection direction = static_cast(0); + uint16_t time = static_cast(0); + uint16_t startHue = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -23333,13 +23345,13 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ColorLoopSet::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - chip::BitFlags updateFlags; - ColorLoopAction action; - ColorLoopDirection direction; - uint16_t time; - uint16_t startHue; - uint8_t optionsMask; - uint8_t optionsOverride; + chip::BitFlags updateFlags = static_cast>(0); + ColorLoopAction action = static_cast(0); + ColorLoopDirection direction = static_cast(0); + uint16_t time = static_cast(0); + uint16_t startHue = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ColorLoopSet @@ -23357,8 +23369,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StopMoveStep::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint8_t optionsMask; - uint8_t optionsOverride; + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -23373,8 +23385,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StopMoveStep::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint8_t optionsMask; - uint8_t optionsOverride; + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StopMoveStep @@ -23396,12 +23408,12 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveColorTemperature::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueMoveMode moveMode; - uint16_t rate; - uint16_t colorTemperatureMinimum; - uint16_t colorTemperatureMaximum; - uint8_t optionsMask; - uint8_t optionsOverride; + HueMoveMode moveMode = static_cast(0); + uint16_t rate = static_cast(0); + uint16_t colorTemperatureMinimum = static_cast(0); + uint16_t colorTemperatureMaximum = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -23416,12 +23428,12 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveColorTemperature::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueMoveMode moveMode; - uint16_t rate; - uint16_t colorTemperatureMinimum; - uint16_t colorTemperatureMaximum; - uint8_t optionsMask; - uint8_t optionsOverride; + HueMoveMode moveMode = static_cast(0); + uint16_t rate = static_cast(0); + uint16_t colorTemperatureMinimum = static_cast(0); + uint16_t colorTemperatureMaximum = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveColorTemperature @@ -23444,13 +23456,13 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StepColorTemperature::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueStepMode stepMode; - uint16_t stepSize; - uint16_t transitionTime; - uint16_t colorTemperatureMinimum; - uint16_t colorTemperatureMaximum; - uint8_t optionsMask; - uint8_t optionsOverride; + HueStepMode stepMode = static_cast(0); + uint16_t stepSize = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint16_t colorTemperatureMinimum = static_cast(0); + uint16_t colorTemperatureMaximum = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -23465,13 +23477,13 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StepColorTemperature::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - HueStepMode stepMode; - uint16_t stepSize; - uint16_t transitionTime; - uint16_t colorTemperatureMinimum; - uint16_t colorTemperatureMaximum; - uint8_t optionsMask; - uint8_t optionsOverride; + HueStepMode stepMode = static_cast(0); + uint16_t stepSize = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint16_t colorTemperatureMinimum = static_cast(0); + uint16_t colorTemperatureMaximum = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StepColorTemperature @@ -24148,61 +24160,62 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::CurrentHue::TypeInfo::DecodableType currentHue; - Attributes::CurrentSaturation::TypeInfo::DecodableType currentSaturation; - Attributes::RemainingTime::TypeInfo::DecodableType remainingTime; - Attributes::CurrentX::TypeInfo::DecodableType currentX; - Attributes::CurrentY::TypeInfo::DecodableType currentY; - Attributes::DriftCompensation::TypeInfo::DecodableType driftCompensation; + Attributes::CurrentHue::TypeInfo::DecodableType currentHue = static_cast(0); + Attributes::CurrentSaturation::TypeInfo::DecodableType currentSaturation = static_cast(0); + Attributes::RemainingTime::TypeInfo::DecodableType remainingTime = static_cast(0); + Attributes::CurrentX::TypeInfo::DecodableType currentX = static_cast(0); + Attributes::CurrentY::TypeInfo::DecodableType currentY = static_cast(0); + Attributes::DriftCompensation::TypeInfo::DecodableType driftCompensation = static_cast(0); Attributes::CompensationText::TypeInfo::DecodableType compensationText; - Attributes::ColorTemperature::TypeInfo::DecodableType colorTemperature; - Attributes::ColorMode::TypeInfo::DecodableType colorMode; - Attributes::ColorControlOptions::TypeInfo::DecodableType colorControlOptions; - Attributes::NumberOfPrimaries::TypeInfo::DecodableType numberOfPrimaries; - Attributes::Primary1X::TypeInfo::DecodableType primary1X; - Attributes::Primary1Y::TypeInfo::DecodableType primary1Y; - Attributes::Primary1Intensity::TypeInfo::DecodableType primary1Intensity; - Attributes::Primary2X::TypeInfo::DecodableType primary2X; - Attributes::Primary2Y::TypeInfo::DecodableType primary2Y; - Attributes::Primary2Intensity::TypeInfo::DecodableType primary2Intensity; - Attributes::Primary3X::TypeInfo::DecodableType primary3X; - Attributes::Primary3Y::TypeInfo::DecodableType primary3Y; - Attributes::Primary3Intensity::TypeInfo::DecodableType primary3Intensity; - Attributes::Primary4X::TypeInfo::DecodableType primary4X; - Attributes::Primary4Y::TypeInfo::DecodableType primary4Y; - Attributes::Primary4Intensity::TypeInfo::DecodableType primary4Intensity; - Attributes::Primary5X::TypeInfo::DecodableType primary5X; - Attributes::Primary5Y::TypeInfo::DecodableType primary5Y; - Attributes::Primary5Intensity::TypeInfo::DecodableType primary5Intensity; - Attributes::Primary6X::TypeInfo::DecodableType primary6X; - Attributes::Primary6Y::TypeInfo::DecodableType primary6Y; - Attributes::Primary6Intensity::TypeInfo::DecodableType primary6Intensity; - Attributes::WhitePointX::TypeInfo::DecodableType whitePointX; - Attributes::WhitePointY::TypeInfo::DecodableType whitePointY; - Attributes::ColorPointRX::TypeInfo::DecodableType colorPointRX; - Attributes::ColorPointRY::TypeInfo::DecodableType colorPointRY; - Attributes::ColorPointRIntensity::TypeInfo::DecodableType colorPointRIntensity; - Attributes::ColorPointGX::TypeInfo::DecodableType colorPointGX; - Attributes::ColorPointGY::TypeInfo::DecodableType colorPointGY; - Attributes::ColorPointGIntensity::TypeInfo::DecodableType colorPointGIntensity; - Attributes::ColorPointBX::TypeInfo::DecodableType colorPointBX; - Attributes::ColorPointBY::TypeInfo::DecodableType colorPointBY; - Attributes::ColorPointBIntensity::TypeInfo::DecodableType colorPointBIntensity; - Attributes::EnhancedCurrentHue::TypeInfo::DecodableType enhancedCurrentHue; - Attributes::EnhancedColorMode::TypeInfo::DecodableType enhancedColorMode; - Attributes::ColorLoopActive::TypeInfo::DecodableType colorLoopActive; - Attributes::ColorLoopDirection::TypeInfo::DecodableType colorLoopDirection; - Attributes::ColorLoopTime::TypeInfo::DecodableType colorLoopTime; - Attributes::ColorLoopStartEnhancedHue::TypeInfo::DecodableType colorLoopStartEnhancedHue; - Attributes::ColorLoopStoredEnhancedHue::TypeInfo::DecodableType colorLoopStoredEnhancedHue; - Attributes::ColorCapabilities::TypeInfo::DecodableType colorCapabilities; - Attributes::ColorTempPhysicalMin::TypeInfo::DecodableType colorTempPhysicalMin; - Attributes::ColorTempPhysicalMax::TypeInfo::DecodableType colorTempPhysicalMax; - Attributes::CoupleColorTempToLevelMinMireds::TypeInfo::DecodableType coupleColorTempToLevelMinMireds; - Attributes::StartUpColorTemperatureMireds::TypeInfo::DecodableType startUpColorTemperatureMireds; + Attributes::ColorTemperature::TypeInfo::DecodableType colorTemperature = static_cast(0); + Attributes::ColorMode::TypeInfo::DecodableType colorMode = static_cast(0); + Attributes::ColorControlOptions::TypeInfo::DecodableType colorControlOptions = static_cast(0); + Attributes::NumberOfPrimaries::TypeInfo::DecodableType numberOfPrimaries = static_cast(0); + Attributes::Primary1X::TypeInfo::DecodableType primary1X = static_cast(0); + Attributes::Primary1Y::TypeInfo::DecodableType primary1Y = static_cast(0); + Attributes::Primary1Intensity::TypeInfo::DecodableType primary1Intensity = static_cast(0); + Attributes::Primary2X::TypeInfo::DecodableType primary2X = static_cast(0); + Attributes::Primary2Y::TypeInfo::DecodableType primary2Y = static_cast(0); + Attributes::Primary2Intensity::TypeInfo::DecodableType primary2Intensity = static_cast(0); + Attributes::Primary3X::TypeInfo::DecodableType primary3X = static_cast(0); + Attributes::Primary3Y::TypeInfo::DecodableType primary3Y = static_cast(0); + Attributes::Primary3Intensity::TypeInfo::DecodableType primary3Intensity = static_cast(0); + Attributes::Primary4X::TypeInfo::DecodableType primary4X = static_cast(0); + Attributes::Primary4Y::TypeInfo::DecodableType primary4Y = static_cast(0); + Attributes::Primary4Intensity::TypeInfo::DecodableType primary4Intensity = static_cast(0); + Attributes::Primary5X::TypeInfo::DecodableType primary5X = static_cast(0); + Attributes::Primary5Y::TypeInfo::DecodableType primary5Y = static_cast(0); + Attributes::Primary5Intensity::TypeInfo::DecodableType primary5Intensity = static_cast(0); + Attributes::Primary6X::TypeInfo::DecodableType primary6X = static_cast(0); + Attributes::Primary6Y::TypeInfo::DecodableType primary6Y = static_cast(0); + Attributes::Primary6Intensity::TypeInfo::DecodableType primary6Intensity = static_cast(0); + Attributes::WhitePointX::TypeInfo::DecodableType whitePointX = static_cast(0); + Attributes::WhitePointY::TypeInfo::DecodableType whitePointY = static_cast(0); + Attributes::ColorPointRX::TypeInfo::DecodableType colorPointRX = static_cast(0); + Attributes::ColorPointRY::TypeInfo::DecodableType colorPointRY = static_cast(0); + Attributes::ColorPointRIntensity::TypeInfo::DecodableType colorPointRIntensity = static_cast(0); + Attributes::ColorPointGX::TypeInfo::DecodableType colorPointGX = static_cast(0); + Attributes::ColorPointGY::TypeInfo::DecodableType colorPointGY = static_cast(0); + Attributes::ColorPointGIntensity::TypeInfo::DecodableType colorPointGIntensity = static_cast(0); + Attributes::ColorPointBX::TypeInfo::DecodableType colorPointBX = static_cast(0); + Attributes::ColorPointBY::TypeInfo::DecodableType colorPointBY = static_cast(0); + Attributes::ColorPointBIntensity::TypeInfo::DecodableType colorPointBIntensity = static_cast(0); + Attributes::EnhancedCurrentHue::TypeInfo::DecodableType enhancedCurrentHue = static_cast(0); + Attributes::EnhancedColorMode::TypeInfo::DecodableType enhancedColorMode = static_cast(0); + Attributes::ColorLoopActive::TypeInfo::DecodableType colorLoopActive = static_cast(0); + Attributes::ColorLoopDirection::TypeInfo::DecodableType colorLoopDirection = static_cast(0); + Attributes::ColorLoopTime::TypeInfo::DecodableType colorLoopTime = static_cast(0); + Attributes::ColorLoopStartEnhancedHue::TypeInfo::DecodableType colorLoopStartEnhancedHue = static_cast(0); + Attributes::ColorLoopStoredEnhancedHue::TypeInfo::DecodableType colorLoopStoredEnhancedHue = static_cast(0); + Attributes::ColorCapabilities::TypeInfo::DecodableType colorCapabilities = static_cast(0); + Attributes::ColorTempPhysicalMin::TypeInfo::DecodableType colorTempPhysicalMin = static_cast(0); + Attributes::ColorTempPhysicalMax::TypeInfo::DecodableType colorTempPhysicalMax = static_cast(0); + Attributes::CoupleColorTempToLevelMinMireds::TypeInfo::DecodableType coupleColorTempToLevelMinMireds = + static_cast(0); + Attributes::StartUpColorTemperatureMireds::TypeInfo::DecodableType startUpColorTemperatureMireds = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -24448,25 +24461,25 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::PhysicalMinLevel::TypeInfo::DecodableType physicalMinLevel; - Attributes::PhysicalMaxLevel::TypeInfo::DecodableType physicalMaxLevel; - Attributes::BallastStatus::TypeInfo::DecodableType ballastStatus; - Attributes::MinLevel::TypeInfo::DecodableType minLevel; - Attributes::MaxLevel::TypeInfo::DecodableType maxLevel; - Attributes::PowerOnLevel::TypeInfo::DecodableType powerOnLevel; - Attributes::PowerOnFadeTime::TypeInfo::DecodableType powerOnFadeTime; - Attributes::IntrinsicBallastFactor::TypeInfo::DecodableType intrinsicBallastFactor; - Attributes::BallastFactorAdjustment::TypeInfo::DecodableType ballastFactorAdjustment; - Attributes::LampQuality::TypeInfo::DecodableType lampQuality; + Attributes::PhysicalMinLevel::TypeInfo::DecodableType physicalMinLevel = static_cast(0); + Attributes::PhysicalMaxLevel::TypeInfo::DecodableType physicalMaxLevel = static_cast(0); + Attributes::BallastStatus::TypeInfo::DecodableType ballastStatus = static_cast(0); + Attributes::MinLevel::TypeInfo::DecodableType minLevel = static_cast(0); + Attributes::MaxLevel::TypeInfo::DecodableType maxLevel = static_cast(0); + Attributes::PowerOnLevel::TypeInfo::DecodableType powerOnLevel = static_cast(0); + Attributes::PowerOnFadeTime::TypeInfo::DecodableType powerOnFadeTime = static_cast(0); + Attributes::IntrinsicBallastFactor::TypeInfo::DecodableType intrinsicBallastFactor = static_cast(0); + Attributes::BallastFactorAdjustment::TypeInfo::DecodableType ballastFactorAdjustment = static_cast(0); + Attributes::LampQuality::TypeInfo::DecodableType lampQuality = static_cast(0); Attributes::LampType::TypeInfo::DecodableType lampType; Attributes::LampManufacturer::TypeInfo::DecodableType lampManufacturer; - Attributes::LampRatedHours::TypeInfo::DecodableType lampRatedHours; - Attributes::LampBurnHours::TypeInfo::DecodableType lampBurnHours; - Attributes::LampAlarmMode::TypeInfo::DecodableType lampAlarmMode; - Attributes::LampBurnHoursTripPoint::TypeInfo::DecodableType lampBurnHoursTripPoint; + Attributes::LampRatedHours::TypeInfo::DecodableType lampRatedHours = static_cast(0); + Attributes::LampBurnHours::TypeInfo::DecodableType lampBurnHours = static_cast(0); + Attributes::LampAlarmMode::TypeInfo::DecodableType lampAlarmMode = static_cast(0); + Attributes::LampBurnHoursTripPoint::TypeInfo::DecodableType lampBurnHoursTripPoint = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -24589,11 +24602,11 @@ struct TypeInfo Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::LightSensorType::TypeInfo::DecodableType lightSensorType; Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -24695,13 +24708,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -24863,18 +24876,18 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; - Attributes::ScaledValue::TypeInfo::DecodableType scaledValue; - Attributes::MinScaledValue::TypeInfo::DecodableType minScaledValue; - Attributes::MaxScaledValue::TypeInfo::DecodableType maxScaledValue; - Attributes::ScaledTolerance::TypeInfo::DecodableType scaledTolerance; - Attributes::Scale::TypeInfo::DecodableType scale; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); + Attributes::ScaledValue::TypeInfo::DecodableType scaledValue = static_cast(0); + Attributes::MinScaledValue::TypeInfo::DecodableType minScaledValue = static_cast(0); + Attributes::MaxScaledValue::TypeInfo::DecodableType maxScaledValue = static_cast(0); + Attributes::ScaledTolerance::TypeInfo::DecodableType scaledTolerance = static_cast(0); + Attributes::Scale::TypeInfo::DecodableType scale = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -24976,13 +24989,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -25084,13 +25097,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -25288,22 +25301,28 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::Occupancy::TypeInfo::DecodableType occupancy; - Attributes::OccupancySensorType::TypeInfo::DecodableType occupancySensorType; - Attributes::OccupancySensorTypeBitmap::TypeInfo::DecodableType occupancySensorTypeBitmap; - Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo::DecodableType pirOccupiedToUnoccupiedDelay; - Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo::DecodableType pirUnoccupiedToOccupiedDelay; - Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo::DecodableType pirUnoccupiedToOccupiedThreshold; - Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo::DecodableType ultrasonicOccupiedToUnoccupiedDelay; - Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo::DecodableType ultrasonicUnoccupiedToOccupiedDelay; - Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo::DecodableType ultrasonicUnoccupiedToOccupiedThreshold; - Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo::DecodableType physicalContactOccupiedToUnoccupiedDelay; - Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo::DecodableType physicalContactUnoccupiedToOccupiedDelay; + Attributes::Occupancy::TypeInfo::DecodableType occupancy = static_cast(0); + Attributes::OccupancySensorType::TypeInfo::DecodableType occupancySensorType = static_cast(0); + Attributes::OccupancySensorTypeBitmap::TypeInfo::DecodableType occupancySensorTypeBitmap = static_cast(0); + Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo::DecodableType pirOccupiedToUnoccupiedDelay = static_cast(0); + Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo::DecodableType pirUnoccupiedToOccupiedDelay = static_cast(0); + Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo::DecodableType pirUnoccupiedToOccupiedThreshold = + static_cast(0); + Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo::DecodableType ultrasonicOccupiedToUnoccupiedDelay = + static_cast(0); + Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo::DecodableType ultrasonicUnoccupiedToOccupiedDelay = + static_cast(0); + Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo::DecodableType ultrasonicUnoccupiedToOccupiedThreshold = + static_cast(0); + Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo::DecodableType physicalContactOccupiedToUnoccupiedDelay = + static_cast(0); + Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo::DecodableType physicalContactUnoccupiedToOccupiedDelay = + static_cast(0); Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo::DecodableType - physicalContactUnoccupiedToOccupiedThreshold; + physicalContactUnoccupiedToOccupiedThreshold = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -25405,13 +25424,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -25513,13 +25532,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -25621,13 +25640,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -25729,13 +25748,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -25837,13 +25856,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -25945,13 +25964,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -26053,13 +26072,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -26161,13 +26180,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -26269,13 +26288,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -26377,13 +26396,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -26485,13 +26504,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -26593,13 +26612,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -26701,13 +26720,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -26809,13 +26828,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -26917,13 +26936,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -27025,13 +27044,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -27133,13 +27152,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -27241,13 +27260,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -27349,13 +27368,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -27457,13 +27476,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -27565,13 +27584,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -27673,13 +27692,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -27781,13 +27800,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -27889,13 +27908,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -27997,13 +28016,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -28105,13 +28124,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -28213,13 +28232,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -28321,13 +28340,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -28429,13 +28448,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -28537,13 +28556,13 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue; - Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue; - Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue; - Attributes::Tolerance::TypeInfo::DecodableType tolerance; + Attributes::MeasuredValue::TypeInfo::DecodableType measuredValue = static_cast(0); + Attributes::MinMeasuredValue::TypeInfo::DecodableType minMeasuredValue = static_cast(0); + Attributes::MaxMeasuredValue::TypeInfo::DecodableType maxMeasuredValue = static_cast(0); + Attributes::Tolerance::TypeInfo::DecodableType tolerance = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -28660,8 +28679,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ZoneEnrollResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasZone::Id; } - IasEnrollResponseCode enrollResponseCode; - uint8_t zoneId; + IasEnrollResponseCode enrollResponseCode = static_cast(0); + uint8_t zoneId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -28676,8 +28695,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ZoneEnrollResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasZone::Id; } - IasEnrollResponseCode enrollResponseCode; - uint8_t zoneId; + IasEnrollResponseCode enrollResponseCode = static_cast(0); + uint8_t zoneId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ZoneEnrollResponse @@ -28697,10 +28716,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ZoneStatusChangeNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasZone::Id; } - chip::BitFlags zoneStatus; - uint8_t extendedStatus; - uint8_t zoneId; - uint16_t delay; + chip::BitFlags zoneStatus = static_cast>(0); + uint8_t extendedStatus = static_cast(0); + uint8_t zoneId = static_cast(0); + uint16_t delay = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -28715,10 +28734,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ZoneStatusChangeNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasZone::Id; } - chip::BitFlags zoneStatus; - uint8_t extendedStatus; - uint8_t zoneId; - uint16_t delay; + chip::BitFlags zoneStatus = static_cast>(0); + uint8_t extendedStatus = static_cast(0); + uint8_t zoneId = static_cast(0); + uint16_t delay = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ZoneStatusChangeNotification @@ -28764,8 +28783,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ZoneEnrollRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasZone::Id; } - IasZoneType zoneType; - uint16_t manufacturerCode; + IasZoneType zoneType = static_cast(0); + uint16_t manufacturerCode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -28780,8 +28799,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ZoneEnrollRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasZone::Id; } - IasZoneType zoneType; - uint16_t manufacturerCode; + IasZoneType zoneType = static_cast(0); + uint16_t manufacturerCode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ZoneEnrollRequest @@ -28799,8 +28818,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::InitiateTestMode::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasZone::Id; } - uint8_t testModeDuration; - uint8_t currentZoneSensitivityLevel; + uint8_t testModeDuration = static_cast(0); + uint8_t currentZoneSensitivityLevel = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -28815,8 +28834,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::InitiateTestMode::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasZone::Id; } - uint8_t testModeDuration; - uint8_t currentZoneSensitivityLevel; + uint8_t testModeDuration = static_cast(0); + uint8_t currentZoneSensitivityLevel = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace InitiateTestMode @@ -29009,16 +29028,17 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::ZoneState::TypeInfo::DecodableType zoneState; - Attributes::ZoneType::TypeInfo::DecodableType zoneType; - Attributes::ZoneStatus::TypeInfo::DecodableType zoneStatus; - Attributes::IasCieAddress::TypeInfo::DecodableType iasCieAddress; - Attributes::ZoneId::TypeInfo::DecodableType zoneId; - Attributes::NumberOfZoneSensitivityLevelsSupported::TypeInfo::DecodableType numberOfZoneSensitivityLevelsSupported; - Attributes::CurrentZoneSensitivityLevel::TypeInfo::DecodableType currentZoneSensitivityLevel; + Attributes::ZoneState::TypeInfo::DecodableType zoneState = static_cast(0); + Attributes::ZoneType::TypeInfo::DecodableType zoneType = static_cast(0); + Attributes::ZoneStatus::TypeInfo::DecodableType zoneStatus = static_cast(0); + Attributes::IasCieAddress::TypeInfo::DecodableType iasCieAddress = static_cast(0); + Attributes::ZoneId::TypeInfo::DecodableType zoneId = static_cast(0); + Attributes::NumberOfZoneSensitivityLevelsSupported::TypeInfo::DecodableType numberOfZoneSensitivityLevelsSupported = + static_cast(0); + Attributes::CurrentZoneSensitivityLevel::TypeInfo::DecodableType currentZoneSensitivityLevel = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -29266,9 +29286,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Arm::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - IasAceArmMode armMode; + IasAceArmMode armMode = static_cast(0); chip::CharSpan armDisarmCode; - uint8_t zoneId; + uint8_t zoneId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -29283,9 +29303,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::Arm::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - IasAceArmMode armMode; + IasAceArmMode armMode = static_cast(0); chip::CharSpan armDisarmCode; - uint8_t zoneId; + uint8_t zoneId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Arm @@ -29302,7 +29322,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ArmResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - IasAceArmNotification armNotification; + IasAceArmNotification armNotification = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -29317,7 +29337,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ArmResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - IasAceArmNotification armNotification; + IasAceArmNotification armNotification = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ArmResponse @@ -29336,7 +29356,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Bypass::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - uint8_t numberOfZones; + uint8_t numberOfZones = static_cast(0); DataModel::List zoneIds; chip::CharSpan armDisarmCode; @@ -29353,7 +29373,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::Bypass::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - uint8_t numberOfZones; + uint8_t numberOfZones = static_cast(0); DataModel::DecodableList zoneIds; chip::CharSpan armDisarmCode; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -29387,22 +29407,22 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetZoneIdMapResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - uint16_t section0; - uint16_t section1; - uint16_t section2; - uint16_t section3; - uint16_t section4; - uint16_t section5; - uint16_t section6; - uint16_t section7; - uint16_t section8; - uint16_t section9; - uint16_t section10; - uint16_t section11; - uint16_t section12; - uint16_t section13; - uint16_t section14; - uint16_t section15; + uint16_t section0 = static_cast(0); + uint16_t section1 = static_cast(0); + uint16_t section2 = static_cast(0); + uint16_t section3 = static_cast(0); + uint16_t section4 = static_cast(0); + uint16_t section5 = static_cast(0); + uint16_t section6 = static_cast(0); + uint16_t section7 = static_cast(0); + uint16_t section8 = static_cast(0); + uint16_t section9 = static_cast(0); + uint16_t section10 = static_cast(0); + uint16_t section11 = static_cast(0); + uint16_t section12 = static_cast(0); + uint16_t section13 = static_cast(0); + uint16_t section14 = static_cast(0); + uint16_t section15 = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -29417,22 +29437,22 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetZoneIdMapResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - uint16_t section0; - uint16_t section1; - uint16_t section2; - uint16_t section3; - uint16_t section4; - uint16_t section5; - uint16_t section6; - uint16_t section7; - uint16_t section8; - uint16_t section9; - uint16_t section10; - uint16_t section11; - uint16_t section12; - uint16_t section13; - uint16_t section14; - uint16_t section15; + uint16_t section0 = static_cast(0); + uint16_t section1 = static_cast(0); + uint16_t section2 = static_cast(0); + uint16_t section3 = static_cast(0); + uint16_t section4 = static_cast(0); + uint16_t section5 = static_cast(0); + uint16_t section6 = static_cast(0); + uint16_t section7 = static_cast(0); + uint16_t section8 = static_cast(0); + uint16_t section9 = static_cast(0); + uint16_t section10 = static_cast(0); + uint16_t section11 = static_cast(0); + uint16_t section12 = static_cast(0); + uint16_t section13 = static_cast(0); + uint16_t section14 = static_cast(0); + uint16_t section15 = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetZoneIdMapResponse @@ -29480,9 +29500,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetZoneInformationResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - uint8_t zoneId; - IasZoneType zoneType; - chip::NodeId ieeeAddress; + uint8_t zoneId = static_cast(0); + IasZoneType zoneType = static_cast(0); + chip::NodeId ieeeAddress = static_cast(0); chip::CharSpan zoneLabel; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -29498,9 +29518,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetZoneInformationResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - uint8_t zoneId; - IasZoneType zoneType; - chip::NodeId ieeeAddress; + uint8_t zoneId = static_cast(0); + IasZoneType zoneType = static_cast(0); + chip::NodeId ieeeAddress = static_cast(0); chip::CharSpan zoneLabel; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -29549,9 +29569,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ZoneStatusChanged::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - uint8_t zoneId; - uint16_t zoneStatus; - IasAceAudibleNotification audibleNotification; + uint8_t zoneId = static_cast(0); + uint16_t zoneStatus = static_cast(0); + IasAceAudibleNotification audibleNotification = static_cast(0); chip::CharSpan zoneLabel; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -29567,9 +29587,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ZoneStatusChanged::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - uint8_t zoneId; - uint16_t zoneStatus; - IasAceAudibleNotification audibleNotification; + uint8_t zoneId = static_cast(0); + uint16_t zoneStatus = static_cast(0); + IasAceAudibleNotification audibleNotification = static_cast(0); chip::CharSpan zoneLabel; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -29618,10 +29638,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::PanelStatusChanged::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - IasAcePanelStatus panelStatus; - uint8_t secondsRemaining; - IasAceAudibleNotification audibleNotification; - IasAceAlarmStatus alarmStatus; + IasAcePanelStatus panelStatus = static_cast(0); + uint8_t secondsRemaining = static_cast(0); + IasAceAudibleNotification audibleNotification = static_cast(0); + IasAceAlarmStatus alarmStatus = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -29636,10 +29656,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::PanelStatusChanged::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - IasAcePanelStatus panelStatus; - uint8_t secondsRemaining; - IasAceAudibleNotification audibleNotification; - IasAceAlarmStatus alarmStatus; + IasAcePanelStatus panelStatus = static_cast(0); + uint8_t secondsRemaining = static_cast(0); + IasAceAudibleNotification audibleNotification = static_cast(0); + IasAceAlarmStatus alarmStatus = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace PanelStatusChanged @@ -29687,10 +29707,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetPanelStatusResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - IasAcePanelStatus panelStatus; - uint8_t secondsRemaining; - IasAceAudibleNotification audibleNotification; - IasAceAlarmStatus alarmStatus; + IasAcePanelStatus panelStatus = static_cast(0); + uint8_t secondsRemaining = static_cast(0); + IasAceAudibleNotification audibleNotification = static_cast(0); + IasAceAlarmStatus alarmStatus = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -29705,10 +29725,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetPanelStatusResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - IasAcePanelStatus panelStatus; - uint8_t secondsRemaining; - IasAceAudibleNotification audibleNotification; - IasAceAlarmStatus alarmStatus; + IasAcePanelStatus panelStatus = static_cast(0); + uint8_t secondsRemaining = static_cast(0); + IasAceAudibleNotification audibleNotification = static_cast(0); + IasAceAlarmStatus alarmStatus = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetPanelStatusResponse @@ -29725,7 +29745,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetZoneInformation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - uint8_t zoneId; + uint8_t zoneId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -29740,7 +29760,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetZoneInformation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - uint8_t zoneId; + uint8_t zoneId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetZoneInformation @@ -29758,7 +29778,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetBypassedZoneList::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - uint8_t numberOfZones; + uint8_t numberOfZones = static_cast(0); DataModel::List zoneIds; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -29774,7 +29794,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetBypassedZoneList::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - uint8_t numberOfZones; + uint8_t numberOfZones = static_cast(0); DataModel::DecodableList zoneIds; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -29821,7 +29841,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::BypassResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - uint8_t numberOfZones; + uint8_t numberOfZones = static_cast(0); DataModel::List bypassResult; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -29837,7 +29857,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::BypassResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - uint8_t numberOfZones; + uint8_t numberOfZones = static_cast(0); DataModel::DecodableList bypassResult; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -29885,8 +29905,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetZoneStatusResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - bool zoneStatusComplete; - uint8_t numberOfZones; + bool zoneStatusComplete = static_cast(0); + uint8_t numberOfZones = static_cast(0); DataModel::List zoneStatusResult; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -29902,8 +29922,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetZoneStatusResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - bool zoneStatusComplete; - uint8_t numberOfZones; + bool zoneStatusComplete = static_cast(0); + uint8_t numberOfZones = static_cast(0); DataModel::DecodableList zoneStatusResult; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -29924,10 +29944,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetZoneStatus::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - uint8_t startingZoneId; - uint8_t maxNumberOfZoneIds; - bool zoneStatusMaskFlag; - uint16_t zoneStatusMask; + uint8_t startingZoneId = static_cast(0); + uint8_t maxNumberOfZoneIds = static_cast(0); + bool zoneStatusMaskFlag = static_cast(0); + uint16_t zoneStatusMask = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -29942,10 +29962,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetZoneStatus::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } - uint8_t startingZoneId; - uint8_t maxNumberOfZoneIds; - bool zoneStatusMaskFlag; - uint16_t zoneStatusMask; + uint8_t startingZoneId = static_cast(0); + uint8_t maxNumberOfZoneIds = static_cast(0); + bool zoneStatusMaskFlag = static_cast(0); + uint16_t zoneStatusMask = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetZoneStatus @@ -29999,8 +30019,8 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -30055,10 +30075,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StartWarning::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasWd::Id; } - chip::BitFlags warningInfo; - uint16_t warningDuration; - uint8_t strobeDutyCycle; - uint8_t strobeLevel; + chip::BitFlags warningInfo = static_cast>(0); + uint16_t warningDuration = static_cast(0); + uint8_t strobeDutyCycle = static_cast(0); + uint8_t strobeLevel = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -30073,10 +30093,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StartWarning::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasWd::Id; } - chip::BitFlags warningInfo; - uint16_t warningDuration; - uint8_t strobeDutyCycle; - uint8_t strobeLevel; + chip::BitFlags warningInfo = static_cast>(0); + uint16_t warningDuration = static_cast(0); + uint8_t strobeDutyCycle = static_cast(0); + uint8_t strobeLevel = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StartWarning @@ -30093,7 +30113,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::Squawk::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasWd::Id; } - chip::BitFlags squawkInfo; + chip::BitFlags squawkInfo = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -30108,7 +30128,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::Squawk::Id; } static constexpr ClusterId GetClusterId() { return Clusters::IasWd::Id; } - chip::BitFlags squawkInfo; + chip::BitFlags squawkInfo = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace Squawk @@ -30173,10 +30193,10 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MaxDuration::TypeInfo::DecodableType maxDuration; + Attributes::MaxDuration::TypeInfo::DecodableType maxDuration = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -30244,8 +30264,8 @@ struct TypeInfo Attributes::WakeOnLanMacAddress::TypeInfo::DecodableType wakeOnLanMacAddress; Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -30389,7 +30409,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } Structs::ChannelInfo::Type channelMatch; - ErrorTypeEnum errorType; + ErrorTypeEnum errorType = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -30405,7 +30425,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } Structs::ChannelInfo::DecodableType channelMatch; - ErrorTypeEnum errorType; + ErrorTypeEnum errorType = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ChangeChannelResponse @@ -30423,8 +30443,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::ChangeChannelByNumberRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } - uint16_t majorNumber; - uint16_t minorNumber; + uint16_t majorNumber = static_cast(0); + uint16_t minorNumber = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -30439,8 +30459,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::ChangeChannelByNumberRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } - uint16_t majorNumber; - uint16_t minorNumber; + uint16_t majorNumber = static_cast(0); + uint16_t minorNumber = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ChangeChannelByNumberRequest @@ -30457,7 +30477,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SkipChannelRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } - uint16_t count; + uint16_t count = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -30472,7 +30492,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SkipChannelRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Channel::Id; } - uint16_t count; + uint16_t count = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SkipChannelRequest @@ -30566,8 +30586,8 @@ struct TypeInfo Attributes::ChannelLineup::TypeInfo::DecodableType channelLineup; Attributes::CurrentChannel::TypeInfo::DecodableType currentChannel; Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -30634,7 +30654,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::NavigateTargetRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } - uint8_t target; + uint8_t target = static_cast(0); chip::CharSpan data; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -30650,7 +30670,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::NavigateTargetRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } - uint8_t target; + uint8_t target = static_cast(0); chip::CharSpan data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -30669,7 +30689,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::NavigateTargetResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } - StatusEnum status; + StatusEnum status = static_cast(0); chip::CharSpan data; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -30685,7 +30705,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::NavigateTargetResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } - StatusEnum status; + StatusEnum status = static_cast(0); chip::CharSpan data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -30766,10 +30786,10 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::TargetNavigatorList::TypeInfo::DecodableType targetNavigatorList; - Attributes::CurrentNavigatorTarget::TypeInfo::DecodableType currentNavigatorTarget; + Attributes::CurrentNavigatorTarget::TypeInfo::DecodableType currentNavigatorTarget = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -31120,7 +31140,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SkipForwardRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - uint64_t deltaPositionMilliseconds; + uint64_t deltaPositionMilliseconds = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -31135,7 +31155,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SkipForwardRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - uint64_t deltaPositionMilliseconds; + uint64_t deltaPositionMilliseconds = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SkipForwardRequest @@ -31152,7 +31172,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SkipBackwardRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - uint64_t deltaPositionMilliseconds; + uint64_t deltaPositionMilliseconds = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -31167,7 +31187,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SkipBackwardRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - uint64_t deltaPositionMilliseconds; + uint64_t deltaPositionMilliseconds = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SkipBackwardRequest @@ -31184,7 +31204,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::PlaybackResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - StatusEnum status; + StatusEnum status = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -31199,7 +31219,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::PlaybackResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - StatusEnum status; + StatusEnum status = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace PlaybackResponse @@ -31216,7 +31236,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SeekRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - uint64_t position; + uint64_t position = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -31231,7 +31251,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SeekRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } - uint64_t position; + uint64_t position = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SeekRequest @@ -31368,16 +31388,16 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::PlaybackState::TypeInfo::DecodableType playbackState; - Attributes::StartTime::TypeInfo::DecodableType startTime; - Attributes::Duration::TypeInfo::DecodableType duration; + Attributes::PlaybackState::TypeInfo::DecodableType playbackState = static_cast(0); + Attributes::StartTime::TypeInfo::DecodableType startTime = static_cast(0); + Attributes::Duration::TypeInfo::DecodableType duration = static_cast(0); Attributes::Position::TypeInfo::DecodableType position; - Attributes::PlaybackSpeed::TypeInfo::DecodableType playbackSpeed; - Attributes::SeekRangeEnd::TypeInfo::DecodableType seekRangeEnd; - Attributes::SeekRangeStart::TypeInfo::DecodableType seekRangeStart; + Attributes::PlaybackSpeed::TypeInfo::DecodableType playbackSpeed = static_cast(0); + Attributes::SeekRangeEnd::TypeInfo::DecodableType seekRangeEnd = static_cast(0); + Attributes::SeekRangeStart::TypeInfo::DecodableType seekRangeStart = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -31472,7 +31492,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SelectInputRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } - uint8_t index; + uint8_t index = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -31487,7 +31507,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SelectInputRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } - uint8_t index; + uint8_t index = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SelectInputRequest @@ -31561,7 +31581,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::RenameInputRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } - uint8_t index; + uint8_t index = static_cast(0); chip::CharSpan name; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -31577,7 +31597,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::RenameInputRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } - uint8_t index; + uint8_t index = static_cast(0); chip::CharSpan name; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -31657,10 +31677,10 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::MediaInputList::TypeInfo::DecodableType mediaInputList; - Attributes::CurrentMediaInput::TypeInfo::DecodableType currentMediaInput; + Attributes::CurrentMediaInput::TypeInfo::DecodableType currentMediaInput = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -31756,8 +31776,8 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -31898,7 +31918,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SendKeyRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } - CecKeyCode keyCode; + CecKeyCode keyCode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -31913,7 +31933,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SendKeyRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } - CecKeyCode keyCode; + CecKeyCode keyCode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SendKeyRequest @@ -31930,7 +31950,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SendKeyResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } - StatusEnum status; + StatusEnum status = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -31945,7 +31965,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SendKeyResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } - StatusEnum status; + StatusEnum status = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SendKeyResponse @@ -31999,8 +32019,8 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -32232,7 +32252,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::LaunchContentRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } - bool autoPlay; + bool autoPlay = static_cast(0); chip::CharSpan data; DataModel::List search; @@ -32249,7 +32269,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::LaunchContentRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } - bool autoPlay; + bool autoPlay = static_cast(0); chip::CharSpan data; DataModel::DecodableList search; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -32307,7 +32327,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::LaunchResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } - StatusEnum status; + StatusEnum status = static_cast(0); chip::CharSpan data; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -32323,7 +32343,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::LaunchResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } - StatusEnum status; + StatusEnum status = static_cast(0); chip::CharSpan data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -32402,10 +32422,10 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::AcceptHeaderList::TypeInfo::DecodableType acceptHeaderList; - Attributes::SupportedStreamingProtocols::TypeInfo::DecodableType supportedStreamingProtocols; + Attributes::SupportedStreamingProtocols::TypeInfo::DecodableType supportedStreamingProtocols = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -32482,7 +32502,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SelectOutputRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } - uint8_t index; + uint8_t index = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -32497,7 +32517,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SelectOutputRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } - uint8_t index; + uint8_t index = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SelectOutputRequest @@ -32515,7 +32535,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::RenameOutputRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } - uint8_t index; + uint8_t index = static_cast(0); chip::CharSpan name; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -32531,7 +32551,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::RenameOutputRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } - uint8_t index; + uint8_t index = static_cast(0); chip::CharSpan name; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -32611,10 +32631,10 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::AudioOutputList::TypeInfo::DecodableType audioOutputList; - Attributes::CurrentAudioOutput::TypeInfo::DecodableType currentAudioOutput; + Attributes::CurrentAudioOutput::TypeInfo::DecodableType currentAudioOutput = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -32823,7 +32843,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::LauncherResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } - StatusEnum status; + StatusEnum status = static_cast(0); chip::CharSpan data; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -32839,7 +32859,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::LauncherResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } - StatusEnum status; + StatusEnum status = static_cast(0); chip::CharSpan data; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -32920,8 +32940,8 @@ struct TypeInfo Attributes::ApplicationLauncherList::TypeInfo::DecodableType applicationLauncherList; Attributes::ApplicationLauncherApp::TypeInfo::DecodableType applicationLauncherApp; Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -33103,16 +33123,16 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::VendorName::TypeInfo::DecodableType vendorName; - Attributes::VendorId::TypeInfo::DecodableType vendorId; + Attributes::VendorId::TypeInfo::DecodableType vendorId = static_cast(0); Attributes::ApplicationName::TypeInfo::DecodableType applicationName; - Attributes::ProductId::TypeInfo::DecodableType productId; + Attributes::ProductId::TypeInfo::DecodableType productId = static_cast(0); Attributes::ApplicationApp::TypeInfo::DecodableType applicationApp; - Attributes::ApplicationStatus::TypeInfo::DecodableType applicationStatus; + Attributes::ApplicationStatus::TypeInfo::DecodableType applicationStatus = static_cast(0); Attributes::ApplicationVersion::TypeInfo::DecodableType applicationVersion; Attributes::AllowedVendorList::TypeInfo::DecodableType allowedVendorList; Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -33322,8 +33342,8 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -33747,7 +33767,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::TestSpecificResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - uint8_t returnValue; + uint8_t returnValue = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -33762,7 +33782,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::TestSpecificResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - uint8_t returnValue; + uint8_t returnValue = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace TestSpecificResponse @@ -33807,7 +33827,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::TestAddArgumentsResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - uint8_t returnValue; + uint8_t returnValue = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -33822,7 +33842,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::TestAddArgumentsResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - uint8_t returnValue; + uint8_t returnValue = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace TestAddArgumentsResponse @@ -33867,7 +33887,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::TestSimpleArgumentResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - bool returnValue; + bool returnValue = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -33882,7 +33902,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::TestSimpleArgumentResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - bool returnValue; + bool returnValue = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace TestSimpleArgumentResponse @@ -33936,8 +33956,8 @@ struct Type DataModel::List arg2; DataModel::List arg3; DataModel::List arg4; - SimpleEnum arg5; - bool arg6; + SimpleEnum arg5 = static_cast(0); + bool arg6 = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -33956,8 +33976,8 @@ struct DecodableType DataModel::DecodableList arg2; DataModel::DecodableList arg3; DataModel::DecodableList arg4; - SimpleEnum arg5; - bool arg6; + SimpleEnum arg5 = static_cast(0); + bool arg6 = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace TestStructArrayArgumentResponse @@ -33975,8 +33995,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::TestAddArguments::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - uint8_t arg1; - uint8_t arg2; + uint8_t arg1 = static_cast(0); + uint8_t arg2 = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -33991,8 +34011,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::TestAddArguments::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - uint8_t arg1; - uint8_t arg2; + uint8_t arg1 = static_cast(0); + uint8_t arg2 = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace TestAddArguments @@ -34041,7 +34061,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::TestSimpleArgumentRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - bool arg1; + bool arg1 = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -34056,7 +34076,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::TestSimpleArgumentRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - bool arg1; + bool arg1 = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace TestSimpleArgumentRequest @@ -34074,8 +34094,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::TestEnumsResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - chip::VendorId arg1; - SimpleEnum arg2; + chip::VendorId arg1 = static_cast(0); + SimpleEnum arg2 = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -34090,8 +34110,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::TestEnumsResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - chip::VendorId arg1; - SimpleEnum arg2; + chip::VendorId arg1 = static_cast(0); + SimpleEnum arg2 = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace TestEnumsResponse @@ -34117,8 +34137,8 @@ struct Type DataModel::List arg2; DataModel::List arg3; DataModel::List arg4; - SimpleEnum arg5; - bool arg6; + SimpleEnum arg5 = static_cast(0); + bool arg6 = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -34137,8 +34157,8 @@ struct DecodableType DataModel::DecodableList arg2; DataModel::DecodableList arg3; DataModel::DecodableList arg4; - SimpleEnum arg5; - bool arg6; + SimpleEnum arg5 = static_cast(0); + bool arg6 = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace TestStructArrayArgumentRequest @@ -34158,7 +34178,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::TestNullableOptionalResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - bool wasPresent; + bool wasPresent = static_cast(0); Optional wasNull; Optional value; Optional> originalValue; @@ -34176,7 +34196,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::TestNullableOptionalResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - bool wasPresent; + bool wasPresent = static_cast(0); Optional wasNull; Optional value; Optional> originalValue; @@ -34255,32 +34275,32 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::TestComplexNullableOptionalResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - bool nullableIntWasNull; + bool nullableIntWasNull = static_cast(0); Optional nullableIntValue; - bool optionalIntWasPresent; + bool optionalIntWasPresent = static_cast(0); Optional optionalIntValue; - bool nullableOptionalIntWasPresent; + bool nullableOptionalIntWasPresent = static_cast(0); Optional nullableOptionalIntWasNull; Optional nullableOptionalIntValue; - bool nullableStringWasNull; + bool nullableStringWasNull = static_cast(0); Optional nullableStringValue; - bool optionalStringWasPresent; + bool optionalStringWasPresent = static_cast(0); Optional optionalStringValue; - bool nullableOptionalStringWasPresent; + bool nullableOptionalStringWasPresent = static_cast(0); Optional nullableOptionalStringWasNull; Optional nullableOptionalStringValue; - bool nullableStructWasNull; + bool nullableStructWasNull = static_cast(0); Optional nullableStructValue; - bool optionalStructWasPresent; + bool optionalStructWasPresent = static_cast(0); Optional optionalStructValue; - bool nullableOptionalStructWasPresent; + bool nullableOptionalStructWasPresent = static_cast(0); Optional nullableOptionalStructWasNull; Optional nullableOptionalStructValue; - bool nullableListWasNull; + bool nullableListWasNull = static_cast(0); Optional> nullableListValue; - bool optionalListWasPresent; + bool optionalListWasPresent = static_cast(0); Optional> optionalListValue; - bool nullableOptionalListWasPresent; + bool nullableOptionalListWasPresent = static_cast(0); Optional nullableOptionalListWasNull; Optional> nullableOptionalListValue; @@ -34297,32 +34317,32 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::TestComplexNullableOptionalResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - bool nullableIntWasNull; + bool nullableIntWasNull = static_cast(0); Optional nullableIntValue; - bool optionalIntWasPresent; + bool optionalIntWasPresent = static_cast(0); Optional optionalIntValue; - bool nullableOptionalIntWasPresent; + bool nullableOptionalIntWasPresent = static_cast(0); Optional nullableOptionalIntWasNull; Optional nullableOptionalIntValue; - bool nullableStringWasNull; + bool nullableStringWasNull = static_cast(0); Optional nullableStringValue; - bool optionalStringWasPresent; + bool optionalStringWasPresent = static_cast(0); Optional optionalStringValue; - bool nullableOptionalStringWasPresent; + bool nullableOptionalStringWasPresent = static_cast(0); Optional nullableOptionalStringWasNull; Optional nullableOptionalStringValue; - bool nullableStructWasNull; + bool nullableStructWasNull = static_cast(0); Optional nullableStructValue; - bool optionalStructWasPresent; + bool optionalStructWasPresent = static_cast(0); Optional optionalStructValue; - bool nullableOptionalStructWasPresent; + bool nullableOptionalStructWasPresent = static_cast(0); Optional nullableOptionalStructWasNull; Optional nullableOptionalStructValue; - bool nullableListWasNull; + bool nullableListWasNull = static_cast(0); Optional> nullableListValue; - bool optionalListWasPresent; + bool optionalListWasPresent = static_cast(0); Optional> optionalListValue; - bool nullableOptionalListWasPresent; + bool nullableOptionalListWasPresent = static_cast(0); Optional nullableOptionalListWasNull; Optional> nullableOptionalListValue; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -34373,7 +34393,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::BooleanResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - bool value; + bool value = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -34388,7 +34408,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::BooleanResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - bool value; + bool value = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace BooleanResponse @@ -34501,7 +34521,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::TestEmitTestEventResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - uint64_t value; + uint64_t value = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -34516,7 +34536,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::TestEmitTestEventResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - uint64_t value; + uint64_t value = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace TestEmitTestEventResponse @@ -34630,8 +34650,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::TestEnumsRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - chip::VendorId arg1; - SimpleEnum arg2; + chip::VendorId arg1 = static_cast(0); + SimpleEnum arg2 = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -34646,8 +34666,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::TestEnumsRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - chip::VendorId arg1; - SimpleEnum arg2; + chip::VendorId arg1 = static_cast(0); + SimpleEnum arg2 = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace TestEnumsRequest @@ -34855,9 +34875,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::TestEmitTestEventRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - uint8_t arg1; - SimpleEnum arg2; - bool arg3; + uint8_t arg1 = static_cast(0); + SimpleEnum arg2 = static_cast(0); + bool arg3 = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -34872,9 +34892,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::TestEmitTestEventRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - uint8_t arg1; - SimpleEnum arg2; - bool arg3; + uint8_t arg1 = static_cast(0); + SimpleEnum arg2 = static_cast(0); + bool arg3 = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace TestEmitTestEventRequest @@ -35868,31 +35888,31 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::Boolean::TypeInfo::DecodableType boolean; - Attributes::Bitmap8::TypeInfo::DecodableType bitmap8; - Attributes::Bitmap16::TypeInfo::DecodableType bitmap16; - Attributes::Bitmap32::TypeInfo::DecodableType bitmap32; - Attributes::Bitmap64::TypeInfo::DecodableType bitmap64; - Attributes::Int8u::TypeInfo::DecodableType int8u; - Attributes::Int16u::TypeInfo::DecodableType int16u; - Attributes::Int24u::TypeInfo::DecodableType int24u; - Attributes::Int32u::TypeInfo::DecodableType int32u; - Attributes::Int40u::TypeInfo::DecodableType int40u; - Attributes::Int48u::TypeInfo::DecodableType int48u; - Attributes::Int56u::TypeInfo::DecodableType int56u; - Attributes::Int64u::TypeInfo::DecodableType int64u; - Attributes::Int8s::TypeInfo::DecodableType int8s; - Attributes::Int16s::TypeInfo::DecodableType int16s; - Attributes::Int24s::TypeInfo::DecodableType int24s; - Attributes::Int32s::TypeInfo::DecodableType int32s; - Attributes::Int40s::TypeInfo::DecodableType int40s; - Attributes::Int48s::TypeInfo::DecodableType int48s; - Attributes::Int56s::TypeInfo::DecodableType int56s; - Attributes::Int64s::TypeInfo::DecodableType int64s; - Attributes::Enum8::TypeInfo::DecodableType enum8; - Attributes::Enum16::TypeInfo::DecodableType enum16; - Attributes::FloatSingle::TypeInfo::DecodableType floatSingle; - Attributes::FloatDouble::TypeInfo::DecodableType floatDouble; + Attributes::Boolean::TypeInfo::DecodableType boolean = static_cast(0); + Attributes::Bitmap8::TypeInfo::DecodableType bitmap8 = static_cast(0); + Attributes::Bitmap16::TypeInfo::DecodableType bitmap16 = static_cast(0); + Attributes::Bitmap32::TypeInfo::DecodableType bitmap32 = static_cast(0); + Attributes::Bitmap64::TypeInfo::DecodableType bitmap64 = static_cast(0); + Attributes::Int8u::TypeInfo::DecodableType int8u = static_cast(0); + Attributes::Int16u::TypeInfo::DecodableType int16u = static_cast(0); + Attributes::Int24u::TypeInfo::DecodableType int24u = static_cast(0); + Attributes::Int32u::TypeInfo::DecodableType int32u = static_cast(0); + Attributes::Int40u::TypeInfo::DecodableType int40u = static_cast(0); + Attributes::Int48u::TypeInfo::DecodableType int48u = static_cast(0); + Attributes::Int56u::TypeInfo::DecodableType int56u = static_cast(0); + Attributes::Int64u::TypeInfo::DecodableType int64u = static_cast(0); + Attributes::Int8s::TypeInfo::DecodableType int8s = static_cast(0); + Attributes::Int16s::TypeInfo::DecodableType int16s = static_cast(0); + Attributes::Int24s::TypeInfo::DecodableType int24s = static_cast(0); + Attributes::Int32s::TypeInfo::DecodableType int32s = static_cast(0); + Attributes::Int40s::TypeInfo::DecodableType int40s = static_cast(0); + Attributes::Int48s::TypeInfo::DecodableType int48s = static_cast(0); + Attributes::Int56s::TypeInfo::DecodableType int56s = static_cast(0); + Attributes::Int64s::TypeInfo::DecodableType int64s = static_cast(0); + Attributes::Enum8::TypeInfo::DecodableType enum8 = static_cast(0); + Attributes::Enum16::TypeInfo::DecodableType enum16 = static_cast(0); + Attributes::FloatSingle::TypeInfo::DecodableType floatSingle = static_cast(0); + Attributes::FloatDouble::TypeInfo::DecodableType floatDouble = static_cast(0); Attributes::OctetString::TypeInfo::DecodableType octetString; Attributes::ListInt8u::TypeInfo::DecodableType listInt8u; Attributes::ListOctetString::TypeInfo::DecodableType listOctetString; @@ -35900,19 +35920,19 @@ struct TypeInfo Attributes::LongOctetString::TypeInfo::DecodableType longOctetString; Attributes::CharString::TypeInfo::DecodableType charString; Attributes::LongCharString::TypeInfo::DecodableType longCharString; - Attributes::EpochUs::TypeInfo::DecodableType epochUs; - Attributes::EpochS::TypeInfo::DecodableType epochS; - Attributes::VendorId::TypeInfo::DecodableType vendorId; + Attributes::EpochUs::TypeInfo::DecodableType epochUs = static_cast(0); + Attributes::EpochS::TypeInfo::DecodableType epochS = static_cast(0); + Attributes::VendorId::TypeInfo::DecodableType vendorId = static_cast(0); Attributes::ListNullablesAndOptionalsStruct::TypeInfo::DecodableType listNullablesAndOptionalsStruct; - Attributes::EnumAttr::TypeInfo::DecodableType enumAttr; + Attributes::EnumAttr::TypeInfo::DecodableType enumAttr = static_cast(0); Attributes::StructAttr::TypeInfo::DecodableType structAttr; - Attributes::RangeRestrictedInt8u::TypeInfo::DecodableType rangeRestrictedInt8u; - Attributes::RangeRestrictedInt8s::TypeInfo::DecodableType rangeRestrictedInt8s; - Attributes::RangeRestrictedInt16u::TypeInfo::DecodableType rangeRestrictedInt16u; - Attributes::RangeRestrictedInt16s::TypeInfo::DecodableType rangeRestrictedInt16s; + Attributes::RangeRestrictedInt8u::TypeInfo::DecodableType rangeRestrictedInt8u = static_cast(0); + Attributes::RangeRestrictedInt8s::TypeInfo::DecodableType rangeRestrictedInt8s = static_cast(0); + Attributes::RangeRestrictedInt16u::TypeInfo::DecodableType rangeRestrictedInt16u = static_cast(0); + Attributes::RangeRestrictedInt16s::TypeInfo::DecodableType rangeRestrictedInt16s = static_cast(0); Attributes::ListLongOctetString::TypeInfo::DecodableType listLongOctetString; - Attributes::TimedWriteBoolean::TypeInfo::DecodableType timedWriteBoolean; - Attributes::Unsupported::TypeInfo::DecodableType unsupported; + Attributes::TimedWriteBoolean::TypeInfo::DecodableType timedWriteBoolean = static_cast(0); + Attributes::Unsupported::TypeInfo::DecodableType unsupported = static_cast(0); Attributes::NullableBoolean::TypeInfo::DecodableType nullableBoolean; Attributes::NullableBitmap8::TypeInfo::DecodableType nullableBitmap8; Attributes::NullableBitmap16::TypeInfo::DecodableType nullableBitmap16; @@ -35947,8 +35967,8 @@ struct TypeInfo Attributes::NullableRangeRestrictedInt16u::TypeInfo::DecodableType nullableRangeRestrictedInt16u; Attributes::NullableRangeRestrictedInt16s::TypeInfo::DecodableType nullableRangeRestrictedInt16s; Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -35974,9 +35994,9 @@ struct Type static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - uint8_t arg1; - SimpleEnum arg2; - bool arg3; + uint8_t arg1 = static_cast(0); + SimpleEnum arg2 = static_cast(0); + bool arg3 = static_cast(0); Structs::SimpleStruct::Type arg4; DataModel::List arg5; DataModel::List arg6; @@ -35991,9 +36011,9 @@ struct DecodableType static constexpr EventId GetEventId() { return kEventId; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } - uint8_t arg1; - SimpleEnum arg2; - bool arg3; + uint8_t arg1 = static_cast(0); + SimpleEnum arg2 = static_cast(0); + bool arg3 = static_cast(0); Structs::SimpleStruct::DecodableType arg4; DataModel::DecodableList arg5; DataModel::DecodableList arg6; @@ -36199,12 +36219,13 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::DisplayMessage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Messaging::Id; } - uint32_t messageId; - chip::BitFlags messageControl; - uint32_t startTime; - uint16_t durationInMinutes; + uint32_t messageId = static_cast(0); + chip::BitFlags messageControl = static_cast>(0); + uint32_t startTime = static_cast(0); + uint16_t durationInMinutes = static_cast(0); chip::CharSpan message; - chip::BitFlags optionalExtendedMessageControl; + chip::BitFlags optionalExtendedMessageControl = + static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -36219,12 +36240,13 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::DisplayMessage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Messaging::Id; } - uint32_t messageId; - chip::BitFlags messageControl; - uint32_t startTime; - uint16_t durationInMinutes; + uint32_t messageId = static_cast(0); + chip::BitFlags messageControl = static_cast>(0); + uint32_t startTime = static_cast(0); + uint16_t durationInMinutes = static_cast(0); chip::CharSpan message; - chip::BitFlags optionalExtendedMessageControl; + chip::BitFlags optionalExtendedMessageControl = + static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace DisplayMessage @@ -36270,8 +36292,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::CancelMessage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Messaging::Id; } - uint32_t messageId; - chip::BitFlags messageControl; + uint32_t messageId = static_cast(0); + chip::BitFlags messageControl = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -36286,8 +36308,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::CancelMessage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Messaging::Id; } - uint32_t messageId; - chip::BitFlags messageControl; + uint32_t messageId = static_cast(0); + chip::BitFlags messageControl = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace CancelMessage @@ -36307,9 +36329,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MessageConfirmation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Messaging::Id; } - uint32_t messageId; - uint32_t confirmationTime; - uint8_t messageConfirmationControl; + uint32_t messageId = static_cast(0); + uint32_t confirmationTime = static_cast(0); + uint8_t messageConfirmationControl = static_cast(0); chip::ByteSpan messageResponse; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -36325,9 +36347,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MessageConfirmation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Messaging::Id; } - uint32_t messageId; - uint32_t confirmationTime; - uint8_t messageConfirmationControl; + uint32_t messageId = static_cast(0); + uint32_t confirmationTime = static_cast(0); + uint8_t messageConfirmationControl = static_cast(0); chip::ByteSpan messageResponse; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -36350,12 +36372,13 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::DisplayProtectedMessage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Messaging::Id; } - uint32_t messageId; - chip::BitFlags messageControl; - uint32_t startTime; - uint16_t durationInMinutes; + uint32_t messageId = static_cast(0); + chip::BitFlags messageControl = static_cast>(0); + uint32_t startTime = static_cast(0); + uint16_t durationInMinutes = static_cast(0); chip::CharSpan message; - chip::BitFlags optionalExtendedMessageControl; + chip::BitFlags optionalExtendedMessageControl = + static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -36370,12 +36393,13 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::DisplayProtectedMessage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Messaging::Id; } - uint32_t messageId; - chip::BitFlags messageControl; - uint32_t startTime; - uint16_t durationInMinutes; + uint32_t messageId = static_cast(0); + chip::BitFlags messageControl = static_cast>(0); + uint32_t startTime = static_cast(0); + uint16_t durationInMinutes = static_cast(0); chip::CharSpan message; - chip::BitFlags optionalExtendedMessageControl; + chip::BitFlags optionalExtendedMessageControl = + static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace DisplayProtectedMessage @@ -36392,7 +36416,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetMessageCancellation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Messaging::Id; } - uint32_t earliestImplementationTime; + uint32_t earliestImplementationTime = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -36407,7 +36431,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetMessageCancellation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Messaging::Id; } - uint32_t earliestImplementationTime; + uint32_t earliestImplementationTime = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetMessageCancellation @@ -36424,7 +36448,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::CancelAllMessages::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Messaging::Id; } - uint32_t implementationDateTime; + uint32_t implementationDateTime = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -36439,7 +36463,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::CancelAllMessages::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Messaging::Id; } - uint32_t implementationDateTime; + uint32_t implementationDateTime = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace CancelAllMessages @@ -36493,8 +36517,8 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -36692,21 +36716,21 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::BasicIdentification::TypeInfo::DecodableType basicIdentification; + Attributes::BasicIdentification::TypeInfo::DecodableType basicIdentification = static_cast(0); Attributes::CompanyName::TypeInfo::DecodableType companyName; - Attributes::CompanyId::TypeInfo::DecodableType companyId; + Attributes::CompanyId::TypeInfo::DecodableType companyId = static_cast(0); Attributes::BrandName::TypeInfo::DecodableType brandName; - Attributes::BrandId::TypeInfo::DecodableType brandId; + Attributes::BrandId::TypeInfo::DecodableType brandId = static_cast(0); Attributes::Model::TypeInfo::DecodableType model; Attributes::PartNumber::TypeInfo::DecodableType partNumber; Attributes::ProductRevision::TypeInfo::DecodableType productRevision; Attributes::SoftwareRevision::TypeInfo::DecodableType softwareRevision; Attributes::ProductTypeName::TypeInfo::DecodableType productTypeName; - Attributes::ProductTypeId::TypeInfo::DecodableType productTypeId; - Attributes::CecedSpecificationVersion::TypeInfo::DecodableType cecedSpecificationVersion; + Attributes::ProductTypeId::TypeInfo::DecodableType productTypeId = static_cast(0); + Attributes::CecedSpecificationVersion::TypeInfo::DecodableType cecedSpecificationVersion = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -36905,8 +36929,8 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::CompanyName::TypeInfo::DecodableType companyName; - Attributes::MeterTypeId::TypeInfo::DecodableType meterTypeId; - Attributes::DataQualityId::TypeInfo::DecodableType dataQualityId; + Attributes::MeterTypeId::TypeInfo::DecodableType meterTypeId = static_cast(0); + Attributes::DataQualityId::TypeInfo::DecodableType dataQualityId = static_cast(0); Attributes::CustomerName::TypeInfo::DecodableType customerName; Attributes::Model::TypeInfo::DecodableType model; Attributes::PartNumber::TypeInfo::DecodableType partNumber; @@ -36914,11 +36938,11 @@ struct TypeInfo Attributes::SoftwareRevision::TypeInfo::DecodableType softwareRevision; Attributes::UtilityName::TypeInfo::DecodableType utilityName; Attributes::Pod::TypeInfo::DecodableType pod; - Attributes::AvailablePower::TypeInfo::DecodableType availablePower; - Attributes::PowerThreshold::TypeInfo::DecodableType powerThreshold; + Attributes::AvailablePower::TypeInfo::DecodableType availablePower = static_cast(0); + Attributes::PowerThreshold::TypeInfo::DecodableType powerThreshold = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -37017,7 +37041,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetAlertsResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceEventsAndAlert::Id; } - chip::BitFlags alertsCount; + chip::BitFlags alertsCount = static_cast>(0); DataModel::List> alertStructures; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -37033,7 +37057,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetAlertsResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceEventsAndAlert::Id; } - chip::BitFlags alertsCount; + chip::BitFlags alertsCount = static_cast>(0); DataModel::DecodableList> alertStructures; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -37052,7 +37076,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::AlertsNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceEventsAndAlert::Id; } - chip::BitFlags alertsCount; + chip::BitFlags alertsCount = static_cast>(0); DataModel::List> alertStructures; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -37068,7 +37092,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::AlertsNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceEventsAndAlert::Id; } - chip::BitFlags alertsCount; + chip::BitFlags alertsCount = static_cast>(0); DataModel::DecodableList> alertStructures; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -37087,8 +37111,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EventsNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceEventsAndAlert::Id; } - uint8_t eventHeader; - EventIdentification eventId; + uint8_t eventHeader = static_cast(0); + EventIdentification eventId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -37103,8 +37127,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EventsNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceEventsAndAlert::Id; } - uint8_t eventHeader; - EventIdentification eventId; + uint8_t eventHeader = static_cast(0); + EventIdentification eventId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace EventsNotification @@ -37158,8 +37182,8 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -37218,9 +37242,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::LogNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceStatistics::Id; } - uint32_t timeStamp; - uint32_t logId; - uint32_t logLength; + uint32_t timeStamp = static_cast(0); + uint32_t logId = static_cast(0); + uint32_t logLength = static_cast(0); DataModel::List logPayload; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -37236,9 +37260,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::LogNotification::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceStatistics::Id; } - uint32_t timeStamp; - uint32_t logId; - uint32_t logLength; + uint32_t timeStamp = static_cast(0); + uint32_t logId = static_cast(0); + uint32_t logLength = static_cast(0); DataModel::DecodableList logPayload; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -37256,7 +37280,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::LogRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceStatistics::Id; } - uint32_t logId; + uint32_t logId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -37271,7 +37295,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::LogRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceStatistics::Id; } - uint32_t logId; + uint32_t logId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace LogRequest @@ -37291,9 +37315,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::LogResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceStatistics::Id; } - uint32_t timeStamp; - uint32_t logId; - uint32_t logLength; + uint32_t timeStamp = static_cast(0); + uint32_t logId = static_cast(0); + uint32_t logLength = static_cast(0); DataModel::List logPayload; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -37309,9 +37333,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::LogResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceStatistics::Id; } - uint32_t timeStamp; - uint32_t logId; - uint32_t logLength; + uint32_t timeStamp = static_cast(0); + uint32_t logId = static_cast(0); + uint32_t logLength = static_cast(0); DataModel::DecodableList logPayload; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -37358,7 +37382,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::LogQueueResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceStatistics::Id; } - uint8_t logQueueSize; + uint8_t logQueueSize = static_cast(0); DataModel::List logIds; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -37374,7 +37398,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::LogQueueResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceStatistics::Id; } - uint8_t logQueueSize; + uint8_t logQueueSize = static_cast(0); DataModel::DecodableList logIds; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -37393,7 +37417,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::StatisticsAvailable::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceStatistics::Id; } - uint8_t logQueueSize; + uint8_t logQueueSize = static_cast(0); DataModel::List logIds; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -37409,7 +37433,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::StatisticsAvailable::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ApplianceStatistics::Id; } - uint8_t logQueueSize; + uint8_t logQueueSize = static_cast(0); DataModel::DecodableList logIds; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -37487,11 +37511,11 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::LogMaxSize::TypeInfo::DecodableType logMaxSize; - Attributes::LogQueueMaxSize::TypeInfo::DecodableType logQueueMaxSize; + Attributes::LogMaxSize::TypeInfo::DecodableType logMaxSize = static_cast(0); + Attributes::LogQueueMaxSize::TypeInfo::DecodableType logQueueMaxSize = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes @@ -37540,9 +37564,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetProfileInfoResponseCommand::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - uint8_t profileCount; - uint8_t profileIntervalPeriod; - uint8_t maxNumberOfIntervals; + uint8_t profileCount = static_cast(0); + uint8_t profileIntervalPeriod = static_cast(0); + uint8_t maxNumberOfIntervals = static_cast(0); DataModel::List listOfAttributes; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -37558,9 +37582,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetProfileInfoResponseCommand::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - uint8_t profileCount; - uint8_t profileIntervalPeriod; - uint8_t maxNumberOfIntervals; + uint8_t profileCount = static_cast(0); + uint8_t profileIntervalPeriod = static_cast(0); + uint8_t maxNumberOfIntervals = static_cast(0); DataModel::DecodableList listOfAttributes; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -37611,11 +37635,11 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetMeasurementProfileResponseCommand::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - uint32_t startTime; - uint8_t status; - uint8_t profileIntervalPeriod; - uint8_t numberOfIntervalsDelivered; - uint16_t attributeId; + uint32_t startTime = static_cast(0); + uint8_t status = static_cast(0); + uint8_t profileIntervalPeriod = static_cast(0); + uint8_t numberOfIntervalsDelivered = static_cast(0); + uint16_t attributeId = static_cast(0); DataModel::List intervals; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -37631,11 +37655,11 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetMeasurementProfileResponseCommand::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - uint32_t startTime; - uint8_t status; - uint8_t profileIntervalPeriod; - uint8_t numberOfIntervalsDelivered; - uint16_t attributeId; + uint32_t startTime = static_cast(0); + uint8_t status = static_cast(0); + uint8_t profileIntervalPeriod = static_cast(0); + uint8_t numberOfIntervalsDelivered = static_cast(0); + uint16_t attributeId = static_cast(0); DataModel::DecodableList intervals; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -37655,9 +37679,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetMeasurementProfileCommand::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - uint16_t attributeId; - uint32_t startTime; - uint8_t numberOfIntervals; + uint16_t attributeId = static_cast(0); + uint32_t startTime = static_cast(0); + uint8_t numberOfIntervals = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -37672,9 +37696,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetMeasurementProfileCommand::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - uint16_t attributeId; - uint32_t startTime; - uint8_t numberOfIntervals; + uint16_t attributeId = static_cast(0); + uint32_t startTime = static_cast(0); + uint8_t numberOfIntervals = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetMeasurementProfileCommand @@ -39263,137 +39287,154 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MeasurementType::TypeInfo::DecodableType measurementType; - Attributes::DcVoltage::TypeInfo::DecodableType dcVoltage; - Attributes::DcVoltageMin::TypeInfo::DecodableType dcVoltageMin; - Attributes::DcVoltageMax::TypeInfo::DecodableType dcVoltageMax; - Attributes::DcCurrent::TypeInfo::DecodableType dcCurrent; - Attributes::DcCurrentMin::TypeInfo::DecodableType dcCurrentMin; - Attributes::DcCurrentMax::TypeInfo::DecodableType dcCurrentMax; - Attributes::DcPower::TypeInfo::DecodableType dcPower; - Attributes::DcPowerMin::TypeInfo::DecodableType dcPowerMin; - Attributes::DcPowerMax::TypeInfo::DecodableType dcPowerMax; - Attributes::DcVoltageMultiplier::TypeInfo::DecodableType dcVoltageMultiplier; - Attributes::DcVoltageDivisor::TypeInfo::DecodableType dcVoltageDivisor; - Attributes::DcCurrentMultiplier::TypeInfo::DecodableType dcCurrentMultiplier; - Attributes::DcCurrentDivisor::TypeInfo::DecodableType dcCurrentDivisor; - Attributes::DcPowerMultiplier::TypeInfo::DecodableType dcPowerMultiplier; - Attributes::DcPowerDivisor::TypeInfo::DecodableType dcPowerDivisor; - Attributes::AcFrequency::TypeInfo::DecodableType acFrequency; - Attributes::AcFrequencyMin::TypeInfo::DecodableType acFrequencyMin; - Attributes::AcFrequencyMax::TypeInfo::DecodableType acFrequencyMax; - Attributes::NeutralCurrent::TypeInfo::DecodableType neutralCurrent; - Attributes::TotalActivePower::TypeInfo::DecodableType totalActivePower; - Attributes::TotalReactivePower::TypeInfo::DecodableType totalReactivePower; - Attributes::TotalApparentPower::TypeInfo::DecodableType totalApparentPower; - Attributes::Measured1stHarmonicCurrent::TypeInfo::DecodableType measured1stHarmonicCurrent; - Attributes::Measured3rdHarmonicCurrent::TypeInfo::DecodableType measured3rdHarmonicCurrent; - Attributes::Measured5thHarmonicCurrent::TypeInfo::DecodableType measured5thHarmonicCurrent; - Attributes::Measured7thHarmonicCurrent::TypeInfo::DecodableType measured7thHarmonicCurrent; - Attributes::Measured9thHarmonicCurrent::TypeInfo::DecodableType measured9thHarmonicCurrent; - Attributes::Measured11thHarmonicCurrent::TypeInfo::DecodableType measured11thHarmonicCurrent; - Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo::DecodableType measuredPhase1stHarmonicCurrent; - Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo::DecodableType measuredPhase3rdHarmonicCurrent; - Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo::DecodableType measuredPhase5thHarmonicCurrent; - Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo::DecodableType measuredPhase7thHarmonicCurrent; - Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo::DecodableType measuredPhase9thHarmonicCurrent; - Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo::DecodableType measuredPhase11thHarmonicCurrent; - Attributes::AcFrequencyMultiplier::TypeInfo::DecodableType acFrequencyMultiplier; - Attributes::AcFrequencyDivisor::TypeInfo::DecodableType acFrequencyDivisor; - Attributes::PowerMultiplier::TypeInfo::DecodableType powerMultiplier; - Attributes::PowerDivisor::TypeInfo::DecodableType powerDivisor; - Attributes::HarmonicCurrentMultiplier::TypeInfo::DecodableType harmonicCurrentMultiplier; - Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo::DecodableType phaseHarmonicCurrentMultiplier; - Attributes::InstantaneousVoltage::TypeInfo::DecodableType instantaneousVoltage; - Attributes::InstantaneousLineCurrent::TypeInfo::DecodableType instantaneousLineCurrent; - Attributes::InstantaneousActiveCurrent::TypeInfo::DecodableType instantaneousActiveCurrent; - Attributes::InstantaneousReactiveCurrent::TypeInfo::DecodableType instantaneousReactiveCurrent; - Attributes::InstantaneousPower::TypeInfo::DecodableType instantaneousPower; - Attributes::RmsVoltage::TypeInfo::DecodableType rmsVoltage; - Attributes::RmsVoltageMin::TypeInfo::DecodableType rmsVoltageMin; - Attributes::RmsVoltageMax::TypeInfo::DecodableType rmsVoltageMax; - Attributes::RmsCurrent::TypeInfo::DecodableType rmsCurrent; - Attributes::RmsCurrentMin::TypeInfo::DecodableType rmsCurrentMin; - Attributes::RmsCurrentMax::TypeInfo::DecodableType rmsCurrentMax; - Attributes::ActivePower::TypeInfo::DecodableType activePower; - Attributes::ActivePowerMin::TypeInfo::DecodableType activePowerMin; - Attributes::ActivePowerMax::TypeInfo::DecodableType activePowerMax; - Attributes::ReactivePower::TypeInfo::DecodableType reactivePower; - Attributes::ApparentPower::TypeInfo::DecodableType apparentPower; - Attributes::PowerFactor::TypeInfo::DecodableType powerFactor; - Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo::DecodableType averageRmsVoltageMeasurementPeriod; - Attributes::AverageRmsUnderVoltageCounter::TypeInfo::DecodableType averageRmsUnderVoltageCounter; - Attributes::RmsExtremeOverVoltagePeriod::TypeInfo::DecodableType rmsExtremeOverVoltagePeriod; - Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo::DecodableType rmsExtremeUnderVoltagePeriod; - Attributes::RmsVoltageSagPeriod::TypeInfo::DecodableType rmsVoltageSagPeriod; - Attributes::RmsVoltageSwellPeriod::TypeInfo::DecodableType rmsVoltageSwellPeriod; - Attributes::AcVoltageMultiplier::TypeInfo::DecodableType acVoltageMultiplier; - Attributes::AcVoltageDivisor::TypeInfo::DecodableType acVoltageDivisor; - Attributes::AcCurrentMultiplier::TypeInfo::DecodableType acCurrentMultiplier; - Attributes::AcCurrentDivisor::TypeInfo::DecodableType acCurrentDivisor; - Attributes::AcPowerMultiplier::TypeInfo::DecodableType acPowerMultiplier; - Attributes::AcPowerDivisor::TypeInfo::DecodableType acPowerDivisor; - Attributes::OverloadAlarmsMask::TypeInfo::DecodableType overloadAlarmsMask; - Attributes::VoltageOverload::TypeInfo::DecodableType voltageOverload; - Attributes::CurrentOverload::TypeInfo::DecodableType currentOverload; - Attributes::AcOverloadAlarmsMask::TypeInfo::DecodableType acOverloadAlarmsMask; - Attributes::AcVoltageOverload::TypeInfo::DecodableType acVoltageOverload; - Attributes::AcCurrentOverload::TypeInfo::DecodableType acCurrentOverload; - Attributes::AcActivePowerOverload::TypeInfo::DecodableType acActivePowerOverload; - Attributes::AcReactivePowerOverload::TypeInfo::DecodableType acReactivePowerOverload; - Attributes::AverageRmsOverVoltage::TypeInfo::DecodableType averageRmsOverVoltage; - Attributes::AverageRmsUnderVoltage::TypeInfo::DecodableType averageRmsUnderVoltage; - Attributes::RmsExtremeOverVoltage::TypeInfo::DecodableType rmsExtremeOverVoltage; - Attributes::RmsExtremeUnderVoltage::TypeInfo::DecodableType rmsExtremeUnderVoltage; - Attributes::RmsVoltageSag::TypeInfo::DecodableType rmsVoltageSag; - Attributes::RmsVoltageSwell::TypeInfo::DecodableType rmsVoltageSwell; - Attributes::LineCurrentPhaseB::TypeInfo::DecodableType lineCurrentPhaseB; - Attributes::ActiveCurrentPhaseB::TypeInfo::DecodableType activeCurrentPhaseB; - Attributes::ReactiveCurrentPhaseB::TypeInfo::DecodableType reactiveCurrentPhaseB; - Attributes::RmsVoltagePhaseB::TypeInfo::DecodableType rmsVoltagePhaseB; - Attributes::RmsVoltageMinPhaseB::TypeInfo::DecodableType rmsVoltageMinPhaseB; - Attributes::RmsVoltageMaxPhaseB::TypeInfo::DecodableType rmsVoltageMaxPhaseB; - Attributes::RmsCurrentPhaseB::TypeInfo::DecodableType rmsCurrentPhaseB; - Attributes::RmsCurrentMinPhaseB::TypeInfo::DecodableType rmsCurrentMinPhaseB; - Attributes::RmsCurrentMaxPhaseB::TypeInfo::DecodableType rmsCurrentMaxPhaseB; - Attributes::ActivePowerPhaseB::TypeInfo::DecodableType activePowerPhaseB; - Attributes::ActivePowerMinPhaseB::TypeInfo::DecodableType activePowerMinPhaseB; - Attributes::ActivePowerMaxPhaseB::TypeInfo::DecodableType activePowerMaxPhaseB; - Attributes::ReactivePowerPhaseB::TypeInfo::DecodableType reactivePowerPhaseB; - Attributes::ApparentPowerPhaseB::TypeInfo::DecodableType apparentPowerPhaseB; - Attributes::PowerFactorPhaseB::TypeInfo::DecodableType powerFactorPhaseB; - Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo::DecodableType averageRmsVoltageMeasurementPeriodPhaseB; - Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo::DecodableType averageRmsOverVoltageCounterPhaseB; - Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo::DecodableType averageRmsUnderVoltageCounterPhaseB; - Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo::DecodableType rmsExtremeOverVoltagePeriodPhaseB; - Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo::DecodableType rmsExtremeUnderVoltagePeriodPhaseB; - Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo::DecodableType rmsVoltageSagPeriodPhaseB; - Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo::DecodableType rmsVoltageSwellPeriodPhaseB; - Attributes::LineCurrentPhaseC::TypeInfo::DecodableType lineCurrentPhaseC; - Attributes::ActiveCurrentPhaseC::TypeInfo::DecodableType activeCurrentPhaseC; - Attributes::ReactiveCurrentPhaseC::TypeInfo::DecodableType reactiveCurrentPhaseC; - Attributes::RmsVoltagePhaseC::TypeInfo::DecodableType rmsVoltagePhaseC; - Attributes::RmsVoltageMinPhaseC::TypeInfo::DecodableType rmsVoltageMinPhaseC; - Attributes::RmsVoltageMaxPhaseC::TypeInfo::DecodableType rmsVoltageMaxPhaseC; - Attributes::RmsCurrentPhaseC::TypeInfo::DecodableType rmsCurrentPhaseC; - Attributes::RmsCurrentMinPhaseC::TypeInfo::DecodableType rmsCurrentMinPhaseC; - Attributes::RmsCurrentMaxPhaseC::TypeInfo::DecodableType rmsCurrentMaxPhaseC; - Attributes::ActivePowerPhaseC::TypeInfo::DecodableType activePowerPhaseC; - Attributes::ActivePowerMinPhaseC::TypeInfo::DecodableType activePowerMinPhaseC; - Attributes::ActivePowerMaxPhaseC::TypeInfo::DecodableType activePowerMaxPhaseC; - Attributes::ReactivePowerPhaseC::TypeInfo::DecodableType reactivePowerPhaseC; - Attributes::ApparentPowerPhaseC::TypeInfo::DecodableType apparentPowerPhaseC; - Attributes::PowerFactorPhaseC::TypeInfo::DecodableType powerFactorPhaseC; - Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo::DecodableType averageRmsVoltageMeasurementPeriodPhaseC; - Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo::DecodableType averageRmsOverVoltageCounterPhaseC; - Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo::DecodableType averageRmsUnderVoltageCounterPhaseC; - Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo::DecodableType rmsExtremeOverVoltagePeriodPhaseC; - Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo::DecodableType rmsExtremeUnderVoltagePeriodPhaseC; - Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo::DecodableType rmsVoltageSagPeriodPhaseC; - Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo::DecodableType rmsVoltageSwellPeriodPhaseC; + Attributes::MeasurementType::TypeInfo::DecodableType measurementType = static_cast(0); + Attributes::DcVoltage::TypeInfo::DecodableType dcVoltage = static_cast(0); + Attributes::DcVoltageMin::TypeInfo::DecodableType dcVoltageMin = static_cast(0); + Attributes::DcVoltageMax::TypeInfo::DecodableType dcVoltageMax = static_cast(0); + Attributes::DcCurrent::TypeInfo::DecodableType dcCurrent = static_cast(0); + Attributes::DcCurrentMin::TypeInfo::DecodableType dcCurrentMin = static_cast(0); + Attributes::DcCurrentMax::TypeInfo::DecodableType dcCurrentMax = static_cast(0); + Attributes::DcPower::TypeInfo::DecodableType dcPower = static_cast(0); + Attributes::DcPowerMin::TypeInfo::DecodableType dcPowerMin = static_cast(0); + Attributes::DcPowerMax::TypeInfo::DecodableType dcPowerMax = static_cast(0); + Attributes::DcVoltageMultiplier::TypeInfo::DecodableType dcVoltageMultiplier = static_cast(0); + Attributes::DcVoltageDivisor::TypeInfo::DecodableType dcVoltageDivisor = static_cast(0); + Attributes::DcCurrentMultiplier::TypeInfo::DecodableType dcCurrentMultiplier = static_cast(0); + Attributes::DcCurrentDivisor::TypeInfo::DecodableType dcCurrentDivisor = static_cast(0); + Attributes::DcPowerMultiplier::TypeInfo::DecodableType dcPowerMultiplier = static_cast(0); + Attributes::DcPowerDivisor::TypeInfo::DecodableType dcPowerDivisor = static_cast(0); + Attributes::AcFrequency::TypeInfo::DecodableType acFrequency = static_cast(0); + Attributes::AcFrequencyMin::TypeInfo::DecodableType acFrequencyMin = static_cast(0); + Attributes::AcFrequencyMax::TypeInfo::DecodableType acFrequencyMax = static_cast(0); + Attributes::NeutralCurrent::TypeInfo::DecodableType neutralCurrent = static_cast(0); + Attributes::TotalActivePower::TypeInfo::DecodableType totalActivePower = static_cast(0); + Attributes::TotalReactivePower::TypeInfo::DecodableType totalReactivePower = static_cast(0); + Attributes::TotalApparentPower::TypeInfo::DecodableType totalApparentPower = static_cast(0); + Attributes::Measured1stHarmonicCurrent::TypeInfo::DecodableType measured1stHarmonicCurrent = static_cast(0); + Attributes::Measured3rdHarmonicCurrent::TypeInfo::DecodableType measured3rdHarmonicCurrent = static_cast(0); + Attributes::Measured5thHarmonicCurrent::TypeInfo::DecodableType measured5thHarmonicCurrent = static_cast(0); + Attributes::Measured7thHarmonicCurrent::TypeInfo::DecodableType measured7thHarmonicCurrent = static_cast(0); + Attributes::Measured9thHarmonicCurrent::TypeInfo::DecodableType measured9thHarmonicCurrent = static_cast(0); + Attributes::Measured11thHarmonicCurrent::TypeInfo::DecodableType measured11thHarmonicCurrent = static_cast(0); + Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo::DecodableType measuredPhase1stHarmonicCurrent = + static_cast(0); + Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo::DecodableType measuredPhase3rdHarmonicCurrent = + static_cast(0); + Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo::DecodableType measuredPhase5thHarmonicCurrent = + static_cast(0); + Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo::DecodableType measuredPhase7thHarmonicCurrent = + static_cast(0); + Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo::DecodableType measuredPhase9thHarmonicCurrent = + static_cast(0); + Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo::DecodableType measuredPhase11thHarmonicCurrent = + static_cast(0); + Attributes::AcFrequencyMultiplier::TypeInfo::DecodableType acFrequencyMultiplier = static_cast(0); + Attributes::AcFrequencyDivisor::TypeInfo::DecodableType acFrequencyDivisor = static_cast(0); + Attributes::PowerMultiplier::TypeInfo::DecodableType powerMultiplier = static_cast(0); + Attributes::PowerDivisor::TypeInfo::DecodableType powerDivisor = static_cast(0); + Attributes::HarmonicCurrentMultiplier::TypeInfo::DecodableType harmonicCurrentMultiplier = static_cast(0); + Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo::DecodableType phaseHarmonicCurrentMultiplier = static_cast(0); + Attributes::InstantaneousVoltage::TypeInfo::DecodableType instantaneousVoltage = static_cast(0); + Attributes::InstantaneousLineCurrent::TypeInfo::DecodableType instantaneousLineCurrent = static_cast(0); + Attributes::InstantaneousActiveCurrent::TypeInfo::DecodableType instantaneousActiveCurrent = static_cast(0); + Attributes::InstantaneousReactiveCurrent::TypeInfo::DecodableType instantaneousReactiveCurrent = static_cast(0); + Attributes::InstantaneousPower::TypeInfo::DecodableType instantaneousPower = static_cast(0); + Attributes::RmsVoltage::TypeInfo::DecodableType rmsVoltage = static_cast(0); + Attributes::RmsVoltageMin::TypeInfo::DecodableType rmsVoltageMin = static_cast(0); + Attributes::RmsVoltageMax::TypeInfo::DecodableType rmsVoltageMax = static_cast(0); + Attributes::RmsCurrent::TypeInfo::DecodableType rmsCurrent = static_cast(0); + Attributes::RmsCurrentMin::TypeInfo::DecodableType rmsCurrentMin = static_cast(0); + Attributes::RmsCurrentMax::TypeInfo::DecodableType rmsCurrentMax = static_cast(0); + Attributes::ActivePower::TypeInfo::DecodableType activePower = static_cast(0); + Attributes::ActivePowerMin::TypeInfo::DecodableType activePowerMin = static_cast(0); + Attributes::ActivePowerMax::TypeInfo::DecodableType activePowerMax = static_cast(0); + Attributes::ReactivePower::TypeInfo::DecodableType reactivePower = static_cast(0); + Attributes::ApparentPower::TypeInfo::DecodableType apparentPower = static_cast(0); + Attributes::PowerFactor::TypeInfo::DecodableType powerFactor = static_cast(0); + Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo::DecodableType averageRmsVoltageMeasurementPeriod = + static_cast(0); + Attributes::AverageRmsUnderVoltageCounter::TypeInfo::DecodableType averageRmsUnderVoltageCounter = static_cast(0); + Attributes::RmsExtremeOverVoltagePeriod::TypeInfo::DecodableType rmsExtremeOverVoltagePeriod = static_cast(0); + Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo::DecodableType rmsExtremeUnderVoltagePeriod = static_cast(0); + Attributes::RmsVoltageSagPeriod::TypeInfo::DecodableType rmsVoltageSagPeriod = static_cast(0); + Attributes::RmsVoltageSwellPeriod::TypeInfo::DecodableType rmsVoltageSwellPeriod = static_cast(0); + Attributes::AcVoltageMultiplier::TypeInfo::DecodableType acVoltageMultiplier = static_cast(0); + Attributes::AcVoltageDivisor::TypeInfo::DecodableType acVoltageDivisor = static_cast(0); + Attributes::AcCurrentMultiplier::TypeInfo::DecodableType acCurrentMultiplier = static_cast(0); + Attributes::AcCurrentDivisor::TypeInfo::DecodableType acCurrentDivisor = static_cast(0); + Attributes::AcPowerMultiplier::TypeInfo::DecodableType acPowerMultiplier = static_cast(0); + Attributes::AcPowerDivisor::TypeInfo::DecodableType acPowerDivisor = static_cast(0); + Attributes::OverloadAlarmsMask::TypeInfo::DecodableType overloadAlarmsMask = static_cast(0); + Attributes::VoltageOverload::TypeInfo::DecodableType voltageOverload = static_cast(0); + Attributes::CurrentOverload::TypeInfo::DecodableType currentOverload = static_cast(0); + Attributes::AcOverloadAlarmsMask::TypeInfo::DecodableType acOverloadAlarmsMask = static_cast(0); + Attributes::AcVoltageOverload::TypeInfo::DecodableType acVoltageOverload = static_cast(0); + Attributes::AcCurrentOverload::TypeInfo::DecodableType acCurrentOverload = static_cast(0); + Attributes::AcActivePowerOverload::TypeInfo::DecodableType acActivePowerOverload = static_cast(0); + Attributes::AcReactivePowerOverload::TypeInfo::DecodableType acReactivePowerOverload = static_cast(0); + Attributes::AverageRmsOverVoltage::TypeInfo::DecodableType averageRmsOverVoltage = static_cast(0); + Attributes::AverageRmsUnderVoltage::TypeInfo::DecodableType averageRmsUnderVoltage = static_cast(0); + Attributes::RmsExtremeOverVoltage::TypeInfo::DecodableType rmsExtremeOverVoltage = static_cast(0); + Attributes::RmsExtremeUnderVoltage::TypeInfo::DecodableType rmsExtremeUnderVoltage = static_cast(0); + Attributes::RmsVoltageSag::TypeInfo::DecodableType rmsVoltageSag = static_cast(0); + Attributes::RmsVoltageSwell::TypeInfo::DecodableType rmsVoltageSwell = static_cast(0); + Attributes::LineCurrentPhaseB::TypeInfo::DecodableType lineCurrentPhaseB = static_cast(0); + Attributes::ActiveCurrentPhaseB::TypeInfo::DecodableType activeCurrentPhaseB = static_cast(0); + Attributes::ReactiveCurrentPhaseB::TypeInfo::DecodableType reactiveCurrentPhaseB = static_cast(0); + Attributes::RmsVoltagePhaseB::TypeInfo::DecodableType rmsVoltagePhaseB = static_cast(0); + Attributes::RmsVoltageMinPhaseB::TypeInfo::DecodableType rmsVoltageMinPhaseB = static_cast(0); + Attributes::RmsVoltageMaxPhaseB::TypeInfo::DecodableType rmsVoltageMaxPhaseB = static_cast(0); + Attributes::RmsCurrentPhaseB::TypeInfo::DecodableType rmsCurrentPhaseB = static_cast(0); + Attributes::RmsCurrentMinPhaseB::TypeInfo::DecodableType rmsCurrentMinPhaseB = static_cast(0); + Attributes::RmsCurrentMaxPhaseB::TypeInfo::DecodableType rmsCurrentMaxPhaseB = static_cast(0); + Attributes::ActivePowerPhaseB::TypeInfo::DecodableType activePowerPhaseB = static_cast(0); + Attributes::ActivePowerMinPhaseB::TypeInfo::DecodableType activePowerMinPhaseB = static_cast(0); + Attributes::ActivePowerMaxPhaseB::TypeInfo::DecodableType activePowerMaxPhaseB = static_cast(0); + Attributes::ReactivePowerPhaseB::TypeInfo::DecodableType reactivePowerPhaseB = static_cast(0); + Attributes::ApparentPowerPhaseB::TypeInfo::DecodableType apparentPowerPhaseB = static_cast(0); + Attributes::PowerFactorPhaseB::TypeInfo::DecodableType powerFactorPhaseB = static_cast(0); + Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo::DecodableType averageRmsVoltageMeasurementPeriodPhaseB = + static_cast(0); + Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo::DecodableType averageRmsOverVoltageCounterPhaseB = + static_cast(0); + Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo::DecodableType averageRmsUnderVoltageCounterPhaseB = + static_cast(0); + Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo::DecodableType rmsExtremeOverVoltagePeriodPhaseB = + static_cast(0); + Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo::DecodableType rmsExtremeUnderVoltagePeriodPhaseB = + static_cast(0); + Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo::DecodableType rmsVoltageSagPeriodPhaseB = static_cast(0); + Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo::DecodableType rmsVoltageSwellPeriodPhaseB = static_cast(0); + Attributes::LineCurrentPhaseC::TypeInfo::DecodableType lineCurrentPhaseC = static_cast(0); + Attributes::ActiveCurrentPhaseC::TypeInfo::DecodableType activeCurrentPhaseC = static_cast(0); + Attributes::ReactiveCurrentPhaseC::TypeInfo::DecodableType reactiveCurrentPhaseC = static_cast(0); + Attributes::RmsVoltagePhaseC::TypeInfo::DecodableType rmsVoltagePhaseC = static_cast(0); + Attributes::RmsVoltageMinPhaseC::TypeInfo::DecodableType rmsVoltageMinPhaseC = static_cast(0); + Attributes::RmsVoltageMaxPhaseC::TypeInfo::DecodableType rmsVoltageMaxPhaseC = static_cast(0); + Attributes::RmsCurrentPhaseC::TypeInfo::DecodableType rmsCurrentPhaseC = static_cast(0); + Attributes::RmsCurrentMinPhaseC::TypeInfo::DecodableType rmsCurrentMinPhaseC = static_cast(0); + Attributes::RmsCurrentMaxPhaseC::TypeInfo::DecodableType rmsCurrentMaxPhaseC = static_cast(0); + Attributes::ActivePowerPhaseC::TypeInfo::DecodableType activePowerPhaseC = static_cast(0); + Attributes::ActivePowerMinPhaseC::TypeInfo::DecodableType activePowerMinPhaseC = static_cast(0); + Attributes::ActivePowerMaxPhaseC::TypeInfo::DecodableType activePowerMaxPhaseC = static_cast(0); + Attributes::ReactivePowerPhaseC::TypeInfo::DecodableType reactivePowerPhaseC = static_cast(0); + Attributes::ApparentPowerPhaseC::TypeInfo::DecodableType apparentPowerPhaseC = static_cast(0); + Attributes::PowerFactorPhaseC::TypeInfo::DecodableType powerFactorPhaseC = static_cast(0); + Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo::DecodableType averageRmsVoltageMeasurementPeriodPhaseC = + static_cast(0); + Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo::DecodableType averageRmsOverVoltageCounterPhaseC = + static_cast(0); + Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo::DecodableType averageRmsUnderVoltageCounterPhaseC = + static_cast(0); + Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo::DecodableType rmsExtremeOverVoltagePeriodPhaseC = + static_cast(0); + Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo::DecodableType rmsExtremeUnderVoltagePeriodPhaseC = + static_cast(0); + Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo::DecodableType rmsVoltageSagPeriodPhaseC = static_cast(0); + Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo::DecodableType rmsVoltageSwellPeriodPhaseC = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap; - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; } // namespace Attributes From 536eb4242b6e3779d3ff6559e7f3acdab6bc6a52 Mon Sep 17 00:00:00 2001 From: Timothy Maes Date: Thu, 13 Jan 2022 22:50:03 +0100 Subject: [PATCH 004/124] Adding ota-requestor support in qpg lighting app (#13534) General: * Add ota-upgrade AnnounceOTAProvider handling to lighting-app .zap QPG: * Add OTA upgrade to QPG platform and lighting-app * Enable DNS client to resolve OTA provider Restyled by whitespace Restyled by clang-format Restyled by gn * Update to latest API for OTARequestor --- config/qpg/chip-gn/BUILD.gn | 2 - .../lighting-app/esp32/main/CMakeLists.txt | 1 + .../lighting-common/lighting-app.zap | 209 ++++++++++++++++- examples/lighting-app/mbed/CMakeLists.txt | 4 + examples/lighting-app/qpg/BUILD.gn | 10 +- examples/lighting-app/qpg/args.gni | 4 + examples/lighting-app/qpg/include/AppTask.h | 5 +- examples/lighting-app/qpg/src/AppTask.cpp | 45 ++-- examples/lighting-app/telink/CMakeLists.txt | 5 +- examples/lock-app/qpg/BUILD.gn | 5 +- examples/platform/qpg/ota/ota.cpp | 65 ++++++ .../qpg/{app/include/Service.h => ota/ota.h} | 9 +- .../qpg/project_include/OpenThreadConfig.h | 1 + src/platform/qpg/BUILD.gn | 1 + src/platform/qpg/CHIPDevicePlatformConfig.h | 7 +- src/platform/qpg/OTAImageProcessorImpl.cpp | 210 ++++++++++++++++++ src/platform/qpg/OTAImageProcessorImpl.h | 63 ++++++ .../zap-generated/IMClusterCommandHandler.cpp | 45 ++++ .../PluginApplicationCallbacks.h | 1 + .../zap-generated/callback-stub.cpp | 8 + .../zap-generated/endpoint_config.h | 68 +++--- .../lighting-app/zap-generated/gen_config.h | 6 + 22 files changed, 687 insertions(+), 87 deletions(-) create mode 100644 examples/platform/qpg/ota/ota.cpp rename examples/platform/qpg/{app/include/Service.h => ota/ota.h} (79%) create mode 100644 src/platform/qpg/OTAImageProcessorImpl.cpp create mode 100644 src/platform/qpg/OTAImageProcessorImpl.h diff --git a/config/qpg/chip-gn/BUILD.gn b/config/qpg/chip-gn/BUILD.gn index 1db20a55b9f9fa..8c3a56ea45c53b 100644 --- a/config/qpg/chip-gn/BUILD.gn +++ b/config/qpg/chip-gn/BUILD.gn @@ -26,8 +26,6 @@ declare_args() { examples_plat_dir = "//examples/platform/qpg" qpg_sdk("sdk") { - sources = [ "//examples/platform/qpg/app/include/Service.h" ] - include_dirs = [ "//src/platform/qpg", "${examples_plat_dir}/project_include", diff --git a/examples/lighting-app/esp32/main/CMakeLists.txt b/examples/lighting-app/esp32/main/CMakeLists.txt index fa544eadb52424..9f1b54cccfc3d6 100644 --- a/examples/lighting-app/esp32/main/CMakeLists.txt +++ b/examples/lighting-app/esp32/main/CMakeLists.txt @@ -48,6 +48,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/occupancy-sensor-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/on-off-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/operational-credentials-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-requestor" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-source-configuration-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/software-diagnostics-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/switch-server" diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 1ba6d25d72e9d9..0fdfa137b28bc5 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -1305,14 +1305,14 @@ "code": 65533, "mfgCode": null, "side": "client", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] @@ -1342,7 +1342,204 @@ "outgoing": 0 } ], - "attributes": [] + "attributes": [ + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_REQUESTOR_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AnnounceOtaProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_REQUESTOR_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "DefaultOtaProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdatePossible", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateState", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateStateProgress", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] }, { "name": "Localization Configuration", diff --git a/examples/lighting-app/mbed/CMakeLists.txt b/examples/lighting-app/mbed/CMakeLists.txt index f623512804b86a..5a4fdf42a2d176 100644 --- a/examples/lighting-app/mbed/CMakeLists.txt +++ b/examples/lighting-app/mbed/CMakeLists.txt @@ -42,6 +42,7 @@ target_include_directories(${APP_TARGET} PRIVATE ${CHIP_ROOT}/third_party/nlio/repo/include ) +# TODO - re-use chip_data_model.cmake to add cluster implementations. target_sources(${APP_TARGET} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/main/AppTask.cpp ${CMAKE_CURRENT_SOURCE_DIR}/main/LightingManager.cpp @@ -95,6 +96,9 @@ target_sources(${APP_TARGET} PRIVATE ${CHIP_ROOT}/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp ${CHIP_ROOT}/src/app/clusters/network-commissioning-old/network-commissioning-ember.cpp ${CHIP_ROOT}/src/app/clusters/network-commissioning-old/network-commissioning-old.cpp + ${CHIP_ROOT}/src/app/clusters/ota-requestor/ota-requestor-server.cpp + ${CHIP_ROOT}/src/app/clusters/ota-requestor/BDXDownloader.cpp + ${CHIP_ROOT}/src/app/clusters/ota-requestor/OTARequestor.cpp ) target_link_libraries(${APP_TARGET} mbed-os-posix-socket mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-emac chip) diff --git a/examples/lighting-app/qpg/BUILD.gn b/examples/lighting-app/qpg/BUILD.gn index b19eec5b3cc5f9..428931ffcd2cdc 100644 --- a/examples/lighting-app/qpg/BUILD.gn +++ b/examples/lighting-app/qpg/BUILD.gn @@ -27,10 +27,7 @@ qpg_project_dir = "${chip_root}/examples/lighting-app/qpg" examples_plat_dir = "${chip_root}/examples/platform/qpg" qpg_sdk("sdk") { - sources = [ - "${examples_plat_dir}/app/include/Service.h", - "${examples_plat_dir}/project_include/CHIPProjectConfig.h", - ] + sources = [ "${examples_plat_dir}/project_include/CHIPProjectConfig.h" ] include_dirs = [ "${chip_root}/src/platform/qpg", @@ -41,9 +38,12 @@ qpg_sdk("sdk") { qpg_executable("lighting_app") { output_name = "chip-${qpg_target_ic}-lighting-example.out" + include_dirs = [] + sources = [ "${chip_root}/examples/lighting-app/lighting-common/color_format/color_format.cpp", "${examples_plat_dir}/app/main.cpp", + "${examples_plat_dir}/ota/ota.cpp", "src/AppTask.cpp", "src/LightingManager.cpp", "src/ZclCallbacks.cpp", @@ -75,7 +75,7 @@ qpg_executable("lighting_app") { include_dirs = [ "${qpg_project_dir}/include/", "${examples_plat_dir}", - "${examples_plat_dir}/app/include", + "${examples_plat_dir}/ota", "${chip_root}/examples/lighting-app/lighting-common/color_format", ] diff --git a/examples/lighting-app/qpg/args.gni b/examples/lighting-app/qpg/args.gni index 8a90e0c6e66dbc..8f05dc6ace9362 100644 --- a/examples/lighting-app/qpg/args.gni +++ b/examples/lighting-app/qpg/args.gni @@ -16,3 +16,7 @@ import("//build_overrides/chip.gni") import("${chip_root}/examples/platform/qpg/args.gni") qpg_sdk_target = get_label_info(":sdk", "label_no_toolchain") + +declare_args() { + chip_enable_ota_requestor = true +} diff --git a/examples/lighting-app/qpg/include/AppTask.h b/examples/lighting-app/qpg/include/AppTask.h index b4f9e2fe86fb86..edc33a5f88a0c3 100644 --- a/examples/lighting-app/qpg/include/AppTask.h +++ b/examples/lighting-app/qpg/include/AppTask.h @@ -27,7 +27,6 @@ #include "FreeRTOS.h" #include "timers.h" // provides FreeRTOS timer support -#include #include #define APP_NAME "Lighting-app" @@ -68,8 +67,7 @@ class AppTask enum Function_t { kFunction_NoneSelected = 0, - kFunction_SoftwareUpdate = 0, - kFunction_Joiner = 1, + kFunction_SoftwareUpdate = 1, kFunction_FactoryReset = 2, kFunction_Invalid @@ -78,7 +76,6 @@ class AppTask Function_t mFunction; bool mFunctionTimerActive; bool mSyncClusterToButtonAction; - chip::Ble::BLEEndPoint * mBLEEndPoint; static AppTask sAppTask; }; diff --git a/examples/lighting-app/qpg/src/AppTask.cpp b/examples/lighting-app/qpg/src/AppTask.cpp index 2addad9a41f715..475cb8324f4325 100644 --- a/examples/lighting-app/qpg/src/AppTask.cpp +++ b/examples/lighting-app/qpg/src/AppTask.cpp @@ -21,6 +21,7 @@ #include "AppConfig.h" #include "AppEvent.h" #include "AppTask.h" +#include "ota.h" #include @@ -42,12 +43,6 @@ using namespace chip::Credentials; using namespace chip::DeviceLayer; #include -#if CHIP_ENABLE_OPENTHREAD -#include -#include -#include -#define JOINER_START_TRIGGER_TIMEOUT 1500 -#endif #define FACTORY_RESET_TRIGGER_TIMEOUT 3000 #define FACTORY_RESET_CANCEL_WINDOW_TIMEOUT 3000 @@ -121,6 +116,9 @@ CHIP_ERROR AppTask::Init() // Init ZCL Data Model chip::Server::GetInstance().Init(); + // Init OTA engine + InitializeOTARequestor(); + // Initialize device attestation config SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); @@ -290,17 +288,8 @@ void AppTask::FunctionTimerEventHandler(AppEvent * aEvent) // initiate factory reset if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_SoftwareUpdate) { -#if CHIP_ENABLE_OPENTHREAD - ChipLogProgress(NotSpecified, "Release button now to Start Thread Joiner"); - ChipLogProgress(NotSpecified, "Hold to trigger Factory Reset"); - sAppTask.mFunction = kFunction_Joiner; - sAppTask.StartTimer(FACTORY_RESET_TRIGGER_TIMEOUT); - } - else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_Joiner) - { -#endif - ChipLogProgress(NotSpecified, "Factory Reset Triggered. Release button within %ums to cancel.", - FACTORY_RESET_CANCEL_WINDOW_TIMEOUT); + ChipLogProgress(NotSpecified, "[BTN] Factory Reset selected. Release within %us to cancel.", + FACTORY_RESET_CANCEL_WINDOW_TIMEOUT / 1000); // Start timer for FACTORY_RESET_CANCEL_WINDOW_TIMEOUT to allow user to // cancel, if required. @@ -340,11 +329,11 @@ void AppTask::FunctionHandler(AppEvent * aEvent) { if (!sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_NoneSelected) { -#if CHIP_ENABLE_OPENTHREAD - sAppTask.StartTimer(JOINER_START_TRIGGER_TIMEOUT); -#else + ChipLogProgress(NotSpecified, "[BTN] Hold to select function:"); + ChipLogProgress(NotSpecified, "[BTN] - Trigger OTA (0-3s)"); + ChipLogProgress(NotSpecified, "[BTN] - Factory Reset (>6s)"); + sAppTask.StartTimer(FACTORY_RESET_TRIGGER_TIMEOUT); -#endif sAppTask.mFunction = kFunction_SoftwareUpdate; } @@ -359,18 +348,10 @@ void AppTask::FunctionHandler(AppEvent * aEvent) sAppTask.mFunction = kFunction_NoneSelected; - ChipLogError(NotSpecified, "Software Update currently not supported."); - } -#if CHIP_ENABLE_OPENTHREAD - else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_Joiner) - { - sAppTask.CancelTimer(); - sAppTask.mFunction = kFunction_NoneSelected; + ChipLogProgress(NotSpecified, "[BTN] Triggering OTA Query"); - CHIP_ERROR error = ThreadStackMgr().JoinerStart(); - ChipLogProgress(NotSpecified, "Thread joiner triggered: %s", chip::ErrorStr(error)); + TriggerOTAQuery(); } -#endif else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_FactoryReset) { sAppTask.CancelTimer(); @@ -379,7 +360,7 @@ void AppTask::FunctionHandler(AppEvent * aEvent) // canceled. sAppTask.mFunction = kFunction_NoneSelected; - ChipLogProgress(NotSpecified, "Factory Reset has been Canceled"); + ChipLogProgress(NotSpecified, "[BTN] Factory Reset has been Canceled"); } } } diff --git a/examples/lighting-app/telink/CMakeLists.txt b/examples/lighting-app/telink/CMakeLists.txt index 2261a2e2823421..cabca3ee2eb539 100644 --- a/examples/lighting-app/telink/CMakeLists.txt +++ b/examples/lighting-app/telink/CMakeLists.txt @@ -39,7 +39,7 @@ target_include_directories(app PRIVATE ${NLIO_ROOT} ${TELINK_COMMON}/util/include ${TELINK_COMMON}/app/include) - +# TODO - re-use chip_data_model.cmake to add cluster implementations. target_sources(app PRIVATE src/AppTask.cpp src/LightingManager.cpp @@ -95,4 +95,7 @@ target_sources(app PRIVATE ${CHIP_ROOT}/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp ${CHIP_ROOT}/src/app/clusters/network-commissioning-old/network-commissioning-ember.cpp ${CHIP_ROOT}/src/app/clusters/network-commissioning-old/network-commissioning-old.cpp + ${CHIP_ROOT}/src/app/clusters/ota-requestor/ota-requestor-server.cpp + ${CHIP_ROOT}/src/app/clusters/ota-requestor/BDXDownloader.cpp + ${CHIP_ROOT}/src/app/clusters/ota-requestor/OTARequestor.cpp ) diff --git a/examples/lock-app/qpg/BUILD.gn b/examples/lock-app/qpg/BUILD.gn index 08d4f5730ddf58..0ba2a9729c709f 100644 --- a/examples/lock-app/qpg/BUILD.gn +++ b/examples/lock-app/qpg/BUILD.gn @@ -28,10 +28,7 @@ qpg_project_dir = "${chip_root}/examples/lock-app/qpg" examples_plat_dir = "${chip_root}/examples/platform/qpg" qpg_sdk("sdk") { - sources = [ - "${examples_plat_dir}/app/include/Service.h", - "${examples_plat_dir}/project_include/CHIPProjectConfig.h", - ] + sources = [ "${examples_plat_dir}/project_include/CHIPProjectConfig.h" ] include_dirs = [ "${chip_root}/src/platform/qpg", diff --git a/examples/platform/qpg/ota/ota.cpp b/examples/platform/qpg/ota/ota.cpp new file mode 100644 index 00000000000000..ec8464ff1486f5 --- /dev/null +++ b/examples/platform/qpg/ota/ota.cpp @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** @file "ota.cpp" + * + * OTA handling for an application + */ + +/***************************************************************************** + * Includes Definitions + *****************************************************************************/ + +#include + +#include +#include +#include +#include + +using namespace chip; +using namespace chip::DeviceLayer; + +/***************************************************************************** + * Static Data Definitions + *****************************************************************************/ + +OTARequestor gRequestorCore; +GenericOTARequestorDriver gRequestorUser; +BDXDownloader gDownloader; +OTAImageProcessorImpl gImageProcessor; + +/***************************************************************************** + * Application Function Definitions + *****************************************************************************/ + +void InitializeOTARequestor(void) +{ + // Initialize and interconnect the Requestor and Image Processor objects + SetRequestorInstance(&gRequestorCore); + + gRequestorCore.Init(&Server::GetInstance(), &gRequestorUser, &gDownloader); + gImageProcessor.SetOTADownloader(&gDownloader); + gDownloader.SetImageProcessorDelegate(&gImageProcessor); + gRequestorUser.Init(&gRequestorCore, &gImageProcessor); +} + +void TriggerOTAQuery(void) +{ + GetRequestorInstance()->TriggerImmediateQuery(); +} diff --git a/examples/platform/qpg/app/include/Service.h b/examples/platform/qpg/ota/ota.h similarity index 79% rename from examples/platform/qpg/app/include/Service.h rename to examples/platform/qpg/ota/ota.h index 14abfb0e1d2189..0a56e93fe95c63 100644 --- a/examples/platform/qpg/app/include/Service.h +++ b/examples/platform/qpg/ota/ota.h @@ -1,6 +1,7 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +18,6 @@ #pragma once -void SetDeviceName(const char * newDeviceName); -void PublishService(); -void StartDefaultThreadNetwork(void); +void InitializeOTARequestor(void); + +void TriggerOTAQuery(void); diff --git a/examples/platform/qpg/project_include/OpenThreadConfig.h b/examples/platform/qpg/project_include/OpenThreadConfig.h index d4c29a26b7c43d..460208fc6b9671 100644 --- a/examples/platform/qpg/project_include/OpenThreadConfig.h +++ b/examples/platform/qpg/project_include/OpenThreadConfig.h @@ -62,6 +62,7 @@ #define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1 #define OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE 1 +#define OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE 1 #define OPENTHREAD_CONFIG_ECDSA_ENABLE 1 #define OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE 0 diff --git a/src/platform/qpg/BUILD.gn b/src/platform/qpg/BUILD.gn index 54596a15ea5f09..419f73030ed61a 100644 --- a/src/platform/qpg/BUILD.gn +++ b/src/platform/qpg/BUILD.gn @@ -42,6 +42,7 @@ static_library("qpg") { "DiagnosticDataProviderImpl.h", "InetPlatformConfig.h", "Logging.cpp", + "OTAImageProcessorImpl.cpp", "PlatformManagerImpl.cpp", "PlatformManagerImpl.h", "SystemPlatformConfig.h", diff --git a/src/platform/qpg/CHIPDevicePlatformConfig.h b/src/platform/qpg/CHIPDevicePlatformConfig.h index 81bcbcfa269419..ecbad8ade3443a 100644 --- a/src/platform/qpg/CHIPDevicePlatformConfig.h +++ b/src/platform/qpg/CHIPDevicePlatformConfig.h @@ -28,15 +28,18 @@ #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 0 #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 0 +#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1 + #if CHIP_ENABLE_OPENTHREAD #define CHIP_DEVICE_CONFIG_ENABLE_THREAD 1 #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT 1 -#define CHIP_DEVICE_CONFIG_THREAD_SRP_MAX_SERVICES 5 +#define CHIP_DEVICE_CONFIG_THREAD_SRP_MAX_SERVICES (CHIP_CONFIG_MAX_DEVICE_ADMINS + 1) +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_DNS_CLIENT 1 +#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_COMMISSIONABLE_DISCOVERY 1 #endif #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 #define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DISCOVERY 1 -#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1 #define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 0 diff --git a/src/platform/qpg/OTAImageProcessorImpl.cpp b/src/platform/qpg/OTAImageProcessorImpl.cpp new file mode 100644 index 00000000000000..019c104daccb6e --- /dev/null +++ b/src/platform/qpg/OTAImageProcessorImpl.cpp @@ -0,0 +1,210 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include "OTAImageProcessorImpl.h" + +namespace chip { + +CHIP_ERROR OTAImageProcessorImpl::PrepareDownload() +{ + + // Get OTA status - under what circumstances does prepared break? + // what happens if a prepare is pending and another one is invoked + // Should we store the state here and wait til we receive notification + + DeviceLayer::PlatformMgr().ScheduleWork(HandlePrepareDownload, reinterpret_cast(this)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR OTAImageProcessorImpl::Finalize() +{ + DeviceLayer::PlatformMgr().ScheduleWork(HandleFinalize, reinterpret_cast(this)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR OTAImageProcessorImpl::Apply() +{ + return CHIP_NO_ERROR; +} + +CHIP_ERROR OTAImageProcessorImpl::Abort() +{ + if (mParams.imageFile.empty()) + { + ChipLogError(SoftwareUpdate, "Invalid output image file supplied"); + return CHIP_ERROR_INTERNAL; + } + + DeviceLayer::PlatformMgr().ScheduleWork(HandleAbort, reinterpret_cast(this)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR OTAImageProcessorImpl::ProcessBlock(ByteSpan & block) +{ + if (!1 /* What stops us processing a block?*/) + { + return CHIP_ERROR_INTERNAL; + } + + if ((block.data() == nullptr) || block.empty()) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + // Store block data for HandleProcessBlock to access + CHIP_ERROR err = SetBlock(block); + if (err != CHIP_NO_ERROR) + { + ChipLogError(SoftwareUpdate, "Cannot set block data: %" CHIP_ERROR_FORMAT, err.Format()); + } + + DeviceLayer::PlatformMgr().ScheduleWork(HandleProcessBlock, reinterpret_cast(this)); + return CHIP_NO_ERROR; +} + +void OTAImageProcessorImpl::HandlePrepareDownload(intptr_t context) +{ + qvCHIP_OtaStatus_t status = qvCHIP_OtaStatusSuccess; + auto * imageProcessor = reinterpret_cast(context); + if (imageProcessor == nullptr) + { + ChipLogError(SoftwareUpdate, "ImageProcessor context is null"); + return; + } + else if (imageProcessor->mDownloader == nullptr) + { + ChipLogError(SoftwareUpdate, "mDownloader is null"); + return; + } + + // running this in a thread so won't block main event loop + ChipLogProgress(SoftwareUpdate, "Q: HandlePrepareDownload"); + + qvCHIP_OtaEraseArea(); + qvCHIP_OtaStartWrite(); + + imageProcessor->mDownloader->OnPreparedForDownload(CHIP_NO_ERROR); +} + +void OTAImageProcessorImpl::HandleFinalize(intptr_t context) +{ + qvCHIP_OtaStatus_t status = qvCHIP_OtaStatusSuccess; + auto * imageProcessor = reinterpret_cast(context); + if (imageProcessor == nullptr) + { + return; + } + + ChipLogProgress(SoftwareUpdate, "Q: HandleFinalize"); + + // FIXME - Versions need to be filled in + qvCHIP_OtaSetPendingImage(imageProcessor->mSwVer /*swVer*/, imageProcessor->mHwVer /*hwVer*/, qvCHIP_OtaGetAreaStartAddress(), + static_cast(imageProcessor->mParams.downloadedBytes) /*imgSz*/); + + imageProcessor->ReleaseBlock(); +} + +void OTAImageProcessorImpl::HandleAbort(intptr_t context) +{ + auto * imageProcessor = reinterpret_cast(context); + if (imageProcessor == nullptr) + { + return; + } + + // TODO: What do we do when we abort? + ChipLogProgress(SoftwareUpdate, "Q: HandleAbort"); + + remove(imageProcessor->mParams.imageFile.data()); + imageProcessor->ReleaseBlock(); +} + +void OTAImageProcessorImpl::HandleProcessBlock(intptr_t context) +{ + qvCHIP_OtaStatus_t status = qvCHIP_OtaStatusSuccess; + auto * imageProcessor = reinterpret_cast(context); + if (imageProcessor == nullptr) + { + ChipLogError(SoftwareUpdate, "ImageProcessor context is null"); + return; + } + else if (imageProcessor->mDownloader == nullptr) + { + ChipLogError(SoftwareUpdate, "mDownloader is null"); + return; + } + + ChipLogProgress(SoftwareUpdate, "Q: HandleProcessBlock"); + // TODO: Process block header if any + + status = qvCHIP_OtaWriteChunk(qvCHIP_OtaGetAreaStartAddress() + imageProcessor->mParams.downloadedBytes, + static_cast(imageProcessor->mBlock.size()), + reinterpret_cast(imageProcessor->mBlock.data())); + + if (status != qvCHIP_OtaStatusSuccess) + { + imageProcessor->mDownloader->EndDownload(CHIP_ERROR_WRITE_FAILED); + return; + } + + imageProcessor->mParams.downloadedBytes += imageProcessor->mBlock.size(); + imageProcessor->mDownloader->FetchNextData(); +} + +CHIP_ERROR OTAImageProcessorImpl::SetBlock(ByteSpan & block) +{ + if ((block.data() == nullptr) || block.empty()) + { + return CHIP_NO_ERROR; + } + + // Allocate memory for block data if it has not been done yet + if (mBlock.empty()) + { + mBlock = MutableByteSpan(static_cast(chip::Platform::MemoryAlloc(block.size())), block.size()); + if (mBlock.data() == nullptr) + { + return CHIP_ERROR_NO_MEMORY; + } + } + + // Store the actual block data + CHIP_ERROR err = CopySpanToMutableSpan(block, mBlock); + if (err != CHIP_NO_ERROR) + { + ChipLogError(SoftwareUpdate, "Cannot copy block data: %" CHIP_ERROR_FORMAT, err.Format()); + return err; + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR OTAImageProcessorImpl::ReleaseBlock() +{ + if (mBlock.data() != nullptr) + { + chip::Platform::MemoryFree(mBlock.data()); + } + + mBlock = MutableByteSpan(); + return CHIP_NO_ERROR; +} + +} // namespace chip diff --git a/src/platform/qpg/OTAImageProcessorImpl.h b/src/platform/qpg/OTAImageProcessorImpl.h new file mode 100644 index 00000000000000..ee8c3175536315 --- /dev/null +++ b/src/platform/qpg/OTAImageProcessorImpl.h @@ -0,0 +1,63 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include + +namespace chip { + +class OTAImageProcessorImpl : public OTAImageProcessorInterface +{ +public: + //////////// OTAImageProcessorInterface Implementation /////////////// + CHIP_ERROR PrepareDownload() override; + CHIP_ERROR Finalize() override; + CHIP_ERROR Apply() override; + CHIP_ERROR Abort() override; + CHIP_ERROR ProcessBlock(ByteSpan & block) override; + + void SetOTADownloader(OTADownloader * downloader) { mDownloader = downloader; } + +private: + //////////// Actual handlers for the OTAImageProcessorInterface /////////////// + static void HandlePrepareDownload(intptr_t context); + static void HandleFinalize(intptr_t context); + static void HandleAbort(intptr_t context); + static void HandleProcessBlock(intptr_t context); + + /** + * Called to allocate memory for mBlock if necessary and set it to block + */ + CHIP_ERROR SetBlock(ByteSpan & block); + + /** + * Called to release allocated memory for mBlock + */ + CHIP_ERROR ReleaseBlock(); + + std::uint32_t mSwVer; + std::uint32_t mHwVer; + + MutableByteSpan mBlock; + OTADownloader * mDownloader; +}; + +} // namespace chip diff --git a/zzz_generated/lighting-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/lighting-app/zap-generated/IMClusterCommandHandler.cpp index b12fb475dacee5..f471a3a899d02d 100644 --- a/zzz_generated/lighting-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/lighting-app/zap-generated/IMClusterCommandHandler.cpp @@ -889,6 +889,48 @@ void DispatchClientCommand(CommandSender * apCommandObj, const ConcreteCommandPa } // namespace OtaSoftwareUpdateProvider +namespace OtaSoftwareUpdateRequestor { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV + // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. + // Any error value TLVUnpackError means we have received an illegal value. + // The following variables are used for all commands to save code size. + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::AnnounceOtaProvider::Id: { + Commands::AnnounceOtaProvider::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = + emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace OtaSoftwareUpdateRequestor + namespace OnOff { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -1247,6 +1289,9 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::NetworkCommissioning::Id: Clusters::NetworkCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; + case Clusters::OtaSoftwareUpdateRequestor::Id: + Clusters::OtaSoftwareUpdateRequestor::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; case Clusters::OnOff::Id: Clusters::OnOff::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; diff --git a/zzz_generated/lighting-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/lighting-app/zap-generated/PluginApplicationCallbacks.h index a1fb371ae0b6b7..7ef58a6f6b5776 100644 --- a/zzz_generated/lighting-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/lighting-app/zap-generated/PluginApplicationCallbacks.h @@ -36,6 +36,7 @@ MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOtaSoftwareUpdateProviderPluginClientInitCallback(); \ + MatterOtaSoftwareUpdateRequestorPluginServerInitCallback(); \ MatterOccupancySensingPluginServerInitCallback(); \ MatterOnOffPluginClientInitCallback(); \ MatterOnOffPluginServerInitCallback(); \ diff --git a/zzz_generated/lighting-app/zap-generated/callback-stub.cpp b/zzz_generated/lighting-app/zap-generated/callback-stub.cpp index ccb5454a214c2c..978e166c1c419c 100644 --- a/zzz_generated/lighting-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/lighting-app/zap-generated/callback-stub.cpp @@ -71,6 +71,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_OTA_PROVIDER_CLUSTER_ID: emberAfOtaSoftwareUpdateProviderClusterInitCallback(endpoint); break; + case ZCL_OTA_REQUESTOR_CLUSTER_ID: + emberAfOtaSoftwareUpdateRequestorClusterInitCallback(endpoint); + break; case ZCL_OCCUPANCY_SENSING_CLUSTER_ID: emberAfOccupancySensingClusterInitCallback(endpoint); break; @@ -174,6 +177,11 @@ void __attribute__((weak)) emberAfOtaSoftwareUpdateProviderClusterInitCallback(E // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfOtaSoftwareUpdateRequestorClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfOccupancySensingClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/lighting-app/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/zap-generated/endpoint_config.h index e32b52b850391d..3ec287cc36faa6 100644 --- a/zzz_generated/lighting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lighting-app/zap-generated/endpoint_config.h @@ -577,7 +577,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 223 +#define GENERATED_ATTRIBUTE_COUNT 229 #define GENERATED_ATTRIBUTES \ { \ \ @@ -613,6 +613,17 @@ { 0x0012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ + { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* DefaultOtaProviders */ \ + { 0x0001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ + { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ @@ -893,7 +904,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 25 +#define GENERATED_CLUSTER_COUNT 26 #define GENERATED_CLUSTERS \ { \ { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ @@ -904,88 +915,91 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x0029, ZAP_ATTRIBUTE_INDEX(25), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0029, ZAP_ATTRIBUTE_INDEX(25), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(25), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002A, ZAP_ATTRIBUTE_INDEX(26), 5, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ + { \ + 0x002B, ZAP_ATTRIBUTE_INDEX(31), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(27), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0030, ZAP_ATTRIBUTE_INDEX(33), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(33), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(39), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(43), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(49), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(43), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(49), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(52), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(58), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(58), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(64), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(123), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(129), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(138), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(144), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(149), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(155), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Switch (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(149), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(155), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(153), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(159), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(159), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(165), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(161), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(167), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { 0x0003, \ - ZAP_ATTRIBUTE_INDEX(163), \ + ZAP_ATTRIBUTE_INDEX(169), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(166), \ + ZAP_ATTRIBUTE_INDEX(172), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(173), \ + ZAP_ATTRIBUTE_INDEX(179), \ 15, \ 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(188), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(194), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(193), \ + ZAP_ATTRIBUTE_INDEX(199), \ 22, \ 36, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(215), \ + ZAP_ATTRIBUTE_INDEX(221), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { \ - 0x0006, ZAP_ATTRIBUTE_INDEX(219), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0006, ZAP_ATTRIBUTE_INDEX(225), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 2, Cluster: On/Off (client) */ \ { \ - 0x0007, ZAP_ATTRIBUTE_INDEX(220), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0007, ZAP_ATTRIBUTE_INDEX(226), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: On/off Switch Configuration (server) */ \ } @@ -994,7 +1008,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 17, 1472 }, { ZAP_CLUSTER_INDEX(17), 6, 82 }, { ZAP_CLUSTER_INDEX(23), 2, 6 }, \ + { ZAP_CLUSTER_INDEX(0), 18, 1479 }, { ZAP_CLUSTER_INDEX(18), 6, 82 }, { ZAP_CLUSTER_INDEX(24), 2, 6 }, \ } // Largest attribute size is needed for various buffers @@ -1004,7 +1018,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (687) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1560) +#define ATTRIBUTE_MAX_SIZE (1567) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/lighting-app/zap-generated/gen_config.h b/zzz_generated/lighting-app/zap-generated/gen_config.h index 053035a8d0e6cc..e801337b0acc11 100644 --- a/zzz_generated/lighting-app/zap-generated/gen_config.h +++ b/zzz_generated/lighting-app/zap-generated/gen_config.h @@ -43,6 +43,7 @@ #define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OTA_PROVIDER_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_OTA_REQUESTOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OCCUPANCY_SENSING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_ON_OFF_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -133,6 +134,11 @@ #define ZCL_USING_OTA_PROVIDER_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_PROVIDER_CLIENT +// Use this macro to check if the server side of the OTA Software Update Requestor cluster is included +#define ZCL_USING_OTA_REQUESTOR_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_REQUESTOR_SERVER +#define EMBER_AF_PLUGIN_OTA_SOFTWARE_UPDATE_REQUESTOR + // Use this macro to check if the server side of the Occupancy Sensing cluster is included #define ZCL_USING_OCCUPANCY_SENSING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_OCCUPANCY_SENSING_SERVER From 4c27e98044eff3e853635a6877dd7733ebf7f3b8 Mon Sep 17 00:00:00 2001 From: Marc Lepage <67919234+mlepage-google@users.noreply.github.com> Date: Thu, 13 Jan 2022 17:12:47 -0500 Subject: [PATCH 005/124] Use more generated code in access control cluster (#13508) Re-use more of the generated code (Encode/Decode) from cluster-objects.cpp (and .h). Progress toward issue #13470 --- .../access-control-server.cpp | 273 +++++++----------- 1 file changed, 112 insertions(+), 161 deletions(-) diff --git a/src/app/clusters/access-control-server/access-control-server.cpp b/src/app/clusters/access-control-server/access-control-server.cpp index e89a1c7845b8fa..b811520623bb9e 100644 --- a/src/app/clusters/access-control-server/access-control-server.cpp +++ b/src/app/clusters/access-control-server/access-control-server.cpp @@ -127,196 +127,147 @@ struct AccessControlEntryCodec return CHIP_NO_ERROR; } - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const + static CHIP_ERROR Convert(const AccessControl::Entry::Target & from, AccessControlCluster::Structs::Target::Type & to) { - TLV::TLVType accessControlEntryContainer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, accessControlEntryContainer)); - using Fields = AccessControlCluster::Structs::AccessControlEntry::Fields; + if (from.flags & AccessControl::Entry::Target::kCluster) + { + to.cluster.SetNonNull(from.cluster); + } + else { - FabricIndex fabricIndex; - ReturnErrorOnFailure(entry.GetFabricIndex(fabricIndex)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(to_underlying(Fields::kFabricIndex)), fabricIndex)); + to.cluster.SetNull(); } + if (from.flags & AccessControl::Entry::Target::kEndpoint) + { + to.endpoint.SetNonNull(from.endpoint); + } + else + { + to.endpoint.SetNull(); + } + if (from.flags & AccessControl::Entry::Target::kDeviceType) + { + to.deviceType.SetNonNull(from.deviceType); + } + else + { + to.deviceType.SetNull(); + } + return CHIP_NO_ERROR; + } + + static CHIP_ERROR Convert(const AccessControlCluster::Structs::Target::Type & from, AccessControl::Entry::Target & to) + { + to.flags = 0; + if (!from.cluster.IsNull()) + { + to.flags |= AccessControl::Entry::Target::kCluster; + to.cluster = from.cluster.Value(); + } + if (!from.endpoint.IsNull()) + { + to.flags |= AccessControl::Entry::Target::kEndpoint; + to.endpoint = from.endpoint.Value(); + } + if (!from.deviceType.IsNull()) + { + to.flags |= AccessControl::Entry::Target::kDeviceType; + to.deviceType = from.deviceType.Value(); + } + return CHIP_NO_ERROR; + } + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const + { + AccessControlCluster::Structs::AccessControlEntry::Type staging; + + ReturnErrorOnFailure(entry.GetFabricIndex(staging.fabricIndex)); + { Privilege privilege; ReturnErrorOnFailure(entry.GetPrivilege(privilege)); - AccessControlCluster::Privilege privilegeTemp; - ReturnErrorOnFailure(Convert(privilege, privilegeTemp)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(to_underlying(Fields::kPrivilege)), privilegeTemp)); + ReturnErrorOnFailure(Convert(privilege, staging.privilege)); } + { AuthMode authMode; ReturnErrorOnFailure(entry.GetAuthMode(authMode)); - AccessControlCluster::AuthMode authModeTemp; - ReturnErrorOnFailure(Convert(authMode, authModeTemp)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(to_underlying(Fields::kAuthMode)), authModeTemp)); + ReturnErrorOnFailure(Convert(authMode, staging.authMode)); } + + NodeId subjectBuffer[CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_MAX_SUBJECTS_PER_ENTRY]; + size_t subjectCount; + ReturnErrorOnFailure(entry.GetSubjectCount(subjectCount)); + if (subjectCount > 0) { - size_t count = 0; - ReturnErrorOnFailure(entry.GetSubjectCount(count)); - if (count > 0) + for (size_t i = 0; i < subjectCount; ++i) { - TLV::TLVType subjectsContainer; - ReturnErrorOnFailure(aWriter.StartContainer(TLV::ContextTag(to_underlying(Fields::kSubjects)), TLV::kTLVType_Array, - subjectsContainer)); - for (size_t i = 0; i < count; ++i) - { - NodeId subject; - ReturnErrorOnFailure(entry.GetSubject(i, subject)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::AnonymousTag(), subject)); - } - ReturnErrorOnFailure(aWriter.EndContainer(subjectsContainer)); + ReturnErrorOnFailure(entry.GetSubject(i, subjectBuffer[i])); } + staging.subjects.SetNonNull(subjectBuffer, subjectCount); } + + AccessControlCluster::Structs::Target::Type targetBuffer[CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_MAX_TARGETS_PER_ENTRY]; + size_t targetCount; + ReturnErrorOnFailure(entry.GetTargetCount(targetCount)); + if (targetCount > 0) { - size_t count = 0; - ReturnErrorOnFailure(entry.GetTargetCount(count)); - if (count > 0) + for (size_t i = 0; i < targetCount; ++i) { - TLV::TLVType targetsContainer; - ReturnErrorOnFailure(aWriter.StartContainer(TLV::ContextTag(to_underlying(Fields::kTargets)), TLV::kTLVType_Array, - targetsContainer)); - using TargetFields = AccessControlCluster::Structs::Target::Fields; - for (size_t i = 0; i < count; ++i) - { - TLV::TLVType targetContainer; - ReturnErrorOnFailure(aWriter.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, targetContainer)); - AccessControl::Entry::Target target; - ReturnErrorOnFailure(entry.GetTarget(i, target)); - if (target.flags & AccessControl::Entry::Target::kCluster) - { - ReturnErrorOnFailure( - DataModel::Encode(aWriter, TLV::ContextTag(to_underlying(TargetFields::kCluster)), target.cluster)); - } - if (target.flags & AccessControl::Entry::Target::kEndpoint) - { - ReturnErrorOnFailure( - DataModel::Encode(aWriter, TLV::ContextTag(to_underlying(TargetFields::kEndpoint)), target.endpoint)); - } - if (target.flags & AccessControl::Entry::Target::kDeviceType) - { - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(to_underlying(TargetFields::kDeviceType)), - target.deviceType)); - } - ReturnErrorOnFailure(aWriter.EndContainer(targetContainer)); - } - ReturnErrorOnFailure(aWriter.EndContainer(targetsContainer)); + AccessControl::Entry::Target target; + ReturnErrorOnFailure(entry.GetTarget(i, target)); + ReturnErrorOnFailure(Convert(target, targetBuffer[i])); } + staging.targets.SetNonNull(targetBuffer, targetCount); } - ReturnErrorOnFailure(aWriter.EndContainer(accessControlEntryContainer)); - return CHIP_NO_ERROR; + + return staging.Encode(aWriter, aTag); } CHIP_ERROR Decode(TLV::TLVReader & aReader) { + AccessControlCluster::Structs::AccessControlEntry::DecodableType staging; + + ReturnErrorOnFailure(staging.Decode(aReader)); + ReturnErrorOnFailure(GetAccessControl().PrepareEntry(entry)); - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVType accessControlEntryContainer; - VerifyOrReturnError(TLV::kTLVType_Structure == aReader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - ReturnErrorOnFailure(aReader.EnterContainer(accessControlEntryContainer)); - using Fields = AccessControlCluster::Structs::AccessControlEntry::Fields; - while ((err = aReader.Next()) == CHIP_NO_ERROR) + + ReturnErrorOnFailure(entry.SetFabricIndex(staging.fabricIndex)); + + { + Privilege privilege; + ReturnErrorOnFailure(Convert(staging.privilege, privilege)); + ReturnErrorOnFailure(entry.SetPrivilege(privilege)); + } + { - VerifyOrReturnError(TLV::IsContextTag(aReader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); - switch (TLV::TagNumFromTag(aReader.GetTag())) + AuthMode authMode; + ReturnErrorOnFailure(Convert(staging.authMode, authMode)); + ReturnErrorOnFailure(entry.SetAuthMode(authMode)); + } + + if (!staging.subjects.IsNull()) + { + auto iterator = staging.subjects.Value().begin(); + while (iterator.Next()) { - case to_underlying(Fields::kFabricIndex): { - chip::FabricIndex fabricIndex; - ReturnErrorOnFailure(DataModel::Decode(aReader, fabricIndex)); - ReturnErrorOnFailure(entry.SetFabricIndex(fabricIndex)); - break; - } - case to_underlying(Fields::kPrivilege): { - AccessControlCluster::Privilege privilegeTemp; - ReturnErrorOnFailure(DataModel::Decode(aReader, privilegeTemp)); - Privilege privilege; - ReturnErrorOnFailure(Convert(privilegeTemp, privilege)); - ReturnErrorOnFailure(entry.SetPrivilege(privilege)); - break; - } - case to_underlying(Fields::kAuthMode): { - AccessControlCluster::AuthMode authModeTemp; - ReturnErrorOnFailure(DataModel::Decode(aReader, authModeTemp)); - AuthMode authMode; - ReturnErrorOnFailure(Convert(authModeTemp, authMode)); - ReturnErrorOnFailure(entry.SetAuthMode(authMode)); - break; + ReturnErrorOnFailure(entry.AddSubject(nullptr, iterator.GetValue())); } - case to_underlying(Fields::kSubjects): { - if (aReader.GetType() != TLV::kTLVType_Null) - { - TLV::TLVType subjectsContainer; - VerifyOrReturnError(TLV::kTLVType_Array == aReader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - ReturnErrorOnFailure(aReader.EnterContainer(subjectsContainer)); - while ((err = aReader.Next()) == CHIP_NO_ERROR) - { - NodeId subject = kUndefinedNodeId; - ReturnErrorOnFailure(DataModel::Decode(aReader, subject)); - ReturnErrorOnFailure(entry.AddSubject(nullptr, subject)); - } - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(aReader.ExitContainer(subjectsContainer)); - } - break; - } - case to_underlying(Fields::kTargets): { - if (aReader.GetType() != TLV::kTLVType_Null) - { - TLV::TLVType targetsContainer; - VerifyOrReturnError(TLV::kTLVType_Array == aReader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - ReturnErrorOnFailure(aReader.EnterContainer(targetsContainer)); - while ((err = aReader.Next()) == CHIP_NO_ERROR) - { - AccessControl::Entry::Target target; - TLV::TLVType targetContainer; - VerifyOrReturnError(TLV::kTLVType_Structure == aReader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - ReturnErrorOnFailure(aReader.EnterContainer(targetContainer)); - using TargetFields = AccessControlCluster::Structs::Target::Fields; - while ((err = aReader.Next()) == CHIP_NO_ERROR) - { - VerifyOrReturnError(TLV::IsContextTag(aReader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); - switch (TLV::TagNumFromTag(aReader.GetTag())) - { - case to_underlying(TargetFields::kCluster): - if (aReader.GetType() != TLV::kTLVType_Null) - { - ReturnErrorOnFailure(DataModel::Decode(aReader, target.cluster)); - target.flags |= target.kCluster; - } - break; - case to_underlying(TargetFields::kEndpoint): - if (aReader.GetType() != TLV::kTLVType_Null) - { - ReturnErrorOnFailure(DataModel::Decode(aReader, target.endpoint)); - target.flags |= target.kEndpoint; - } - break; - case to_underlying(TargetFields::kDeviceType): - if (aReader.GetType() != TLV::kTLVType_Null) - { - ReturnErrorOnFailure(DataModel::Decode(aReader, target.deviceType)); - target.flags |= target.kDeviceType; - } - break; - default: - break; - } - } - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(aReader.ExitContainer(targetContainer)); - ReturnErrorOnFailure(entry.AddTarget(nullptr, target)); - } - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(aReader.ExitContainer(targetsContainer)); - } - break; - } - default: - break; + ReturnErrorOnFailure(iterator.GetStatus()); + } + + if (!staging.targets.IsNull()) + { + auto iterator = staging.targets.Value().begin(); + while (iterator.Next()) + { + AccessControl::Entry::Target target; + ReturnErrorOnFailure(Convert(iterator.GetValue(), target)); + ReturnErrorOnFailure(entry.AddTarget(nullptr, target)); } + ReturnErrorOnFailure(iterator.GetStatus()); } - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(aReader.ExitContainer(accessControlEntryContainer)); + return CHIP_NO_ERROR; } From 79db3db1583c882f680cae5102f452df655c259b Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Thu, 13 Jan 2022 14:40:50 -0800 Subject: [PATCH 006/124] Updating timeouts, and fixing Darwin CodeQL --- .github/workflows/build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index db87f0a732fb3b..446042e2e1d330 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -279,7 +279,7 @@ jobs: .environment/gn_out/.ninja_log .environment/pigweed-venv/*.log - name: Setup and Build Simulated Device - timeout-minutes: 5 + timeout-minutes: 10 run: | BUILD_TYPE=simulated GN_ARGS='chip_tests_zap_config="app1" chip_project_config_include_dirs=["../../examples/placeholder/linux/apps/app1/include", "../../config/standalone"] chip_config_network_layer_ble=false' @@ -309,6 +309,7 @@ jobs: name: crash-log-darwin path: ~/Library/Logs/DiagnosticReports/ - name: Perform CodeQL Analysis + if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} uses: github/codeql-action/analyze@v1 # TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227 # TODO https://github.com/project-chip/connectedhomeip/issues/1512 From 502963f85c6713dc5a5d9701721fd5f72ae89d73 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Thu, 13 Jan 2022 15:14:42 -0800 Subject: [PATCH 007/124] Even higher timeouts... --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 446042e2e1d330..e8778fecad4538 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -135,7 +135,7 @@ jobs: .environment/gn_out/.ninja_log .environment/pigweed-venv/*.log - name: Setup and Build Simulated Device - timeout-minutes: 10 + timeout-minutes: 20 run: | BUILD_TYPE=simulated GN_ARGS='chip_tests_zap_config="app1" chip_project_config_include_dirs=["../../examples/placeholder/linux/apps/app1/include", "../../config/standalone"] chip_config_network_layer_ble=false' @@ -279,7 +279,7 @@ jobs: .environment/gn_out/.ninja_log .environment/pigweed-venv/*.log - name: Setup and Build Simulated Device - timeout-minutes: 10 + timeout-minutes: 20 run: | BUILD_TYPE=simulated GN_ARGS='chip_tests_zap_config="app1" chip_project_config_include_dirs=["../../examples/placeholder/linux/apps/app1/include", "../../config/standalone"] chip_config_network_layer_ble=false' From 9c016d4a16fd78128a30ae945e216954a635bb7a Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 13 Jan 2022 19:16:12 -0500 Subject: [PATCH 008/124] Remove manufacturer code from attribute-storage APIs. (#13546) Matter does not use a separate manufacturer code. --- .../ias-zone-server/ias-zone-server.cpp | 13 +- .../clusters/level-control/level-control.cpp | 7 +- .../clusters/on-off-server/on-off-server.cpp | 6 +- src/app/util/af-main-common.cpp | 9 +- src/app/util/af.h | 53 +----- src/app/util/attribute-storage.cpp | 157 ++++-------------- src/app/util/attribute-storage.h | 32 +--- .../util/ember-compatibility-functions.cpp | 4 +- 8 files changed, 56 insertions(+), 225 deletions(-) diff --git a/src/app/clusters/ias-zone-server/ias-zone-server.cpp b/src/app/clusters/ias-zone-server/ias-zone-server.cpp index 2c33be3a3987ae..5a219448c26dc5 100644 --- a/src/app/clusters/ias-zone-server/ias-zone-server.cpp +++ b/src/app/clusters/ias-zone-server/ias-zone-server.cpp @@ -594,29 +594,26 @@ static bool areZoneServerAttributesNonVolatile(EndpointId endpoint) { EmberAfAttributeMetadata * metadata; - metadata = emberAfLocateAttributeMetadata(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_IAS_CIE_ADDRESS_ATTRIBUTE_ID, - CLUSTER_MASK_SERVER, EMBER_AF_NULL_MANUFACTURER_CODE); + metadata = + emberAfLocateAttributeMetadata(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_IAS_CIE_ADDRESS_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); if (!metadata->IsNonVolatile()) { return false; } - metadata = emberAfLocateAttributeMetadata(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_STATE_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, - EMBER_AF_NULL_MANUFACTURER_CODE); + metadata = emberAfLocateAttributeMetadata(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_STATE_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); if (!metadata->IsNonVolatile()) { return false; } - metadata = emberAfLocateAttributeMetadata(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_TYPE_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, - EMBER_AF_NULL_MANUFACTURER_CODE); + metadata = emberAfLocateAttributeMetadata(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_TYPE_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); if (!metadata->IsNonVolatile()) { return false; } - metadata = emberAfLocateAttributeMetadata(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_ID_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, - EMBER_AF_NULL_MANUFACTURER_CODE); + metadata = emberAfLocateAttributeMetadata(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_ID_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); if (!metadata->IsNonVolatile()) { return false; diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index c27def0d8c5c03..06e7b152a31c8b 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -1034,15 +1034,14 @@ static bool areStartUpLevelControlServerAttributesNonVolatile(EndpointId endpoin { EmberAfAttributeMetadata * metadata; - metadata = emberAfLocateAttributeMetadata(endpoint, LevelControl::Id, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, - EMBER_AF_NULL_MANUFACTURER_CODE); + metadata = emberAfLocateAttributeMetadata(endpoint, LevelControl::Id, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); if (!metadata->IsNonVolatile()) { return false; } - metadata = emberAfLocateAttributeMetadata(endpoint, LevelControl::Id, ZCL_START_UP_CURRENT_LEVEL_ATTRIBUTE_ID, - CLUSTER_MASK_SERVER, EMBER_AF_NULL_MANUFACTURER_CODE); + metadata = + emberAfLocateAttributeMetadata(endpoint, LevelControl::Id, ZCL_START_UP_CURRENT_LEVEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); if (!metadata->IsNonVolatile()) { return false; diff --git a/src/app/clusters/on-off-server/on-off-server.cpp b/src/app/clusters/on-off-server/on-off-server.cpp index a2055a18a819fc..5d9f9040019ce2 100644 --- a/src/app/clusters/on-off-server/on-off-server.cpp +++ b/src/app/clusters/on-off-server/on-off-server.cpp @@ -486,15 +486,13 @@ bool OnOffServer::areStartUpOnOffServerAttributesNonVolatile(EndpointId endpoint { EmberAfAttributeMetadata * metadata; - metadata = emberAfLocateAttributeMetadata(endpoint, OnOff::Id, Attributes::OnOff::Id, CLUSTER_MASK_SERVER, - EMBER_AF_NULL_MANUFACTURER_CODE); + metadata = emberAfLocateAttributeMetadata(endpoint, OnOff::Id, Attributes::OnOff::Id, CLUSTER_MASK_SERVER); if (!metadata->IsNonVolatile()) { return false; } - metadata = emberAfLocateAttributeMetadata(endpoint, OnOff::Id, Attributes::StartUpOnOff::Id, CLUSTER_MASK_SERVER, - EMBER_AF_NULL_MANUFACTURER_CODE); + metadata = emberAfLocateAttributeMetadata(endpoint, OnOff::Id, Attributes::StartUpOnOff::Id, CLUSTER_MASK_SERVER); if (!metadata->IsNonVolatile()) { return false; diff --git a/src/app/util/af-main-common.cpp b/src/app/util/af-main-common.cpp index 624de08acb70c6..67801a695fe4da 100644 --- a/src/app/util/af-main-common.cpp +++ b/src/app/util/af-main-common.cpp @@ -576,14 +576,7 @@ void emAfMessageSentHandler(const MessageSendDestination & destination, EmberAps if (messageContents != NULL && messageContents[0] & ZCL_CLUSTER_SPECIFIC_COMMAND) { - emberAfClusterMessageSentWithMfgCodeCallback( - destination, apsFrame, messageLength, messageContents, status, - // If the manufacturer specific flag is set - // get read it as next part of message - // else use null code. - (((messageContents[0] & ZCL_MANUFACTURER_SPECIFIC_MASK) == ZCL_MANUFACTURER_SPECIFIC_MASK) - ? emberAfGetInt16u(messageContents, 1, messageLength) - : EMBER_AF_NULL_MANUFACTURER_CODE)); + emberAfClusterMessageSentCallback(destination, apsFrame, messageLength, messageContents, status); } if (callback != NULL) diff --git a/src/app/util/af.h b/src/app/util/af.h index 382fa86d3fe9be..1f45e318abddc7 100644 --- a/src/app/util/af.h +++ b/src/app/util/af.h @@ -92,59 +92,29 @@ * @return Returns pointer to the attribute metadata location. */ EmberAfAttributeMetadata * emberAfLocateAttributeMetadata(chip::EndpointId endpoint, chip::ClusterId clusterId, - chip::AttributeId attributeId, uint8_t mask, uint16_t manufacturerCode); + chip::AttributeId attributeId, uint8_t mask); #ifdef DOXYGEN_SHOULD_SKIP_THIS /** @brief Returns true if the attribute exists. */ -bool emberAfContainsAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode); +bool emberAfContainsAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t mask); #else -#define emberAfContainsAttribute(endpoint, clusterId, attributeId, mask, manufacturerCode) \ - (emberAfLocateAttributeMetadata(endpoint, clusterId, attributeId, mask, manufacturerCode) != NULL) +#define emberAfContainsAttribute(endpoint, clusterId, attributeId, mask) \ + (emberAfLocateAttributeMetadata(endpoint, clusterId, attributeId, mask) != NULL) #endif -/** - * @brief Returns true if endpoint contains a cluster, checking for mfg code. - * - * This function returns true regardless of whether - * the endpoint contains server, client or both. - * For standard libraries (when ClusterId < FC00), - * the manufacturerCode is ignored. - */ -bool emberAfContainsClusterWithMfgCode(chip::EndpointId endpoint, chip::ClusterId clusterId, uint16_t manufacturerCode); - /** * @brief Returns true if endpoint contains the ZCL cluster with specified id. * * This function returns true regardless of whether * the endpoint contains server, client or both in the Zigbee cluster Library. - * This wraps emberAfContainsClusterWithMfgCode with - * manufacturerCode = EMBER_AF_NULL_MANUFACTURER_CODE - * If this function is used with a manufacturer specific clusterId - * then this will return the first cluster that it finds in the Cluster table. - * and will not return any other clusters that share that id. */ bool emberAfContainsCluster(chip::EndpointId endpoint, chip::ClusterId clusterId); -/** - * @brief Returns true if endpoint has cluster server, checking for mfg code. - * - * This function returns true if - * the endpoint contains server of a given cluster. - * For standard librarys (when ClusterId < FC00), the manufacturerCode is ignored. - */ -bool emberAfContainsServerWithMfgCode(chip::EndpointId endpoint, chip::ClusterId clusterId, uint16_t manufacturerCode); - /** * @brief Returns true if endpoint contains the ZCL server with specified id. * * This function returns true if * the endpoint contains server of a given cluster. - * This wraps emberAfContainsServer with - * manufacturerCode = EMBER_AF_NULL_MANUFACTURER_CODE - * If this function is used with a manufacturer specific clusterId - * then this will return the first cluster that it finds in the Cluster table. - * and will not return any other clusters that share that id. */ bool emberAfContainsServer(chip::EndpointId endpoint, chip::ClusterId clusterId); @@ -159,26 +129,11 @@ bool emberAfContainsServer(chip::EndpointId endpoint, chip::ClusterId clusterId) */ bool emberAfContainsServerFromIndex(uint16_t index, chip::ClusterId clusterId); -/** - * @brief Returns true if endpoint contains cluster client. - * - * This function returns true if - * the endpoint contains client of a given cluster. - * For standard library clusters (when ClusterId < FC00), - * the manufacturerCode is ignored. - */ -bool emberAfContainsClientWithMfgCode(chip::EndpointId endpoint, chip::ClusterId clusterId, uint16_t manufacturerCode); - /** * @brief Returns true if endpoint contains the ZCL client with specified id. * * This function returns true if * the endpoint contains client of a given cluster. - * This wraps emberAfContainsClient with - * manufacturerCode = EMBER_AF_NULL_MANUFACTURER_CODE - * If this function is used with a manufacturer specific clusterId - * then this will return the first cluster that it finds in the Cluster table. - * and will not return any other clusters that share that id. */ bool emberAfContainsClient(chip::EndpointId endpoint, chip::ClusterId clusterId); diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index e53050729597c5..03adecffaa4d58 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -114,7 +114,7 @@ app::AttributeAccessInterface * gAttributeAccessOverrides = nullptr; // Forward declarations // Returns endpoint index within a given cluster -static uint16_t findClusterEndpointIndex(EndpointId endpoint, ClusterId clusterId, uint8_t mask, uint16_t manufacturerCode); +static uint16_t findClusterEndpointIndex(EndpointId endpoint, ClusterId clusterId, uint8_t mask); //------------------------------------------------------------------------------ @@ -266,10 +266,10 @@ bool emberAfIsThisDataTypeAListType(EmberAfAttributeType dataType) } // This function is used to call the per-cluster default response callback -void emberAfClusterDefaultResponseWithMfgCodeCallback(EndpointId endpoint, ClusterId clusterId, CommandId commandId, - EmberAfStatus status, uint8_t clientServerMask, uint16_t manufacturerCode) +void emberAfClusterDefaultResponseCallback(EndpointId endpoint, ClusterId clusterId, CommandId commandId, EmberAfStatus status, + uint8_t clientServerMask) { - EmberAfCluster * cluster = emberAfFindClusterWithMfgCode(endpoint, clusterId, clientServerMask, manufacturerCode); + EmberAfCluster * cluster = emberAfFindCluster(endpoint, clusterId, clientServerMask); if (cluster != NULL) { EmberAfGenericClusterFunction f = emberAfFindClusterFunction(cluster, CLUSTER_MASK_DEFAULT_RESPONSE_FUNCTION); @@ -282,27 +282,16 @@ void emberAfClusterDefaultResponseWithMfgCodeCallback(EndpointId endpoint, Clust } } -// This function is used to call the per-cluster default response callback, and -// wraps the emberAfClusterDefaultResponseWithMfgCodeCallback with a -// EMBER_AF_NULL_MANUFACTURER_CODE. -void emberAfClusterDefaultResponseCallback(EndpointId endpoint, ClusterId clusterId, CommandId commandId, EmberAfStatus status, - uint8_t clientServerMask) -{ - emberAfClusterDefaultResponseWithMfgCodeCallback(endpoint, clusterId, commandId, status, clientServerMask, - EMBER_AF_NULL_MANUFACTURER_CODE); -} - // This function is used to call the per-cluster message sent callback -void emberAfClusterMessageSentWithMfgCodeCallback(const MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status, uint16_t mfgCode) +void emberAfClusterMessageSentCallback(const MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, + uint8_t * message, EmberStatus status) { if (apsFrame != NULL && message != NULL && msgLen != 0) { - EmberAfCluster * cluster = emberAfFindClusterWithMfgCode( + EmberAfCluster * cluster = emberAfFindCluster( apsFrame->sourceEndpoint, apsFrame->clusterId, (((message[0] & ZCL_FRAME_CONTROL_DIRECTION_MASK) == ZCL_FRAME_CONTROL_SERVER_TO_CLIENT) ? CLUSTER_MASK_SERVER - : CLUSTER_MASK_CLIENT), - mfgCode); + : CLUSTER_MASK_CLIENT)); if (cluster != NULL) { EmberAfGenericClusterFunction f = emberAfFindClusterFunction(cluster, CLUSTER_MASK_MESSAGE_SENT_FUNCTION); @@ -316,20 +305,10 @@ void emberAfClusterMessageSentWithMfgCodeCallback(const MessageSendDestination & } } -// This function is used to call the per-cluster message sent callback, and -// wraps the emberAfClusterMessageSentWithMfgCodeCallback with a -// EMBER_AF_NULL_MANUFACTURER_CODE. -void emberAfClusterMessageSentCallback(const MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, - uint8_t * message, EmberStatus status) -{ - emberAfClusterMessageSentWithMfgCodeCallback(destination, apsFrame, msgLen, message, status, EMBER_AF_NULL_MANUFACTURER_CODE); -} - // This function is used to call the per-cluster attribute changed callback void emAfClusterAttributeChangedCallback(const app::ConcreteAttributePath & attributePath, uint8_t clientServerMask) { - EmberAfCluster * cluster = emberAfFindClusterWithMfgCode(attributePath.mEndpointId, attributePath.mClusterId, clientServerMask, - EMBER_AF_NULL_MANUFACTURER_CODE); + EmberAfCluster * cluster = emberAfFindCluster(attributePath.mEndpointId, attributePath.mClusterId, clientServerMask); if (cluster != NULL) { EmberAfGenericClusterFunction f = emberAfFindClusterFunction(cluster, CLUSTER_MASK_ATTRIBUTE_CHANGED_FUNCTION); @@ -344,8 +323,7 @@ void emAfClusterAttributeChangedCallback(const app::ConcreteAttributePath & attr EmberAfStatus emAfClusterPreAttributeChangedCallback(const app::ConcreteAttributePath & attributePath, uint8_t clientServerMask, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value) { - EmberAfCluster * cluster = emberAfFindClusterWithMfgCode(attributePath.mEndpointId, attributePath.mClusterId, clientServerMask, - EMBER_AF_NULL_MANUFACTURER_CODE); + EmberAfCluster * cluster = emberAfFindCluster(attributePath.mEndpointId, attributePath.mClusterId, clientServerMask); if (cluster == NULL) { return EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE; @@ -396,7 +374,7 @@ void emAfCallInits(void) // Returns the pointer to metadata, or null if it is not found EmberAfAttributeMetadata * emberAfLocateAttributeMetadata(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, - uint8_t mask, uint16_t manufacturerCode) + uint8_t mask) { EmberAfAttributeMetadata * metadata = NULL; EmberAfAttributeSearchRecord record; @@ -643,8 +621,8 @@ EmberAfStatus emAfReadOrWriteAttribute(EmberAfAttributeSearchRecord * attRecord, return EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE; // Sorry, attribute was not found. } -EmberAfCluster * emberAfFindClusterInTypeWithMfgCode(EmberAfEndpointType * endpointType, ClusterId clusterId, - EmberAfClusterMask mask, uint16_t manufacturerCode, uint8_t * index) +EmberAfCluster * emberAfFindClusterInType(EmberAfEndpointType * endpointType, ClusterId clusterId, EmberAfClusterMask mask, + uint8_t * index) { uint8_t i; uint8_t scopedIndex = 0; @@ -673,15 +651,6 @@ EmberAfCluster * emberAfFindClusterInTypeWithMfgCode(EmberAfEndpointType * endpo return NULL; } -// This functions wraps emberAfFindClusterInTypeWithMfgCode with -// a manufacturerCode of EMBER_AF_NULL_MANUFACTURER_CODE. -EmberAfCluster * emberAfFindClusterInType(EmberAfEndpointType * endpointType, ClusterId clusterId, EmberAfClusterMask mask) -{ - return emberAfFindClusterInTypeWithMfgCode(endpointType, clusterId, mask, EMBER_AF_NULL_MANUFACTURER_CODE); -} - -// This code is used during unit tests for clusters that do not involve manufacturer code. -// Should this code be used in other locations, manufacturerCode should be added. uint8_t emberAfClusterIndexInMatchingEndpoints(EndpointId endpoint, ClusterId clusterId, EmberAfClusterMask mask) { uint8_t ep; @@ -689,7 +658,7 @@ uint8_t emberAfClusterIndexInMatchingEndpoints(EndpointId endpoint, ClusterId cl for (ep = 0; ep < emberAfEndpointCount(); ep++) { EmberAfEndpointType * endpointType = emAfEndpoints[ep].endpointType; - if (emberAfFindClusterInTypeWithMfgCode(endpointType, clusterId, mask, EMBER_AF_NULL_MANUFACTURER_CODE) != NULL) + if (emberAfFindClusterInType(endpointType, clusterId, mask) != NULL) { index++; if (emAfEndpoints[ep].endpoint == endpoint) @@ -708,7 +677,7 @@ uint8_t emberAfClusterIndex(EndpointId endpoint, ClusterId clusterId, EmberAfClu for (ep = 0; ep < emberAfEndpointCount(); ep++) { EmberAfEndpointType * endpointType = emAfEndpoints[ep].endpointType; - if (emberAfFindClusterInTypeWithMfgCode(endpointType, clusterId, mask, EMBER_AF_NULL_MANUFACTURER_CODE, &index) != NULL) + if (emberAfFindClusterInType(endpointType, clusterId, mask, &index) != NULL) { if (emAfEndpoints[ep].endpoint == endpoint) { @@ -719,46 +688,26 @@ uint8_t emberAfClusterIndex(EndpointId endpoint, ClusterId clusterId, EmberAfClu return 0xFF; } -// Returns true uf endpoint contains passed cluster -bool emberAfContainsClusterWithMfgCode(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode) -{ - return (emberAfFindClusterWithMfgCode(endpoint, clusterId, 0, manufacturerCode) != NULL); -} - -// Returns true if endpoint contains passed cluster as a server -bool emberAfContainsServerWithMfgCode(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode) -{ - return (emberAfFindClusterWithMfgCode(endpoint, clusterId, CLUSTER_MASK_SERVER, manufacturerCode) != NULL); -} - -// Returns true if endpoint contains passed cluster as a client -bool emberAfContainsClientWithMfgCode(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode) -{ - return (emberAfFindClusterWithMfgCode(endpoint, clusterId, CLUSTER_MASK_CLIENT, manufacturerCode) != NULL); -} - -// Wraps emberAfContainsClusterWithMfgCode with EMBER_AF_NULL_MANUFACTURER_CODE -// This will find the first cluster that has the clusterId given, regardless of mfgCode. +// Returns whether the given endpoint has the client or server of the given +// cluster on it. bool emberAfContainsCluster(EndpointId endpoint, ClusterId clusterId) { - return (emberAfFindClusterWithMfgCode(endpoint, clusterId, 0, EMBER_AF_NULL_MANUFACTURER_CODE) != NULL); + return (emberAfFindCluster(endpoint, clusterId, 0) != NULL); } -// Wraps emberAfContainsServerWithMfgCode with EMBER_AF_NULL_MANUFACTURER_CODE -// This will find the first server that has the clusterId given, regardless of mfgCode. +// Returns whether the given endpoint has the server of the given cluster on it. bool emberAfContainsServer(EndpointId endpoint, ClusterId clusterId) { - return (emberAfFindClusterWithMfgCode(endpoint, clusterId, CLUSTER_MASK_SERVER, EMBER_AF_NULL_MANUFACTURER_CODE) != NULL); + return (emberAfFindCluster(endpoint, clusterId, CLUSTER_MASK_SERVER) != NULL); } -// Wraps emberAfContainsClientWithMfgCode with EMBER_AF_NULL_MANUFACTURER_CODE -// This will find the first client that has the clusterId given, regardless of mfgCode. +// Returns whether the given endpoint has the client of the given cluster on it. bool emberAfContainsClient(EndpointId endpoint, ClusterId clusterId) { - return (emberAfFindClusterWithMfgCode(endpoint, clusterId, CLUSTER_MASK_CLIENT, EMBER_AF_NULL_MANUFACTURER_CODE) != NULL); + return (emberAfFindCluster(endpoint, clusterId, CLUSTER_MASK_CLIENT) != NULL); } -// This will find the first server that has the clusterId given from the index of endpoint, regardless of mfgCode. +// This will find the first server that has the clusterId given from the index of endpoint. bool emberAfContainsServerFromIndex(uint16_t index, ClusterId clusterId) { if (index == 0xFFFF) @@ -767,8 +716,7 @@ bool emberAfContainsServerFromIndex(uint16_t index, ClusterId clusterId) } else { - return emberAfFindClusterInTypeWithMfgCode(emAfEndpoints[index].endpointType, clusterId, CLUSTER_MASK_SERVER, - EMBER_AF_NULL_MANUFACTURER_CODE); + return emberAfFindClusterInType(emAfEndpoints[index].endpointType, clusterId, CLUSTER_MASK_SERVER); } } @@ -805,9 +753,8 @@ void EnabledEndpointsWithServerCluster::EnsureMatchingEndpoint() } // namespace app } // namespace chip -// Finds the cluster that matches endpoint, clusterId, direction, and manufacturerCode. -EmberAfCluster * emberAfFindClusterWithMfgCode(EndpointId endpoint, ClusterId clusterId, EmberAfClusterMask mask, - uint16_t manufacturerCode) +// Finds the cluster that matches endpoint, clusterId, direction. +EmberAfCluster * emberAfFindCluster(EndpointId endpoint, ClusterId clusterId, EmberAfClusterMask mask) { uint16_t ep = emberAfIndexFromEndpoint(endpoint); if (ep == 0xFFFF) @@ -816,70 +763,39 @@ EmberAfCluster * emberAfFindClusterWithMfgCode(EndpointId endpoint, ClusterId cl } else { - return emberAfFindClusterInTypeWithMfgCode(emAfEndpoints[ep].endpointType, clusterId, mask, manufacturerCode); + return emberAfFindClusterInType(emAfEndpoints[ep].endpointType, clusterId, mask); } } -// This function wraps emberAfFindClusterWithMfgCode with EMBER_AF_NULL_MANUFACTURER_CODE -// and will ignore the manufacturerCode when trying to find clusters. -// This will return the first cluster in the cluster table that matches the parameters given. -EmberAfCluster * emberAfFindCluster(EndpointId endpoint, ClusterId clusterId, EmberAfClusterMask mask) -{ - return emberAfFindClusterWithMfgCode(endpoint, clusterId, mask, EMBER_AF_NULL_MANUFACTURER_CODE); -} - // Returns cluster within the endpoint; Does not ignore disabled endpoints -EmberAfCluster * emberAfFindClusterIncludingDisabledEndpointsWithMfgCode(EndpointId endpoint, ClusterId clusterId, - EmberAfClusterMask mask, uint16_t manufacturerCode) +EmberAfCluster * emberAfFindClusterIncludingDisabledEndpoints(EndpointId endpoint, ClusterId clusterId, EmberAfClusterMask mask) { uint16_t ep = emberAfIndexFromEndpointIncludingDisabledEndpoints(endpoint); if (ep < MAX_ENDPOINT_COUNT) { - return emberAfFindClusterInTypeWithMfgCode(emAfEndpoints[ep].endpointType, clusterId, mask, manufacturerCode); + return emberAfFindClusterInType(emAfEndpoints[ep].endpointType, clusterId, mask); } return NULL; } -// Returns cluster within the endpoint; Does not ignore disabled endpoints -// This will ignore manufacturerCode. -EmberAfCluster * emberAfFindClusterIncludingDisabledEndpoints(EndpointId endpoint, ClusterId clusterId, EmberAfClusterMask mask) -{ - return emberAfFindClusterIncludingDisabledEndpointsWithMfgCode(endpoint, clusterId, mask, EMBER_AF_NULL_MANUFACTURER_CODE); -} - -// Server wrapper for findClusterEndpointIndex. -static uint16_t emberAfFindClusterServerEndpointIndexWithMfgCode(EndpointId endpoint, ClusterId clusterId, - uint16_t manufacturerCode) -{ - return findClusterEndpointIndex(endpoint, clusterId, CLUSTER_MASK_SERVER, manufacturerCode); -} - -// Client wrapper for findClusterEndpointIndex. -uint16_t emberAfFindClusterClientEndpointIndexWithMfgCode(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode) -{ - return findClusterEndpointIndex(endpoint, clusterId, CLUSTER_MASK_CLIENT, manufacturerCode); -} - // Server wrapper for findClusterEndpointIndex -// This will ignore manufacturerCode, and return the index for the first server that matches on clusterId uint16_t emberAfFindClusterServerEndpointIndex(EndpointId endpoint, ClusterId clusterId) { - return emberAfFindClusterServerEndpointIndexWithMfgCode(endpoint, clusterId, EMBER_AF_NULL_MANUFACTURER_CODE); + return findClusterEndpointIndex(endpoint, clusterId, CLUSTER_MASK_SERVER); } // Client wrapper for findClusterEndpointIndex -// This will ignore manufacturerCode, and return the index for the first client that matches on clusterId uint16_t emberAfFindClusterClientEndpointIndex(EndpointId endpoint, ClusterId clusterId) { - return emberAfFindClusterClientEndpointIndexWithMfgCode(endpoint, clusterId, EMBER_AF_NULL_MANUFACTURER_CODE); + return findClusterEndpointIndex(endpoint, clusterId, CLUSTER_MASK_CLIENT); } // Returns the endpoint index within a given cluster -static uint16_t findClusterEndpointIndex(EndpointId endpoint, ClusterId clusterId, uint8_t mask, uint16_t manufacturerCode) +static uint16_t findClusterEndpointIndex(EndpointId endpoint, ClusterId clusterId, uint8_t mask) { uint16_t i, epi = 0; - if (emberAfFindClusterWithMfgCode(endpoint, clusterId, mask, manufacturerCode) == NULL) + if (emberAfFindCluster(endpoint, clusterId, mask) == NULL) { return 0xFFFF; } @@ -890,11 +806,8 @@ static uint16_t findClusterEndpointIndex(EndpointId endpoint, ClusterId clusterI { break; } - epi = static_cast(epi + - ((emberAfFindClusterIncludingDisabledEndpointsWithMfgCode(emAfEndpoints[i].endpoint, clusterId, - mask, manufacturerCode) != NULL) - ? 1 - : 0)); + epi = static_cast( + epi + ((emberAfFindClusterIncludingDisabledEndpoints(emAfEndpoints[i].endpoint, clusterId, mask) != NULL) ? 1 : 0)); } return epi; diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index 19972b0cd9a20e..504a6241844999 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -128,8 +128,6 @@ bool emAfMatchCluster(EmberAfCluster * cluster, EmberAfAttributeSearchRecord * a bool emAfMatchAttribute(EmberAfCluster * cluster, EmberAfAttributeMetadata * am, EmberAfAttributeSearchRecord * attRecord); // Check if a cluster is implemented or not. If yes, the cluster is returned. -// If the cluster is not manufacturerSpecific [ClusterId < FC00] then -// manufacturerCode argument is ignored otherwise checked. // // mask = 0 -> find either client or server // mask = CLUSTER_MASK_CLIENT -> find client @@ -138,10 +136,8 @@ bool emAfMatchAttribute(EmberAfCluster * cluster, EmberAfAttributeMetadata * am, // If a pointer to an index is provided, it will be updated to point to the relative index of the cluster // within the set of clusters that match the mask criteria. // -EmberAfCluster * emberAfFindClusterInTypeWithMfgCode(EmberAfEndpointType * endpointType, chip::ClusterId clusterId, - EmberAfClusterMask mask, uint16_t manufacturerCode, uint8_t * index = nullptr); - -EmberAfCluster * emberAfFindClusterInType(EmberAfEndpointType * endpointType, chip::ClusterId clusterId, EmberAfClusterMask mask); +EmberAfCluster * emberAfFindClusterInType(EmberAfEndpointType * endpointType, chip::ClusterId clusterId, EmberAfClusterMask mask, + uint8_t * index = nullptr); // For a given cluster and mask, retrieves the list of endpoints sorted by endpoint that contain the matching cluster and returns // the index within that list that matches the given endpoint. @@ -182,19 +178,9 @@ chip::Optional emberAfGetNthClusterId(chip::EndpointId endpoint uint8_t emberAfGetClustersFromEndpoint(chip::EndpointId endpoint, chip::ClusterId * clusterList, uint8_t listLen, bool server); // Returns cluster within the endpoint, or NULL if it isn't there -EmberAfCluster * emberAfFindClusterWithMfgCode(chip::EndpointId endpoint, chip::ClusterId clusterId, EmberAfClusterMask mask, - uint16_t manufacturerCode); - -// Returns cluster within the endpoint, or NULL if it isn't there -// This wraps emberAfFindClusterWithMfgCode with EMBER_AF_NULL_MANUFACTURER_CODE EmberAfCluster * emberAfFindCluster(chip::EndpointId endpoint, chip::ClusterId clusterId, EmberAfClusterMask mask); // Returns cluster within the endpoint; Does not ignore disabled endpoints -EmberAfCluster * emberAfFindClusterIncludingDisabledEndpointsWithMfgCode(chip::EndpointId endpoint, chip::ClusterId clusterId, - EmberAfClusterMask mask, uint16_t manufacturerCode); - -// Returns cluster within the endpoint; Does not ignore disabled endpoints -// This wraps emberAfFindClusterIncludingDisabledEndpointsWithMfgCode with EMBER_AF_NULL_MANUFACTURER_CODE EmberAfCluster * emberAfFindClusterIncludingDisabledEndpoints(chip::EndpointId endpoint, chip::ClusterId clusterId, EmberAfClusterMask mask); @@ -226,25 +212,15 @@ EmberAfStatus emAfClusterPreAttributeChangedCallback(const chip::app::ConcreteAt uint8_t clientServerMask, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); -// Calls the default response callback for a specific cluster, and wraps emberAfClusterDefaultResponseWithMfgCodeCallback +// Calls the default response callback for a specific cluster. // with the EMBER_NULL_MANUFACTURER_CODE void emberAfClusterDefaultResponseCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::CommandId commandId, EmberAfStatus status, uint8_t clientServerMask); -// Calls the default response callback for a specific cluster. -void emberAfClusterDefaultResponseWithMfgCodeCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, - chip::CommandId commandId, EmberAfStatus status, uint8_t clientServerMask, - uint16_t manufacturerCode); - -// Calls the message sent callback for a specific cluster, and wraps emberAfClusterMessageSentWithMfgCodeCallback +// Calls the message sent callback for a specific cluster. void emberAfClusterMessageSentCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); -// Calls the message sent callback for a specific cluster. -void emberAfClusterMessageSentWithMfgCodeCallback(const chip::MessageSendDestination & destination, EmberApsFrame * apsFrame, - uint16_t msgLen, uint8_t * message, EmberStatus status, - uint16_t manufacturerCode); - // Checks a cluster mask byte against ticks passed bitmask // returns true if the mask matches a passed interval bool emberAfCheckTick(EmberAfClusterMask mask, uint8_t passedMask); diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index 321d4168052da5..3b76151fb3d863 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -382,7 +382,7 @@ CHIP_ERROR ReadSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, c else { attributeMetadata = - emberAfLocateAttributeMetadata(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId, CLUSTER_MASK_SERVER, 0); + emberAfLocateAttributeMetadata(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId, CLUSTER_MASK_SERVER); } if (attributeCluster == nullptr && attributeMetadata == nullptr) @@ -835,7 +835,7 @@ CHIP_ERROR WriteSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, // happen when the above TODO is resolved. ConcreteDataAttributePath aPath(aClusterInfo.mEndpointId, aClusterInfo.mClusterId, aClusterInfo.mAttributeId); const EmberAfAttributeMetadata * attributeMetadata = - emberAfLocateAttributeMetadata(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId, CLUSTER_MASK_SERVER, 0); + emberAfLocateAttributeMetadata(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId, CLUSTER_MASK_SERVER); AttributePathParams attributePathParams(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); From e4aebce39d21258a1579abb8f9baf1d6c6fea649 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Thu, 13 Jan 2022 16:41:38 -0800 Subject: [PATCH 009/124] Even higher timeouts... --- .github/workflows/build.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e8778fecad4538..5834fa152089ba 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -143,7 +143,7 @@ jobs: CHIP_ROOT_PATH="$CHIP_ROOT_PATH" BUILD_TYPE="$BUILD_TYPE" scripts/build/gn_gen.sh --args="$GN_ARGS" scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE" - name: Setup Build, Run Build and Run Tests - timeout-minutes: 50 + timeout-minutes: 80 run: | for BUILD_TYPE in fake gcc_release clang mbedtls; do case $BUILD_TYPE in @@ -240,7 +240,7 @@ jobs: scripts/run_in_build_env.sh '(cd src/controller/python/test/unit_tests/ && python3 -m unittest -v)' build_darwin: name: Build on Darwin (clang, python_lib, simulated) - timeout-minutes: 90 + timeout-minutes: 120 runs-on: macos-latest if: github.actor != 'restyled-io[bot]' @@ -287,7 +287,7 @@ jobs: CHIP_ROOT_PATH="$CHIP_ROOT_PATH" BUILD_TYPE="$BUILD_TYPE" scripts/build/gn_gen.sh --args="$GN_ARGS" scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE" - name: Setup Build, Run Build and Run Tests - timeout-minutes: 75 + timeout-minutes: 80 # Just go ahead and do the "all" build; on Darwin that's fairly # fast. If this ever becomes slow, we can think about ways to do # the examples-linux-standalone.yaml tests on darwin without too From ede482a66c1ef123bcec6ebcea2996c875dac502 Mon Sep 17 00:00:00 2001 From: Kevin Coppock <47542933+g-coppock@users.noreply.github.com> Date: Thu, 13 Jan 2022 19:37:58 -0600 Subject: [PATCH 010/124] Ensure pointers in AndroidDeviceControllerWrapper are init to nullptr (#13557) Fixes #13556 Tested locally on an Android device on the reported code path without a crash. --- src/controller/java/AndroidDeviceControllerWrapper.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/controller/java/AndroidDeviceControllerWrapper.h b/src/controller/java/AndroidDeviceControllerWrapper.h index 02c26e1a1dcbe8..bddf910a077c7a 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.h +++ b/src/controller/java/AndroidDeviceControllerWrapper.h @@ -120,12 +120,12 @@ class AndroidDeviceControllerWrapper : public chip::Controller::DevicePairingDel bool mNodeIdRequested = false; // These fields allow us to release the string/byte array memory later. - jstring ssidStr; - jstring passwordStr; - const char * ssid; - const char * password; - jbyteArray operationalDatasetBytes; - jbyte * operationalDataset; + jstring ssidStr = nullptr; + jstring passwordStr = nullptr; + const char * ssid = nullptr; + const char * password = nullptr; + jbyteArray operationalDatasetBytes = nullptr; + jbyte * operationalDataset = nullptr; AndroidDeviceControllerWrapper(ChipDeviceControllerPtr controller) : mController(std::move(controller)) { From 5e61ce9ce18f8b0af1435775484cab07ab0452cb Mon Sep 17 00:00:00 2001 From: Jerry Johns Date: Thu, 13 Jan 2022 17:41:18 -0800 Subject: [PATCH 011/124] Fixed up Session ID logging (#13548) * Fixed up Session ID logging This fixes the session ID logging in SessionManager to be more aligned with spec terminology as well as logging both local and peer session IDs to make debugging a lot easier. * Update src/transport/SessionManager.cpp Co-authored-by: Tennessee Carmel-Veilleux * Update src/transport/SessionManager.cpp Co-authored-by: Tennessee Carmel-Veilleux * Update src/transport/SessionManager.cpp Co-authored-by: Martin Turon * Update src/transport/SessionManager.cpp Co-authored-by: Martin Turon Co-authored-by: Tennessee Carmel-Veilleux Co-authored-by: Martin Turon --- src/transport/SessionManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/transport/SessionManager.cpp b/src/transport/SessionManager.cpp index 5b2e088357fc25..29841f0cde4c2e 100644 --- a/src/transport/SessionManager.cpp +++ b/src/transport/SessionManager.cpp @@ -309,8 +309,8 @@ CHIP_ERROR SessionManager::NewPairing(SessionHolder & sessionHolder, const Optio mSecureSessions.ReleaseSession(session.Value()->AsSecureSession()); } - ChipLogDetail(Inet, "New secure session created for device 0x" ChipLogFormatX64 ", key %d!!", ChipLogValueX64(peerNodeId), - peerSessionId); + ChipLogDetail(Inet, "New secure session created for device 0x" ChipLogFormatX64 ", LSID:%d PSID:%d!", + ChipLogValueX64(peerNodeId), localSessionId, peerSessionId); session = mSecureSessions.CreateNewSecureSession(pairing->GetSecureSessionType(), localSessionId, peerNodeId, pairing->GetPeerCATs(), peerSessionId, fabric, pairing->GetMRPConfig()); ReturnErrorCodeIf(!session.HasValue(), CHIP_ERROR_NO_MEMORY); @@ -472,7 +472,7 @@ void SessionManager::SecureUnicastMessageDispatch(const PacketHeader & packetHea if (!session.HasValue()) { - ChipLogError(Inet, "Data received on an unknown connection (%d). Dropping it!!", packetHeader.GetSessionId()); + ChipLogError(Inet, "Data received on an unknown session (LSID=%d). Dropping it!", packetHeader.GetSessionId()); return; } From b602b73b4afb6b44543d16fd576ef20d993d5825 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Fri, 14 Jan 2022 12:23:20 +0100 Subject: [PATCH 012/124] [YAML] Add 'saveAs' support for CHAR_STRING and OCTET_STRING (#13541) --- .../templates/partials/test_cluster.zapt | 28 + .../partials/test_cluster_command_value.zapt | 9 +- .../partials/test_cluster_value_equals.zapt | 3 +- src/app/tests/suites/TestSaveAs.yaml | 122 +++ .../common/ClusterTestGeneration.js | 57 +- src/darwin/Framework/CHIP/templates/helper.js | 6 +- .../templates/partials/check_test_value.zapt | 8 +- .../CHIP/templates/partials/test_cluster.zapt | 12 +- .../CHIP/templates/partials/test_value.zapt | 6 + .../Framework/CHIPTests/CHIPClustersTests.m | 388 ++++++++ .../chip-tool/zap-generated/test/Commands.h | 858 +++++++++++++++++- .../app1/zap-generated/test/Commands.h | 2 + .../app2/zap-generated/test/Commands.h | 2 + 13 files changed, 1475 insertions(+), 26 deletions(-) diff --git a/examples/chip-tool/templates/partials/test_cluster.zapt b/examples/chip-tool/templates/partials/test_cluster.zapt index f666c463e2ee4f..c8bfeaa1e72242 100644 --- a/examples/chip-tool/templates/partials/test_cluster.zapt +++ b/examples/chip-tool/templates/partials/test_cluster.zapt @@ -13,6 +13,23 @@ class {{filename}}: public TestCommand {{/chip_tests_config}} } + ~{{filename}}() + { + {{#chip_tests_items}} + {{#chip_tests_item_response_parameters}} + {{#if saveAs}} + {{#if (isString type)}} + if ({{saveAs}}Buffer != nullptr) + { + chip::Platform::MemoryFree({{saveAs}}Buffer); + {{saveAs}}Buffer = nullptr; + } + {{/if}} + {{/if}} + {{/chip_tests_item_response_parameters}} + {{/chip_tests_items}} + } + /////////// TestCommand Interface ///////// void NextTest() override { @@ -75,6 +92,7 @@ class {{filename}}: public TestCommand {{#chip_tests_items}} {{#chip_tests_item_response_parameters}} {{#if saveAs}} + {{~#if (isString type)}}{{#if (isOctetString type)}}uint8_t{{else}}char{{/if}} * {{saveAs}}Buffer = nullptr;{{/if~}} {{chipType}} {{saveAs}}; {{/if}} {{/chip_tests_item_response_parameters}} @@ -357,8 +375,18 @@ class {{filename}}: public TestCommand {{/if}} {{#if saveAs}} + {{#if (isString type)}} + if ({{saveAs}}Buffer != nullptr) + { + chip::Platform::MemoryFree({{saveAs}}Buffer); + } + {{saveAs}}Buffer = static_cast<{{#if (isOctetString type)}}uint8_t{{else}}char{{/if}} *>(chip::Platform::MemoryAlloc({{>item}}.size())); + memcpy({{saveAs}}Buffer, {{>item}}.data(), {{>item}}.size()); + {{saveAs}} = {{chipType}}({{saveAs}}Buffer, {{>item}}.size()); + {{else}} {{saveAs}} = {{>item}}; {{/if}} + {{/if}} {{/chip_tests_item_response_parameters}} {{#unless async}}NextTest();{{/unless}} {{/if}} diff --git a/examples/chip-tool/templates/partials/test_cluster_command_value.zapt b/examples/chip-tool/templates/partials/test_cluster_command_value.zapt index 53c59106296911..5cbf0d57c3915c 100644 --- a/examples/chip-tool/templates/partials/test_cluster_command_value.zapt +++ b/examples/chip-tool/templates/partials/test_cluster_command_value.zapt @@ -35,7 +35,10 @@ {{else}} {{container}} = - {{#if_chip_enum type}} + {{~#if (chip_tests_variables_has definedValue)~}} + {{definedValue}}; + {{else~}} + {{~#if_chip_enum type~}} static_cast<{{zapTypeToEncodableClusterObjectType type ns=ns}}>({{definedValue}}); {{else if (isCharString type)}} chip::Span("{{definedValue}}garbage: not in length on purpose", {{utf8StringLength definedValue}}); @@ -49,6 +52,8 @@ {{else}} {{asTypedLiteral definedValue type}}; {{/if_is_bitmap}} - {{/if_chip_enum}} + {{/if_chip_enum~}} + {{~/if~}} + {{/if_is_struct}} {{/if}} diff --git a/examples/chip-tool/templates/partials/test_cluster_value_equals.zapt b/examples/chip-tool/templates/partials/test_cluster_value_equals.zapt index a50b9be89adca2..179e3cda27a993 100644 --- a/examples/chip-tool/templates/partials/test_cluster_value_equals.zapt +++ b/examples/chip-tool/templates/partials/test_cluster_value_equals.zapt @@ -37,7 +37,8 @@ than "global") that are not present in the struct ? }} {{else}} VerifyOrReturn(CheckValue{{#if (isString type)}}AsString{{/if}}("{{label}}", {{actual}}, - {{~#if (isOctetString type)}}chip::ByteSpan(chip::Uint8::from_const_char("{{octetStringEscapedForCLiteral expected}}"), {{expected.length}}) + {{~#if (chip_tests_variables_has expected)}}{{expected}} + {{else if (isOctetString type)}}chip::ByteSpan(chip::Uint8::from_const_char("{{octetStringEscapedForCLiteral expected}}"), {{expected.length}}) {{else if (isCharString type)}}chip::CharSpan("{{expected}}", {{utf8StringLength expected}}) {{else if (chip_tests_config_has expected)}}m{{asUpperCamelCase expected}}.HasValue() ? m{{asUpperCamelCase expected}}.Value() : {{asTypedLiteral (chip_tests_config_get_default_value expected) (chip_tests_config_get_type expected)}} {{else}}{{asTypedLiteral expected type}} diff --git a/src/app/tests/suites/TestSaveAs.yaml b/src/app/tests/suites/TestSaveAs.yaml index 1ba2e3559ddc0f..e67cadbe3065b0 100644 --- a/src/app/tests/suites/TestSaveAs.yaml +++ b/src/app/tests/suites/TestSaveAs.yaml @@ -675,3 +675,125 @@ tests: attribute: "vendor_id" response: value: readAttributeVendorIdDefaultValue + + # Tests for CHAR_STRING + + - label: "Read attribute char_string Default Value" + command: "readAttribute" + attribute: "char_string" + response: + saveAs: readAttributeCharStringDefaultValue + value: "" + + - label: + "Read attribute char_string Default Value and compare to saved value" + command: "readAttribute" + attribute: "char_string" + response: + value: readAttributeCharStringDefaultValue + + - label: "Write attribute char_string Not Default Value" + command: "writeAttribute" + attribute: "char_string" + arguments: + value: "NotDefault" + + - label: "Read attribute char_string Not Default Value" + command: "readAttribute" + attribute: "char_string" + response: + saveAs: readAttributeCharStringNotDefaultValue + value: "NotDefault" + constraints: + notValue: readAttributeCharStringDefaultValue + + - label: + "Read attribute char_string Not Default Value and compare to saved + value" + command: "readAttribute" + attribute: "char_string" + response: + value: readAttributeCharStringNotDefaultValue + constraints: + notValue: readAttributeCharStringDefaultValue + + - label: "Write attribute char_string Not Default Value from saved value" + command: "writeAttribute" + attribute: "char_string" + arguments: + value: readAttributeCharStringNotDefaultValue + + - label: + "Read attribute char_string Not Default Value and compare to expected + value" + command: "readAttribute" + attribute: "char_string" + response: + value: "NotDefault" + + - label: "Write attribute char_string Default Value" + command: "writeAttribute" + attribute: "char_string" + arguments: + value: readAttributeCharStringDefaultValue + + # Tests for OCTET_STRING + + - label: "Read attribute octet_string Default Value" + command: "readAttribute" + attribute: "octet_string" + response: + saveAs: readAttributeOctetStringDefaultValue + value: "" + + - label: + "Read attribute octet_string Default Value and compare to saved value" + command: "readAttribute" + attribute: "octet_string" + response: + value: readAttributeOctetStringDefaultValue + + - label: "Write attribute octet_string Not Default Value" + command: "writeAttribute" + attribute: "octet_string" + arguments: + value: "NotDefault" + + - label: "Read attribute octet_string Not Default Value" + command: "readAttribute" + attribute: "octet_string" + response: + saveAs: readAttributeOctetStringNotDefaultValue + value: "NotDefault" + constraints: + notValue: readAttributeOctetStringDefaultValue + + - label: + "Read attribute octet_string Not Default Value and compare to saved + value" + command: "readAttribute" + attribute: "octet_string" + response: + value: readAttributeOctetStringNotDefaultValue + constraints: + notValue: readAttributeOctetStringDefaultValue + + - label: "Write attribute octet_string Not Default Value from saved value" + command: "writeAttribute" + attribute: "octet_string" + arguments: + value: readAttributeOctetStringNotDefaultValue + + - label: + "Read attribute octet_string Not Default Value and compare to expected + value" + command: "readAttribute" + attribute: "octet_string" + response: + value: "NotDefault" + + - label: "Write attribute octet_string Default Value" + command: "writeAttribute" + attribute: "octet_string" + arguments: + value: readAttributeOctetStringDefaultValue diff --git a/src/app/zap-templates/common/ClusterTestGeneration.js b/src/app/zap-templates/common/ClusterTestGeneration.js index 19a669a9e8ae8d..936611a8c71acc 100644 --- a/src/app/zap-templates/common/ClusterTestGeneration.js +++ b/src/app/zap-templates/common/ClusterTestGeneration.js @@ -288,14 +288,19 @@ function setDefaultResponse(test) throwError(test, errorStr); } - const name = test.isAttribute ? test.attribute : test.event; + const name = test.isAttribute ? test.attribute : test.event; + const response = test[kResponseName]; if (hasResponseValue) { - test[kResponseName].values.push({ name : name, value : test[kResponseName].value, saveAs : test[kResponseName].saveAs }); + const value = { name, value : response.value, saveAs : response.saveAs }; + response.values.push(value); } if (hasResponseConstraints) { - test[kResponseName].values.push( - { name : name, constraints : test[kResponseName].constraints, saveAs : test[kResponseName].saveAs }); + let constraints = { name : name, constraints : response.constraints }; + if ('saveAs' in response && !hasResponseValue) { + constraints.saveAs = response.saveAs; + } + response.values.push(constraints); } delete test[kResponseName].value; @@ -503,12 +508,7 @@ function chip_tests_items(options) return templateUtil.collectBlocks(this.tests, options, this); } -function chip_tests_config(options) -{ - return templateUtil.collectBlocks(this.variables.config, options, this); -} - -function getConfigVariable(context, name) +function getVariable(context, key, name) { while (!('variables' in context) && context.parent) { context = context.parent; @@ -518,33 +518,55 @@ function getConfigVariable(context, name) return null; } - return context.variables.config.find(variable => variable.name == name); + return context.variables[key].find(variable => variable.name == name); } -function getConfigVariableOrThrow(context, name) +function getVariableOrThrow(context, key, name) { - const variable = getConfigVariable(context, name); + const variable = getVariable(context, key, name); if (variable == null) { throw new Error(`Variable ${name} can not be found`); } return variable; } +function chip_tests_variables(options) +{ + return templateUtil.collectBlocks(this.variables.tests, options, this); +} + +function chip_tests_variables_has(name, options) +{ + const variable = getVariable(this, 'tests', name); + return !!variable; +} + +function chip_tests_variables_get_type(name, options) +{ + const variable = getVariableOrThrow(this, 'tests', name); + return variable.type; +} + +function chip_tests_config(options) +{ + return templateUtil.collectBlocks(this.variables.config, options, this); +} + function chip_tests_config_has(name, options) { - const variable = getConfigVariable(this, name); + const variable = getVariable(this, 'config', name); return !!variable; } function chip_tests_config_get_default_value(name, options) { - const variable = getConfigVariableOrThrow(this, name); + const variable = getVariableOrThrow(this, 'config', name); return variable.defaultValue; } function chip_tests_config_get_type(name, options) { - const variable = getConfigVariableOrThrow(this, name); + const variable = getVariableOrThrow(this, 'config', name); return variable.type; } @@ -717,6 +739,9 @@ exports.chip_tests_config = chip_tests_config; exports.chip_tests_config_has = chip_tests_config_has; exports.chip_tests_config_get_default_value = chip_tests_config_get_default_value; exports.chip_tests_config_get_type = chip_tests_config_get_type; +exports.chip_tests_variables = chip_tests_variables; +exports.chip_tests_variables_has = chip_tests_variables_has; +exports.chip_tests_variables_get_type = chip_tests_variables_get_type; exports.isTestOnlyCluster = isTestOnlyCluster; exports.isLiteralNull = isLiteralNull; exports.octetStringEscapedForCLiteral = octetStringEscapedForCLiteral; diff --git a/src/darwin/Framework/CHIP/templates/helper.js b/src/darwin/Framework/CHIP/templates/helper.js index 7aa0599390bf77..d79ab45d90d4c6 100644 --- a/src/darwin/Framework/CHIP/templates/helper.js +++ b/src/darwin/Framework/CHIP/templates/helper.js @@ -66,12 +66,12 @@ function asTestValue() } } -function asObjectiveCBasicType(type) +function asObjectiveCBasicType(type, options) { if (StringHelper.isOctetString(type)) { - return 'NSData *'; + return options.hash.is_mutable ? 'NSMutableData *' : 'NSData *'; } else if (StringHelper.isCharString(type)) { - return 'NSString *'; + return options.hash.is_mutable ? 'NSMutableString *' : 'NSString *'; } else { return ChipTypesHelper.asBasicType(this.chipType); } diff --git a/src/darwin/Framework/CHIP/templates/partials/check_test_value.zapt b/src/darwin/Framework/CHIP/templates/partials/check_test_value.zapt index 4da8e480ea8f40..7ef670c1723cc4 100644 --- a/src/darwin/Framework/CHIP/templates/partials/check_test_value.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/check_test_value.zapt @@ -27,7 +27,13 @@ {{! Maybe we should add a check for properties in the expected object (other than "global") that are not present in the struct ? }} {{else}} - {{#if (isOctetString type)}} + {{#if (chip_tests_variables_has expected)}} + {{#if (isString type)}} + XCTAssertEqualObjects({{actual}}, {{expected}}); + {{else}} + XCTAssertEqual([{{actual}} {{asObjectiveCNumberType "" type true}}Value], {{expected}}); + {{/if}} + {{else if (isOctetString type)}} XCTAssertTrue([{{actual}} isEqualToData:[[NSData alloc] initWithBytes:"{{octetStringEscapedForCLiteral expected}}" length:{{expected.length}}]]); {{else if (isCharString type)}} XCTAssertTrue([{{actual}} isEqualToString:@"{{expected}}"]); diff --git a/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt b/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt index 2dc923a4739c32..a302c592fc4ac6 100644 --- a/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt @@ -5,7 +5,7 @@ bool testSendCluster{{parent.filename}}_{{asTestIndex index}}_{{asUpperCamelCase {{/if}} {{#chip_tests_item_response_parameters}} {{#if saveAs}} -{{asBasicType chipType}} {{saveAs}}; +{{asObjectiveCBasicType type is_mutable=true}} {{saveAs}}; {{/if}} {{/chip_tests_item_response_parameters}} @@ -103,8 +103,14 @@ ResponseHandler {{> subscribeDataCallback}} = nil; {{> actualValue}} {{>check_test_value actual="actualValue" expected=expectedValue cluster=../cluster}} {{#if saveAs}} + {{#if (isOctetString type)}} + {{saveAs}} = [NSMutableData dataWithData:actualValue]; + {{else if (isCharString type)}} + {{saveAs}} = [NSMutableString stringWithString:actualValue]; + {{else}} {{saveAs}} = [actualValue {{asObjectiveCNumberType "" type true}}Value]; {{/if}} + {{/if}} } {{/if}} {{#if hasExpectedConstraints}} @@ -177,7 +183,11 @@ ResponseHandler {{> subscribeDataCallback}} = nil; XCTAssertFalse(actualValue == nil); {{else}} if (actualValue != nil) { + {{#if (isString type)}} + XCTAssertNotEqualObjects(actualValue, {{expectedConstraints.notValue}}); + {{else}} XCTAssertNotEqual([actualValue {{asObjectiveCNumberType "" type true}}Value], {{asTypedLiteral expectedConstraints.notValue type}}); + {{/if}} } {{/if}} } diff --git a/src/darwin/Framework/CHIP/templates/partials/test_value.zapt b/src/darwin/Framework/CHIP/templates/partials/test_value.zapt index 74488126dd1876..2e022ced5e50f8 100644 --- a/src/darwin/Framework/CHIP/templates/partials/test_value.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/test_value.zapt @@ -27,6 +27,12 @@ {{/if_include_struct_item_value}} {{/zcl_struct_items_by_struct_name}} + {{else if (chip_tests_variables_has definedValue)}} + {{#if (isString type)}} + {{target}} = [{{definedValue}} copy]; + {{else}} + {{target}} = [NSNumber numberWith{{asObjectiveCNumberType definedValue type false}}:{{definedValue}}]; + {{/if}} {{else if (isCharString type)}} {{target}} = @"{{definedValue}}"; {{else if (isOctetString type)}} diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index d99f9a8b777c87..463a561546abcd 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -38339,6 +38339,394 @@ - (void)testSendClusterTestSaveAs_000093_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +NSMutableString * readAttributeCharStringDefaultValue; +- (void)testSendClusterTestSaveAs_000094_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute char_string Default Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute char_string Default Value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertTrue([actualValue isEqualToString:@""]); + readAttributeCharStringDefaultValue = [NSMutableString stringWithString:actualValue]; + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestSaveAs_000095_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read attribute char_string Default Value and compare to saved value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute char_string Default Value and compare to saved value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqualObjects(actualValue, readAttributeCharStringDefaultValue); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestSaveAs_000096_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute char_string Not Default Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id charStringArgument; + charStringArgument = @"NotDefault"; + [cluster writeAttributeCharStringWithValue:charStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute char_string Not Default Value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +NSMutableString * readAttributeCharStringNotDefaultValue; +- (void)testSendClusterTestSaveAs_000097_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute char_string Not Default Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute char_string Not Default Value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertTrue([actualValue isEqualToString:@"NotDefault"]); + readAttributeCharStringNotDefaultValue = [NSMutableString stringWithString:actualValue]; + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestSaveAs_000098_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read attribute char_string Not Default Value and compare to saved value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute char_string Not Default Value and compare to saved value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqualObjects(actualValue, readAttributeCharStringNotDefaultValue); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestSaveAs_000099_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write attribute char_string Not Default Value from saved value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id charStringArgument; + charStringArgument = [readAttributeCharStringNotDefaultValue copy]; + [cluster writeAttributeCharStringWithValue:charStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute char_string Not Default Value from saved value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestSaveAs_000100_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read attribute char_string Not Default Value and compare to expected value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute char_string Not Default Value and compare to expected value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertTrue([actualValue isEqualToString:@"NotDefault"]); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestSaveAs_000101_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute char_string Default Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id charStringArgument; + charStringArgument = [readAttributeCharStringDefaultValue copy]; + [cluster writeAttributeCharStringWithValue:charStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute char_string Default Value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +NSMutableData * readAttributeOctetStringDefaultValue; +- (void)testSendClusterTestSaveAs_000102_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute octet_string Default Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute octet_string Default Value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertTrue([actualValue isEqualToData:[[NSData alloc] initWithBytes:"" length:0]]); + readAttributeOctetStringDefaultValue = [NSMutableData dataWithData:actualValue]; + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestSaveAs_000103_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read attribute octet_string Default Value and compare to saved value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute octet_string Default Value and compare to saved value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqualObjects(actualValue, readAttributeOctetStringDefaultValue); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestSaveAs_000104_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute octet_string Not Default Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id octetStringArgument; + octetStringArgument = [[NSData alloc] initWithBytes:"NotDefault" length:10]; + [cluster writeAttributeOctetStringWithValue:octetStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute octet_string Not Default Value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +NSMutableData * readAttributeOctetStringNotDefaultValue; +- (void)testSendClusterTestSaveAs_000105_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute octet_string Not Default Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute octet_string Not Default Value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertTrue([actualValue isEqualToData:[[NSData alloc] initWithBytes:"NotDefault" length:10]]); + readAttributeOctetStringNotDefaultValue = [NSMutableData dataWithData:actualValue]; + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestSaveAs_000106_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read attribute octet_string Not Default Value and compare to saved value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute octet_string Not Default Value and compare to saved value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqualObjects(actualValue, readAttributeOctetStringNotDefaultValue); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestSaveAs_000107_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Write attribute octet_string Not Default Value from saved value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id octetStringArgument; + octetStringArgument = [readAttributeOctetStringNotDefaultValue copy]; + [cluster writeAttributeOctetStringWithValue:octetStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute octet_string Not Default Value from saved value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestSaveAs_000108_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read attribute octet_string Not Default Value and compare to expected value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute octet_string Not Default Value and compare to expected value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertTrue([actualValue isEqualToData:[[NSData alloc] initWithBytes:"NotDefault" length:10]]); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestSaveAs_000109_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute octet_string Default Value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id octetStringArgument; + octetStringArgument = [readAttributeOctetStringDefaultValue copy]; + [cluster writeAttributeOctetStringWithValue:octetStringArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute octet_string Default Value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterTestConstraints_000000_WaitForCommissionee { diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 3e9075940d9a02..34f2af8e8da1f1 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -183,6 +183,8 @@ class Test_TC_BI_1_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_BI_1_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -383,6 +385,8 @@ class Test_TC_BI_2_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_BI_2_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -813,6 +817,8 @@ class Test_TC_BI_2_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_BI_2_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -1190,6 +1196,8 @@ class Test_TC_BOOL_1_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_BOOL_1_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -1390,6 +1398,8 @@ class Test_TC_BOOL_2_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_BOOL_2_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -1590,6 +1600,8 @@ class Test_TC_CC_1_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_1_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -1722,6 +1734,8 @@ class Test_TC_CC_2_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_2_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -7067,6 +7081,8 @@ class Test_TC_CC_3_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_3_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -7382,6 +7398,8 @@ class Test_TC_CC_3_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_3_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -7693,6 +7711,8 @@ class Test_TC_CC_3_3 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_3_3() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -7944,6 +7964,8 @@ class Test_TC_CC_4_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_4_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -8162,6 +8184,8 @@ class Test_TC_CC_4_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_4_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -8535,6 +8559,8 @@ class Test_TC_CC_4_3 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_4_3() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -8786,6 +8812,8 @@ class Test_TC_CC_4_4 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_4_4() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -9005,6 +9033,8 @@ class Test_TC_CC_5_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_5_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -9224,6 +9254,8 @@ class Test_TC_CC_5_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_5_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -9471,6 +9503,8 @@ class Test_TC_CC_5_3 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_5_3() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -9690,6 +9724,8 @@ class Test_TC_CC_6_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_6_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -9908,6 +9944,8 @@ class Test_TC_CC_6_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_6_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -10194,6 +10232,8 @@ class Test_TC_CC_6_3 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_6_3() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -10449,6 +10489,8 @@ class Test_TC_CC_7_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_7_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -10703,6 +10745,8 @@ class Test_TC_CC_7_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_7_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -11014,6 +11058,8 @@ class Test_TC_CC_7_3 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_7_3() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -11265,6 +11311,8 @@ class Test_TC_CC_7_4 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_7_4() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -11484,6 +11532,8 @@ class Test_TC_CC_8_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_8_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -12080,6 +12130,8 @@ class Test_TC_CC_9_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_9_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -13490,6 +13542,8 @@ class Test_TC_CC_9_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_9_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -14073,6 +14127,8 @@ class Test_TC_CC_9_3 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_CC_9_3() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -14656,6 +14712,8 @@ class Test_TC_DD_1_5 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_DD_1_5() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -14722,6 +14780,8 @@ class Test_TC_DD_1_6 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_DD_1_6() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -14809,6 +14869,8 @@ class Test_TC_DD_1_7 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_DD_1_7() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -14885,6 +14947,8 @@ class Test_TC_DD_1_8 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_DD_1_8() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -14960,6 +15024,8 @@ class Test_TC_DD_1_9 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_DD_1_9() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -15046,6 +15112,8 @@ class Test_TC_DM_1_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_DM_1_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -15791,6 +15859,8 @@ class Test_TC_DM_3_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_DM_3_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -15856,6 +15926,8 @@ class Test_TC_DM_2_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_DM_2_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -16069,6 +16141,8 @@ class Test_TC_EMR_1_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_EMR_1_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -16273,6 +16347,8 @@ class Test_TC_FLW_1_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_FLW_1_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -16405,6 +16481,8 @@ class Test_TC_FLW_2_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_FLW_2_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -16912,6 +16990,8 @@ class Test_TC_FLW_2_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_FLW_2_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -17043,6 +17123,8 @@ class Test_TC_ILL_1_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_ILL_1_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -17247,6 +17329,8 @@ class Test_TC_LVL_1_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_LVL_1_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -17379,6 +17463,8 @@ class Test_TC_LVL_2_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_LVL_2_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -17948,6 +18034,8 @@ class Test_TC_LVL_2_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_LVL_2_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -18531,6 +18619,8 @@ class Test_TC_LVL_3_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_LVL_3_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -18998,6 +19088,8 @@ class Test_TC_LVL_4_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_LVL_4_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -19496,6 +19588,8 @@ class Test_TC_LVL_5_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_LVL_5_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -19884,6 +19978,8 @@ class Test_TC_LVL_6_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_LVL_6_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -20223,6 +20319,8 @@ class Test_TC_MC_1_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_1_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -20355,6 +20453,8 @@ class Test_TC_MC_2_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_2_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -20447,6 +20547,8 @@ class Test_TC_MC_3_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_3_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -20512,6 +20614,8 @@ class Test_TC_MC_3_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_3_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -20577,6 +20681,8 @@ class Test_TC_MC_3_3 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_3_3() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -20642,6 +20748,8 @@ class Test_TC_MC_3_4 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_3_4() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -20707,6 +20815,8 @@ class Test_TC_MC_3_5 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_3_5() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -20772,6 +20882,8 @@ class Test_TC_MC_3_6 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_3_6() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -20837,6 +20949,8 @@ class Test_TC_MC_3_7 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_3_7() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -20902,6 +21016,8 @@ class Test_TC_MC_3_8 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_3_8() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -20967,6 +21083,8 @@ class Test_TC_MC_3_9 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_3_9() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -21032,6 +21150,8 @@ class Test_TC_MC_3_10 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_3_10() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -21097,6 +21217,8 @@ class Test_TC_MC_3_11 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_3_11() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -21162,6 +21284,8 @@ class Test_TC_MC_5_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_5_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -21263,6 +21387,8 @@ class Test_TC_MC_5_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_5_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -21338,6 +21464,8 @@ class Test_TC_MC_5_3 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_5_3() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -21413,6 +21541,8 @@ class Test_TC_MC_6_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_6_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -21552,6 +21682,8 @@ class Test_TC_MC_6_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_6_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -21721,6 +21853,8 @@ class Test_TC_MC_6_3 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_6_3() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -21816,6 +21950,8 @@ class Test_TC_MC_6_4 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_6_4() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -22043,6 +22179,8 @@ class Test_TC_MC_7_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_7_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -22108,6 +22246,8 @@ class Test_TC_MC_7_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_7_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -22173,6 +22313,8 @@ class Test_TC_MC_8_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_8_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -22313,6 +22455,8 @@ class Test_TC_MC_9_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_MC_9_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -22590,6 +22734,8 @@ class Test_TC_OCC_1_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_OCC_1_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -22756,6 +22902,8 @@ class Test_TC_OCC_2_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_OCC_2_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -23137,6 +23285,8 @@ class Test_TC_OCC_2_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_OCC_2_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -23278,6 +23428,8 @@ class Test_TC_OO_1_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_OO_1_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -23622,6 +23774,8 @@ class Test_TC_OO_2_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_OO_2_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -24180,6 +24334,8 @@ class Test_TC_OO_2_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_OO_2_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -24672,6 +24828,8 @@ class Test_TC_OO_2_3 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_OO_2_3() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -26374,6 +26532,8 @@ class Test_TC_PRS_1_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_PRS_1_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -26507,6 +26667,8 @@ class Test_TC_PRS_2_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_PRS_2_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -26878,6 +27040,8 @@ class Test_TC_PCC_1_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_PCC_1_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -27046,6 +27210,8 @@ class Test_TC_PCC_2_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_PCC_2_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -28890,6 +29056,8 @@ class Test_TC_PCC_2_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_PCC_2_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -29060,6 +29228,8 @@ class Test_TC_PCC_2_3 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_PCC_2_3() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -29450,6 +29620,8 @@ class Test_TC_RH_1_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_RH_1_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -29584,6 +29756,8 @@ class Test_TC_RH_2_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_RH_2_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -29796,6 +29970,8 @@ class Test_TC_RH_2_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_RH_2_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -29939,6 +30115,8 @@ class Test_TC_TM_1_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_TM_1_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -30143,6 +30321,8 @@ class Test_TC_TM_2_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_TM_2_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -30280,6 +30460,8 @@ class Test_TC_TM_2_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_TM_2_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -30423,6 +30605,8 @@ class Test_TC_TSTAT_1_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_TSTAT_1_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -30588,6 +30772,8 @@ class Test_TC_TSTAT_2_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_TSTAT_2_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -32729,6 +32915,8 @@ class Test_TC_TSTAT_2_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_TSTAT_2_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -34600,6 +34788,8 @@ class Test_TC_TSUIC_1_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_TSUIC_1_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -34735,6 +34925,8 @@ class Test_TC_TSUIC_2_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_TSUIC_2_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -35314,6 +35506,8 @@ class Test_TC_TSUIC_2_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_TSUIC_2_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -35735,6 +35929,8 @@ class Test_TC_DIAGTH_1_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_DIAGTH_1_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -35939,6 +36135,8 @@ class Test_TC_WNCV_1_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_WNCV_1_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -36212,6 +36410,8 @@ class Test_TC_WNCV_2_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_WNCV_2_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -38217,6 +38417,8 @@ class Test_TC_WNCV_2_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_WNCV_2_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -38282,6 +38484,8 @@ class Test_TC_WNCV_2_4 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_WNCV_2_4() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -38426,6 +38630,8 @@ class Test_TC_WNCV_2_5 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_WNCV_2_5() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -38570,6 +38776,8 @@ class Test_TC_WNCV_3_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_WNCV_3_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -38723,6 +38931,8 @@ class Test_TC_WNCV_3_2 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_WNCV_3_2() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -38876,6 +39086,8 @@ class Test_TC_WNCV_3_3 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_WNCV_3_3() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -39029,6 +39241,8 @@ class TV_TargetNavigatorCluster : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TV_TargetNavigatorCluster() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -39215,6 +39429,8 @@ class TV_AudioOutputCluster : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TV_AudioOutputCluster() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -39428,6 +39644,8 @@ class TV_ApplicationLauncherCluster : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TV_ApplicationLauncherCluster() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -39647,6 +39865,8 @@ class TV_KeypadInputCluster : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TV_KeypadInputCluster() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -39745,6 +39965,8 @@ class TV_AccountLoginCluster : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TV_AccountLoginCluster() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -39902,6 +40124,8 @@ class TV_WakeOnLanCluster : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TV_WakeOnLanCluster() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -40001,6 +40225,8 @@ class TV_ApplicationBasicCluster : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TV_ApplicationBasicCluster() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -40270,6 +40496,8 @@ class TV_MediaPlaybackCluster : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TV_MediaPlaybackCluster() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -40894,6 +41122,8 @@ class TV_ChannelCluster : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TV_ChannelCluster() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -41113,6 +41343,8 @@ class TV_LowPowerCluster : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TV_LowPowerCluster() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -41205,6 +41437,8 @@ class TV_ContentLauncherCluster : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TV_ContentLauncherCluster() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -41458,6 +41692,8 @@ class TV_MediaInputCluster : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TV_MediaInputCluster() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -41722,6 +41958,8 @@ class TestCluster : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TestCluster() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -57939,6 +58177,8 @@ class TestClusterComplexTypes : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TestClusterComplexTypes() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -58688,6 +58928,8 @@ class TestConstraints : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TestConstraints() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -59417,6 +59659,8 @@ class TestDelayCommands : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TestDelayCommands() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -59492,6 +59736,8 @@ class TestLogCommands : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TestLogCommands() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -59577,6 +59823,30 @@ class TestSaveAs : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TestSaveAs() + { + if (readAttributeCharStringDefaultValueBuffer != nullptr) + { + chip::Platform::MemoryFree(readAttributeCharStringDefaultValueBuffer); + readAttributeCharStringDefaultValueBuffer = nullptr; + } + if (readAttributeCharStringNotDefaultValueBuffer != nullptr) + { + chip::Platform::MemoryFree(readAttributeCharStringNotDefaultValueBuffer); + readAttributeCharStringNotDefaultValueBuffer = nullptr; + } + if (readAttributeOctetStringDefaultValueBuffer != nullptr) + { + chip::Platform::MemoryFree(readAttributeOctetStringDefaultValueBuffer); + readAttributeOctetStringDefaultValueBuffer = nullptr; + } + if (readAttributeOctetStringNotDefaultValueBuffer != nullptr) + { + chip::Platform::MemoryFree(readAttributeOctetStringNotDefaultValueBuffer); + readAttributeOctetStringNotDefaultValueBuffer = nullptr; + } + } + /////////// TestCommand Interface ///////// void NextTest() override { @@ -59978,6 +60248,76 @@ class TestSaveAs : public TestCommand ChipLogProgress(chipTool, " ***** Test Step 93 : Read attribute vendor_id Default Value\n"); err = TestReadAttributeVendorIdDefaultValue_93(); break; + case 94: + ChipLogProgress(chipTool, " ***** Test Step 94 : Read attribute char_string Default Value\n"); + err = TestReadAttributeCharStringDefaultValue_94(); + break; + case 95: + ChipLogProgress(chipTool, + " ***** Test Step 95 : Read attribute char_string Default Value and compare to saved value\n"); + err = TestReadAttributeCharStringDefaultValueAndCompareToSavedValue_95(); + break; + case 96: + ChipLogProgress(chipTool, " ***** Test Step 96 : Write attribute char_string Not Default Value\n"); + err = TestWriteAttributeCharStringNotDefaultValue_96(); + break; + case 97: + ChipLogProgress(chipTool, " ***** Test Step 97 : Read attribute char_string Not Default Value\n"); + err = TestReadAttributeCharStringNotDefaultValue_97(); + break; + case 98: + ChipLogProgress(chipTool, + " ***** Test Step 98 : Read attribute char_string Not Default Value and compare to saved value\n"); + err = TestReadAttributeCharStringNotDefaultValueAndCompareToSavedValue_98(); + break; + case 99: + ChipLogProgress(chipTool, " ***** Test Step 99 : Write attribute char_string Not Default Value from saved value\n"); + err = TestWriteAttributeCharStringNotDefaultValueFromSavedValue_99(); + break; + case 100: + ChipLogProgress(chipTool, + " ***** Test Step 100 : Read attribute char_string Not Default Value and compare to expected value\n"); + err = TestReadAttributeCharStringNotDefaultValueAndCompareToExpectedValue_100(); + break; + case 101: + ChipLogProgress(chipTool, " ***** Test Step 101 : Write attribute char_string Default Value\n"); + err = TestWriteAttributeCharStringDefaultValue_101(); + break; + case 102: + ChipLogProgress(chipTool, " ***** Test Step 102 : Read attribute octet_string Default Value\n"); + err = TestReadAttributeOctetStringDefaultValue_102(); + break; + case 103: + ChipLogProgress(chipTool, + " ***** Test Step 103 : Read attribute octet_string Default Value and compare to saved value\n"); + err = TestReadAttributeOctetStringDefaultValueAndCompareToSavedValue_103(); + break; + case 104: + ChipLogProgress(chipTool, " ***** Test Step 104 : Write attribute octet_string Not Default Value\n"); + err = TestWriteAttributeOctetStringNotDefaultValue_104(); + break; + case 105: + ChipLogProgress(chipTool, " ***** Test Step 105 : Read attribute octet_string Not Default Value\n"); + err = TestReadAttributeOctetStringNotDefaultValue_105(); + break; + case 106: + ChipLogProgress(chipTool, + " ***** Test Step 106 : Read attribute octet_string Not Default Value and compare to saved value\n"); + err = TestReadAttributeOctetStringNotDefaultValueAndCompareToSavedValue_106(); + break; + case 107: + ChipLogProgress(chipTool, " ***** Test Step 107 : Write attribute octet_string Not Default Value from saved value\n"); + err = TestWriteAttributeOctetStringNotDefaultValueFromSavedValue_107(); + break; + case 108: + ChipLogProgress(chipTool, + " ***** Test Step 108 : Read attribute octet_string Not Default Value and compare to expected value\n"); + err = TestReadAttributeOctetStringNotDefaultValueAndCompareToExpectedValue_108(); + break; + case 109: + ChipLogProgress(chipTool, " ***** Test Step 109 : Write attribute octet_string Default Value\n"); + err = TestWriteAttributeOctetStringDefaultValue_109(); + break; } if (CHIP_NO_ERROR != err) @@ -59989,7 +60329,7 @@ class TestSaveAs : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 94; + const uint16_t mTestCount = 110; chip::Optional mCluster; chip::Optional mEndpoint; @@ -60013,6 +60353,14 @@ class TestSaveAs : public TestCommand uint64_t readAttributeEpochUSDefaultValue; uint32_t readAttributeEpochSDefaultValue; chip::VendorId readAttributeVendorIdDefaultValue; + char * readAttributeCharStringDefaultValueBuffer = nullptr; + chip::CharSpan readAttributeCharStringDefaultValue; + char * readAttributeCharStringNotDefaultValueBuffer = nullptr; + chip::CharSpan readAttributeCharStringNotDefaultValue; + uint8_t * readAttributeOctetStringDefaultValueBuffer = nullptr; + chip::ByteSpan readAttributeOctetStringDefaultValue; + uint8_t * readAttributeOctetStringNotDefaultValueBuffer = nullptr; + chip::ByteSpan readAttributeOctetStringNotDefaultValue; static void OnFailureCallback_4(void * context, EmberAfStatus status) { @@ -60806,6 +61154,148 @@ class TestSaveAs : public TestCommand (static_cast(context))->OnSuccessResponse_93(vendorId); } + static void OnFailureCallback_94(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_94(status); + } + + static void OnSuccessCallback_94(void * context, chip::CharSpan charString) + { + (static_cast(context))->OnSuccessResponse_94(charString); + } + + static void OnFailureCallback_95(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_95(status); + } + + static void OnSuccessCallback_95(void * context, chip::CharSpan charString) + { + (static_cast(context))->OnSuccessResponse_95(charString); + } + + static void OnFailureCallback_96(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_96(status); + } + + static void OnSuccessCallback_96(void * context) { (static_cast(context))->OnSuccessResponse_96(); } + + static void OnFailureCallback_97(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_97(status); + } + + static void OnSuccessCallback_97(void * context, chip::CharSpan charString) + { + (static_cast(context))->OnSuccessResponse_97(charString); + } + + static void OnFailureCallback_98(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_98(status); + } + + static void OnSuccessCallback_98(void * context, chip::CharSpan charString) + { + (static_cast(context))->OnSuccessResponse_98(charString); + } + + static void OnFailureCallback_99(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_99(status); + } + + static void OnSuccessCallback_99(void * context) { (static_cast(context))->OnSuccessResponse_99(); } + + static void OnFailureCallback_100(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_100(status); + } + + static void OnSuccessCallback_100(void * context, chip::CharSpan charString) + { + (static_cast(context))->OnSuccessResponse_100(charString); + } + + static void OnFailureCallback_101(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_101(status); + } + + static void OnSuccessCallback_101(void * context) { (static_cast(context))->OnSuccessResponse_101(); } + + static void OnFailureCallback_102(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_102(status); + } + + static void OnSuccessCallback_102(void * context, chip::ByteSpan octetString) + { + (static_cast(context))->OnSuccessResponse_102(octetString); + } + + static void OnFailureCallback_103(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_103(status); + } + + static void OnSuccessCallback_103(void * context, chip::ByteSpan octetString) + { + (static_cast(context))->OnSuccessResponse_103(octetString); + } + + static void OnFailureCallback_104(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_104(status); + } + + static void OnSuccessCallback_104(void * context) { (static_cast(context))->OnSuccessResponse_104(); } + + static void OnFailureCallback_105(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_105(status); + } + + static void OnSuccessCallback_105(void * context, chip::ByteSpan octetString) + { + (static_cast(context))->OnSuccessResponse_105(octetString); + } + + static void OnFailureCallback_106(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_106(status); + } + + static void OnSuccessCallback_106(void * context, chip::ByteSpan octetString) + { + (static_cast(context))->OnSuccessResponse_106(octetString); + } + + static void OnFailureCallback_107(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_107(status); + } + + static void OnSuccessCallback_107(void * context) { (static_cast(context))->OnSuccessResponse_107(); } + + static void OnFailureCallback_108(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_108(status); + } + + static void OnSuccessCallback_108(void * context, chip::ByteSpan octetString) + { + (static_cast(context))->OnSuccessResponse_108(octetString); + } + + static void OnFailureCallback_109(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_109(status); + } + + static void OnSuccessCallback_109(void * context) { (static_cast(context))->OnSuccessResponse_109(); } + // // Tests methods // @@ -62622,7 +63112,7 @@ class TestSaveAs : public TestCommand cluster.Associate(mDevices[kIdentityAlpha], endpoint); chip::VendorId vendorIdArgument; - vendorIdArgument = static_cast(readAttributeVendorIdDefaultValue); + vendorIdArgument = readAttributeVendorIdDefaultValue; ReturnErrorOnFailure(cluster.WriteAttribute( vendorIdArgument, this, OnSuccessCallback_92, OnFailureCallback_92)); @@ -62652,6 +63142,344 @@ class TestSaveAs : public TestCommand NextTest(); } + + CHIP_ERROR TestReadAttributeCharStringDefaultValue_94() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_94, OnFailureCallback_94)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_94(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_94(chip::CharSpan charString) + { + VerifyOrReturn(CheckValueAsString("charString", charString, chip::CharSpan("", 0))); + + if (readAttributeCharStringDefaultValueBuffer != nullptr) + { + chip::Platform::MemoryFree(readAttributeCharStringDefaultValueBuffer); + } + readAttributeCharStringDefaultValueBuffer = static_cast(chip::Platform::MemoryAlloc(charString.size())); + memcpy(readAttributeCharStringDefaultValueBuffer, charString.data(), charString.size()); + readAttributeCharStringDefaultValue = chip::CharSpan(readAttributeCharStringDefaultValueBuffer, charString.size()); + NextTest(); + } + + CHIP_ERROR TestReadAttributeCharStringDefaultValueAndCompareToSavedValue_95() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_95, OnFailureCallback_95)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_95(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_95(chip::CharSpan charString) + { + VerifyOrReturn(CheckValueAsString("charString", charString, readAttributeCharStringDefaultValue)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeCharStringNotDefaultValue_96() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::CharSpan charStringArgument; + charStringArgument = chip::Span("NotDefaultgarbage: not in length on purpose", 10); + + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_96, OnFailureCallback_96)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_96(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_96() { NextTest(); } + + CHIP_ERROR TestReadAttributeCharStringNotDefaultValue_97() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_97, OnFailureCallback_97)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_97(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_97(chip::CharSpan charString) + { + VerifyOrReturn(CheckValueAsString("charString", charString, chip::CharSpan("NotDefault", 10))); + + if (readAttributeCharStringNotDefaultValueBuffer != nullptr) + { + chip::Platform::MemoryFree(readAttributeCharStringNotDefaultValueBuffer); + } + readAttributeCharStringNotDefaultValueBuffer = static_cast(chip::Platform::MemoryAlloc(charString.size())); + memcpy(readAttributeCharStringNotDefaultValueBuffer, charString.data(), charString.size()); + readAttributeCharStringNotDefaultValue = chip::CharSpan(readAttributeCharStringNotDefaultValueBuffer, charString.size()); + NextTest(); + } + + CHIP_ERROR TestReadAttributeCharStringNotDefaultValueAndCompareToSavedValue_98() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_98, OnFailureCallback_98)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_98(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_98(chip::CharSpan charString) + { + VerifyOrReturn(CheckValueAsString("charString", charString, readAttributeCharStringNotDefaultValue)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeCharStringNotDefaultValueFromSavedValue_99() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::CharSpan charStringArgument; + charStringArgument = readAttributeCharStringNotDefaultValue; + + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_99, OnFailureCallback_99)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_99(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_99() { NextTest(); } + + CHIP_ERROR TestReadAttributeCharStringNotDefaultValueAndCompareToExpectedValue_100() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_100, OnFailureCallback_100)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_100(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_100(chip::CharSpan charString) + { + VerifyOrReturn(CheckValueAsString("charString", charString, chip::CharSpan("NotDefault", 10))); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeCharStringDefaultValue_101() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::CharSpan charStringArgument; + charStringArgument = readAttributeCharStringDefaultValue; + + ReturnErrorOnFailure(cluster.WriteAttribute( + charStringArgument, this, OnSuccessCallback_101, OnFailureCallback_101)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_101(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_101() { NextTest(); } + + CHIP_ERROR TestReadAttributeOctetStringDefaultValue_102() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_102, OnFailureCallback_102)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_102(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_102(chip::ByteSpan octetString) + { + VerifyOrReturn(CheckValueAsString("octetString", octetString, chip::ByteSpan(chip::Uint8::from_const_char(""), 0))); + + if (readAttributeOctetStringDefaultValueBuffer != nullptr) + { + chip::Platform::MemoryFree(readAttributeOctetStringDefaultValueBuffer); + } + readAttributeOctetStringDefaultValueBuffer = static_cast(chip::Platform::MemoryAlloc(octetString.size())); + memcpy(readAttributeOctetStringDefaultValueBuffer, octetString.data(), octetString.size()); + readAttributeOctetStringDefaultValue = chip::ByteSpan(readAttributeOctetStringDefaultValueBuffer, octetString.size()); + NextTest(); + } + + CHIP_ERROR TestReadAttributeOctetStringDefaultValueAndCompareToSavedValue_103() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_103, OnFailureCallback_103)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_103(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_103(chip::ByteSpan octetString) + { + VerifyOrReturn(CheckValueAsString("octetString", octetString, readAttributeOctetStringDefaultValue)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeOctetStringNotDefaultValue_104() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::ByteSpan octetStringArgument; + octetStringArgument = chip::ByteSpan(chip::Uint8::from_const_char("NotDefaultgarbage: not in length on purpose"), 10); + + ReturnErrorOnFailure(cluster.WriteAttribute( + octetStringArgument, this, OnSuccessCallback_104, OnFailureCallback_104)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_104(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_104() { NextTest(); } + + CHIP_ERROR TestReadAttributeOctetStringNotDefaultValue_105() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_105, OnFailureCallback_105)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_105(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_105(chip::ByteSpan octetString) + { + VerifyOrReturn( + CheckValueAsString("octetString", octetString, chip::ByteSpan(chip::Uint8::from_const_char("NotDefault"), 10))); + + if (readAttributeOctetStringNotDefaultValueBuffer != nullptr) + { + chip::Platform::MemoryFree(readAttributeOctetStringNotDefaultValueBuffer); + } + readAttributeOctetStringNotDefaultValueBuffer = static_cast(chip::Platform::MemoryAlloc(octetString.size())); + memcpy(readAttributeOctetStringNotDefaultValueBuffer, octetString.data(), octetString.size()); + readAttributeOctetStringNotDefaultValue = chip::ByteSpan(readAttributeOctetStringNotDefaultValueBuffer, octetString.size()); + NextTest(); + } + + CHIP_ERROR TestReadAttributeOctetStringNotDefaultValueAndCompareToSavedValue_106() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_106, OnFailureCallback_106)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_106(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_106(chip::ByteSpan octetString) + { + VerifyOrReturn(CheckValueAsString("octetString", octetString, readAttributeOctetStringNotDefaultValue)); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeOctetStringNotDefaultValueFromSavedValue_107() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::ByteSpan octetStringArgument; + octetStringArgument = readAttributeOctetStringNotDefaultValue; + + ReturnErrorOnFailure(cluster.WriteAttribute( + octetStringArgument, this, OnSuccessCallback_107, OnFailureCallback_107)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_107(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_107() { NextTest(); } + + CHIP_ERROR TestReadAttributeOctetStringNotDefaultValueAndCompareToExpectedValue_108() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_108, OnFailureCallback_108)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_108(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_108(chip::ByteSpan octetString) + { + VerifyOrReturn( + CheckValueAsString("octetString", octetString, chip::ByteSpan(chip::Uint8::from_const_char("NotDefault"), 10))); + + NextTest(); + } + + CHIP_ERROR TestWriteAttributeOctetStringDefaultValue_109() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + chip::ByteSpan octetStringArgument; + octetStringArgument = readAttributeOctetStringDefaultValue; + + ReturnErrorOnFailure(cluster.WriteAttribute( + octetStringArgument, this, OnSuccessCallback_109, OnFailureCallback_109)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_109(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_109() { NextTest(); } }; class TestConfigVariables : public TestCommand @@ -62665,6 +63493,8 @@ class TestConfigVariables : public TestCommand AddArgument("returnValueWithArg1", 0, UINT8_MAX, &mReturnValueWithArg1); } + ~TestConfigVariables() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -62803,6 +63633,8 @@ class TestDescriptorCluster : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TestDescriptorCluster() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -63074,6 +63906,8 @@ class TestBasicInformation : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TestBasicInformation() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -63276,6 +64110,8 @@ class TestIdentifyCluster : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TestIdentifyCluster() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -63369,6 +64205,8 @@ class TestGroupsCluster : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TestGroupsCluster() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -64090,6 +64928,8 @@ class TestGroupKeyManagementCluster : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TestGroupKeyManagementCluster() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -64225,6 +65065,8 @@ class TestOperationalCredentialsCluster : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TestOperationalCredentialsCluster() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -64395,6 +65237,8 @@ class TestModeSelectCluster : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TestModeSelectCluster() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -64745,6 +65589,8 @@ class TestGroupMessaging : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TestGroupMessaging() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -64944,6 +65790,8 @@ class Test_TC_SWDIAG_1_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_SWDIAG_1_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -65128,6 +65976,8 @@ class Test_TC_SWDIAG_2_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_SWDIAG_2_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -65183,6 +66033,8 @@ class Test_TC_SWDIAG_3_1 : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_SWDIAG_3_1() {} + /////////// TestCommand Interface ///////// void NextTest() override { @@ -65333,6 +66185,8 @@ class TestSubscribe_OnOff : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~TestSubscribe_OnOff() {} + /////////// TestCommand Interface ///////// void NextTest() override { diff --git a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h index a1b3008d43c825..63199726f2da29 100644 --- a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h @@ -30,6 +30,8 @@ class Test_TC_DM_1_3_Simulated : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_DM_1_3_Simulated() {} + /////////// TestCommand Interface ///////// void NextTest() override { diff --git a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h index a1b3008d43c825..63199726f2da29 100644 --- a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h @@ -30,6 +30,8 @@ class Test_TC_DM_1_3_Simulated : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } + ~Test_TC_DM_1_3_Simulated() {} + /////////// TestCommand Interface ///////// void NextTest() override { From 1feadcf8e214dea2b056e69b54bd31f61afd011b Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Fri, 14 Jan 2022 21:41:36 +0800 Subject: [PATCH 013/124] [Ameba] Revise build script for otar (#13573) * Update Dockerfile Add OTAR to all-clusters-app and lighting-app Fix build pigweed-app * Update version Revise build script for otar --- integrations/docker/images/chip-build-ameba/Dockerfile | 2 +- integrations/docker/images/chip-build/version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/docker/images/chip-build-ameba/Dockerfile b/integrations/docker/images/chip-build-ameba/Dockerfile index d98d6175fc9ee8..1a0d97d29e5654 100644 --- a/integrations/docker/images/chip-build-ameba/Dockerfile +++ b/integrations/docker/images/chip-build-ameba/Dockerfile @@ -9,7 +9,7 @@ RUN set -x \ && cd ${AMEBA_DIR} \ && git clone --progress -b cmake_build https://github.com/pankore/ambd_sdk_with_chip_non_NDA.git \ && cd ambd_sdk_with_chip_non_NDA \ - && git reset --hard dd89725 \ + && git reset --hard 4491131 \ && git submodule update --depth 1 --init --progress \ && cd project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/toolchain \ && cat asdk/asdk-10.3.0-linux-newlib-build-3638-x86_64.tar.bz2.part* > asdk/asdk-10.3.0-linux-newlib-build-3638-x86_64.tar.bz2 \ diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version index dd7e7fa44a9b1b..61483888eab895 100644 --- a/integrations/docker/images/chip-build/version +++ b/integrations/docker/images/chip-build/version @@ -1 +1 @@ -0.5.46 Version bump reason: [Doxygen] Adding git missing package +0.5.47 Version bump reason: [Ameba] Revise build script for otar From 827fabdb757a7d68f20ec3eeb3a42ae1c653872f Mon Sep 17 00:00:00 2001 From: Rohit Jadhav <69809379+jadhavrohit924@users.noreply.github.com> Date: Fri, 14 Jan 2022 20:26:31 +0530 Subject: [PATCH 014/124] Added ota-requestor for lighting app and updated readme. (#13532) Removed applyupdate command from ota-requestor-app as ota-announce automatically apply the updates once trasnfer completes. Minor readme changes. --- examples/all-clusters-app/esp32/README.md | 4 +- examples/bridge-app/esp32/README.md | 4 +- examples/lighting-app/esp32/README.md | 39 +++++++++++++++ .../lighting-app/esp32/main/CMakeLists.txt | 3 +- examples/lighting-app/esp32/main/main.cpp | 26 ++++++++++ examples/lighting-app/esp32/partitions.csv | 5 +- .../lighting-app/esp32/sdkconfig.defaults | 4 ++ examples/lock-app/esp32/README.md | 4 +- examples/ota-requestor-app/esp32/README.md | 15 ++---- .../ota-requestor-app/esp32/main/main.cpp | 47 ------------------- .../esp32/README.md | 2 +- 11 files changed, 85 insertions(+), 68 deletions(-) diff --git a/examples/all-clusters-app/esp32/README.md b/examples/all-clusters-app/esp32/README.md index 15dce596e041e0..1f4ca1ca5a630e 100644 --- a/examples/all-clusters-app/esp32/README.md +++ b/examples/all-clusters-app/esp32/README.md @@ -195,7 +195,7 @@ remote device, as well as the network credentials to use. The command below uses the default values hard-coded into the debug versions of the ESP32 all-clusters-app to commission it onto a Wi-Fi network: - $ .out/debug/chip-tool pairing ble-wifi 12344321 ${SSID} ${PASSWORD} 20202021 3840 + $ ./out/debug/chip-tool pairing ble-wifi 12344321 ${SSID} ${PASSWORD} 20202021 3840 Parameters: @@ -210,7 +210,7 @@ Parameters: To use the Client to send Matter commands, run the built executable and pass it the target cluster name, the target command name as well as an endpoint id. - $ .out/debug/chip-tool onoff on 12344321 1 + $ ./out/debug/chip-tool onoff on 12344321 1 The client will send a single command packet and then exit. diff --git a/examples/bridge-app/esp32/README.md b/examples/bridge-app/esp32/README.md index 96e1a60f3ffb98..3e04f1bb30aad2 100644 --- a/examples/bridge-app/esp32/README.md +++ b/examples/bridge-app/esp32/README.md @@ -227,7 +227,7 @@ remote device, as well as the network credentials to use. The command below uses the default values hard-coded into the debug versions of the ESP32 all-clusters-app to commission it onto a Wi-Fi network: - $ .out/debug/chip-tool pairing ble-wifi 12344321 ${SSID} ${PASSWORD} 20202021 3840 + $ ./out/debug/chip-tool pairing ble-wifi 12344321 ${SSID} ${PASSWORD} 20202021 3840 Parameters: @@ -242,6 +242,6 @@ Parameters: To use the Client to send Matter commands, run the built executable and pass it the target cluster name, the target command name as well as an endpoint id. - $ .out/debug/chip-tool onoff on 12344321 1 + $ ./out/debug/chip-tool onoff on 12344321 2 The client will send a single command packet and then exit. diff --git a/examples/lighting-app/esp32/README.md b/examples/lighting-app/esp32/README.md index 99a847938d8d63..534e6ec3df0c16 100644 --- a/examples/lighting-app/esp32/README.md +++ b/examples/lighting-app/esp32/README.md @@ -9,6 +9,7 @@ This example demonstrates the Matter Lighting application on ESP platforms. - [Building the Example Application](#building-the-example-application) - [Commissioning over BLE using chip-tool](#commissioning-over-ble-using-chip-tool) - [Cluster Control](#cluster-control) +- [Steps to Try Lighting app OTA Requestor](#steps-to-try-lighting-app-ota-requestor) --- @@ -122,3 +123,41 @@ make sure the IDF_PATH has been exported(See the manual setup steps above). control the color attributes: $ ./out/debug/chip-tool colorcontrol move-to-hue-and-saturation 240 100 0 0 0 12345 1 + +# Steps to Try Lighting app OTA Requestor + +Before moving ahead, make sure your device is commissioned and running. + +- Build the Linux OTA Provider + +``` +scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug chip_config_network_layer_ble=false +``` + +- Run the Linux OTA Provider with OTA image. + +``` +./out/debug/chip-ota-provider-app -f hello-world.bin +``` + +hello-world.bin can be obtained from compiling the hello-world ESP-IDF example. + +- Provision the Linux OTA Provider using chip-tool + +``` +./out/debug/chip-tool pairing onnetwork 12345 20202021 +``` + +## Query for an OTA Image + +After commissioning is successful, press Enter in requestor device console and +type below query. + +``` +>matter ota query 1 12345 0 +``` + +## Apply update + +Once transfer is complete, reboot the device manually to boot from upgraded OTA +image. diff --git a/examples/lighting-app/esp32/main/CMakeLists.txt b/examples/lighting-app/esp32/main/CMakeLists.txt index 9f1b54cccfc3d6..4413f141070491 100644 --- a/examples/lighting-app/esp32/main/CMakeLists.txt +++ b/examples/lighting-app/esp32/main/CMakeLists.txt @@ -55,7 +55,8 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/user-label-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wifi-network-diagnostics-server" - PRIV_REQUIRES chip QRCode bt led_strip) + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-requestor" + PRIV_REQUIRES chip QRCode bt led_strip app_update) set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 17) target_compile_options(${COMPONENT_LIB} PRIVATE "-DLWIP_IPV6_SCOPES=0" "-DCHIP_HAVE_CONFIG_H") diff --git a/examples/lighting-app/esp32/main/main.cpp b/examples/lighting-app/esp32/main/main.cpp index 5a703183850757..b26a2fa6afd2e6 100644 --- a/examples/lighting-app/esp32/main/main.cpp +++ b/examples/lighting-app/esp32/main/main.cpp @@ -26,22 +26,46 @@ #include "freertos/task.h" #include "nvs_flash.h" #include "shell_extension/launch.h" +#include +#include #include #include #include #include +#include +#include using namespace ::chip; using namespace ::chip::Credentials; using namespace ::chip::DeviceManager; using namespace ::chip::DeviceLayer; +#if CONFIG_ENABLE_OTA_REQUESTOR +OTARequestor gRequestorCore; +GenericOTARequestorDriver gRequestorUser; +BDXDownloader gDownloader; +OTAImageProcessorImpl gImageProcessor; +#endif + LEDWidget AppLED; static const char * TAG = "light-app"; static DeviceCallbacks EchoCallbacks; +static void InitOTARequestor(void) +{ +#if CONFIG_ENABLE_OTA_REQUESTOR + SetRequestorInstance(&gRequestorCore); + gRequestorCore.SetServerInstance(&Server::GetInstance()); + gRequestorCore.SetOtaRequestorDriver(&gRequestorUser); + gImageProcessor.SetOTADownloader(&gDownloader); + gDownloader.SetImageProcessorDelegate(&gImageProcessor); + gRequestorUser.Init(&gRequestorCore, &gImageProcessor); + gRequestorCore.SetBDXDownloader(&gDownloader); +#endif +} + static void InitServer(intptr_t context) { // Print QR Code URL @@ -82,5 +106,7 @@ extern "C" void app_main() AppLED.Init(); + InitOTARequestor(); + chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer, reinterpret_cast(nullptr)); } diff --git a/examples/lighting-app/esp32/partitions.csv b/examples/lighting-app/esp32/partitions.csv index b338ff11a11589..9c801081f71c04 100644 --- a/examples/lighting-app/esp32/partitions.csv +++ b/examples/lighting-app/esp32/partitions.csv @@ -1,6 +1,7 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap nvs, data, nvs, , 0x6000, +otadata, data, ota, , 0x2000, phy_init, data, phy, , 0x1000, -# Factory partition size about 1.9MB -factory, app, factory, , 1945K, +ota_0, app, ota_0, , 1500K, +ota_1, app, ota_1, , 1500K, diff --git a/examples/lighting-app/esp32/sdkconfig.defaults b/examples/lighting-app/esp32/sdkconfig.defaults index 85e84a2001e385..23a3766c340c04 100644 --- a/examples/lighting-app/esp32/sdkconfig.defaults +++ b/examples/lighting-app/esp32/sdkconfig.defaults @@ -39,3 +39,7 @@ CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" #enable lwIP route hooks CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT=y CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y + +# Serial Flasher config +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y +CONFIG_ESPTOOLPY_FLASHSIZE="4MB" diff --git a/examples/lock-app/esp32/README.md b/examples/lock-app/esp32/README.md index fa9aab5abcff86..4fd81bc2bf5d53 100644 --- a/examples/lock-app/esp32/README.md +++ b/examples/lock-app/esp32/README.md @@ -171,7 +171,7 @@ remote device, as well as the network credentials to use. The command below uses the default values hard-coded into the debug versions of the ESP32 all-clusters-app to commission it onto a Wi-Fi network: - $ .out/debug/chip-tool pairing ble-wifi 12344321 ${SSID} ${PASSWORD} 20202021 3840 + $ ./out/debug/chip-tool pairing ble-wifi 12344321 ${SSID} ${PASSWORD} 20202021 3840 Parameters: @@ -186,7 +186,7 @@ Parameters: To use the Client to send Matter commands, run the built executable and pass it the target cluster name, the target command name as well as an endpoint id. - $ .out/debug/chip-tool onoff on 12344321 1 + $ ./out/debug/chip-tool onoff on 12344321 1 The client will send a single command packet and then exit. diff --git a/examples/ota-requestor-app/esp32/README.md b/examples/ota-requestor-app/esp32/README.md index 3fa1a299b5e53a..20534f43393f8c 100644 --- a/examples/ota-requestor-app/esp32/README.md +++ b/examples/ota-requestor-app/esp32/README.md @@ -40,20 +40,13 @@ After commissioning is successful, announce OTA provider's presence using chip-tool. On receiving this command OTA requestor will query for OTA image. ``` -./out/debug/chip-tool otasoftwareupdaterequestor announce-ota-provider 12345 0 0 12346 0 +./out/debug/chip-tool otasoftwareupdaterequestor announce-ota-provider 12345 0 0 0 12346 0 ``` -## Apply update request +## Apply update -Once transfer is complete OTA Requestor should take permission from the OTA -Provider for applying the OTA image. Use the following command from OTA -requestor prompt - -``` -esp32> ApplyUpdateRequest -``` - -Then reboot the device manually to boot from upgraded OTA image. +Once transfer is complete, reboot the device manually to boot from upgraded OTA +image. ## ESP32 OTA Requestor with Linux OTA Provider diff --git a/examples/ota-requestor-app/esp32/main/main.cpp b/examples/ota-requestor-app/esp32/main/main.cpp index e53dc1bb341dc1..06084e7994a004 100644 --- a/examples/ota-requestor-app/esp32/main/main.cpp +++ b/examples/ota-requestor-app/esp32/main/main.cpp @@ -32,11 +32,6 @@ #include #include -#include -#include -#include -#include - #include #include @@ -45,8 +40,6 @@ #include "OTAImageProcessorImpl.h" #include "platform/GenericOTARequestorDriver.h" #include "platform/OTARequestorInterface.h" -#include -#include using namespace ::chip; using namespace ::chip::System; @@ -54,15 +47,9 @@ using namespace ::chip::Credentials; using namespace ::chip::DeviceManager; using namespace ::chip::DeviceLayer; -struct CmdArgs -{ - struct arg_end * end; -}; - namespace { const char * TAG = "ota-requester-app"; static DeviceCallbacks EchoCallbacks; -CmdArgs applyUpdateCmdArgs; OTARequestor gRequestorCore; GenericOTARequestorDriver gRequestorUser; @@ -70,39 +57,6 @@ BDXDownloader gDownloader; OTAImageProcessorImpl gImageProcessor; } // namespace -int ESPApplyUpdateCmdHandler(int argc, char ** argv) -{ - gRequestorCore.ApplyUpdate(); - ESP_LOGI(TAG, "Apply the Update"); - return 0; -} - -void ESPInitConsole(void) -{ - esp_console_repl_t * repl = NULL; - esp_console_repl_config_t replConfig = ESP_CONSOLE_REPL_CONFIG_DEFAULT(); - esp_console_dev_uart_config_t uartConfig = ESP_CONSOLE_DEV_UART_CONFIG_DEFAULT(); - /* Prompt to be printed before each line. - * This can be customized, made dynamic, etc. - */ - replConfig.prompt = "esp32 >"; - - esp_console_register_help_command(); - - esp_console_cmd_t applyUpdateCommand; - memset(&applyUpdateCommand, 0, sizeof(applyUpdateCommand)); - - applyUpdateCmdArgs.end = arg_end(1); - - applyUpdateCommand.command = "ApplyUpdateRequest", applyUpdateCommand.help = "Request to OTA update image", - applyUpdateCommand.func = &ESPApplyUpdateCmdHandler, applyUpdateCommand.argtable = &applyUpdateCmdArgs; - - esp_console_cmd_register(&applyUpdateCommand); - - esp_console_new_repl_uart(&uartConfig, &replConfig, &repl); - esp_console_start_repl(repl); -} - extern "C" void app_main() { ESP_LOGI(TAG, "OTA Requester!"); @@ -140,7 +94,6 @@ extern "C" void app_main() // Initialize device attestation config SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); - ESPInitConsole(); SetRequestorInstance(&gRequestorCore); gRequestorCore.Init(&(Server::GetInstance()), &gRequestorUser, &gDownloader); gImageProcessor.SetOTADownloader(&gDownloader); diff --git a/examples/temperature-measurement-app/esp32/README.md b/examples/temperature-measurement-app/esp32/README.md index 63834903af093e..13b2e745c6103e 100644 --- a/examples/temperature-measurement-app/esp32/README.md +++ b/examples/temperature-measurement-app/esp32/README.md @@ -171,7 +171,7 @@ remote device, as well as the network credentials to use. The command below uses the default values hard-coded into the debug versions of the ESP32 all-clusters-app to commission it onto a Wi-Fi network: - $ .out/debug/chip-tool pairing ble-wifi 12344321 ${SSID} ${PASSWORD} 20202021 3840 + $ ./out/debug/chip-tool pairing ble-wifi 12344321 ${SSID} ${PASSWORD} 20202021 3840 Parameters: From 251d99a417b72eafb58dd553c826f0bae5549a99 Mon Sep 17 00:00:00 2001 From: Carol Yang Date: Fri, 14 Jan 2022 07:41:04 -0800 Subject: [PATCH 015/124] [OTA] QueryImageResponse status reflects command line input (#13565) --- examples/ota-provider-app/linux/main.cpp | 4 ++-- .../ota-provider-common/OTAProviderExample.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/ota-provider-app/linux/main.cpp b/examples/ota-provider-app/linux/main.cpp index 2f749324d5399a..9242ab780e41ce 100644 --- a/examples/ota-provider-app/linux/main.cpp +++ b/examples/ota-provider-app/linux/main.cpp @@ -54,7 +54,7 @@ constexpr uint16_t kOptionQueryImageBehavior = 'q'; constexpr uint16_t kOptionDelayedActionTimeSec = 'd'; // Global variables used for passing the CLI arguments to the OTAProviderExample object -OTAProviderExample::queryImageBehaviorType gQueryImageBehavior = OTAProviderExample::kRespondWithUpdateAvailable; +OTAProviderExample::QueryImageBehaviorType gQueryImageBehavior = OTAProviderExample::kRespondWithUpdateAvailable; uint32_t gDelayedActionTimeSec = 0; const char * gOtaFilepath = nullptr; @@ -91,7 +91,7 @@ bool HandleOptions(const char * aProgram, OptionSet * aOptions, int aIdentifier, } else if (strcmp(aValue, "UpdateNotAvailable") == 0) { - gQueryImageBehavior = OTAProviderExample::kRespondWithUpdateAvailable; + gQueryImageBehavior = OTAProviderExample::kRespondWithNotAvailable; } else { diff --git a/examples/ota-provider-app/ota-provider-common/OTAProviderExample.h b/examples/ota-provider-app/ota-provider-common/OTAProviderExample.h index 67e4a70e277282..1645e9dc6f66e2 100644 --- a/examples/ota-provider-app/ota-provider-common/OTAProviderExample.h +++ b/examples/ota-provider-app/ota-provider-common/OTAProviderExample.h @@ -44,19 +44,19 @@ class OTAProviderExample : public chip::app::Clusters::OTAProviderDelegate chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::DecodableType & commandData) override; - enum queryImageBehaviorType + enum QueryImageBehaviorType { kRespondWithUpdateAvailable, kRespondWithBusy, kRespondWithNotAvailable }; - void SetQueryImageBehavior(queryImageBehaviorType behavior) { mQueryImageBehavior = behavior; } + void SetQueryImageBehavior(QueryImageBehaviorType behavior) { mQueryImageBehavior = behavior; } void SetDelayedActionTimeSec(uint32_t time) { mDelayedActionTimeSec = time; } private: BdxOtaSender mBdxOtaSender; static constexpr size_t kFilepathBufLen = 256; char mOTAFilePath[kFilepathBufLen]; // null-terminated - queryImageBehaviorType mQueryImageBehavior; + QueryImageBehaviorType mQueryImageBehavior; uint32_t mDelayedActionTimeSec; }; From 1a4a06160613c23f8ed451944df899c7f2441bbe Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 14 Jan 2022 10:44:54 -0500 Subject: [PATCH 016/124] Remove manufacturer code from attribute-table APIs. (#13560) --- examples/bridge-app/esp32/main/main.cpp | 8 +- examples/bridge-app/linux/main.cpp | 14 +- src/app/reporting/reporting.h | 2 +- src/app/util/af.h | 77 +------ src/app/util/attribute-table.cpp | 208 ++---------------- src/app/util/attribute-table.h | 13 +- .../util/ember-compatibility-functions.cpp | 5 +- src/app/util/util.cpp | 27 +-- src/app/util/util.h | 2 - .../templates/app/callback-stub-src.zapt | 2 +- .../zap-templates/templates/app/callback.zapt | 2 +- .../zap-generated/callback-stub.cpp | 2 +- .../app-common/zap-generated/callback.h | 2 +- .../zap-generated/callback-stub.cpp | 2 +- .../zap-generated/callback-stub.cpp | 2 +- .../zap-generated/callback-stub.cpp | 2 +- .../zap-generated/callback-stub.cpp | 2 +- .../lock-app/zap-generated/callback-stub.cpp | 2 +- .../zap-generated/callback-stub.cpp | 2 +- .../zap-generated/callback-stub.cpp | 2 +- .../zap-generated/callback-stub.cpp | 2 +- .../app1/zap-generated/callback-stub.cpp | 2 +- .../app2/zap-generated/callback-stub.cpp | 2 +- .../pump-app/zap-generated/callback-stub.cpp | 2 +- .../zap-generated/callback-stub.cpp | 2 +- .../zap-generated/callback-stub.cpp | 2 +- .../zap-generated/callback-stub.cpp | 2 +- .../tv-app/zap-generated/callback-stub.cpp | 2 +- .../zap-generated/callback-stub.cpp | 2 +- .../zap-generated/callback-stub.cpp | 2 +- 30 files changed, 65 insertions(+), 333 deletions(-) diff --git a/examples/bridge-app/esp32/main/main.cpp b/examples/bridge-app/esp32/main/main.cpp index 33aee02b2d2900..b80795b56c7821 100644 --- a/examples/bridge-app/esp32/main/main.cpp +++ b/examples/bridge-app/esp32/main/main.cpp @@ -308,7 +308,7 @@ void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask) { uint8_t reachable = dev->IsReachable() ? 1 : 0; MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID, - ZCL_REACHABLE_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, 0, ZCL_BOOLEAN_ATTRIBUTE_TYPE, + ZCL_REACHABLE_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, ZCL_BOOLEAN_ATTRIBUTE_TYPE, &reachable); } @@ -316,7 +316,7 @@ void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask) { uint8_t isOn = dev->IsOn() ? 1 : 0; MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, - CLUSTER_MASK_SERVER, 0, ZCL_BOOLEAN_ATTRIBUTE_TYPE, &isOn); + CLUSTER_MASK_SERVER, ZCL_BOOLEAN_ATTRIBUTE_TYPE, &isOn); } if (itemChangedMask & Device::kChanged_Name) @@ -324,7 +324,7 @@ void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask) uint8_t zclName[kNodeLabelSize + 1]; ToZclCharString(zclName, dev->GetName(), kNodeLabelSize); MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID, - ZCL_NODE_LABEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, 0, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, + ZCL_NODE_LABEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, zclName); } if (itemChangedMask & Device::kChanged_Location) @@ -337,7 +337,7 @@ void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask) EncodeFixedLabel("room", dev->GetLocation(), buffer, sizeof(buffer), &am); MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_FIXED_LABEL_CLUSTER_ID, ZCL_LABEL_LIST_ATTRIBUTE_ID, - CLUSTER_MASK_SERVER, 0, ZCL_ARRAY_ATTRIBUTE_TYPE, buffer); + CLUSTER_MASK_SERVER, ZCL_ARRAY_ATTRIBUTE_TYPE, buffer); } } diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index f6d7814d38f250..fa250dc4c276fb 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -259,7 +259,7 @@ void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask) { uint8_t reachable = dev->IsReachable() ? 1 : 0; MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID, - ZCL_REACHABLE_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, 0, ZCL_BOOLEAN_ATTRIBUTE_TYPE, + ZCL_REACHABLE_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, ZCL_BOOLEAN_ATTRIBUTE_TYPE, &reachable); } @@ -269,7 +269,7 @@ void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask) MutableByteSpan zclNameSpan(zclName); MakeZclCharString(zclNameSpan, dev->GetName()); MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID, - ZCL_NODE_LABEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, 0, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, + ZCL_NODE_LABEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, zclNameSpan.data()); } @@ -283,7 +283,7 @@ void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask) EncodeFixedLabel("room", dev->GetLocation(), buffer, sizeof(buffer), &am); MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_FIXED_LABEL_CLUSTER_ID, ZCL_LABEL_LIST_ATTRIBUTE_ID, - CLUSTER_MASK_SERVER, 0, ZCL_ARRAY_ATTRIBUTE_TYPE, buffer); + CLUSTER_MASK_SERVER, ZCL_ARRAY_ATTRIBUTE_TYPE, buffer); } } @@ -298,7 +298,7 @@ void HandleDeviceOnOffStatusChanged(DeviceOnOff * dev, DeviceOnOff::Changed_t it { uint8_t isOn = dev->IsOn() ? 1 : 0; MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, - CLUSTER_MASK_SERVER, 0, ZCL_BOOLEAN_ATTRIBUTE_TYPE, &isOn); + CLUSTER_MASK_SERVER, ZCL_BOOLEAN_ATTRIBUTE_TYPE, &isOn); } } @@ -313,21 +313,21 @@ void HandleDeviceSwitchStatusChanged(DeviceSwitch * dev, DeviceSwitch::Changed_t { uint8_t numberOfPositions = dev->GetNumberOfPositions(); MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_SWITCH_CLUSTER_ID, ZCL_NUMBER_OF_POSITIONS_ATTRIBUTE_ID, - CLUSTER_MASK_SERVER, 0, ZCL_INT8U_ATTRIBUTE_TYPE, &numberOfPositions); + CLUSTER_MASK_SERVER, ZCL_INT8U_ATTRIBUTE_TYPE, &numberOfPositions); } if (itemChangedMask & DeviceSwitch::kChanged_CurrentPosition) { uint8_t currentPosition = dev->GetCurrentPosition(); MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_SWITCH_CLUSTER_ID, ZCL_CURRENT_POSITION_ATTRIBUTE_ID, - CLUSTER_MASK_SERVER, 0, ZCL_INT8U_ATTRIBUTE_TYPE, ¤tPosition); + CLUSTER_MASK_SERVER, ZCL_INT8U_ATTRIBUTE_TYPE, ¤tPosition); } if (itemChangedMask & DeviceSwitch::kChanged_MultiPressMax) { uint8_t multiPressMax = dev->GetMultiPressMax(); MatterReportingAttributeChangeCallback(dev->GetEndpointId(), ZCL_SWITCH_CLUSTER_ID, ZCL_MULTI_PRESS_MAX_ATTRIBUTE_ID, - CLUSTER_MASK_SERVER, 0, ZCL_INT8U_ATTRIBUTE_TYPE, &multiPressMax); + CLUSTER_MASK_SERVER, ZCL_INT8U_ATTRIBUTE_TYPE, &multiPressMax); } } diff --git a/src/app/reporting/reporting.h b/src/app/reporting/reporting.h index f6294c0455cee7..c1bda681fbade5 100644 --- a/src/app/reporting/reporting.h +++ b/src/app/reporting/reporting.h @@ -50,7 +50,7 @@ * notification to inform its reporting decisions. */ void MatterReportingAttributeChangeCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, - uint8_t mask, uint16_t manufacturerCode, EmberAfAttributeType type, uint8_t * data); + uint8_t mask, EmberAfAttributeType type, uint8_t * data); /* * Same but with just an attribute path and no data available. diff --git a/src/app/util/af.h b/src/app/util/af.h index 1f45e318abddc7..3174acfbd8925f 100644 --- a/src/app/util/af.h +++ b/src/app/util/af.h @@ -153,8 +153,6 @@ bool emberAfContainsClient(chip::EndpointId endpoint, chip::ClusterId clusterId) * to perform the given operation. * * @see emberAfWriteClientAttribute, emberAfWriteServerAttribute, - * emberAfWriteManufacturerSpecificClientAttribute, - * emberAfWriteManufacturerSpecificServerAttribute */ EmberAfStatus emberAfWriteAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, chip::AttributeId attributeID, uint8_t mask, uint8_t * dataPtr, EmberAfAttributeType dataType); @@ -168,8 +166,6 @@ EmberAfStatus emberAfWriteAttribute(chip::EndpointId endpoint, chip::ClusterId c * is used frequently throughout the framework * * @see emberAfWriteClientAttribute, - * emberAfWriteManufacturerSpecificClientAttribute, - * emberAfWriteManufacturerSpecificServerAttribute */ EmberAfStatus emberAfWriteServerAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, chip::AttributeId attributeID, uint8_t * dataPtr, EmberAfAttributeType dataType); @@ -183,44 +179,10 @@ EmberAfStatus emberAfWriteServerAttribute(chip::EndpointId endpoint, chip::Clust * is used frequently throughout the framework * * @see emberAfWriteServerAttribute, - * emberAfWriteManufacturerSpecificClientAttribute, - * emberAfWriteManufacturerSpecificServerAttribute */ EmberAfStatus emberAfWriteClientAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, chip::AttributeId attributeID, uint8_t * dataPtr, EmberAfAttributeType dataType); -/** - * @brief write a manufacturer specific server attribute. - * - * This function is the same as emberAfWriteAttribute - * except that it saves having to pass the cluster mask - * and allows passing of a manufacturer code. - * This is useful for code savings since write attribute - * is used frequently throughout the framework - * - * @see emberAfWriteClientAttribute, emberAfWriteServerAttribute, - * emberAfWriteManufacturerSpecificClientAttribute - */ -EmberAfStatus emberAfWriteManufacturerSpecificServerAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, - chip::AttributeId attributeID, uint16_t manufacturerCode, - uint8_t * dataPtr, EmberAfAttributeType dataType); - -/** - * @brief write a manufacturer specific client attribute. - * - * This function is the same as emberAfWriteAttribute - * except that it saves having to pass the cluster mask. - * and allows passing of a manufacturer code. - * This is useful for code savings since write attribute - * is used frequently throughout the framework - * - * @see emberAfWriteClientAttribute, emberAfWriteServerAttribute, - * emberAfWriteManufacturerSpecificServerAttribute - */ -EmberAfStatus emberAfWriteManufacturerSpecificClientAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, - chip::AttributeId attributeID, uint16_t manufacturerCode, - uint8_t * dataPtr, EmberAfAttributeType dataType); - /** * @brief Function that test the success of attribute write. * @@ -236,8 +198,7 @@ EmberAfStatus emberAfWriteManufacturerSpecificClientAttribute(chip::EndpointId e * @param dataType ZCL attribute type. */ EmberAfStatus emberAfVerifyAttributeWrite(chip::EndpointId endpoint, chip::ClusterId cluster, chip::AttributeId attributeID, - uint8_t mask, uint16_t manufacturerCode, uint8_t * dataPtr, - EmberAfAttributeType dataType); + uint8_t mask, uint8_t * dataPtr, EmberAfAttributeType dataType); /** * @brief Read the attribute value, performing all the checks. @@ -248,8 +209,6 @@ EmberAfStatus emberAfVerifyAttributeWrite(chip::EndpointId endpoint, chip::Clust * value or type is not desired. * * @see emberAfReadClientAttribute, emberAfReadServerAttribute, - * emberAfReadManufacturerSpecificClientAttribute, - * emberAfReadManufacturerSpecificServerAttribute */ EmberAfStatus emberAfReadAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, chip::AttributeId attributeID, uint8_t mask, uint8_t * dataPtr, uint16_t readLength, EmberAfAttributeType * dataType); @@ -263,8 +222,6 @@ EmberAfStatus emberAfReadAttribute(chip::EndpointId endpoint, chip::ClusterId cl * value or type is not desired. * * @see emberAfReadClientAttribute, - * emberAfReadManufacturerSpecificClientAttribute, - * emberAfReadManufacturerSpecificServerAttribute */ EmberAfStatus emberAfReadServerAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, chip::AttributeId attributeID, uint8_t * dataPtr, uint16_t readLength); @@ -278,42 +235,10 @@ EmberAfStatus emberAfReadServerAttribute(chip::EndpointId endpoint, chip::Cluste * value or type is not desired. * * @see emberAfReadServerAttribute, - * emberAfReadManufacturerSpecificClientAttribute, - * emberAfReadManufacturerSpecificServerAttribute */ EmberAfStatus emberAfReadClientAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, chip::AttributeId attributeID, uint8_t * dataPtr, uint16_t readLength); -/** - * @brief Read the manufacturer-specific server attribute value, performing all checks. - * - * This function will attempt to read the attribute and store - * it into the pointer. It will also read the data type. - * Both dataPtr and dataType may be NULL, signifying that either - * value or type is not desired. - * - * @see emberAfReadClientAttribute, emberAfReadServerAttribute, - * emberAfReadManufacturerSpecificClientAttribute - */ -EmberAfStatus emberAfReadManufacturerSpecificServerAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, - chip::AttributeId attributeID, uint16_t manufacturerCode, - uint8_t * dataPtr, uint16_t readLength); - -/** - * @brief Read the manufacturer-specific client attribute value, performing all checks. - * - * This function will attempt to read the attribute and store - * it into the pointer. It will also read the data type. - * Both dataPtr and dataType may be NULL, signifying that either - * value or type is not desired. - * - * @see emberAfReadClientAttribute, emberAfReadServerAttribute, - * emberAfReadManufacturerSpecificServerAttribute - */ -EmberAfStatus emberAfReadManufacturerSpecificClientAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, - chip::AttributeId attributeID, uint16_t manufacturerCode, - uint8_t * dataPtr, uint16_t readLength); - /** * @brief this function returns the size of the ZCL data in bytes. * diff --git a/src/app/util/attribute-table.cpp b/src/app/util/attribute-table.cpp index 28f58cd504b91e..d3c2473e8ff64a 100644 --- a/src/app/util/attribute-table.cpp +++ b/src/app/util/attribute-table.cpp @@ -69,17 +69,17 @@ using namespace chip; // Globals EmberAfStatus emberAfWriteAttributeExternal(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t mask, - uint16_t manufacturerCode, uint8_t * dataPtr, EmberAfAttributeType dataType) + uint8_t * dataPtr, EmberAfAttributeType dataType) { EmberAfAttributeWritePermission extWritePermission = - emberAfAllowNetworkWriteAttributeCallback(endpoint, cluster, attributeID, mask, manufacturerCode, dataPtr, dataType); + emberAfAllowNetworkWriteAttributeCallback(endpoint, cluster, attributeID, mask, dataPtr, dataType); switch (extWritePermission) { case EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_DENY_WRITE: return EMBER_ZCL_STATUS_FAILURE; case EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL: case EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_OF_READ_ONLY: - return emAfWriteAttribute(endpoint, cluster, attributeID, mask, manufacturerCode, dataPtr, dataType, + return emAfWriteAttribute(endpoint, cluster, attributeID, mask, dataPtr, dataType, (extWritePermission == EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_OF_READ_ONLY), false); default: return (EmberAfStatus) extWritePermission; @@ -90,7 +90,7 @@ EmberAfStatus emberAfWriteAttributeExternal(EndpointId endpoint, ClusterId clust EmberAfStatus emberAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t mask, uint8_t * dataPtr, EmberAfAttributeType dataType) { - return emAfWriteAttribute(endpoint, cluster, attributeID, mask, EMBER_AF_NULL_MANUFACTURER_CODE, dataPtr, dataType, + return emAfWriteAttribute(endpoint, cluster, attributeID, mask, dataPtr, dataType, true, // override read-only? false); // just test? } @@ -98,8 +98,7 @@ EmberAfStatus emberAfWriteAttribute(EndpointId endpoint, ClusterId cluster, Attr EmberAfStatus emberAfWriteClientAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t * dataPtr, EmberAfAttributeType dataType) { - return emAfWriteAttribute(endpoint, cluster, attributeID, CLUSTER_MASK_CLIENT, EMBER_AF_NULL_MANUFACTURER_CODE, dataPtr, - dataType, + return emAfWriteAttribute(endpoint, cluster, attributeID, CLUSTER_MASK_CLIENT, dataPtr, dataType, true, // override read-only? false); // just test? } @@ -107,34 +106,15 @@ EmberAfStatus emberAfWriteClientAttribute(EndpointId endpoint, ClusterId cluster EmberAfStatus emberAfWriteServerAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t * dataPtr, EmberAfAttributeType dataType) { - return emAfWriteAttribute(endpoint, cluster, attributeID, CLUSTER_MASK_SERVER, EMBER_AF_NULL_MANUFACTURER_CODE, dataPtr, - dataType, - true, // override read-only? - false); // just test? -} - -EmberAfStatus emberAfWriteManufacturerSpecificClientAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, - uint16_t manufacturerCode, uint8_t * dataPtr, - EmberAfAttributeType dataType) -{ - return emAfWriteAttribute(endpoint, cluster, attributeID, CLUSTER_MASK_CLIENT, manufacturerCode, dataPtr, dataType, - true, // override read-only? - false); // just test? -} - -EmberAfStatus emberAfWriteManufacturerSpecificServerAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, - uint16_t manufacturerCode, uint8_t * dataPtr, - EmberAfAttributeType dataType) -{ - return emAfWriteAttribute(endpoint, cluster, attributeID, CLUSTER_MASK_SERVER, manufacturerCode, dataPtr, dataType, + return emAfWriteAttribute(endpoint, cluster, attributeID, CLUSTER_MASK_SERVER, dataPtr, dataType, true, // override read-only? false); // just test? } EmberAfStatus emberAfVerifyAttributeWrite(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t mask, - uint16_t manufacturerCode, uint8_t * dataPtr, EmberAfAttributeType dataType) + uint8_t * dataPtr, EmberAfAttributeType dataType) { - return emAfWriteAttribute(endpoint, cluster, attributeID, mask, manufacturerCode, dataPtr, dataType, + return emAfWriteAttribute(endpoint, cluster, attributeID, mask, dataPtr, dataType, false, // override read-only? true); // just test? } @@ -142,39 +122,25 @@ EmberAfStatus emberAfVerifyAttributeWrite(EndpointId endpoint, ClusterId cluster EmberAfStatus emberAfReadAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t mask, uint8_t * dataPtr, uint16_t readLength, EmberAfAttributeType * dataType) { - return emAfReadAttribute(endpoint, cluster, attributeID, mask, EMBER_AF_NULL_MANUFACTURER_CODE, dataPtr, readLength, dataType); + return emAfReadAttribute(endpoint, cluster, attributeID, mask, dataPtr, readLength, dataType); } EmberAfStatus emberAfReadServerAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t * dataPtr, uint16_t readLength) { - return emAfReadAttribute(endpoint, cluster, attributeID, CLUSTER_MASK_SERVER, EMBER_AF_NULL_MANUFACTURER_CODE, dataPtr, - readLength, NULL); + return emAfReadAttribute(endpoint, cluster, attributeID, CLUSTER_MASK_SERVER, dataPtr, readLength, NULL); } EmberAfStatus emberAfReadClientAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t * dataPtr, uint16_t readLength) { - return emAfReadAttribute(endpoint, cluster, attributeID, CLUSTER_MASK_CLIENT, EMBER_AF_NULL_MANUFACTURER_CODE, dataPtr, - readLength, NULL); + return emAfReadAttribute(endpoint, cluster, attributeID, CLUSTER_MASK_CLIENT, dataPtr, readLength, NULL); } -EmberAfStatus emberAfReadManufacturerSpecificServerAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, - uint16_t manufacturerCode, uint8_t * dataPtr, uint16_t readLength) -{ - return emAfReadAttribute(endpoint, cluster, attributeID, CLUSTER_MASK_SERVER, manufacturerCode, dataPtr, readLength, NULL); -} - -EmberAfStatus emberAfReadManufacturerSpecificClientAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, - uint16_t manufacturerCode, uint8_t * dataPtr, uint16_t readLength) -{ - return emAfReadAttribute(endpoint, cluster, attributeID, CLUSTER_MASK_CLIENT, manufacturerCode, dataPtr, readLength, NULL); -} - -static void emberAfAttributeDecodeAndPrintCluster(ClusterId cluster, uint16_t mfgCode) +static void emberAfAttributeDecodeAndPrintCluster(ClusterId cluster) { #if defined(EMBER_AF_PRINT_ENABLE) && defined(EMBER_AF_PRINT_ATTRIBUTES) - uint16_t index = emberAfFindClusterNameIndexWithMfgCode(cluster, mfgCode); + uint16_t index = emberAfFindClusterNameIndex(cluster); if (index != 0xFFFF) { emberAfAttributesPrintln("(%p)", zclClusterNames[index].name); @@ -219,8 +185,8 @@ void emberAfPrintAttributeTable(void) (metaData->IsNonVolatile() ? " nonvolatile " : (metaData->IsExternal() ? " extern " : " RAM "))); emberAfAttributesFlush(); status = emAfReadAttribute(ep->endpoint, cluster->clusterId, metaData->attributeId, - (emberAfAttributeIsClient(metaData) ? CLUSTER_MASK_CLIENT : CLUSTER_MASK_SERVER), - EMBER_AF_NULL_MANUFACTURER_CODE, data, ATTRIBUTE_LARGEST, NULL); + (emberAfAttributeIsClient(metaData) ? CLUSTER_MASK_CLIENT : CLUSTER_MASK_SERVER), data, + ATTRIBUTE_LARGEST, NULL); if (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) { emberAfAttributesPrintln("Unsupported"); @@ -243,7 +209,7 @@ void emberAfPrintAttributeTable(void) UNUSED_VAR(length); emberAfAttributesPrintBuffer(data, length, true); emberAfAttributesFlush(); - emberAfAttributeDecodeAndPrintCluster(cluster->clusterId, EMBER_AF_NULL_MANUFACTURER_CODE); + emberAfAttributeDecodeAndPrintCluster(cluster->clusterId); } } } @@ -251,137 +217,6 @@ void emberAfPrintAttributeTable(void) } } -// given a clusterId and an attribute to read, this crafts the response -// and places it in the response buffer. Response is one of two items: -// 1) unsupported: [attrId:2] [status:1] -// 2) supported: [attrId:2] [status:1] [type:1] [data:n] -// -void emberAfRetrieveAttributeAndCraftResponse(EndpointId endpoint, ClusterId clusterId, AttributeId attrId, uint8_t mask, - uint16_t manufacturerCode, uint16_t readLength) -{ - EmberAfStatus status; - uint8_t data[ATTRIBUTE_LARGEST]; - uint8_t dataType; - uint16_t dataLen; - - // account for at least one byte of data - if (readLength < 5) - { - return; - } - - emberAfAttributesPrintln("OTA READ: ep:%" PRIx16 " cid:" ChipLogFormatMEI " attid:" ChipLogFormatMEI " msk:%x mfcode:%2x", - endpoint, ChipLogValueMEI(clusterId), ChipLogValueMEI(attrId), mask, manufacturerCode); - - // lookup the attribute in our table - status = emAfReadAttribute(endpoint, clusterId, attrId, mask, manufacturerCode, data, ATTRIBUTE_LARGEST, &dataType); - if (status == EMBER_ZCL_STATUS_SUCCESS) - { - dataLen = emberAfAttributeValueSize(clusterId, attrId, dataType, data); - if ((readLength - 4) < dataLen) - { // Not enough space for attribute. - return; - } - } - else - { - emberAfPutInt32uInResp(attrId); - emberAfPutStatusInResp(status); - emberAfAttributesPrintln("READ: clus " ChipLogFormatMEI ", attr " ChipLogFormatMEI " failed %x", ChipLogValueMEI(clusterId), - ChipLogValueMEI(attrId), status); - emberAfAttributesFlush(); - return; - } - - // put attribute in least sig byte first - emberAfPutInt32uInResp(attrId); - - // attribute is found, so copy in the status and the data type - emberAfPutInt8uInResp(EMBER_ZCL_STATUS_SUCCESS); - emberAfPutInt8uInResp(dataType); - - if (dataLen < (EMBER_AF_RESPONSE_BUFFER_LEN - appResponseLength)) - { -#if (BIGENDIAN_CPU) - // strings go over the air as length byte and then in human - // readable format. These should not be flipped. Other attributes - // need to be flipped so they go little endian OTA - if (isThisDataTypeSentLittleEndianOTA(dataType)) - { - uint8_t i; - for (i = 0; i < dataLen; i++) - { - appResponseData[appResponseLength + i] = data[dataLen - i - 1]; - } - } - else - { - memmove(&(appResponseData[appResponseLength]), data, dataLen); - } -#else //(BIGENDIAN_CPU) - memmove(&(appResponseData[appResponseLength]), data, dataLen); -#endif //(BIGENDIAN_CPU) - // TODO: How do we know this does not overflow? - appResponseLength = static_cast(appResponseLength + dataLen); - } - - emberAfAttributesPrintln("READ: clus " ChipLogFormatMEI ", attr " ChipLogFormatMEI ", dataLen: %x, OK", - ChipLogValueMEI(clusterId), ChipLogValueMEI(attrId), dataLen); - emberAfAttributesFlush(); -} - -// This function appends the attribute report fields for the given endpoint, -// cluster, and attribute to the buffer starting at the index. If there is -// insufficient space in the buffer or an error occurs, buffer and bufIndex will -// remain unchanged. Otherwise, bufIndex will be incremented appropriately and -// the fields will be written to the buffer. -EmberAfStatus emberAfAppendAttributeReportFields(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint8_t * buffer, uint8_t bufLen, uint8_t * bufIndex) -{ - EmberAfStatus status; - EmberAfAttributeType type; - uint16_t size; - uint16_t bufLen16 = (uint16_t) bufLen; - uint8_t data[ATTRIBUTE_LARGEST]; - - status = emberAfReadAttribute(endpoint, clusterId, attributeId, mask, data, sizeof(data), &type); - if (status != EMBER_ZCL_STATUS_SUCCESS) - { - goto kickout; - } - - size = emberAfAttributeValueSize(clusterId, attributeId, type, data); - if (bufLen16 - *bufIndex < 3 || size > bufLen16 - (*bufIndex + 3)) - { - status = EMBER_ZCL_STATUS_INSUFFICIENT_SPACE; - goto kickout; - } - - buffer[(*bufIndex)++] = EMBER_LOW_BYTE(attributeId); - buffer[(*bufIndex)++] = EMBER_HIGH_BYTE(attributeId); - buffer[(*bufIndex)++] = type; -#if (BIGENDIAN_CPU) - if (isThisDataTypeSentLittleEndianOTA(type)) - { - emberReverseMemCopy(buffer + *bufIndex, data, size); - } - else - { - memmove(buffer + *bufIndex, data, size); - } -#else - memmove(buffer + *bufIndex, data, size); -#endif - *bufIndex = static_cast(*bufIndex + size); - -kickout: - emberAfAttributesPrintln("REPORT: clus " ChipLogFormatMEI ", attr " ChipLogFormatMEI ": 0x%x", ChipLogValueMEI(clusterId), - ChipLogValueMEI(attributeId), status); - emberAfAttributesFlush(); - - return status; -} - //------------------------------------------------------------------------------ // Internal Functions @@ -462,9 +297,8 @@ static bool IsNullValue(const uint8_t * data, uint16_t dataLen, bool isAttribute // the table or the data is too large, returns true and writes to dataPtr // if the attribute is supported and the readLength specified is less than // the length of the data. -EmberAfStatus emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t mask, - uint16_t manufacturerCode, uint8_t * data, EmberAfAttributeType dataType, - bool overrideReadOnlyAndDataType, bool justTest) +EmberAfStatus emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t mask, uint8_t * data, + EmberAfAttributeType dataType, bool overrideReadOnlyAndDataType, bool justTest) { EmberAfAttributeMetadata * metadata = NULL; EmberAfAttributeSearchRecord record; @@ -583,7 +417,7 @@ EmberAfStatus emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, Attribu // The callee will weed out attributes that do not need to be stored. emAfSaveAttributeToStorageIfNeeded(data, endpoint, cluster, metadata); - MatterReportingAttributeChangeCallback(endpoint, cluster, attributeID, mask, manufacturerCode, dataType, data); + MatterReportingAttributeChangeCallback(endpoint, cluster, attributeID, mask, dataType, data); // Post write attribute callback for all attributes changes, regardless // of cluster. @@ -608,8 +442,8 @@ EmberAfStatus emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, Attribu // If dataPtr is NULL, no data is copied to the caller. // readLength should be 0 in that case. -EmberAfStatus emAfReadAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t mask, - uint16_t manufacturerCode, uint8_t * dataPtr, uint16_t readLength, EmberAfAttributeType * dataType) +EmberAfStatus emAfReadAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t mask, uint8_t * dataPtr, + uint16_t readLength, EmberAfAttributeType * dataType) { EmberAfAttributeMetadata * metadata = NULL; EmberAfAttributeSearchRecord record; diff --git a/src/app/util/attribute-table.h b/src/app/util/attribute-table.h index d623b2543b2d43..fbae46ac559be6 100644 --- a/src/app/util/attribute-table.h +++ b/src/app/util/attribute-table.h @@ -47,19 +47,12 @@ // Remote devices writing attributes of local device EmberAfStatus emberAfWriteAttributeExternal(chip::EndpointId endpoint, chip::ClusterId cluster, chip::AttributeId attributeID, - uint8_t mask, uint16_t manufacturerCode, uint8_t * dataPtr, - EmberAfAttributeType dataType); + uint8_t mask, uint8_t * dataPtr, EmberAfAttributeType dataType); -void emberAfRetrieveAttributeAndCraftResponse(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attrId, - uint8_t mask, uint16_t manufacturerCode, uint16_t readLength); -EmberAfStatus emberAfAppendAttributeReportFields(chip::EndpointId endpoint, chip::ClusterId clusterId, - chip::AttributeId attributeId, uint8_t mask, uint8_t * buffer, uint8_t bufLen, - uint8_t * bufIndex); void emberAfPrintAttributeTable(void); EmberAfStatus emAfWriteAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, chip::AttributeId attributeID, uint8_t mask, - uint16_t manufacturerCode, uint8_t * data, EmberAfAttributeType dataType, - bool overrideReadOnlyAndDataType, bool justTest); + uint8_t * data, EmberAfAttributeType dataType, bool overrideReadOnlyAndDataType, bool justTest); EmberAfStatus emAfReadAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, chip::AttributeId attributeID, uint8_t mask, - uint16_t manufacturerCode, uint8_t * dataPtr, uint16_t readLength, EmberAfAttributeType * dataType); + uint8_t * dataPtr, uint16_t readLength, EmberAfAttributeType * dataType); diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index 3b76151fb3d863..369f3d0c343e55 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -894,7 +894,7 @@ CHIP_ERROR WriteSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, } auto status = ToInteractionModelStatus(emberAfWriteAttributeExternal(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId, - CLUSTER_MASK_SERVER, 0, attributeData, + CLUSTER_MASK_SERVER, attributeData, attributeMetadata->attributeType)); return apWriteHandler->AddStatus(attributePathParams, status); } @@ -903,9 +903,8 @@ CHIP_ERROR WriteSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, } // namespace chip void MatterReportingAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, EmberAfAttributeType type, uint8_t * data) + EmberAfAttributeType type, uint8_t * data) { - IgnoreUnusedVariable(manufacturerCode); IgnoreUnusedVariable(type); IgnoreUnusedVariable(data); IgnoreUnusedVariable(mask); diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index 06add3f7ee01d4..55850c493e80ea 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -325,20 +325,13 @@ void emberAfStackDown(void) // Print out information about each cluster // **************************************** -uint16_t emberAfFindClusterNameIndexWithMfgCode(ClusterId cluster, uint16_t mfgCode) +uint16_t emberAfFindClusterNameIndex(ClusterId cluster) { static_assert(sizeof(ClusterId) == 4, "May need to adjust our index type or somehow define it in terms of cluster id type"); uint16_t index = 0; while (zclClusterNames[index].id != ZCL_NULL_CLUSTER_ID) { - if (zclClusterNames[index].id == cluster - // This check sees if its a standard cluster, in which mfgCode is ignored - // due to the name being well defined. - // If it is manufacturer specific, then we try to check to see if we - // know the name of the cluster within the list. - // If the mfgCode we are given is null, then we just ignore it for backward - // compatibility reasons - && (cluster < 0xFC00 || zclClusterNames[index].mfgCode == mfgCode || mfgCode == EMBER_AF_NULL_MANUFACTURER_CODE)) + if (zclClusterNames[index].id == cluster) { return index; } @@ -347,16 +340,11 @@ uint16_t emberAfFindClusterNameIndexWithMfgCode(ClusterId cluster, uint16_t mfgC return 0xFFFF; } -uint16_t emberAfFindClusterNameIndex(ClusterId cluster) -{ - return emberAfFindClusterNameIndexWithMfgCode(cluster, EMBER_AF_NULL_MANUFACTURER_CODE); -} - // This function parses into the cluster name table, and tries to find -// the index in the table that has the two keys: cluster + mfgcode. -void emberAfDecodeAndPrintClusterWithMfgCode(ClusterId cluster, uint16_t mfgCode) +// the index in the table that has the right cluster id. +void emberAfDecodeAndPrintCluster(ClusterId cluster) { - uint16_t index = emberAfFindClusterNameIndexWithMfgCode(cluster, mfgCode); + uint16_t index = emberAfFindClusterNameIndex(cluster); if (index == 0xFFFF) { static_assert(sizeof(ClusterId) == 4, "Adjust the print formatting"); @@ -368,11 +356,6 @@ void emberAfDecodeAndPrintClusterWithMfgCode(ClusterId cluster, uint16_t mfgCode } } -void emberAfDecodeAndPrintCluster(ClusterId cluster) -{ - emberAfDecodeAndPrintClusterWithMfgCode(cluster, EMBER_AF_NULL_MANUFACTURER_CODE); -} - // This function makes the assumption that // emberAfCurrentCommand will either be NULL // when invalid, or will have a valid mfgCode diff --git a/src/app/util/util.h b/src/app/util/util.h index 84def0875d2335..0ebbc750a45c38 100644 --- a/src/app/util/util.h +++ b/src/app/util/util.h @@ -145,11 +145,9 @@ uint16_t emberAfGetMfgCodeFromCurrentCommand(void); void emberAfInit(chip::Messaging::ExchangeManager * exchangeContext); void emberAfTick(void); uint16_t emberAfFindClusterNameIndex(chip::ClusterId cluster); -uint16_t emberAfFindClusterNameIndexWithMfgCode(chip::ClusterId cluster, uint16_t mfgCode); void emberAfStackDown(void); void emberAfDecodeAndPrintCluster(chip::ClusterId cluster); -void emberAfDecodeAndPrintClusterWithMfgCode(chip::ClusterId cluster, uint16_t mfgCode); /** * Retrieves the difference between the two passed values. diff --git a/src/app/zap-templates/templates/app/callback-stub-src.zapt b/src/app/zap-templates/templates/app/callback-stub-src.zapt index a3b874658246c6..129caa153d22eb 100644 --- a/src/app/zap-templates/templates/app/callback-stub-src.zapt +++ b/src/app/zap-templates/templates/app/callback-stub-src.zapt @@ -42,7 +42,7 @@ void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfAppli EmberAfAttributeWritePermission __attribute__((weak)) emberAfAllowNetworkWriteAttributeCallback( EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) + uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } diff --git a/src/app/zap-templates/templates/app/callback.zapt b/src/app/zap-templates/templates/app/callback.zapt index adfdb0553fff5e..7528d1d4130843 100644 --- a/src/app/zap-templates/templates/app/callback.zapt +++ b/src/app/zap-templates/templates/app/callback.zapt @@ -213,7 +213,7 @@ void emberAfRemoveFromCurrentAppTasksCallback(EmberAfApplicationTask tasks); */ EmberAfAttributeWritePermission emberAfAllowNetworkWriteAttributeCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type); + uint8_t * value, uint8_t type); /** @brief Attribute Read Access * diff --git a/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp b/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp index 3d5bf0ef4e2b03..669aad0bc0eb0c 100644 --- a/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp @@ -542,7 +542,7 @@ void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfAppli EmberAfAttributeWritePermission __attribute__((weak)) emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) + uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } 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 11d7eb7a353b61..9d208dd4b77cb9 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -15285,7 +15285,7 @@ void emberAfRemoveFromCurrentAppTasksCallback(EmberAfApplicationTask tasks); */ EmberAfAttributeWritePermission emberAfAllowNetworkWriteAttributeCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type); + uint8_t * value, uint8_t type); /** @brief Attribute Read Access * diff --git a/zzz_generated/bridge-app/zap-generated/callback-stub.cpp b/zzz_generated/bridge-app/zap-generated/callback-stub.cpp index db808e845ccbf2..80238761f1dba6 100644 --- a/zzz_generated/bridge-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/bridge-app/zap-generated/callback-stub.cpp @@ -190,7 +190,7 @@ void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfAppli EmberAfAttributeWritePermission __attribute__((weak)) emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) + uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } diff --git a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp index 553c4b2eace656..614b3f60bbfb8e 100644 --- a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp +++ b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp @@ -534,7 +534,7 @@ void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfAppli EmberAfAttributeWritePermission __attribute__((weak)) emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) + uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } diff --git a/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp b/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp index 91e0e39bba160a..c017282ef1cbe1 100644 --- a/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp @@ -190,7 +190,7 @@ void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfAppli EmberAfAttributeWritePermission __attribute__((weak)) emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) + uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } diff --git a/zzz_generated/lighting-app/zap-generated/callback-stub.cpp b/zzz_generated/lighting-app/zap-generated/callback-stub.cpp index 978e166c1c419c..174b1ba630740f 100644 --- a/zzz_generated/lighting-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/lighting-app/zap-generated/callback-stub.cpp @@ -238,7 +238,7 @@ void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfAppli EmberAfAttributeWritePermission __attribute__((weak)) emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) + uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } diff --git a/zzz_generated/lock-app/zap-generated/callback-stub.cpp b/zzz_generated/lock-app/zap-generated/callback-stub.cpp index 0ff68ab589c5c0..476be726134688 100644 --- a/zzz_generated/lock-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/lock-app/zap-generated/callback-stub.cpp @@ -190,7 +190,7 @@ void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfAppli EmberAfAttributeWritePermission __attribute__((weak)) emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) + uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } diff --git a/zzz_generated/log-source-app/zap-generated/callback-stub.cpp b/zzz_generated/log-source-app/zap-generated/callback-stub.cpp index 28ea38411726b0..b41bc5cc2758f5 100644 --- a/zzz_generated/log-source-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/log-source-app/zap-generated/callback-stub.cpp @@ -78,7 +78,7 @@ void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfAppli EmberAfAttributeWritePermission __attribute__((weak)) emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) + uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } diff --git a/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp b/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp index 970d17d71a9bb9..66285f85447034 100644 --- a/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp @@ -102,7 +102,7 @@ void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfAppli EmberAfAttributeWritePermission __attribute__((weak)) emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) + uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } diff --git a/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp b/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp index 500c51e856ba69..468a654cb7820f 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp @@ -118,7 +118,7 @@ void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfAppli EmberAfAttributeWritePermission __attribute__((weak)) emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) + uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } diff --git a/zzz_generated/placeholder/app1/zap-generated/callback-stub.cpp b/zzz_generated/placeholder/app1/zap-generated/callback-stub.cpp index 0b4cea00e38d0d..8f969cda28131c 100644 --- a/zzz_generated/placeholder/app1/zap-generated/callback-stub.cpp +++ b/zzz_generated/placeholder/app1/zap-generated/callback-stub.cpp @@ -142,7 +142,7 @@ void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfAppli EmberAfAttributeWritePermission __attribute__((weak)) emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) + uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } diff --git a/zzz_generated/placeholder/app2/zap-generated/callback-stub.cpp b/zzz_generated/placeholder/app2/zap-generated/callback-stub.cpp index 0b4cea00e38d0d..8f969cda28131c 100644 --- a/zzz_generated/placeholder/app2/zap-generated/callback-stub.cpp +++ b/zzz_generated/placeholder/app2/zap-generated/callback-stub.cpp @@ -142,7 +142,7 @@ void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfAppli EmberAfAttributeWritePermission __attribute__((weak)) emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) + uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } diff --git a/zzz_generated/pump-app/zap-generated/callback-stub.cpp b/zzz_generated/pump-app/zap-generated/callback-stub.cpp index 56c234f67b6905..c7b27ef1c08073 100644 --- a/zzz_generated/pump-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/pump-app/zap-generated/callback-stub.cpp @@ -198,7 +198,7 @@ void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfAppli EmberAfAttributeWritePermission __attribute__((weak)) emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) + uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } diff --git a/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp b/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp index b3ada25d6ddec5..ff093a6a8b0735 100644 --- a/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp @@ -214,7 +214,7 @@ void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfAppli EmberAfAttributeWritePermission __attribute__((weak)) emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) + uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } diff --git a/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp b/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp index ecf1610feb98f7..f00da99a372601 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp @@ -166,7 +166,7 @@ void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfAppli EmberAfAttributeWritePermission __attribute__((weak)) emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) + uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } diff --git a/zzz_generated/thermostat/zap-generated/callback-stub.cpp b/zzz_generated/thermostat/zap-generated/callback-stub.cpp index 5b349786749461..6639804cde08ba 100644 --- a/zzz_generated/thermostat/zap-generated/callback-stub.cpp +++ b/zzz_generated/thermostat/zap-generated/callback-stub.cpp @@ -222,7 +222,7 @@ void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfAppli EmberAfAttributeWritePermission __attribute__((weak)) emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) + uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } diff --git a/zzz_generated/tv-app/zap-generated/callback-stub.cpp b/zzz_generated/tv-app/zap-generated/callback-stub.cpp index 84e72526be3645..020e1eb2ea2a00 100644 --- a/zzz_generated/tv-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/tv-app/zap-generated/callback-stub.cpp @@ -310,7 +310,7 @@ void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfAppli EmberAfAttributeWritePermission __attribute__((weak)) emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) + uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } diff --git a/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp b/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp index 5e6947d605ad84..53e5806d7842f2 100644 --- a/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp @@ -438,7 +438,7 @@ void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfAppli EmberAfAttributeWritePermission __attribute__((weak)) emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) + uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } diff --git a/zzz_generated/window-app/zap-generated/callback-stub.cpp b/zzz_generated/window-app/zap-generated/callback-stub.cpp index b92b84140138dc..5415ccc97ce01e 100644 --- a/zzz_generated/window-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/window-app/zap-generated/callback-stub.cpp @@ -182,7 +182,7 @@ void __attribute__((weak)) emberAfRemoveFromCurrentAppTasksCallback(EmberAfAppli EmberAfAttributeWritePermission __attribute__((weak)) emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask, - uint16_t manufacturerCode, uint8_t * value, uint8_t type) + uint8_t * value, uint8_t type) { return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } From b42655a3cde10d18b2d04e46e8a90b7b3260ec06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Fri, 14 Jan 2022 16:55:41 +0100 Subject: [PATCH 017/124] [docker] Bump west version in nRF Connect Docker (#13583) --- integrations/docker/images/chip-build-nrf-platform/Dockerfile | 2 +- integrations/docker/images/chip-build/version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/docker/images/chip-build-nrf-platform/Dockerfile b/integrations/docker/images/chip-build-nrf-platform/Dockerfile index de3094203f9682..e73fac173e7795 100644 --- a/integrations/docker/images/chip-build-nrf-platform/Dockerfile +++ b/integrations/docker/images/chip-build-nrf-platform/Dockerfile @@ -29,7 +29,7 @@ WORKDIR /opt/NordicSemiconductor/nrfconnect RUN set -x \ && python3 -m pip install -U --no-cache-dir \ cmake==3.21.2 \ - west==0.11.1 \ + west==0.12.0 \ && west init -m https://github.com/nrfconnect/sdk-nrf \ && git -C nrf fetch origin "$NCS_REVISION" \ && git -C nrf checkout FETCH_HEAD \ diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version index 61483888eab895..4a9997ad0d2342 100644 --- a/integrations/docker/images/chip-build/version +++ b/integrations/docker/images/chip-build/version @@ -1 +1 @@ -0.5.47 Version bump reason: [Ameba] Revise build script for otar +0.5.48 Version bump reason: [nrf] Bump west version From 3b8a3c71e1143aa8e4fcf26af458a3ca38d7a59e Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 14 Jan 2022 08:36:26 -0800 Subject: [PATCH 018/124] Update build.yaml --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5834fa152089ba..295a4f32aa3490 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -240,7 +240,7 @@ jobs: scripts/run_in_build_env.sh '(cd src/controller/python/test/unit_tests/ && python3 -m unittest -v)' build_darwin: name: Build on Darwin (clang, python_lib, simulated) - timeout-minutes: 120 + timeout-minutes: 200 runs-on: macos-latest if: github.actor != 'restyled-io[bot]' From f12831df26b2abf0e8f6f5cf7d3bb857009631bf Mon Sep 17 00:00:00 2001 From: Marc Lepage <67919234+mlepage-google@users.noreply.github.com> Date: Fri, 14 Jan 2022 13:59:58 -0500 Subject: [PATCH 019/124] Hookup SubjectDescriptor in CommandHandler (#12953) Get the subject descriptor (from the exchange context session handle) in the command handler so an access control check can be performed before executing a command. Unit tests did not always provide an exchange context for tests of command interaction. This required some special handling for test cases in actual command handling code, and blocked cases (e.g. access control) which require an exchange context. So provide an exchange context even in test cases. --- src/app/CommandHandler.cpp | 9 +++++---- src/app/tests/TestCommandInteraction.cpp | 23 ++++++++++++----------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/app/CommandHandler.cpp b/src/app/CommandHandler.cpp index cabddbb1f8b57c..4a2b77aeb983cd 100644 --- a/src/app/CommandHandler.cpp +++ b/src/app/CommandHandler.cpp @@ -98,6 +98,8 @@ CHIP_ERROR CommandHandler::ProcessInvokeRequest(System::PacketBufferHandle && pa ReturnErrorOnFailure(invokeRequestMessage.GetTimedRequest(&mTimedRequest)); ReturnErrorOnFailure(invokeRequestMessage.GetInvokeRequests(&invokeRequests)); + VerifyOrReturnError(mpExchangeCtx != nullptr, CHIP_ERROR_INCORRECT_STATE); + if (mTimedRequest != isTimedInvoke) { // The message thinks it should be part of a timed interaction but it's @@ -105,9 +107,7 @@ CHIP_ERROR CommandHandler::ProcessInvokeRequest(System::PacketBufferHandle && pa err = StatusResponse::Send(Protocols::InteractionModel::Status::UnsupportedAccess, mpExchangeCtx, /* aExpectResponse = */ false); - // Some unit tests call this function in an abnormal state when we don't - // even have an exchange. - if (err != CHIP_NO_ERROR && mpExchangeCtx) + if (err != CHIP_NO_ERROR) { // We have to manually close the exchange, because we called // WillSendMessage already. @@ -252,9 +252,10 @@ CHIP_ERROR CommandHandler::ProcessCommandDataIB(CommandDataIB::Parser & aCommand SuccessOrExit(err); VerifyOrExit(mpCallback->CommandExists(concretePath), err = CHIP_ERROR_INVALID_PROFILE_ID); + VerifyOrExit(mpExchangeCtx != nullptr && mpExchangeCtx->HasSessionHandle(), err = CHIP_ERROR_INCORRECT_STATE); { - Access::SubjectDescriptor subjectDescriptor; // TODO: get actual subject descriptor + Access::SubjectDescriptor subjectDescriptor = mpExchangeCtx->GetSessionHandle()->GetSubjectDescriptor(); Access::RequestPath requestPath{ .cluster = concretePath.mClusterId, .endpoint = concretePath.mEndpointId }; Access::Privilege requestPrivilege = Access::Privilege::kOperate; // TODO: get actual request privilege err = Access::GetAccessControl().Check(subjectDescriptor, requestPath, requestPrivilege); diff --git a/src/app/tests/TestCommandInteraction.cpp b/src/app/tests/TestCommandInteraction.cpp index 2af13c597ce36e..67fcd195fe2c8b 100644 --- a/src/app/tests/TestCommandInteraction.cpp +++ b/src/app/tests/TestCommandInteraction.cpp @@ -542,12 +542,18 @@ void TestCommandInteraction::TestCommandHandlerWithSendSimpleStatusCode(nlTestSu void TestCommandInteraction::TestCommandHandlerWithProcessReceivedMsg(nlTestSuite * apSuite, void * apContext) { - CHIP_ERROR err = CHIP_NO_ERROR; + TestContext & ctx = *static_cast(apContext); + CHIP_ERROR err = CHIP_NO_ERROR; app::CommandHandler commandHandler(&mockCommandHandlerDelegate); System::PacketBufferHandle commandDatabuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); + TestExchangeDelegate delegate; + commandHandler.mpExchangeCtx = ctx.NewExchangeToAlice(&delegate); + GenerateInvokeRequest(apSuite, apContext, commandDatabuf, true /*aNeedCommandData*/, /* aIsTimedRequest = */ false); err = commandHandler.ProcessInvokeRequest(std::move(commandDatabuf), false); + + ChipLogDetail(DataManagement, "###################################### %s", err.AsString()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); } @@ -570,6 +576,7 @@ void TestCommandInteraction::TestCommandHandlerWithProcessReceivedNotExistComman void TestCommandInteraction::TestCommandHandlerWithProcessReceivedEmptyDataMsg(nlTestSuite * apSuite, void * apContext) { + TestContext & ctx = *static_cast(apContext); bool allBooleans[] = { true, false }; for (auto messageIsTimed : allBooleans) { @@ -579,19 +586,13 @@ void TestCommandInteraction::TestCommandHandlerWithProcessReceivedEmptyDataMsg(n app::CommandHandler commandHandler(&mockCommandHandlerDelegate); System::PacketBufferHandle commandDatabuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); - chip::isCommandDispatched = false; + TestExchangeDelegate delegate; + commandHandler.mpExchangeCtx = ctx.NewExchangeToAlice(&delegate); + chip::isCommandDispatched = false; GenerateInvokeRequest(apSuite, apContext, commandDatabuf, false /*aNeedCommandData*/, messageIsTimed); - err = commandHandler.ProcessInvokeRequest(std::move(commandDatabuf), transactionIsTimed); - if (messageIsTimed == transactionIsTimed) - { - NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR && chip::isCommandDispatched); - } - else - { - NL_TEST_ASSERT(apSuite, err != CHIP_NO_ERROR && !chip::isCommandDispatched); - } + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR && chip::isCommandDispatched == (messageIsTimed == transactionIsTimed)); } } } From 02c97cabdad8912c87295f6037d12390d31ca7ad Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Sat, 15 Jan 2022 03:15:30 +0800 Subject: [PATCH 020/124] Update docker images to latest version. (#13575) * Update docker images to 0.5.47 * Update image version to latest: 0.5.48 Co-authored-by: Andrei Litvin --- .devcontainer/devcontainer.json | 2 +- .github/workflows/android.yaml | 2 +- .github/workflows/bloat_check.yaml | 2 +- .github/workflows/build.yaml | 6 +++--- .github/workflows/cirque.yaml | 4 ++-- .github/workflows/doxygen.yaml | 2 +- .github/workflows/examples-ameba.yaml | 2 +- .github/workflows/examples-efr32.yaml | 2 +- .github/workflows/examples-esp32.yaml | 4 ++-- .github/workflows/examples-infineon.yaml | 2 +- .github/workflows/examples-k32w.yaml | 2 +- .github/workflows/examples-linux-arm.yaml | 2 +- .github/workflows/examples-linux-standalone.yaml | 2 +- .github/workflows/examples-mbed.yaml | 2 +- .github/workflows/examples-nrfconnect.yaml | 2 +- .github/workflows/examples-qpg.yaml | 2 +- .github/workflows/examples-telink.yaml | 2 +- .github/workflows/examples-tizen.yaml | 2 +- .github/workflows/qemu.yaml | 2 +- .github/workflows/release_artifacts.yaml | 4 ++-- .github/workflows/tests.yaml | 2 +- .github/workflows/unit_integration_test.yaml | 2 +- .github/workflows/zap_regeneration.yaml | 2 +- .github/workflows/zap_templates.yaml | 2 +- integrations/cloudbuild/build-all.yaml | 4 ++-- integrations/cloudbuild/smoke-test.yaml | 12 ++++++------ 26 files changed, 37 insertions(+), 37 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 04d4d239fc8282..28be6acd95b45c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -17,7 +17,7 @@ "build": { "dockerfile": "Dockerfile", "args": { - "BUILD_VERSION": "0.5.45" + "BUILD_VERSION": "0.5.48" } }, "remoteUser": "vscode", diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index c89a6ab877c6be..6c06afebdb2897 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-android:0.5.45 + image: connectedhomeip/chip-build-android:0.5.48 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index 0cf2b5fb1b3c90..7488636f5bbe8d 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.5.45 + image: connectedhomeip/chip-build:0.5.48 steps: - name: Checkout diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 295a4f32aa3490..51da7289a5fe03 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.45 + image: connectedhomeip/chip-build:0.5.48 volumes: - "/tmp/log_output:/tmp/test_logs" options: @@ -98,7 +98,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.45 + image: connectedhomeip/chip-build:0.5.48 volumes: - "/tmp/log_output:/tmp/test_logs" options: @@ -204,7 +204,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.45 + image: connectedhomeip/chip-build:0.5.48 volumes: - "/tmp/log_output:/tmp/test_logs" options: diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index 88b15371de336d..0348783b4e495d 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -29,7 +29,7 @@ jobs: timeout-minutes: 60 env: - DOCKER_RUN_VERSION: 0.5.45 + DOCKER_RUN_VERSION: 0.5.48 GITHUB_CACHE_PATH: /tmp/cirque-cache/ runs-on: ubuntu-latest @@ -38,7 +38,7 @@ jobs: # need to run with privilege, which isn't supported by job.XXX.contaner # https://github.com/actions/container-action/issues/2 # container: -# image: connectedhomeip/chip-build-cirque:0.5.45 +# image: connectedhomeip/chip-build-cirque:0.5.48 # volumes: # - "/tmp:/tmp" # - "/dev/pts:/dev/pts" diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index 1cb45ddf44eceb..8d68e1302e3b89 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: connectedhomeip/chip-build-doxygen:0.5.45 + image: connectedhomeip/chip-build-doxygen:0.5.48 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index 8129ce907c82b8..1dc04c95e25846 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -28,7 +28,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-ameba:0.5.45 + image: connectedhomeip/chip-build-ameba:0.5.48 options: --user root steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 9e24ea5d1a1feb..cebd9102383422 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-efr32:0.5.45 + image: connectedhomeip/chip-build-efr32:0.5.48 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 5dd137d1a286e0..aab13cbee7937b 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.5.45 + image: connectedhomeip/chip-build-esp32:0.5.48 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -115,7 +115,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.5.40 + image: connectedhomeip/chip-build-esp32:0.5.48 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index ba78656ed6b9c8..b3157925fbc754 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-infineon:0.5.45 + image: connectedhomeip/chip-build-infineon:0.5.48 steps: - name: Checkout diff --git a/.github/workflows/examples-k32w.yaml b/.github/workflows/examples-k32w.yaml index 5be6002ed2859d..3208296b54f571 100644 --- a/.github/workflows/examples-k32w.yaml +++ b/.github/workflows/examples-k32w.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-k32w:0.5.45 + image: connectedhomeip/chip-build-k32w:0.5.48 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index 514ce8910cdbaa..87663e1975e2be 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -31,7 +31,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-crosscompile:0.5.45 + image: connectedhomeip/chip-build-crosscompile:0.5.48 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index 33b8bbd88aa0be..a71152986ecced 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.45 + image: connectedhomeip/chip-build:0.5.48 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index 4a01d1bd9ba60c..48bd90395f8698 100644 --- a/.github/workflows/examples-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-mbed-os:0.5.45 + image: connectedhomeip/chip-build-mbed-os:0.5.48 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index 02f49360b8ef12..37fce11739e023 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-nrf-platform:0.5.40 + image: connectedhomeip/chip-build-nrf-platform:0.5.48 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index d5f8193f1df4a6..c923a60558cd5f 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.45 + image: connectedhomeip/chip-build:0.5.48 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index efa7bfa52071a3..d68aa72bf398c8 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-telink:0.5.45 + image: connectedhomeip/chip-build-telink:0.5.48 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index 7f430f6645f887..a241a8982ff296 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -28,7 +28,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-tizen:0.5.45 + image: connectedhomeip/chip-build-tizen:0.5.48 options: --user root volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 5c5f538f120b55..63b5a9968c921e 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32-qemu:0.5.45 + image: connectedhomeip/chip-build-esp32-qemu:0.5.48 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 0ce6a64044b271..c7f3493db68f37 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-esp32:0.5.45 + image: connectedhomeip/chip-build-esp32:0.5.48 steps: - name: Checkout @@ -70,7 +70,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-efr32:0.5.45 + image: connectedhomeip/chip-build-efr32:0.5.48 steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 19a1554de3366e..f38ba1a4e819d3 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.5.45 + image: connectedhomeip/chip-build:0.5.48 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index 481c0fddf14584..0d29df63563a08 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.5.45 + image: connectedhomeip/chip-build:0.5.48 volumes: - "/tmp/log_output:/tmp/test_logs" options: diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index abe02380faf34c..72a0175d7057e8 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: connectedhomeip/chip-build-zap:0.5.42 + image: connectedhomeip/chip-build-zap:0.5.48 defaults: run: shell: sh diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index e8ef4e1497897b..d864068be61821 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: connectedhomeip/chip-build-zap:0.5.42 + image: connectedhomeip/chip-build-zap:0.5.48 defaults: run: shell: sh diff --git a/integrations/cloudbuild/build-all.yaml b/integrations/cloudbuild/build-all.yaml index 997d486754071f..b700bd5d29229f 100644 --- a/integrations/cloudbuild/build-all.yaml +++ b/integrations/cloudbuild/build-all.yaml @@ -1,5 +1,5 @@ steps: - - name: "connectedhomeip/chip-build-vscode:0.5.45" + - name: "connectedhomeip/chip-build-vscode:0.5.48" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -12,7 +12,7 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build-vscode:0.5.45" + - name: "connectedhomeip/chip-build-vscode:0.5.48" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index 6117998834a2c5..3539eefde6f257 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -1,5 +1,5 @@ steps: - - name: "connectedhomeip/chip-build-vscode:0.5.45" + - name: "connectedhomeip/chip-build-vscode:0.5.48" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -12,7 +12,7 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build-vscode:0.5.45" + - name: "connectedhomeip/chip-build-vscode:0.5.48" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -28,7 +28,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.5.45" + - name: "connectedhomeip/chip-build-vscode:0.5.48" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -45,7 +45,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.5.45" + - name: "connectedhomeip/chip-build-vscode:0.5.48" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -62,7 +62,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.5.45" + - name: "connectedhomeip/chip-build-vscode:0.5.48" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -79,7 +79,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.5.45" + - name: "connectedhomeip/chip-build-vscode:0.5.48" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv From 45214cf0daa16bb829809e74b80baacc009df1f4 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Fri, 14 Jan 2022 14:19:50 -0500 Subject: [PATCH 021/124] Have commissioner call cleanup on error. (#13518) --- src/controller/AutoCommissioner.cpp | 13 +++++++++---- src/controller/AutoCommissioner.h | 2 +- src/controller/CHIPDeviceController.cpp | 2 +- src/controller/CommissioningDelegate.h | 3 +++ 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/controller/AutoCommissioner.cpp b/src/controller/AutoCommissioner.cpp index c5cab14f32868c..78daa9e8218966 100644 --- a/src/controller/AutoCommissioner.cpp +++ b/src/controller/AutoCommissioner.cpp @@ -52,8 +52,12 @@ CHIP_ERROR AutoCommissioner::SetCommissioningParameters(const CommissioningParam return CHIP_NO_ERROR; } -CommissioningStage AutoCommissioner::GetNextCommissioningStage(CommissioningStage currentStage) +CommissioningStage AutoCommissioner::GetNextCommissioningStage(CommissioningStage currentStage, CHIP_ERROR lastErr) { + if (lastErr != CHIP_NO_ERROR) + { + return CommissioningStage::kCleanup; + } switch (currentStage) { case CommissioningStage::kSecurePairing: @@ -138,14 +142,14 @@ void AutoCommissioner::StartCommissioning(CommissioneeDeviceProxy * proxy) void AutoCommissioner::CommissioningStepFinished(CHIP_ERROR err, CommissioningDelegate::CommissioningReport report) { - if (report.stageCompleted == CommissioningStage::kFindOperational) { mOperationalDeviceProxy = report.OperationalNodeFoundData.operationalProxy; } - CommissioningStage nextStage = GetNextCommissioningStage(report.stageCompleted); + CommissioningStage nextStage = GetNextCommissioningStage(report.stageCompleted, err); DeviceProxy * proxy = mCommissioneeDeviceProxy; - if (nextStage == CommissioningStage::kSendComplete || nextStage == CommissioningStage::kCleanup) + if (nextStage == CommissioningStage::kSendComplete || + (nextStage == CommissioningStage::kCleanup && mOperationalDeviceProxy != nullptr)) { proxy = mOperationalDeviceProxy; } @@ -155,6 +159,7 @@ void AutoCommissioner::CommissioningStepFinished(CHIP_ERROR err, CommissioningDe ChipLogError(Controller, "Invalid device for commissioning"); return; } + mParams.SetCompletionStatus(err); mCommissioner->PerformCommissioningStep(proxy, nextStage, mParams, this); } diff --git a/src/controller/AutoCommissioner.h b/src/controller/AutoCommissioner.h index 5b65674709a150..18f751dfe2f935 100644 --- a/src/controller/AutoCommissioner.h +++ b/src/controller/AutoCommissioner.h @@ -35,7 +35,7 @@ class AutoCommissioner : public CommissioningDelegate void CommissioningStepFinished(CHIP_ERROR err, CommissioningDelegate::CommissioningReport report) override; private: - CommissioningStage GetNextCommissioningStage(CommissioningStage currentStage); + CommissioningStage GetNextCommissioningStage(CommissioningStage currentStage, CHIP_ERROR lastErr); DeviceCommissioner * mCommissioner; CommissioneeDeviceProxy * mCommissioneeDeviceProxy = nullptr; OperationalDeviceProxy * mOperationalDeviceProxy = nullptr; diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index f660a40bd73ee9..792df14307744c 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -1875,7 +1875,7 @@ void DeviceCommissioner::PerformCommissioningStep(DeviceProxy * proxy, Commissio ChipLogProgress(Controller, "Rendezvous cleanup"); if (mPairingDelegate != nullptr) { - mPairingDelegate->OnCommissioningComplete(proxy->GetDeviceId(), CHIP_NO_ERROR); + mPairingDelegate->OnCommissioningComplete(proxy->GetDeviceId(), params.GetCompletionStatus()); } mCommissioningStage = CommissioningStage::kSecurePairing; break; diff --git a/src/controller/CommissioningDelegate.h b/src/controller/CommissioningDelegate.h index 3a48eded46068b..86133b9782e248 100644 --- a/src/controller/CommissioningDelegate.h +++ b/src/controller/CommissioningDelegate.h @@ -91,12 +91,15 @@ class CommissioningParameters mThreadOperationalDataset.SetValue(threadOperationalDataset); return *this; } + void SetCompletionStatus(CHIP_ERROR err) { completionStatus = err; } + CHIP_ERROR GetCompletionStatus() { return completionStatus; } private: Optional mCSRNonce; ///< CSR Nonce passed by the commissioner Optional mAttestationNonce; ///< Attestation Nonce passed by the commissioner Optional mWiFiCreds; Optional mThreadOperationalDataset; + CHIP_ERROR completionStatus = CHIP_NO_ERROR; }; class CommissioningDelegate From 1a89a84e1cddd32126ab89f167aed2bac65bdefc Mon Sep 17 00:00:00 2001 From: jmartinez-silabs <67972863+jmartinez-silabs@users.noreply.github.com> Date: Fri, 14 Jan 2022 15:09:07 -0500 Subject: [PATCH 022/124] Update/Add Level control features based on lastest cluster revision (#13338) * Some level control lighting behaviours were disable by ember and zll unused defines. Add runtime attribute metadata checks to validate that the need attributes exist for that code. Replace the #ifdef gates to compiled that code by default but still allow toggling it off by defining the right IGNORE_LEVEL_CONTROL_XXX defines Fix min and max Level usage and consideing the attributes and featuremap. add behaviour tied with lighting Enable Feature map for level control and update cluster revision * regen * enable test lvl control cluster revision and featuremap and update values * regen * Fix build for other platforms. Fix test LVL min max level changes with level controll ligthing feature Set max Level to 254 for all Set CurrentLevel And StatUpCurrentLevel to NVM storage to support Start up current level behaviour Change current level and Start up current level to NVM storage for the startup functionnality. Update yaml lvl control test support lighting device using a minimum level of 1 instead of 0 add level control effect on off commmands * rebase regen * Use move to handler as precondition level setter as it doesn't depend of the current level Address PR comments * Fix conflicts after rebase and use new nonVolatile method instead of tokenized * regen & restyle rebase and regen, fix conflicts and error * Init persistance storage before InitDatamodel to allow attribute nvm storage in init callbacks. Rework Levelcontrol StartupCurrentLevel. Workaround zap can't generate default value to null. Use 255 for StartupCurrentLevel * Rebase and regen to fix conflicts. LVL tests changed recently but do not match those new feature from this PR. Fix that * Rebase and fix conflicts, add some wait time to a test that sometimes get delayed in Darwin test and reads the value too soon * Update src/app/clusters/level-control/level-control.cpp Co-authored-by: Marc Lepage <67919234+mlepage-google@users.noreply.github.com> * Fix Cirque test due to lvl ctrl changes Co-authored-by: Marc Lepage <67919234+mlepage-google@users.noreply.github.com> --- .../all-clusters-common/all-clusters-app.zap | 23 +- .../bridge-app/bridge-common/bridge-app.zap | 25 +- .../lighting-common/lighting-app.zap | 31 +- .../thermostat-common/thermostat.zap | 4 +- examples/tv-app/tv-common/tv-app.zap | 23 +- .../tv-casting-common/tv-casting-app.zap | 10 +- .../color-control-server.h | 4 + .../ias-zone-server/ias-zone-server.cpp | 29 +- .../clusters/level-control/level-control.cpp | 531 +++++++++-------- .../clusters/on-off-server/on-off-server.cpp | 44 +- .../clusters/on-off-server/on-off-server.h | 4 +- src/app/server/Server.cpp | 4 +- .../suites/certification/Test_TC_LVL_1_1.yaml | 13 +- .../suites/certification/Test_TC_LVL_2_1.yaml | 33 +- .../suites/certification/Test_TC_LVL_2_2.yaml | 12 +- .../suites/certification/Test_TC_LVL_3_1.yaml | 4 +- .../suites/certification/Test_TC_LVL_4_1.yaml | 9 +- .../suites/certification/Test_TC_LVL_6_1.yaml | 9 +- src/app/util/af.h | 8 - src/app/util/util.cpp | 20 + src/app/util/util.h | 4 + .../templates/app/gen_config.zapt | 2 +- .../zcl/data-model/silabs/general.xml | 12 +- .../data_model/controller-clusters.zap | 34 +- .../java/zap-generated/CHIPCallbackTypes.h | 2 + .../java/zap-generated/CHIPClusters-JNI.cpp | 15 +- .../zap-generated/CHIPClustersRead-JNI.cpp | 40 +- .../java/zap-generated/CHIPReadCallbacks.cpp | 61 ++ .../java/zap-generated/CHIPReadCallbacks.h | 30 + .../chip/devicecontroller/ChipClusters.java | 33 +- .../devicecontroller/ClusterReadMapping.java | 15 +- .../python/chip/clusters/CHIPClusters.py | 5 + .../python/chip/clusters/Objects.py | 8 +- .../python/test/test_scripts/base.py | 14 +- .../CHIPAttributeTLVValueDecoder.mm | 19 +- .../CHIP/zap-generated/CHIPClustersObjc.h | 6 +- .../CHIP/zap-generated/CHIPClustersObjc.mm | 39 +- .../CHIP/zap-generated/CHIPTestClustersObjc.h | 1 + .../zap-generated/CHIPTestClustersObjc.mm | 18 + .../Framework/CHIPTests/CHIPClustersTests.m | 278 ++++++--- .../zap-generated/endpoint_config.h | 555 +++++++++--------- .../zap-generated/gen_config.h | 2 +- .../zap-generated/attributes/Accessors.cpp | 32 +- .../zap-generated/attributes/Accessors.h | 4 +- .../zap-generated/cluster-objects.h | 16 +- .../app-common/zap-generated/enums.h | 6 + .../zap-generated/endpoint_config.h | 63 +- .../bridge-app/zap-generated/gen_config.h | 2 +- .../zap-generated/cluster/Commands.h | 41 +- .../chip-tool/zap-generated/test/Commands.h | 540 +++++++++-------- .../zap-generated/endpoint_config.h | 171 +++--- .../zap-generated/endpoint_config.h | 64 +- .../lighting-app/zap-generated/gen_config.h | 2 +- .../app1/zap-generated/gen_config.h | 2 +- .../app2/zap-generated/gen_config.h | 2 +- .../pump-app/zap-generated/gen_config.h | 2 +- .../tv-app/zap-generated/endpoint_config.h | 141 +++-- .../tv-app/zap-generated/gen_config.h | 2 +- .../zap-generated/endpoint_config.h | 22 +- .../tv-casting-app/zap-generated/gen_config.h | 2 +- 60 files changed, 1934 insertions(+), 1213 deletions(-) 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 16e066cd2397ae..290c774cd21191 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 @@ -8134,7 +8134,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8281,15 +8281,30 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "255", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -8299,7 +8314,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 5b0a5680dc403d..f35c00e0335920 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -3793,7 +3793,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -3841,7 +3841,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3988,15 +3988,30 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "255", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -4006,7 +4021,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 0fdfa137b28bc5..50788263665078 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -4957,7 +4957,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -5017,7 +5017,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5164,10 +5164,10 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x01", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5212,7 +5212,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5359,15 +5359,30 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "255", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -5377,7 +5392,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 2c8181b6c56088..f4475cf122b75f 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -7520,7 +7520,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7670,7 +7670,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "255", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index f1d3b04f738a40..e4953135d3cbc2 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -8474,7 +8474,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -8669,15 +8669,30 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "255", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -8687,7 +8702,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, 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 bac7bbd71cc378..a8fcda9213be34 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 @@ -7289,7 +7289,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -7484,10 +7484,10 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "255", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7502,7 +7502,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7517,7 +7517,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/src/app/clusters/color-control-server/color-control-server.h b/src/app/clusters/color-control-server/color-control-server.h index 7ce355db3ee870..aae68293b1c1ed 100644 --- a/src/app/clusters/color-control-server/color-control-server.h +++ b/src/app/clusters/color-control-server/color-control-server.h @@ -270,3 +270,7 @@ void emberAfPluginColorControlServerXyTransitionEventHandler(chip::EndpointId en #ifdef EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_HSV void emberAfPluginColorControlServerHueSatTransitionEventHandler(chip::EndpointId endpoint); #endif // EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_HSV + +#ifdef EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP +void emberAfPluginLevelControlCoupledColorTempChangeCallback(chip::EndpointId endpoint); +#endif // EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP diff --git a/src/app/clusters/ias-zone-server/ias-zone-server.cpp b/src/app/clusters/ias-zone-server/ias-zone-server.cpp index 5a219448c26dc5..77cbb555976f19 100644 --- a/src/app/clusters/ias-zone-server/ias-zone-server.cpp +++ b/src/app/clusters/ias-zone-server/ias-zone-server.cpp @@ -63,9 +63,11 @@ #include #include #include +#include #include using namespace chip; +using namespace chip::app::Clusters; using namespace chip::app::Clusters::IasZone; #define UNDEFINED_ZONE_ID 0xFF @@ -592,29 +594,10 @@ uint8_t emberAfPluginIasZoneServerGetZoneId(EndpointId endpoint) //------------------------------------------------------------------------------ static bool areZoneServerAttributesNonVolatile(EndpointId endpoint) { - EmberAfAttributeMetadata * metadata; - - metadata = - emberAfLocateAttributeMetadata(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_IAS_CIE_ADDRESS_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) - { - return false; - } - - metadata = emberAfLocateAttributeMetadata(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_STATE_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) - { - return false; - } - - metadata = emberAfLocateAttributeMetadata(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_TYPE_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) - { - return false; - } - - metadata = emberAfLocateAttributeMetadata(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_ID_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) + if (!emberAfIsNonVolatileAttribute(endpoint, IasZone::Id, Attributes::IasCieAddress::Id, true) || + !emberAfIsNonVolatileAttribute(endpoint, IasZone::Id, Attributes::ZoneState::Id, true) || + !emberAfIsNonVolatileAttribute(endpoint, IasZone::Id, Attributes::ZoneType::Id, true) || + !emberAfIsNonVolatileAttribute(endpoint, IasZone::Id, Attributes::ZoneId::Id, true)) { return false; } diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index 06e7b152a31c8b..79e1ccecd3e65a 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -48,6 +48,7 @@ #include #include #include +#include #include @@ -59,9 +60,9 @@ #include #endif // EMBER_AF_PLUGIN_ON_OFF -#ifdef EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER -#include "app/framework/plugin/zll-level-control-server/zll-level-control-server.h" -#endif // EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER +#ifdef EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP +#include +#endif // EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP #include @@ -69,23 +70,18 @@ using namespace chip; using namespace chip::app::Clusters; using namespace chip::app::Clusters::LevelControl; -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL_ATTRIBUTE +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL static bool areStartUpLevelControlServerAttributesNonVolatile(EndpointId endpoint); -#endif +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL #if (EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE == 0) #define FASTEST_TRANSITION_TIME_MS 0 #else #define FASTEST_TRANSITION_TIME_MS (MILLISECOND_TICKS_PER_SECOND / EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE) -#endif +#endif // EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE -#ifdef EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER -#define MIN_LEVEL EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER_MINIMUM_LEVEL -#define MAX_LEVEL EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER_MAXIMUM_LEVEL -#else -#define MIN_LEVEL EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL -#define MAX_LEVEL EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL -#endif +#define LEVEL_CONTROL_LIGHTING_MIN_LEVEL 0x01 +#define LEVEL_CONTROL_LIGHTING_MAX_LEVEL 0xFE #define INVALID_STORED_LEVEL 0xFFFF @@ -107,10 +103,13 @@ typedef struct static EmberAfLevelControlState stateTable[EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT]; +static uint8_t minLevel = EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL; +static uint8_t maxLevel = EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL; + static EmberAfLevelControlState * getState(EndpointId endpoint); -static void moveToLevelHandler(CommandId commandId, uint8_t level, uint16_t transitionTimeDs, uint8_t optionMask, - uint8_t optionOverride, uint16_t storedLevel); +static void moveToLevelHandler(EndpointId endpoint, CommandId commandId, uint8_t level, uint16_t transitionTimeDs, + uint8_t optionMask, uint8_t optionOverride, uint16_t storedLevel); static void moveHandler(CommandId commandId, uint8_t moveMode, uint8_t rate, uint8_t optionMask, uint8_t optionOverride); static void stepHandler(CommandId commandId, uint8_t stepMode, uint8_t stepSize, uint16_t transitionTimeDs, uint8_t optionMask, uint8_t optionOverride); @@ -120,12 +119,12 @@ static void setOnOffValue(EndpointId endpoint, bool onOff); static void writeRemainingTime(EndpointId endpoint, uint16_t remainingTimeMs); static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, uint8_t optionMask, uint8_t optionOverride); -#if defined(ZCL_USING_LEVEL_CONTROL_CLUSTER_OPTIONS_ATTRIBUTE) && defined(EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP) +#if !defined(IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS) && defined(EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP) static void reallyUpdateCoupledColorTemp(EndpointId endpoint); #define updateCoupledColorTemp(endpoint) reallyUpdateCoupledColorTemp(endpoint) #else #define updateCoupledColorTemp(endpoint) -#endif // LEVEL...OPTIONS_ATTRIBUTE && COLOR...SERVER_TEMP +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS && EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP static void schedule(EndpointId endpoint, uint32_t delayMs) { @@ -143,7 +142,7 @@ static EmberAfLevelControlState * getState(EndpointId endpoint) return (ep == 0xFFFF ? NULL : &stateTable[ep]); } -#if defined(ZCL_USING_LEVEL_CONTROL_CLUSTER_OPTIONS_ATTRIBUTE) && defined(EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP) +#if !defined(IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS) && defined(EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP) static void reallyUpdateCoupledColorTemp(EndpointId endpoint) { uint8_t options; @@ -154,12 +153,15 @@ static void reallyUpdateCoupledColorTemp(EndpointId endpoint) return; } - if (READBITS(options, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_COUPLE_COLOR_TEMP_TO_LEVEL)) + if (emberAfContainsAttribute(endpoint, ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true)) { - emberAfPluginLevelControlCoupledColorTempChangeCallback(endpoint); + if (READBITS(options, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_COUPLE_COLOR_TEMP_TO_LEVEL)) + { + emberAfPluginLevelControlCoupledColorTempChangeCallback(endpoint); + } } } -#endif // LEVEL...OPTIONS_ATTRIBUTE && COLOR...SERVER_TEMP +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS && EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) { @@ -174,13 +176,6 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) state->elapsedTimeMs += state->eventDurationMs; -#if !defined(ZCL_USING_LEVEL_CONTROL_CLUSTER_OPTIONS_ATTRIBUTE) && defined(EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER) - if (emberAfPluginZllLevelControlServerIgnoreMoveToLevelMoveStepStop(endpoint, state->commandId)) - { - return; - } -#endif - // Read the attribute; print error message and return if it can't be read status = Attributes::CurrentLevel::Get(endpoint, ¤tLevel); if (status != EMBER_ZCL_STATUS_SUCCESS) @@ -200,13 +195,13 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) } else if (state->increasing) { - assert(currentLevel < MAX_LEVEL); + assert(currentLevel < maxLevel); assert(currentLevel < state->moveToLevel); currentLevel++; } else { - assert(MIN_LEVEL < currentLevel); + assert(minLevel < currentLevel); assert(state->moveToLevel < currentLevel); currentLevel--; } @@ -230,7 +225,7 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) { emberAfScenesClusterMakeInvalidCallback(endpoint); } -#endif +#endif // EMBER_AF_PLUGIN_SCENES // Are we at the requested level? if (currentLevel == state->moveToLevel) @@ -238,8 +233,8 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) if (state->commandId == Commands::MoveToLevelWithOnOff::Id || state->commandId == Commands::MoveWithOnOff::Id || state->commandId == Commands::StepWithOnOff::Id) { - setOnOffValue(endpoint, (currentLevel != MIN_LEVEL)); - if (currentLevel == MIN_LEVEL && state->useOnLevel) + setOnOffValue(endpoint, (currentLevel != minLevel)); + if (currentLevel == minLevel && state->useOnLevel) { status = Attributes::CurrentLevel::Set(endpoint, state->onLevel); if (status != EMBER_ZCL_STATUS_SUCCESS) @@ -279,29 +274,32 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) static void writeRemainingTime(EndpointId endpoint, uint16_t remainingTimeMs) { -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_LEVEL_CONTROL_REMAINING_TIME_ATTRIBUTE - // Convert milliseconds to tenths of a second, rounding any fractional value - // up to the nearest whole value. This means: - // - // 0 ms = 0.00 ds = 0 ds - // 1 ms = 0.01 ds = 1 ds - // ... - // 100 ms = 1.00 ds = 1 ds - // 101 ms = 1.01 ds = 2 ds - // ... - // 200 ms = 2.00 ds = 2 ds - // 201 ms = 2.01 ds = 3 ds - // ... - // - // This is done to ensure that the attribute, in tenths of a second, only - // goes to zero when the remaining time in milliseconds is actually zero. - uint16_t remainingTimeDs = (remainingTimeMs + 99) / 100; - EmberStatus status = Attributes::LevelControlRemainingTime::Set(endpoint, remainingTypeDs); - if (status != EMBER_ZCL_STATUS_SUCCESS) +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_LEVEL_CONTROL_REMAINING_TIME + if (emberAfContainsAttribute(endpoint, LevelControl::Id, LevelControl::Attributes::RemainingTime::Id, true)) { - emberAfLevelControlClusterPrintln("ERR: writing remaining time %x", status); + // Convert milliseconds to tenths of a second, rounding any fractional value + // up to the nearest whole value. This means: + // + // 0 ms = 0.00 ds = 0 ds + // 1 ms = 0.01 ds = 1 ds + // ... + // 100 ms = 1.00 ds = 1 ds + // 101 ms = 1.01 ds = 2 ds + // ... + // 200 ms = 2.00 ds = 2 ds + // 201 ms = 2.01 ds = 3 ds + // ... + // + // This is done to ensure that the attribute, in tenths of a second, only + // goes to zero when the remaining time in milliseconds is actually zero. + uint16_t remainingTimeDs = static_cast((remainingTimeMs + 99) / 100); + EmberStatus status = LevelControl::Attributes::RemainingTime::Set(endpoint, remainingTimeDs); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + emberAfLevelControlClusterPrintln("ERR: writing remaining time %x", status); + } } -#endif +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_LEVEL_CONTROL_REMAINING_TIME } static void setOnOffValue(EndpointId endpoint, bool onOff) @@ -317,86 +315,88 @@ static void setOnOffValue(EndpointId endpoint, bool onOff) static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, uint8_t optionMask, uint8_t optionOverride) { -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_OPTIONS_ATTRIBUTE - // From 3.10.2.2.8.1 of ZCL7 document 14-0127-20j-zcl-ch-3-general.docx: - // "Command execution SHALL NOT continue beyond the Options processing if - // all of these criteria are true: - // - The command is one of the ‘without On/Off’ commands: Move, Move to - // Level, Stop, or Step. - // - The On/Off cluster exists on the same endpoint as this cluster. - // - The OnOff attribute of the On/Off cluster, on this endpoint, is 0x00 - // (FALSE). - // - The value of the ExecuteIfOff bit is 0." - if (commandId > Commands::Stop::Id) +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS + if (emberAfContainsAttribute(endpoint, LevelControl::Id, Attributes::Options::Id, true)) { - return true; - } + // From 3.10.2.2.8.1 of ZCL7 document 14-0127-20j-zcl-ch-3-general.docx: + // "Command execution SHALL NOT continue beyond the Options processing if + // all of these criteria are true: + // - The command is one of the ‘without On/Off’ commands: Move, Move to + // Level, Stop, or Step. + // - The On/Off cluster exists on the same endpoint as this cluster. + // - The OnOff attribute of the On/Off cluster, on this endpoint, is 0x00 + // (FALSE). + // - The value of the ExecuteIfOff bit is 0." + if (commandId > Commands::Stop::Id) + { + return true; + } - if (!emberAfContainsServer(endpoint, OnOff::Id)) - { - return true; - } + if (!emberAfContainsServer(endpoint, OnOff::Id)) + { + return true; + } - uint8_t options; - EmberAfStatus status = Attributes::Options::Get(&options); - if (status != EMBER_ZCL_STATUS_SUCCESS) - { - emberAfLevelControlClusterPrintln("Unable to read Options attribute: 0x%X", status); - // If we can't read the attribute, then we should just assume that it has its - // default value. - options = 0x00; - } + uint8_t options; + EmberAfStatus status = Attributes::Options::Get(endpoint, &options); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + emberAfLevelControlClusterPrintln("Unable to read Options attribute: 0x%X", status); + // If we can't read the attribute, then we should just assume that it has its + // default value. + options = 0x00; + } - bool on; - status = OnOff::Attributes::OnOff::Get(endpoint, &on); - if (status != EMBER_ZCL_STATUS_SUCCESS) - { - emberAfLevelControlClusterPrintln("Unable to read OnOff attribute: 0x%X", status); - return true; - } - // The device is on - hence ExecuteIfOff does not matter - if (on) - { - return true; - } - // The OptionsMask & OptionsOverride fields SHALL both be present or both - // omitted in the command. A temporary Options bitmap SHALL be created from - // the Options attribute, using the OptionsMask & OptionsOverride fields, if - // present. Each bit of the temporary Options bitmap SHALL be determined as - // follows: - // Each bit in the Options attribute SHALL determine the corresponding bit in - // the temporary Options bitmap, unless the OptionsMask field is present and - // has the corresponding bit set to 1, in which case the corresponding bit in - // the OptionsOverride field SHALL determine the corresponding bit in the - // temporary Options bitmap. - // The resulting temporary Options bitmap SHALL then be processed as defined - // in section 3.10.2.2.3. - - // ---------- The following order is important in decission making ------- - // -----------more readable ---------- - // - if (optionMask == 0xFF && optionOverride == 0xFF) - { - // 0xFF are the default values passed to the command handler when - // the payload is not present - in that case there is use of option - // attribute to decide execution of the command - return READBITS(options, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF); - } - // ---------- The above is to distinguish if the payload is present or not + bool on; + status = OnOff::Attributes::OnOff::Get(endpoint, &on); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + emberAfLevelControlClusterPrintln("Unable to read OnOff attribute: 0x%X", status); + return true; + } + // The device is on - hence ExecuteIfOff does not matter + if (on) + { + return true; + } + // The OptionsMask & OptionsOverride fields SHALL both be present or both + // omitted in the command. A temporary Options bitmap SHALL be created from + // the Options attribute, using the OptionsMask & OptionsOverride fields, if + // present. Each bit of the temporary Options bitmap SHALL be determined as + // follows: + // Each bit in the Options attribute SHALL determine the corresponding bit in + // the temporary Options bitmap, unless the OptionsMask field is present and + // has the corresponding bit set to 1, in which case the corresponding bit in + // the OptionsOverride field SHALL determine the corresponding bit in the + // temporary Options bitmap. + // The resulting temporary Options bitmap SHALL then be processed as defined + // in section 3.10.2.2.3. + + // ---------- The following order is important in decision making ------- + // -----------more readable ---------- + // + if (optionMask == 0xFF && optionOverride == 0xFF) + { + // 0xFF are the default values passed to the command handler when + // the payload is not present - in that case there is use of option + // attribute to decide execution of the command + return READBITS(options, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF); + } + // ---------- The above is to distinguish if the payload is present or not - if (READBITS(optionMask, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF)) - { - // Mask is present and set in the command payload, this indicates - // use the over ride as temporary option - return READBITS(optionOverride, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF); + if (READBITS(optionMask, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF)) + { + // Mask is present and set in the command payload, this indicates + // use the over ride as temporary option + return READBITS(optionOverride, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF); + } + // if we are here - use the option bits + return (READBITS(options, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF)); } - // if we are here - use the option bits - return (READBITS(options, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF)); -#else +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS // By default, we return true to continue supporting backwards compatibility. return true; -#endif } bool emberAfLevelControlClusterMoveToLevelCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, @@ -409,7 +409,7 @@ bool emberAfLevelControlClusterMoveToLevelCallback(app::CommandHandler * command emberAfLevelControlClusterPrintln("%pMOVE_TO_LEVEL %x %2x %x %x", "RX level-control:", level, transitionTime, optionMask, optionOverride); - moveToLevelHandler(Commands::MoveToLevel::Id, level, transitionTime, optionMask, optionOverride, + moveToLevelHandler(commandPath.mEndpointId, Commands::MoveToLevel::Id, level, transitionTime, optionMask, optionOverride, INVALID_STORED_LEVEL); // Don't revert to the stored level return true; } @@ -422,7 +422,7 @@ bool emberAfLevelControlClusterMoveToLevelWithOnOffCallback(app::CommandHandler auto & transitionTime = commandData.transitionTime; emberAfLevelControlClusterPrintln("%pMOVE_TO_LEVEL_WITH_ON_OFF %x %2x", "RX level-control:", level, transitionTime); - moveToLevelHandler(Commands::MoveToLevelWithOnOff::Id, level, transitionTime, 0xFF, 0xFF, + moveToLevelHandler(commandPath.mEndpointId, Commands::MoveToLevelWithOnOff::Id, level, transitionTime, 0xFF, 0xFF, INVALID_STORED_LEVEL); // Don't revert to the stored level return true; } @@ -496,10 +496,9 @@ bool emberAfLevelControlClusterStopWithOnOffCallback(app::CommandHandler * comma return true; } -static void moveToLevelHandler(CommandId commandId, uint8_t level, uint16_t transitionTimeDs, uint8_t optionMask, - uint8_t optionOverride, uint16_t storedLevel) +static void moveToLevelHandler(EndpointId endpoint, CommandId commandId, uint8_t level, uint16_t transitionTimeDs, + uint8_t optionMask, uint8_t optionOverride, uint16_t storedLevel) { - EndpointId endpoint = emberAfCurrentEndpoint(); EmberAfLevelControlState * state = getState(endpoint); EmberAfStatus status; uint8_t currentLevel; @@ -531,13 +530,13 @@ static void moveToLevelHandler(CommandId commandId, uint8_t level, uint16_t tran // Move To Level commands cause the device to move from its current level to // the specified level at the specified rate. - if (MAX_LEVEL <= level) + if (maxLevel <= level) { - state->moveToLevel = MAX_LEVEL; + state->moveToLevel = maxLevel; } - else if (level <= MIN_LEVEL) + else if (level <= minLevel) { - state->moveToLevel = MIN_LEVEL; + state->moveToLevel = minLevel; } else { @@ -552,7 +551,7 @@ static void moveToLevelHandler(CommandId commandId, uint8_t level, uint16_t tran { if (commandId == Commands::MoveToLevelWithOnOff::Id) { - setOnOffValue(endpoint, (state->moveToLevel != MIN_LEVEL)); + setOnOffValue(endpoint, (state->moveToLevel != minLevel)); } if (currentLevel == state->moveToLevel) { @@ -575,23 +574,30 @@ static void moveToLevelHandler(CommandId commandId, uint8_t level, uint16_t tran // as fast as it is able. if (transitionTimeDs == 0xFFFF) { -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME_ATTRIBUTE - status = Attributes::OnOffTransitionTime::Get(endpoint, &transitionTimeDs); - if (status != EMBER_ZCL_STATUS_SUCCESS) +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME + if (emberAfContainsAttribute(endpoint, LevelControl::Id, Attributes::OnOffTransitionTime::Id, true)) { - emberAfLevelControlClusterPrintln("ERR: reading on/off transition time %x", status); - goto send_default_response; - } + status = Attributes::OnOffTransitionTime::Get(endpoint, &transitionTimeDs); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + emberAfLevelControlClusterPrintln("ERR: reading on/off transition time %x", status); + goto send_default_response; + } - // Transition time comes in (or is stored, in the case of On/Off Transition - // Time) as tenths of a second, but we work in milliseconds. - state->transitionTimeMs = (transitionTimeDs * MILLISECOND_TICKS_PER_SECOND / 10); -#else // ZCL_USING_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME_ATTRIBUTE - // If the Transition Time field is 0xFFFF and On/Off Transition Time, - // which is an optional attribute, is not present, the device shall move to - // its new level as fast as it is able. + // Transition time comes in (or is stored, in the case of On/Off Transition + // Time) as tenths of a second, but we work in milliseconds. + state->transitionTimeMs = (transitionTimeDs * MILLISECOND_TICKS_PER_SECOND / 10); + } + else + { + state->transitionTimeMs = FASTEST_TRANSITION_TIME_MS; + } +#else + // If the Transition Time field is 0xFFFF and On/Off Transition Time, + // which is an optional attribute, is not present, the device shall move to + // its new level as fast as it is able. state->transitionTimeMs = FASTEST_TRANSITION_TIME_MS; -#endif // ZCL_USING_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME_ATTRIBUTE +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME } else { @@ -614,12 +620,15 @@ static void moveToLevelHandler(CommandId commandId, uint8_t level, uint16_t tran schedule(endpoint, state->eventDurationMs); status = EMBER_ZCL_STATUS_SUCCESS; -#ifdef EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER if (commandId == Commands::MoveToLevelWithOnOff::Id) { - emberAfPluginZllLevelControlServerMoveToLevelWithOnOffZllExtensions(emberAfCurrentCommand()); + uint32_t featureMap; + if (Attributes::FeatureMap::Get(endpoint, &featureMap) == EMBER_ZCL_STATUS_SUCCESS && + READBITS(featureMap, EMBER_AF_LEVEL_CONTROL_FEATURE_LIGHTING)) + { + OnOff::Attributes::GlobalSceneControl::Set(endpoint, true); + } } -#endif send_default_response: if (emberAfCurrentCommand()->apsFrame->clusterId == LevelControl::Id) @@ -666,13 +675,13 @@ static void moveHandler(CommandId commandId, uint8_t moveMode, uint8_t rate, uin { case EMBER_ZCL_MOVE_MODE_UP: state->increasing = true; - state->moveToLevel = MAX_LEVEL; - difference = static_cast(MAX_LEVEL - currentLevel); + state->moveToLevel = maxLevel; + difference = static_cast(maxLevel - currentLevel); break; case EMBER_ZCL_MOVE_MODE_DOWN: state->increasing = false; - state->moveToLevel = MIN_LEVEL; - difference = currentLevel - MIN_LEVEL; + state->moveToLevel = minLevel; + difference = static_cast(currentLevel - minLevel); break; default: status = EMBER_ZCL_STATUS_INVALID_FIELD; @@ -687,7 +696,7 @@ static void moveHandler(CommandId commandId, uint8_t moveMode, uint8_t rate, uin { if (commandId == Commands::MoveWithOnOff::Id) { - setOnOffValue(endpoint, (state->moveToLevel != MIN_LEVEL)); + setOnOffValue(endpoint, (state->moveToLevel != minLevel)); } if (currentLevel == state->moveToLevel) { @@ -779,10 +788,10 @@ static void stepHandler(CommandId commandId, uint8_t stepMode, uint8_t stepSize, { case EMBER_ZCL_STEP_MODE_UP: state->increasing = true; - if (MAX_LEVEL - currentLevel < stepSize) + if (maxLevel - currentLevel < stepSize) { - state->moveToLevel = MAX_LEVEL; - actualStepSize = static_cast(MAX_LEVEL - currentLevel); + state->moveToLevel = maxLevel; + actualStepSize = static_cast(maxLevel - currentLevel); } else { @@ -791,10 +800,10 @@ static void stepHandler(CommandId commandId, uint8_t stepMode, uint8_t stepSize, break; case EMBER_ZCL_STEP_MODE_DOWN: state->increasing = false; - if (currentLevel - MIN_LEVEL < stepSize) + if (currentLevel - minLevel < stepSize) { - state->moveToLevel = MIN_LEVEL; - actualStepSize = (currentLevel - MIN_LEVEL); + state->moveToLevel = minLevel; + actualStepSize = static_cast(currentLevel - minLevel); } else { @@ -814,7 +823,7 @@ static void stepHandler(CommandId commandId, uint8_t stepMode, uint8_t stepSize, { if (commandId == Commands::StepWithOnOff::Id) { - setOnOffValue(endpoint, (state->moveToLevel != MIN_LEVEL)); + setOnOffValue(endpoint, (state->moveToLevel != minLevel)); } if (currentLevel == state->moveToLevel) { @@ -893,10 +902,10 @@ static void stopHandler(CommandId commandId, uint8_t optionMask, uint8_t optionO // Quotes are from table 3.46. void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool newValue) { + app::DataModel::Nullable resolvedLevel; uint8_t temporaryCurrentLevelCache; uint16_t currentOnOffTransitionTime; - uint8_t resolvedLevel; - uint8_t minimumLevelAllowedForTheDevice = MIN_LEVEL; + uint8_t minimumLevelAllowedForTheDevice = minLevel; EmberAfStatus status; // "Temporarily store CurrentLevel." @@ -908,34 +917,48 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new } // Read the OnLevel attribute. -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_ON_LEVEL_ATTRIBUTE - status = Attributes::OnLevel::Get(endpoint, &resolvedLevel); - if (status != EMBER_ZCL_STATUS_SUCCESS) +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_ON_LEVEL_ATTRIBUTE + if (emberAfContainsAttribute(endpoint, LevelControl::Id, Attributes::OnLevel::Id, true)) { - emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); - return; - } + status = Attributes::OnLevel::Get(endpoint, resolvedLevel); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); + return; + } - if (resolvedLevel == 0xFF) + if (resolvedLevel.IsNull()) + { + // OnLevel has undefined value; fall back to CurrentLevel. + resolvedLevel.SetNonNull(temporaryCurrentLevelCache); + } + } + else { - // OnLevel has undefined value; fall back to CurrentLevel. - resolvedLevel = temporaryCurrentLevelCache; + resolvedLevel.SetNonNull(temporaryCurrentLevelCache); } #else - resolvedLevel = temporaryCurrentLevelCache; -#endif + resolvedLevel.SetNonNull(temporaryCurrentLevelCache); +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_ON_LEVEL_ATTRIBUTE // Read the OnOffTransitionTime attribute. -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME_ATTRIBUTE - status = Attributes::OnOffTransitionTime::Get(endpoint, ¤tOnOffTransitionTime); - if (status != EMBER_ZCL_STATUS_SUCCESS) +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME + if (emberAfContainsAttribute(endpoint, LevelControl::Id, Attributes::OnOffTransitionTime::Id, true)) { - emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); - return; + status = Attributes::OnOffTransitionTime::Get(endpoint, ¤tOnOffTransitionTime); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); + return; + } + } + else + { + currentOnOffTransitionTime = 0xFFFF; } #else currentOnOffTransitionTime = 0xFFFF; -#endif +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME if (newValue) { @@ -950,7 +973,7 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new // "Move CurrentLevel to OnLevel, or to the stored level if OnLevel is not // defined, over the time period OnOffTransitionTime." - moveToLevelHandler(Commands::MoveToLevel::Id, resolvedLevel, currentOnOffTransitionTime, 0xFF, 0xFF, + moveToLevelHandler(endpoint, Commands::MoveToLevel::Id, resolvedLevel.Value(), currentOnOffTransitionTime, 0xFF, 0xFF, INVALID_STORED_LEVEL); // Don't revert to stored level } else @@ -958,8 +981,8 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new // ...else if newValue is OnOff::Commands::Off::Id... // "Move CurrentLevel to the minimum level allowed for the device over the // time period OnOffTransitionTime." - moveToLevelHandler(Commands::MoveToLevel::Id, minimumLevelAllowedForTheDevice, currentOnOffTransitionTime, 0xFF, 0xFF, - temporaryCurrentLevelCache); + moveToLevelHandler(endpoint, Commands::MoveToLevel::Id, minimumLevelAllowedForTheDevice, currentOnOffTransitionTime, 0xFF, + 0xFF, temporaryCurrentLevelCache); // "If OnLevel is not defined, set the CurrentLevel to the stored level." // The emberAfLevelControlClusterServerTickCallback implementation handles @@ -969,87 +992,107 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new void emberAfLevelControlClusterServerInitCallback(EndpointId endpoint) { -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL_ATTRIBUTE - // StartUp behavior relies StartUpCurrentLevel attributes being non-volatile. - if (areStartUpLevelControlServerAttributesNonVolatile(endpoint)) + // If these read only attributes are enabled we use those values as our set minLevel and maxLevel + // if get isn't possible, value stays at default + Attributes::MinLevel::Get(endpoint, &minLevel); + Attributes::MaxLevel::Get(endpoint, &maxLevel); + + uint32_t featureMap; + if (Attributes::FeatureMap::Get(endpoint, &featureMap) == EMBER_ZCL_STATUS_SUCCESS && + READBITS(featureMap, EMBER_AF_LEVEL_CONTROL_FEATURE_LIGHTING)) + { + if (minLevel < LEVEL_CONTROL_LIGHTING_MIN_LEVEL) + { + minLevel = LEVEL_CONTROL_LIGHTING_MIN_LEVEL; + } + + if (maxLevel > LEVEL_CONTROL_LIGHTING_MAX_LEVEL) + { + maxLevel = LEVEL_CONTROL_LIGHTING_MAX_LEVEL; + } + } + + uint8_t currentLevel = 0; + EmberAfStatus status = Attributes::CurrentLevel::Get(endpoint, ¤tLevel); + if (status == EMBER_ZCL_STATUS_SUCCESS) { - // Read the StartUpOnOff attribute and set the OnOff attribute as per - // following from zcl 7 14-0127-20i-zcl-ch-3-general.doc. - // 3.10.2.2.14 StartUpCurrentLevel Attribute - // The StartUpCurrentLevel attribute SHALL define the desired startup level - // for a device when it is supplied with power and this level SHALL be - // reflected in the CurrentLevel attribute. The values of the StartUpCurrentLevel - // attribute are listed below: - // Table 3 58. Values of the StartUpCurrentLevel Attribute - // Value Action on power up - // 0x00 Set the CurrentLevel attribute to the minimum value permitted on the device. - // 0x01-0xfe Set the CurrentLevel attribute to this value. - // 0xff Set the CurrentLevel attribute to its previous value. - - // Initialize startUpCurrentLevel to assume previous value for currentLevel. - uint8_t startUpCurrentLevel = STARTUP_CURRENT_LEVEL_USE_PREVIOUS_LEVEL; - EmberAfStatus status = Attributes::StartUpCurrentLevel::Get(endpoint, &startUpCurrentLevel); - if (status == EMBER_ZCL_STATUS_SUCCESS) +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL + // StartUp behavior relies StartUpCurrentLevel attributes being Non Volatile. + if (areStartUpLevelControlServerAttributesNonVolatile(endpoint)) { - uint8_t currentLevel = 0; - status = Attributes::CurrentLevel::Get(endpoint, ¤tLevel); + // 1.5.14. StartUpCurrentLevel Attribute + // The StartUpCurrentLevel attribute SHALL define the desired startup level + // for a device when it is supplied with power and this level SHALL be + // reflected in the CurrentLevel attribute. The values of the StartUpCurrentLevel + // attribute are listed below: + // Table 4. Values of the StartUpCurrentLevel attribute + // Value Action on power up + // 0x00 Set the CurrentLevel attribute to the minimum value permitted on the device. + // 0x01-0xfe Set the CurrentLevel attribute to this value. + // NULL Set the CurrentLevel attribute to its previous value. + // 0xFF Work Around ZAP Can't set default value to NULL + // https://github.com/project-chip/zap/issues/354 + + app::DataModel::Nullable startUpCurrentLevel; + status = Attributes::StartUpCurrentLevel::Get(endpoint, startUpCurrentLevel); if (status == EMBER_ZCL_STATUS_SUCCESS) { - switch (startUpCurrentLevel) + if (!startUpCurrentLevel.IsNull()) { - case STARTUP_CURRENT_LEVEL_USE_DEVICE_MINIMUM: - currentLevel = MIN_LEVEL; - break; - case STARTUP_CURRENT_LEVEL_USE_PREVIOUS_LEVEL: - // Just fetched it. - break; - default: - // Otherwise set to specified value 0x01-0xFE. - // But, need to enforce currentLevel's min/max, right? - // Spec doesn't mention this. - if (startUpCurrentLevel < MIN_LEVEL) + if (startUpCurrentLevel.Value() == STARTUP_CURRENT_LEVEL_USE_DEVICE_MINIMUM) { - currentLevel = MIN_LEVEL; - } - else if (startUpCurrentLevel > MAX_LEVEL) - { - currentLevel = MAX_LEVEL; + currentLevel = minLevel; } else { - currentLevel = startUpCurrentLevel; + // Otherwise set to specified value 0x01-0xFE. + // But, need to enforce currentLevel's min/max, right? + // Spec doesn't mention this. + if (startUpCurrentLevel.Value() < minLevel) + { + currentLevel = minLevel; + } + else if (startUpCurrentLevel.Value() > maxLevel) + { + currentLevel = maxLevel; + } + else + { + currentLevel = startUpCurrentLevel.Value(); + } } - break; } - status = Attributes::CurrentLevel::Set(endpoint, currentLevel); + // Otherwise Set the CurrentLevel attribute to its previous value which was already fetch above + + Attributes::CurrentLevel::Set(endpoint, currentLevel); } } +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL + // In any case, we make sure that the respects min/max + if (currentLevel < minLevel) + { + Attributes::CurrentLevel::Set(endpoint, minLevel); + } + else if (currentLevel > maxLevel) + { + Attributes::CurrentLevel::Set(endpoint, maxLevel); + } } -#endif + emberAfPluginLevelControlClusterServerPostInitCallback(endpoint); } -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL_ATTRIBUTE +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL static bool areStartUpLevelControlServerAttributesNonVolatile(EndpointId endpoint) { - EmberAfAttributeMetadata * metadata; - - metadata = emberAfLocateAttributeMetadata(endpoint, LevelControl::Id, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) - { - return false; - } - - metadata = - emberAfLocateAttributeMetadata(endpoint, LevelControl::Id, ZCL_START_UP_CURRENT_LEVEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) + if (emberAfIsNonVolatileAttribute(endpoint, LevelControl::Id, Attributes::CurrentLevel::Id, true)) { - return false; + return emberAfIsNonVolatileAttribute(endpoint, LevelControl::Id, Attributes::StartUpCurrentLevel::Id, true); } - return true; + return false; } -#endif +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL void emberAfPluginLevelControlClusterServerPostInitCallback(EndpointId endpoint) {} diff --git a/src/app/clusters/on-off-server/on-off-server.cpp b/src/app/clusters/on-off-server/on-off-server.cpp index 5d9f9040019ce2..4c35510fdf9f72 100644 --- a/src/app/clusters/on-off-server/on-off-server.cpp +++ b/src/app/clusters/on-off-server/on-off-server.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include @@ -155,12 +156,30 @@ EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, uint8_t comm emberAfOnOffClusterPrintln("ERR: writing on/off %x", status); return status; } + +#ifdef EMBER_AF_PLUGIN_LEVEL_CONTROL + // If initiatedByLevelChange is false, then we assume that the level change + // ZCL stuff has not happened and we do it here + if (!initiatedByLevelChange && emberAfContainsServer(endpoint, LevelControl::Id)) + { + emberAfOnOffClusterLevelControlEffectCallback(endpoint, newValue); + } +#endif } else // Set Off { emberAfOnOffClusterPrintln("Off Command - OnTime : 0"); Attributes::OnTime::Set(endpoint, 0); // Reset onTime +#ifdef EMBER_AF_PLUGIN_LEVEL_CONTROL + // If initiatedByLevelChange is false, then we assume that the level change + // ZCL stuff has not happened and we do it here + if (!initiatedByLevelChange && emberAfContainsServer(endpoint, LevelControl::Id)) + { + emberAfOnOffClusterLevelControlEffectCallback(endpoint, newValue); + } +#endif + // write the new on/off value status = Attributes::OnOff::Set(endpoint, newValue); if (status != EMBER_ZCL_STATUS_SUCCESS) @@ -194,7 +213,7 @@ EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, uint8_t comm void OnOffServer::initOnOffServer(chip::EndpointId endpoint) { -#ifdef ZCL_USING_ON_OFF_CLUSTER_START_UP_ON_OFF_ATTRIBUTE +#ifndef IGNORE_ON_OFF_CLUSTER_START_UP_ON_OFF // StartUp behavior relies on OnOff and StartUpOnOff attributes being non-volatile. if (areStartUpOnOffServerAttributesNonVolatile(endpoint)) { @@ -222,7 +241,7 @@ void OnOffServer::initOnOffServer(chip::EndpointId endpoint) { // Initialise updated value to 0 bool updatedOnOff = 0; - status = Attributes::OnOff::Get(endpoint, &udpateOnOff); + status = Attributes::OnOff::Get(endpoint, &updatedOnOff); if (status == EMBER_ZCL_STATUS_SUCCESS) { switch (startUpOnOff) @@ -247,7 +266,7 @@ void OnOffServer::initOnOffServer(chip::EndpointId endpoint) } } } -#endif +#endif // IGNORE_ON_OFF_CLUSTER_START_UP_ON_OFF emberAfPluginOnOffClusterServerPostInitCallback(endpoint); } @@ -481,26 +500,17 @@ void OnOffServer::updateOnOffTimeCommand(chip::EndpointId endpoint) } } -#ifdef ZCL_USING_ON_OFF_CLUSTER_START_UP_ON_OFF_ATTRIBUTE +#ifndef IGNORE_ON_OFF_CLUSTER_START_UP_ON_OFF bool OnOffServer::areStartUpOnOffServerAttributesNonVolatile(EndpointId endpoint) { - EmberAfAttributeMetadata * metadata; - - metadata = emberAfLocateAttributeMetadata(endpoint, OnOff::Id, Attributes::OnOff::Id, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) + if (emberAfIsNonVolatileAttribute(endpoint, OnOff::Id, Attributes::OnOff::Id, true)) { - return false; + return emberAfIsNonVolatileAttribute(endpoint, LevelControl::Id, Attributes::StartUpOnOff::Id, true); } - metadata = emberAfLocateAttributeMetadata(endpoint, OnOff::Id, Attributes::StartUpOnOff::Id, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) - { - return false; - } - - return true; + return false; } -#endif // ZCL_USING_ON_OFF_CLUSTER_START_UP_ON_OFF_ATTRIBUTE +#endif // IGNORE_ON_OFF_CLUSTER_START_UP_ON_OFF /** * @brief event control object for an endpoint diff --git a/src/app/clusters/on-off-server/on-off-server.h b/src/app/clusters/on-off-server/on-off-server.h index e72eb61e858715..8e2502007f1a3c 100644 --- a/src/app/clusters/on-off-server/on-off-server.h +++ b/src/app/clusters/on-off-server/on-off-server.h @@ -62,9 +62,9 @@ class OnOffServer * Functions Definitions *********************************************************/ -#ifdef ZCL_USING_ON_OFF_CLUSTER_START_UP_ON_OFF_ATTRIBUTE +#ifndef IGNORE_ON_OFF_CLUSTER_START_UP_ON_OFF bool areStartUpOnOffServerAttributesNonVolatile(chip::EndpointId endpoint); -#endif // ZCL_USING_ON_OFF_CLUSTER_START_UP_ON_OFF_ATTRIBUTE +#endif EmberEventControl * getEventControl(chip::EndpointId endpoint); EmberEventControl * configureEventControl(chip::EndpointId endpoint); diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index c7394bc0d74d51..2f35404a01a55e 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -112,8 +112,6 @@ CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint // handler. SetAttributePersistenceProvider(&mAttributePersister); - InitDataModelHandler(&mExchangeMgr); - #if CHIP_DEVICE_LAYER_TARGET_DARWIN err = DeviceLayer::PersistedStorage::KeyValueStoreMgrImpl().Init("chip.store"); SuccessOrExit(err); @@ -121,6 +119,8 @@ CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint DeviceLayer::PersistedStorage::KeyValueStoreMgrImpl().Init(CHIP_CONFIG_KVS_PATH); #endif + InitDataModelHandler(&mExchangeMgr); + err = mFabrics.Init(&mServerStorage); SuccessOrExit(err); diff --git a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml index 111317c8d9a82b..9807cca38ece32 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml @@ -23,13 +23,11 @@ tests: cluster: "DelayCommands" command: "WaitForCommissionee" - #issue #12190 as per spec default value is 5 but expecting 3 - label: "read the global attribute: ClusterRevision" - disabled: true command: "readAttribute" attribute: "ClusterRevision" response: - value: 4 + value: 5 - label: "Read the global attribute constraints: ClusterRevision" command: "readAttribute" @@ -49,11 +47,10 @@ tests: error: UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" - disabled: true command: "readAttribute" attribute: "ClusterRevision" response: - value: 4 + value: 5 #issue #11053 disabled steps below Global attributes missing from YAML framework - label: "Read the global attribute: AttributeList" @@ -101,10 +98,9 @@ tests: command: "readAttribute" attribute: "FeatureMap" response: - value: 0 + value: 3 - label: "Read the optional global attribute : FeatureMap" - disabled: true command: "readAttribute" attribute: "FeatureMap" response: @@ -112,7 +108,6 @@ tests: type: map32 - label: "write the default values to optional global attribute: FeatureMap" - disabled: true command: "writeAttribute" attribute: "FeatureMap" arguments: @@ -125,4 +120,4 @@ tests: command: "readAttribute" attribute: "FeatureMap" response: - value: 0 + value: 3 diff --git a/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml index cd5032e3dd6b6f..31a3f9ccfb2d2c 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml @@ -23,16 +23,33 @@ tests: cluster: "DelayCommands" command: "WaitForCommissionee" - - label: "Reads the CurrentLevel attribute" - command: "readAttribute" - attribute: "current level" - response: - value: 254 + # Temporary - see #13551 + - label: "Reset level to 254" + command: "MoveToLevel" + arguments: + values: + - name: "level" + value: 254 + - name: "transitionTime" + value: 0 + - name: "optionMask" + value: 1 + - name: "optionOverride" + value: 1 + + - label: "Wait 100ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 100 - label: "Reads the CurrentLevel attribute" command: "readAttribute" attribute: "current level" response: + value: 254 constraints: type: uint8 @@ -151,10 +168,10 @@ tests: constraints: type: map8 + #Disabled due to issue - #13414 - label: "Reads the StartUpCurrentLevel attribute " + disabled: true command: "readAttribute" attribute: "start up current level" response: - value: 0 - constraints: - type: uint8 + value: null diff --git a/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml index d01d462b347020..3a7f0d99c1531c 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml @@ -65,13 +65,13 @@ tests: command: "writeAttribute" attribute: "on level" arguments: - value: 1 + value: 254 - label: "Reads the OnLevel attribute from the DUT" command: "readAttribute" attribute: "on level" response: - value: 1 + value: 254 constraints: type: uint8 @@ -145,11 +145,13 @@ tests: constraints: type: uint8 + #Disabled due to issue - #11670 - label: "Reads the StartUpCurrentLevel attribute from the DUT" + disabled: true command: "readAttribute" attribute: "start up current level" response: - value: 0 + value: null constraints: type: uint8 @@ -157,12 +159,12 @@ tests: command: "writeAttribute" attribute: "start up current level" arguments: - value: 1 + value: 254 - label: "reads the StartUpCurrentLevel attribute from the DUT" command: "readAttribute" attribute: "start up current level" response: - value: 1 + value: 254 constraints: type: uint8 diff --git a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml index 05675a800ef748..365bfed122e33d 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml @@ -39,7 +39,7 @@ tests: command: "readAttribute" attribute: "max level" response: - value: 255 + value: 254 - label: "sends a Move to level command" command: "MoveToLevel" @@ -120,7 +120,7 @@ tests: arguments: values: - name: "ms" - value: 10 + value: 100 - label: "reads CurrentLevel attribute from DUT" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml index d21a5854b10858..584862a1c14369 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml @@ -33,7 +33,7 @@ tests: command: "readAttribute" attribute: "max level" response: - value: 255 + value: 254 - label: "sends a Move up command" command: "Move" @@ -60,7 +60,7 @@ tests: command: "readAttribute" attribute: "current level" response: - value: 255 + value: 254 - label: "reads min level attribute from DUT" command: "readAttribute" @@ -89,11 +89,14 @@ tests: - name: "ms" value: 3000 + # For lighting Device type current level minimal value is 1 - label: "reads CurrentLevel attribute from DUT" command: "readAttribute" attribute: "current level" response: - value: 0 + constraints: + minValue: 0 + maxValue: 1 - label: "Write default move rate attribute from DUT" command: "writeAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml index f95ec0767bb30f..6f098444592b34 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml @@ -48,11 +48,14 @@ tests: - name: "ms" value: 100 + # For lighting Device type current level minimal value is 1 - label: "Reads CurrentLevel attribute from DUT" command: "readAttribute" attribute: "current level" response: - value: 0 + constraints: + minValue: 0 + maxValue: 1 - label: "Sends a move up command to DUT" command: "Move" @@ -88,7 +91,9 @@ tests: command: "readAttribute" attribute: "current level" response: - value: 2 + constraints: + minValue: 2 + maxValue: 3 - label: "Reset level to 254" command: "MoveToLevel" diff --git a/src/app/util/af.h b/src/app/util/af.h index 3174acfbd8925f..80e122dfb14241 100644 --- a/src/app/util/af.h +++ b/src/app/util/af.h @@ -94,14 +94,6 @@ EmberAfAttributeMetadata * emberAfLocateAttributeMetadata(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t mask); -#ifdef DOXYGEN_SHOULD_SKIP_THIS -/** @brief Returns true if the attribute exists. */ -bool emberAfContainsAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t mask); -#else -#define emberAfContainsAttribute(endpoint, clusterId, attributeId, mask) \ - (emberAfLocateAttributeMetadata(endpoint, clusterId, attributeId, mask) != NULL) -#endif - /** * @brief Returns true if endpoint contains the ZCL cluster with specified id. * diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index 55850c493e80ea..adb98637959ba8 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -964,6 +964,26 @@ uint8_t emberAfMake8bitEncodedChanPg(uint8_t page, uint8_t channel) } } +bool emberAfContainsAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, bool asServer) +{ + uint8_t mask = asServer ? CLUSTER_MASK_SERVER : CLUSTER_MASK_CLIENT; + return (emberAfLocateAttributeMetadata(endpoint, clusterId, attributeId, mask) != nullptr); +} + +bool emberAfIsNonVolatileAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, + bool asServer) +{ + uint8_t mask = asServer ? CLUSTER_MASK_SERVER : CLUSTER_MASK_CLIENT; + EmberAfAttributeMetadata * metadata = emberAfLocateAttributeMetadata(endpoint, clusterId, attributeId, mask); + + if (metadata == nullptr) + { + return false; + } + + return metadata->IsNonVolatile(); +} + chip::Messaging::ExchangeManager * chip::ExchangeManager() { return emAfExchangeMgr; diff --git a/src/app/util/util.h b/src/app/util/util.h index 0ebbc750a45c38..f85a272740ab6e 100644 --- a/src/app/util/util.h +++ b/src/app/util/util.h @@ -277,6 +277,10 @@ uint8_t emberAfGetChannelFrom8bitEncodedChanPg(uint8_t chanPg); */ uint8_t emberAfMake8bitEncodedChanPg(uint8_t page, uint8_t channel); +bool emberAfContainsAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, bool asServer); +bool emberAfIsNonVolatileAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, + bool asServer); + namespace chip { chip::Messaging::ExchangeManager * ExchangeManager(); } // namespace chip diff --git a/src/app/zap-templates/templates/app/gen_config.zapt b/src/app/zap-templates/templates/app/gen_config.zapt index d6e3dfad0eddae..6a88ddc37da67a 100644 --- a/src/app/zap-templates/templates/app/gen_config.zapt +++ b/src/app/zap-templates/templates/app/gen_config.zapt @@ -43,7 +43,7 @@ {{else if (isStrEqual name "Level Control")}} {{#if (isServer side)}} // User options for {{side}} plugin {{name}} -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 {{/if}} diff --git a/src/app/zap-templates/zcl/data-model/silabs/general.xml b/src/app/zap-templates/zcl/data-model/silabs/general.xml index c645bb2ac60628..d6a6d5cfe13be3 100644 --- a/src/app/zap-templates/zcl/data-model/silabs/general.xml +++ b/src/app/zap-templates/zcl/data-model/silabs/general.xml @@ -391,11 +391,11 @@ limitations under the License. LEVEL_CONTROL_CLUSTER true true - + current level remaining time min level - max level + max level current frequency min frequency max frequency @@ -406,7 +406,7 @@ limitations under the License. off transition time default move rate options - start up current level + start up current level Command description for MoveToLevel @@ -556,4 +556,10 @@ limitations under the License. status flags application type + + + + + + diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 0e9154291779a1..1d6753cc8be855 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -956,6 +956,21 @@ } ], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -965,7 +980,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -1036,7 +1051,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1207,6 +1222,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h index 810ae078cd27c8..da0ba83cbce26a 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -581,6 +581,8 @@ typedef void (*CHIPLevelControlClusterStartUpCurrentLevelAttributeCallbackType)( void *, chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo::DecodableArgType); typedef void (*CHIPLevelControlClusterAttributeListAttributeCallbackType)( void *, const chip::app::Clusters::LevelControl::Attributes::AttributeList::TypeInfo::DecodableType &); +typedef void (*CHIPLevelControlClusterFeatureMapAttributeCallbackType)( + void *, chip::app::Clusters::LevelControl::Attributes::FeatureMap::TypeInfo::DecodableArgType); typedef void (*CHIPLevelControlClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::LevelControl::Attributes::ClusterRevision::TypeInfo::DecodableArgType); diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index 65f41fd0a28a6b..2f12f407473fb5 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -12847,7 +12847,12 @@ JNI_METHOD(void, LevelControlCluster, writeStartUpCurrentLevelAttribute) using TypeInfo = chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + uint8_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -12890,8 +12895,10 @@ JNI_METHOD(void, LevelControlCluster, subscribeStartUpCurrentLevelAttribute) (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); + 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)); @@ -12915,7 +12922,7 @@ JNI_METHOD(void, LevelControlCluster, subscribeStartUpCurrentLevelAttribute) err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), - CHIPInt8uAttributeCallback::OnSubscriptionEstablished); + CHIPLevelControlStartUpCurrentLevelAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); diff --git a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp index 35059ef7947460..6a8542d8b23086 100644 --- a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp @@ -8596,8 +8596,10 @@ JNI_METHOD(void, LevelControlCluster, readStartUpCurrentLevelAttribute) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + 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)); @@ -8661,6 +8663,40 @@ JNI_METHOD(void, LevelControlCluster, readAttributeListAttribute)(JNIEnv * env, onFailure.release(); } +JNI_METHOD(void, LevelControlCluster, readFeatureMapAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::FeatureMap::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::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()); + 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, LevelControlCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index d601ecc1a90fc6..ac6fc45a922ed1 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -6533,6 +6533,67 @@ void CHIPLevelControlDefaultMoveRateAttributeCallback::CallbackFn(void * context 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.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + CHIPLevelControlAttributeListAttributeCallback::CHIPLevelControlAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index 63517b51228b9f..36c5da692ac87b 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -2306,6 +2306,36 @@ class CHIPLevelControlDefaultMoveRateAttributeCallback bool keepAlive; }; +class CHIPLevelControlStartUpCurrentLevelAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPLevelControlStartUpCurrentLevelAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPLevelControlStartUpCurrentLevelAttributeCallback(); + + static void maybeDestroy(CHIPLevelControlStartUpCurrentLevelAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPLevelControlAttributeListAttributeCallback : public chip::Callback::Callback { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 685d6d85a0eb2f..8e6b06cf8870df 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -7213,6 +7213,14 @@ public interface DefaultMoveRateAttributeCallback { default void onSubscriptionEstablished() {} } + public interface StartUpCurrentLevelAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + public interface AttributeListAttributeCallback { void onSuccess(List valueList); @@ -7395,21 +7403,22 @@ public void subscribeDefaultMoveRateAttribute( subscribeDefaultMoveRateAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readStartUpCurrentLevelAttribute(IntegerAttributeCallback callback) { + public void readStartUpCurrentLevelAttribute(StartUpCurrentLevelAttributeCallback callback) { readStartUpCurrentLevelAttribute(chipClusterPtr, callback); } - public void writeStartUpCurrentLevelAttribute(DefaultClusterCallback callback, Integer value) { + public void writeStartUpCurrentLevelAttribute( + DefaultClusterCallback callback, @Nullable Integer value) { writeStartUpCurrentLevelAttribute(chipClusterPtr, callback, value, null); } public void writeStartUpCurrentLevelAttribute( - DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { writeStartUpCurrentLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeStartUpCurrentLevelAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + StartUpCurrentLevelAttributeCallback callback, int minInterval, int maxInterval) { subscribeStartUpCurrentLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); } @@ -7417,6 +7426,10 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void readFeatureMapAttribute(LongAttributeCallback callback) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -7550,20 +7563,26 @@ private native void subscribeDefaultMoveRateAttribute( int maxInterval); private native void readStartUpCurrentLevelAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, StartUpCurrentLevelAttributeCallback callback); private native void writeStartUpCurrentLevelAttribute( long chipClusterPtr, DefaultClusterCallback callback, - Integer value, + @Nullable Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeStartUpCurrentLevelAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + StartUpCurrentLevelAttributeCallback callback, + int minInterval, + int maxInterval); private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readFeatureMapAttribute( + long chipClusterPtr, LongAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index 683e425cab0083..7a7e0d8cd74d98 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -3301,7 +3301,8 @@ public Map> getReadAttributeMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.LevelControlCluster) cluster) .readStartUpCurrentLevelAttribute( - (ChipClusters.IntegerAttributeCallback) callback); + (ChipClusters.LevelControlCluster.StartUpCurrentLevelAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readLevelControlStartUpCurrentLevelCommandParams); @@ -3322,6 +3323,18 @@ public Map> getReadAttributeMap() { readLevelControlAttributeListCommandParams); readLevelControlInteractionInfo.put( "readAttributeListAttribute", readLevelControlAttributeListAttributeInteractionInfo); + Map readLevelControlFeatureMapCommandParams = + new LinkedHashMap(); + InteractionInfo readLevelControlFeatureMapAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LevelControlCluster) cluster) + .readFeatureMapAttribute((ChipClusters.LongAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readLevelControlFeatureMapCommandParams); + readLevelControlInteractionInfo.put( + "readFeatureMapAttribute", readLevelControlFeatureMapAttributeInteractionInfo); Map readLevelControlClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readLevelControlClusterRevisionAttributeInteractionInfo = diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 7249c702873c45..bfb0bfdf93a3fe 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -2496,6 +2496,11 @@ class ChipClusters: "attributeId": 0x0000FFFB, "type": "int", }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 652f4e7e8ee5be..c10a80d81e035c 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -2761,7 +2761,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="onTransitionTime", Tag=0x00000012, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="offTransitionTime", Tag=0x00000013, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="defaultMoveRate", Tag=0x00000014, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="startUpCurrentLevel", Tag=0x00004000, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="startUpCurrentLevel", Tag=0x00004000, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), @@ -2780,7 +2780,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: onTransitionTime: 'typing.Union[None, Nullable, uint]' = None offTransitionTime: 'typing.Union[None, Nullable, uint]' = None defaultMoveRate: 'typing.Union[None, Nullable, uint]' = None - startUpCurrentLevel: 'typing.Optional[uint]' = None + startUpCurrentLevel: 'typing.Union[None, Nullable, uint]' = None attributeList: 'typing.List[uint]' = None featureMap: 'typing.Optional[uint]' = None clusterRevision: 'uint' = None @@ -3167,9 +3167,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class AttributeList(ClusterAttributeDescriptor): diff --git a/src/controller/python/test/test_scripts/base.py b/src/controller/python/test/test_scripts/base.py index ee66766ab16ab0..11fdaae5b045ec 100644 --- a/src/controller/python/test/test_scripts/base.py +++ b/src/controller/python/test/test_scripts/base.py @@ -176,29 +176,29 @@ def TestLevelControlCluster(self, nodeid: int, endpoint: int, group: int): self.logger.info( f"Sending MoveToLevel command to device {nodeid} endpoint {endpoint}") try: - commonArgs = dict(transitionTime=0, optionMask=0, optionOverride=0) + commonArgs = dict(transitionTime=0, optionMask=1, optionOverride=1) - # Move to 0 + # Move to 1 self.devCtrl.ZCLSend("LevelControl", "MoveToLevel", nodeid, - endpoint, group, dict(**commonArgs, level=0), blocking=True) + endpoint, group, dict(**commonArgs, level=1), blocking=True) res = self.devCtrl.ZCLReadAttribute(cluster="LevelControl", attribute="CurrentLevel", nodeid=nodeid, endpoint=endpoint, groupid=group) TestResult("Read attribute LevelControl.CurrentLevel", - res).assertValueEqual(0) + res).assertValueEqual(1) - # Move to 255 + # Move to 254 self.devCtrl.ZCLSend("LevelControl", "MoveToLevel", nodeid, - endpoint, group, dict(**commonArgs, level=255), blocking=True) + endpoint, group, dict(**commonArgs, level=254), blocking=True) res = self.devCtrl.ZCLReadAttribute(cluster="LevelControl", attribute="CurrentLevel", nodeid=nodeid, endpoint=endpoint, groupid=group) TestResult("Read attribute LevelControl.CurrentLevel", - res).assertValueEqual(255) + res).assertValueEqual(254) return True except Exception as ex: diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index 717d51799d3ddf..906bf6724999aa 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -3943,8 +3943,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } case Attributes::AttributeList::Id: { @@ -3973,6 +3977,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = array_0; return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index c44ef20fbb31b9..09c3c465d97229 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -2180,7 +2180,8 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeStartUpCurrentLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; - (void)subscribeAttributeStartUpCurrentLevelWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval subscriptionEstablished: @@ -2191,6 +2192,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index db4a324646ca5c..354fe085ca2132 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -9251,15 +9251,16 @@ new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( - (void)readAttributeStartUpCurrentLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt8uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -9270,7 +9271,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -9284,14 +9290,14 @@ - (void)subscribeAttributeStartUpCurrentLevelWithMinInterval:(uint16_t)minInterv reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + minInterval, maxInterval, CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } @@ -9308,6 +9314,17 @@ new CHIPLevelControlAttributeListListAttributeCallbackBridge( }); } +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h index c5cf0391eaab4b..4cc9fda6cf6978 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -521,6 +521,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeMinFrequencyWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeMaxFrequencyWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index bb89a0747e26ce..9fa13d75a158d3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -5334,6 +5334,24 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 463a561546abcd..bf5db54985a86d 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -10944,6 +10944,30 @@ - (void)testSendClusterTest_TC_LVL_1_1_000000_WaitForCommissionee [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - (void)testSendClusterTest_TC_LVL_1_1_000001_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 5U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_1_1_000002_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute constraints: ClusterRevision"]; @@ -10962,7 +10986,7 @@ - (void)testSendClusterTest_TC_LVL_1_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_1_1_000002_WriteAttribute +- (void)testSendClusterTest_TC_LVL_1_1_000003_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; @@ -10985,6 +11009,71 @@ - (void)testSendClusterTest_TC_LVL_1_1_000002_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_LVL_1_1_000004_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"reads back global attribute: ClusterRevision"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 5U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_1_1_000005_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional global attribute : FeatureMap"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional global attribute : FeatureMap Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_1_1_000006_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"write the default values to optional global attribute: FeatureMap"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id featureMapArgument; + featureMapArgument = [NSNumber numberWithUnsignedInt:0UL]; + [cluster writeAttributeFeatureMapWithValue:featureMapArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"write the default values to optional global attribute: FeatureMap Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterTest_TC_LVL_2_1_000000_WaitForCommissionee { @@ -10994,31 +11083,40 @@ - (void)testSendClusterTest_TC_LVL_2_1_000000_WaitForCommissionee WaitForCommissionee(expectation, queue); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000001_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000001_MoveToLevel { - XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the CurrentLevel attribute"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Reset level to 254"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentLevel attribute Error: %@", err); + __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:254]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionMask = [NSNumber numberWithUnsignedChar:1]; + params.optionOverride = [NSNumber numberWithUnsignedChar:1]; + [cluster moveToLevelWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Reset level to 254 Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 254); - } + [expectation fulfill]; + }]; - [expectation fulfill]; - }]; + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_2_1_000002_WaitForMs +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 100ms"]; + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForMs(expectation, queue, 100); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000002_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000003_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the CurrentLevel attribute"]; @@ -11032,12 +11130,17 @@ - (void)testSendClusterTest_TC_LVL_2_1_000002_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 254); + } + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000003_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000004_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the RemainingTime attribute"]; @@ -11061,7 +11164,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000003_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000004_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000005_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the MinLevel attribute"]; @@ -11085,7 +11188,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000004_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000005_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000006_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the MaxLevel attribute"]; @@ -11104,7 +11207,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000005_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000006_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000007_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the CurrentFrequency attribute"]; @@ -11128,7 +11231,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000006_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000007_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000008_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the MinFrequency attribute"]; @@ -11152,7 +11255,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000007_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000008_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000009_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the MaxFrequency attribute"]; @@ -11176,7 +11279,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000008_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000009_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000010_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the OnOffTransitionTime attribute"]; @@ -11200,7 +11303,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000009_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000010_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000011_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the OnLevel attribute "]; @@ -11219,7 +11322,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000010_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000011_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000012_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the OnTransitionTime attribute "]; @@ -11238,7 +11341,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000011_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000012_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000013_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the OffTransitionTime attribute "]; @@ -11257,7 +11360,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000012_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000013_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000014_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the DefaultMoveRate attribute "]; @@ -11276,7 +11379,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000013_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000014_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000015_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the Options attribute "]; @@ -11300,30 +11403,6 @@ - (void)testSendClusterTest_TC_LVL_2_1_000014_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000015_ReadAttribute -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the StartUpCurrentLevel attribute "]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeStartUpCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the StartUpCurrentLevel attribute Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - (void)testSendClusterTest_TC_LVL_2_2_000000_WaitForCommissionee { @@ -11435,7 +11514,7 @@ - (void)testSendClusterTest_TC_LVL_2_2_000005_WriteAttribute XCTAssertNotNil(cluster); id onLevelArgument; - onLevelArgument = [NSNumber numberWithUnsignedChar:1]; + onLevelArgument = [NSNumber numberWithUnsignedChar:254]; [cluster writeAttributeOnLevelWithValue:onLevelArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"writes the OnLevel attribute on the DUT Error: %@", err); @@ -11464,7 +11543,7 @@ - (void)testSendClusterTest_TC_LVL_2_2_000006_ReadAttribute { id actualValue = value; XCTAssertFalse(actualValue == nil); - XCTAssertEqual([actualValue unsignedCharValue], 1); + XCTAssertEqual([actualValue unsignedCharValue], 254); } [expectation fulfill]; @@ -11638,31 +11717,7 @@ - (void)testSendClusterTest_TC_LVL_2_2_000013_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_2_000014_ReadAttribute -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the StartUpCurrentLevel attribute from the DUT"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeStartUpCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the StartUpCurrentLevel attribute from the DUT Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_LVL_2_2_000015_WriteAttribute +- (void)testSendClusterTest_TC_LVL_2_2_000014_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"writes the StartUpCurrentLevel attribute on the DUT"]; @@ -11672,7 +11727,7 @@ - (void)testSendClusterTest_TC_LVL_2_2_000015_WriteAttribute XCTAssertNotNil(cluster); id startUpCurrentLevelArgument; - startUpCurrentLevelArgument = [NSNumber numberWithUnsignedChar:1]; + startUpCurrentLevelArgument = [NSNumber numberWithUnsignedChar:254]; [cluster writeAttributeStartUpCurrentLevelWithValue:startUpCurrentLevelArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"writes the StartUpCurrentLevel attribute on the DUT Error: %@", err); @@ -11684,7 +11739,7 @@ - (void)testSendClusterTest_TC_LVL_2_2_000015_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_2_000016_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_2_000015_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"reads the StartUpCurrentLevel attribute from the DUT"]; @@ -11700,7 +11755,8 @@ - (void)testSendClusterTest_TC_LVL_2_2_000016_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 1); + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue unsignedCharValue], 254); } [expectation fulfill]; @@ -11781,7 +11837,7 @@ - (void)testSendClusterTest_TC_LVL_3_1_000003_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 255); + XCTAssertEqual([actualValue unsignedCharValue], 254); } [expectation fulfill]; @@ -11957,7 +12013,7 @@ - (void)testSendClusterTest_TC_LVL_3_1_000012_WaitForMs XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 10ms"]; dispatch_queue_t queue = dispatch_get_main_queue(); - WaitForMs(expectation, queue, 10); + WaitForMs(expectation, queue, 100); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - (void)testSendClusterTest_TC_LVL_3_1_000013_ReadAttribute @@ -12066,7 +12122,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000002_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 255); + XCTAssertEqual([actualValue unsignedCharValue], 254); } [expectation fulfill]; @@ -12123,7 +12179,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000005_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 255); + XCTAssertEqual([actualValue unsignedCharValue], 254); } [expectation fulfill]; @@ -12204,7 +12260,15 @@ - (void)testSendClusterTest_TC_LVL_4_1_000009_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 1); + } } [expectation fulfill]; @@ -12682,7 +12746,15 @@ - (void)testSendClusterTest_TC_LVL_6_1_000004_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 1); + } } [expectation fulfill]; @@ -12762,7 +12834,15 @@ - (void)testSendClusterTest_TC_LVL_6_1_000008_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 2); + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 2); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 3); + } } [expectation fulfill]; @@ -47054,7 +47134,7 @@ - (void)testSendClusterLevelControlWriteAttributeStartUpCurrentLevelWithValue XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlWriteAttributeStartUpCurrentLevelWithValue"]; - NSNumber * _Nonnull value = @(0); + NSNumber * _Nullable value = @(0); [cluster writeAttributeStartUpCurrentLevelWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"LevelControl StartUpCurrentLevel Error: %@", err); @@ -47089,6 +47169,30 @@ - (void)testSendClusterLevelControlReadAttributeAttributeListWithCompletionHandl [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterLevelControlReadAttributeFeatureMapWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlReadAttributeFeatureMapWithCompletionHandler"]; + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"LevelControl FeatureMap Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterLevelControlReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 07e7acdbbbcbf5..63edca3f85d2ce 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -298,39 +298,44 @@ /* 886 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 1, Cluster: Level Control (server), big-endian */ \ + \ + /* 890 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x03, \ + \ /* Endpoint: 1, Cluster: Power Source (server), big-endian */ \ \ - /* 890 - BatteryVoltage, */ \ + /* 894 - BatteryVoltage, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 894 - BatteryTimeRemaining, */ \ + /* 898 - BatteryTimeRemaining, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 898 - ActiveBatteryFaults, */ \ + /* 902 - ActiveBatteryFaults, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 906 - FeatureMap, */ \ + /* 910 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 910 - Networks, */ \ + /* 914 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 922 - LastConnectErrorValue, */ \ + /* 926 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 926 - FeatureMap, */ \ + /* 930 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Switch (server), big-endian */ \ \ - /* 930 - FeatureMap, */ \ + /* 934 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), big-endian */ \ \ - /* 934 - label list, */ \ + /* 938 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -348,55 +353,55 @@ \ /* Endpoint: 1, Cluster: Mode Select (server), big-endian */ \ \ - /* 1188 - Description, */ \ + /* 1192 - Description, */ \ 6, 'C', 'o', 'f', 'f', 'e', 'e', \ \ /* Endpoint: 1, Cluster: Door Lock (server), big-endian */ \ \ - /* 1195 - DoorOpenEvents, */ \ + /* 1199 - DoorOpenEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1199 - DoorClosedEvents, */ \ + /* 1203 - DoorClosedEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1203 - Language, */ \ + /* 1207 - Language, */ \ 2, 'e', 'n', \ \ - /* 1206 - AutoRelockTime, */ \ + /* 1210 - AutoRelockTime, */ \ 0x00, 0x00, 0x00, 0x60, \ \ /* Endpoint: 1, Cluster: Window Covering (server), big-endian */ \ \ - /* 1210 - FeatureMap, */ \ + /* 1214 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), big-endian */ \ \ - /* 1214 - LifetimeRunningHours, */ \ + /* 1218 - LifetimeRunningHours, */ \ 0x00, 0x00, 0x00, \ \ - /* 1217 - Power, */ \ + /* 1221 - Power, */ \ 0x00, 0x00, 0x00, \ \ - /* 1220 - LifetimeEnergyConsumed, */ \ + /* 1224 - LifetimeEnergyConsumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1224 - FeatureMap, */ \ + /* 1228 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), big-endian */ \ \ - /* 1228 - FeatureMap, */ \ + /* 1232 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0B, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), big-endian */ \ \ - /* 1232 - IAS CIE address, */ \ + /* 1236 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Channel (server), big-endian */ \ \ - /* 1240 - channel list, */ \ + /* 1244 - channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -414,7 +419,7 @@ \ /* Endpoint: 1, Cluster: Target Navigator (server), big-endian */ \ \ - /* 1494 - target navigator list, */ \ + /* 1498 - target navigator list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -432,24 +437,24 @@ \ /* Endpoint: 1, Cluster: Media Playback (server), big-endian */ \ \ - /* 1748 - start time, */ \ + /* 1752 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 1756 - duration, */ \ + /* 1760 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1764 - playback speed, */ \ + /* 1768 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1768 - seek range end, */ \ + /* 1772 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1776 - seek range start, */ \ + /* 1780 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Media Input (server), big-endian */ \ \ - /* 1784 - media input list, */ \ + /* 1788 - media input list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -467,7 +472,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), big-endian */ \ \ - /* 2038 - accept header list, */ \ + /* 2042 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -483,12 +488,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2292 - supported streaming protocols, */ \ + /* 2296 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Audio Output (server), big-endian */ \ \ - /* 2296 - audio output list, */ \ + /* 2300 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -506,7 +511,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), big-endian */ \ \ - /* 2550 - application launcher list, */ \ + /* 2554 - application launcher list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -524,67 +529,67 @@ \ /* Endpoint: 1, Cluster: Application Basic (server), big-endian */ \ \ - /* 2804 - allowed vendor list, */ \ + /* 2808 - allowed vendor list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), big-endian */ \ \ - /* 2836 - bitmap32, */ \ + /* 2840 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2840 - bitmap64, */ \ + /* 2844 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2848 - int24u, */ \ + /* 2852 - int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 2851 - int32u, */ \ + /* 2855 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2855 - int40u, */ \ + /* 2859 - int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2860 - int48u, */ \ + /* 2864 - int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2866 - int56u, */ \ + /* 2870 - int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2873 - int64u, */ \ + /* 2877 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2881 - int24s, */ \ + /* 2885 - int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 2884 - int32s, */ \ + /* 2888 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2888 - int40s, */ \ + /* 2892 - int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2893 - int48s, */ \ + /* 2897 - int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2899 - int56s, */ \ + /* 2903 - int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2906 - int64s, */ \ + /* 2910 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2914 - float_single, */ \ + /* 2918 - float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2918 - float_double, */ \ + /* 2922 - float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2926 - epoch_us, */ \ + /* 2930 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2934 - epoch_s, */ \ + /* 2938 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2938 - list_long_octet_string, */ \ + /* 2942 - list_long_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -639,65 +644,65 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3938 - nullable_bitmap32, */ \ + /* 3942 - nullable_bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3942 - nullable_bitmap64, */ \ + /* 3946 - nullable_bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3950 - nullable_int24u, */ \ + /* 3954 - nullable_int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 3953 - nullable_int32u, */ \ + /* 3957 - nullable_int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3957 - nullable_int40u, */ \ + /* 3961 - nullable_int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3962 - nullable_int48u, */ \ + /* 3966 - nullable_int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3968 - nullable_int56u, */ \ + /* 3972 - nullable_int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3975 - nullable_int64u, */ \ + /* 3979 - nullable_int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3983 - nullable_int24s, */ \ + /* 3987 - nullable_int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 3986 - nullable_int32s, */ \ + /* 3990 - nullable_int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3990 - nullable_int40s, */ \ + /* 3994 - nullable_int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3995 - nullable_int48s, */ \ + /* 3999 - nullable_int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4001 - nullable_int56s, */ \ + /* 4005 - nullable_int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4008 - nullable_int64s, */ \ + /* 4012 - nullable_int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4016 - nullable_float_single, */ \ + /* 4020 - nullable_float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4020 - nullable_float_double, */ \ + /* 4024 - nullable_float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), big-endian */ \ \ - /* 4028 - measurement type, */ \ + /* 4032 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4032 - total active power, */ \ + /* 4036 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), big-endian */ \ \ - /* 4036 - FeatureMap, */ \ + /* 4040 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } @@ -976,39 +981,44 @@ /* 886 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 1, Cluster: Level Control (server), little-endian */ \ + \ + /* 890 - FeatureMap, */ \ + 0x03, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: Power Source (server), little-endian */ \ \ - /* 890 - BatteryVoltage, */ \ + /* 894 - BatteryVoltage, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 894 - BatteryTimeRemaining, */ \ + /* 898 - BatteryTimeRemaining, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 898 - ActiveBatteryFaults, */ \ + /* 902 - ActiveBatteryFaults, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 906 - FeatureMap, */ \ + /* 910 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 910 - Networks, */ \ + /* 914 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 922 - LastConnectErrorValue, */ \ + /* 926 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 926 - FeatureMap, */ \ + /* 930 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Switch (server), little-endian */ \ \ - /* 930 - FeatureMap, */ \ + /* 934 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), little-endian */ \ \ - /* 934 - label list, */ \ + /* 938 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1026,55 +1036,55 @@ \ /* Endpoint: 1, Cluster: Mode Select (server), little-endian */ \ \ - /* 1188 - Description, */ \ + /* 1192 - Description, */ \ 6, 'C', 'o', 'f', 'f', 'e', 'e', \ \ /* Endpoint: 1, Cluster: Door Lock (server), little-endian */ \ \ - /* 1195 - DoorOpenEvents, */ \ + /* 1199 - DoorOpenEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1199 - DoorClosedEvents, */ \ + /* 1203 - DoorClosedEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1203 - Language, */ \ + /* 1207 - Language, */ \ 2, 'e', 'n', \ \ - /* 1206 - AutoRelockTime, */ \ + /* 1210 - AutoRelockTime, */ \ 0x60, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Window Covering (server), little-endian */ \ \ - /* 1210 - FeatureMap, */ \ + /* 1214 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), little-endian */ \ \ - /* 1214 - LifetimeRunningHours, */ \ + /* 1218 - LifetimeRunningHours, */ \ 0x00, 0x00, 0x00, \ \ - /* 1217 - Power, */ \ + /* 1221 - Power, */ \ 0x00, 0x00, 0x00, \ \ - /* 1220 - LifetimeEnergyConsumed, */ \ + /* 1224 - LifetimeEnergyConsumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1224 - FeatureMap, */ \ + /* 1228 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), little-endian */ \ \ - /* 1228 - FeatureMap, */ \ + /* 1232 - FeatureMap, */ \ 0x0B, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), little-endian */ \ \ - /* 1232 - IAS CIE address, */ \ + /* 1236 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Channel (server), little-endian */ \ \ - /* 1240 - channel list, */ \ + /* 1244 - channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1092,7 +1102,7 @@ \ /* Endpoint: 1, Cluster: Target Navigator (server), little-endian */ \ \ - /* 1494 - target navigator list, */ \ + /* 1498 - target navigator list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1110,24 +1120,24 @@ \ /* Endpoint: 1, Cluster: Media Playback (server), little-endian */ \ \ - /* 1748 - start time, */ \ + /* 1752 - start time, */ \ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1756 - duration, */ \ + /* 1760 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1764 - playback speed, */ \ + /* 1768 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1768 - seek range end, */ \ + /* 1772 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1776 - seek range start, */ \ + /* 1780 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Media Input (server), little-endian */ \ \ - /* 1784 - media input list, */ \ + /* 1788 - media input list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1145,7 +1155,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), little-endian */ \ \ - /* 2038 - accept header list, */ \ + /* 2042 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1161,12 +1171,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2292 - supported streaming protocols, */ \ + /* 2296 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Audio Output (server), little-endian */ \ \ - /* 2296 - audio output list, */ \ + /* 2300 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1184,7 +1194,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), little-endian */ \ \ - /* 2550 - application launcher list, */ \ + /* 2554 - application launcher list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1202,67 +1212,67 @@ \ /* Endpoint: 1, Cluster: Application Basic (server), little-endian */ \ \ - /* 2804 - allowed vendor list, */ \ + /* 2808 - allowed vendor list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), little-endian */ \ \ - /* 2836 - bitmap32, */ \ + /* 2840 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2840 - bitmap64, */ \ + /* 2844 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2848 - int24u, */ \ + /* 2852 - int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 2851 - int32u, */ \ + /* 2855 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2855 - int40u, */ \ + /* 2859 - int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2860 - int48u, */ \ + /* 2864 - int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2866 - int56u, */ \ + /* 2870 - int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2873 - int64u, */ \ + /* 2877 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2881 - int24s, */ \ + /* 2885 - int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 2884 - int32s, */ \ + /* 2888 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2888 - int40s, */ \ + /* 2892 - int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2893 - int48s, */ \ + /* 2897 - int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2899 - int56s, */ \ + /* 2903 - int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2906 - int64s, */ \ + /* 2910 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2914 - float_single, */ \ + /* 2918 - float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2918 - float_double, */ \ + /* 2922 - float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2926 - epoch_us, */ \ + /* 2930 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2934 - epoch_s, */ \ + /* 2938 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2938 - list_long_octet_string, */ \ + /* 2942 - list_long_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1317,71 +1327,71 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3938 - nullable_bitmap32, */ \ + /* 3942 - nullable_bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3942 - nullable_bitmap64, */ \ + /* 3946 - nullable_bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3950 - nullable_int24u, */ \ + /* 3954 - nullable_int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 3953 - nullable_int32u, */ \ + /* 3957 - nullable_int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3957 - nullable_int40u, */ \ + /* 3961 - nullable_int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3962 - nullable_int48u, */ \ + /* 3966 - nullable_int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3968 - nullable_int56u, */ \ + /* 3972 - nullable_int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3975 - nullable_int64u, */ \ + /* 3979 - nullable_int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3983 - nullable_int24s, */ \ + /* 3987 - nullable_int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 3986 - nullable_int32s, */ \ + /* 3990 - nullable_int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3990 - nullable_int40s, */ \ + /* 3994 - nullable_int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3995 - nullable_int48s, */ \ + /* 3999 - nullable_int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4001 - nullable_int56s, */ \ + /* 4005 - nullable_int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4008 - nullable_int64s, */ \ + /* 4012 - nullable_int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4016 - nullable_float_single, */ \ + /* 4020 - nullable_float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4020 - nullable_float_double, */ \ + /* 4024 - nullable_float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), little-endian */ \ \ - /* 4028 - measurement type, */ \ + /* 4032 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4032 - total active power, */ \ + /* 4036 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), little-endian */ \ \ - /* 4036 - FeatureMap, */ \ + /* 4040 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (147) +#define GENERATED_DEFAULTS_COUNT (148) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -1474,7 +1484,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 614 +#define GENERATED_ATTRIBUTE_COUNT 615 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1766,7 +1776,7 @@ { 0x0000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0xFE) }, /* current level */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFE) }, /* max level */ \ { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ @@ -1781,9 +1791,12 @@ { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, \ + ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(890) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { 0x0051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1817,25 +1830,25 @@ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Status */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Order */ \ { 0x0002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* Description */ \ - { 0x000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(890) }, /* BatteryVoltage */ \ + { 0x000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(894) }, /* BatteryVoltage */ \ { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryPercentRemaining */ \ - { 0x000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(894) }, /* BatteryTimeRemaining */ \ + { 0x000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(898) }, /* BatteryTimeRemaining */ \ { 0x000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ - { 0x0012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(898) }, /* ActiveBatteryFaults */ \ + { 0x0012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(902) }, /* ActiveBatteryFaults */ \ { 0x001A, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeState */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(906) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(910) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(910) }, /* Networks */ \ + { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(914) }, /* Networks */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(922) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(926) }, /* FeatureMap */ \ + { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(926) }, /* LastConnectErrorValue */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(930) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ @@ -1845,11 +1858,11 @@ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* number of positions */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* current position */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* multi press max */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(930) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(934) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(934) }, /* label list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(938) }, /* label list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: User Label (server) */ \ @@ -1866,7 +1879,7 @@ { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* SupportedModes */ \ { 0x0002, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnMode */ \ { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* StartUpMode */ \ - { 0x0004, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(1188) }, /* Description */ \ + { 0x0004, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(1192) }, /* Description */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ @@ -1874,8 +1887,8 @@ { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LockType */ \ { 0x0002, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ActuatorEnabled */ \ { 0x0003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* DoorState */ \ - { 0x0004, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1195) }, /* DoorOpenEvents */ \ - { 0x0005, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1199) }, /* DoorClosedEvents */ \ + { 0x0004, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1199) }, /* DoorOpenEvents */ \ + { 0x0005, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1203) }, /* DoorClosedEvents */ \ { 0x0006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* OpenPeriod */ \ { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfTotalUsersSupported */ \ { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfPINUsersSupported */ \ @@ -1885,8 +1898,8 @@ { 0x0017, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MaxPINCodeLength */ \ { 0x0018, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MinPINCodeLength */ \ { 0x001B, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* CredentialRulesSupport */ \ - { 0x0021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1203) }, /* Language */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1206) }, /* AutoRelockTime */ \ + { 0x0021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1207) }, /* Language */ \ + { 0x0023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1210) }, /* AutoRelockTime */ \ { 0x0024, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* SoundVolume */ \ { 0x0025, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1931,7 +1944,7 @@ { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* Mode */ \ { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1210) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1214) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ @@ -1961,16 +1974,16 @@ { 0x0013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ { 0x0015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(1214) }, /* LifetimeRunningHours */ \ - { 0x0016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(1217) }, /* Power */ \ + ZAP_LONG_DEFAULTS_INDEX(1218) }, /* LifetimeRunningHours */ \ + { 0x0016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(1221) }, /* Power */ \ { 0x0017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(1220) }, /* LifetimeEnergyConsumed */ \ + ZAP_LONG_DEFAULTS_INDEX(1224) }, /* LifetimeEnergyConsumed */ \ { 0x0020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* OperationMode */ \ { 0x0021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* ControlMode */ \ { 0x0022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1224) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1228) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ @@ -2000,7 +2013,7 @@ { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ { 0x0021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ { 0x0022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1228) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1232) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ @@ -2121,7 +2134,7 @@ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* zone state */ \ { 0x0001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* zone type */ \ { 0x0002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* zone status */ \ - { 0x0010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1232) }, /* IAS CIE address */ \ + { 0x0010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1236) }, /* IAS CIE address */ \ { 0x0011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* Zone ID */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ @@ -2130,25 +2143,25 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Channel (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1240) }, /* channel list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1244) }, /* channel list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1494) }, /* target navigator list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1498) }, /* target navigator list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current navigator target */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Playback (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ - { 0x0001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1748) }, /* start time */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1756) }, /* duration */ \ - { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1764) }, /* playback speed */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1768) }, /* seek range end */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1776) }, /* seek range start */ \ + { 0x0001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1752) }, /* start time */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1760) }, /* duration */ \ + { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1768) }, /* playback speed */ \ + { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1772) }, /* seek range end */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1780) }, /* seek range start */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Input (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1784) }, /* media input list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1788) }, /* media input list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current media input */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ @@ -2159,18 +2172,18 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2038) }, /* accept header list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2042) }, /* accept header list */ \ { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(2292) }, /* supported streaming protocols */ \ + ZAP_LONG_DEFAULTS_INDEX(2296) }, /* supported streaming protocols */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2296) }, /* audio output list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2300) }, /* audio output list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current audio output */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2550) }, /* application launcher list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2554) }, /* application launcher list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ @@ -2180,7 +2193,7 @@ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ { 0x0006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ - { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2804) }, /* allowed vendor list */ \ + { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2808) }, /* allowed vendor list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Account Login (server) */ \ @@ -2190,28 +2203,28 @@ { 0x0000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) }, /* boolean */ \ { 0x0001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap8 */ \ { 0x0002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap16 */ \ - { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2836) }, /* bitmap32 */ \ - { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2840) }, /* bitmap64 */ \ + { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2840) }, /* bitmap32 */ \ + { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2844) }, /* bitmap64 */ \ { 0x0005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8u */ \ { 0x0006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16u */ \ - { 0x0007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2848) }, /* int24u */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2851) }, /* int32u */ \ - { 0x0009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2855) }, /* int40u */ \ - { 0x000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2860) }, /* int48u */ \ - { 0x000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2866) }, /* int56u */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2873) }, /* int64u */ \ + { 0x0007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2852) }, /* int24u */ \ + { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2855) }, /* int32u */ \ + { 0x0009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2859) }, /* int40u */ \ + { 0x000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2864) }, /* int48u */ \ + { 0x000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2870) }, /* int56u */ \ + { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2877) }, /* int64u */ \ { 0x000D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8s */ \ { 0x000E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16s */ \ - { 0x000F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2881) }, /* int24s */ \ - { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2884) }, /* int32s */ \ - { 0x0011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2888) }, /* int40s */ \ - { 0x0012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2893) }, /* int48s */ \ - { 0x0013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2899) }, /* int56s */ \ - { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2906) }, /* int64s */ \ + { 0x000F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2885) }, /* int24s */ \ + { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2888) }, /* int32s */ \ + { 0x0011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2892) }, /* int40s */ \ + { 0x0012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2897) }, /* int48s */ \ + { 0x0013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2903) }, /* int56s */ \ + { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2910) }, /* int64s */ \ { 0x0015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum8 */ \ { 0x0016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum16 */ \ - { 0x0017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2914) }, /* float_single */ \ - { 0x0018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2918) }, /* float_double */ \ + { 0x0017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2918) }, /* float_single */ \ + { 0x0018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2922) }, /* float_double */ \ { 0x0019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* octet_string */ \ { 0x001A, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* list_int8u */ \ @@ -2224,8 +2237,8 @@ { 0x001E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* char_string */ \ { 0x001F, ZAP_TYPE(LONG_CHAR_STRING), 1002, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* long_char_string */ \ - { 0x0020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2926) }, /* epoch_us */ \ - { 0x0021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2934) }, /* epoch_s */ \ + { 0x0020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2930) }, /* epoch_us */ \ + { 0x0021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2938) }, /* epoch_s */ \ { 0x0022, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* vendor_id */ \ { 0x0023, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* list_nullables_and_optionals_struct */ \ @@ -2240,7 +2253,7 @@ ZAP_MIN_MAX_DEFAULTS_INDEX(33) }, /* range_restricted_int16u */ \ { 0x0029, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(34) }, /* range_restricted_int16s */ \ - { 0x002A, ZAP_TYPE(ARRAY), 1000, 0, ZAP_LONG_DEFAULTS_INDEX(2938) }, /* list_long_octet_string */ \ + { 0x002A, ZAP_TYPE(ARRAY), 1000, 0, ZAP_LONG_DEFAULTS_INDEX(2942) }, /* list_long_octet_string */ \ { 0x0030, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(MUST_USE_TIMED_WRITE), \ ZAP_EMPTY_DEFAULT() }, /* timed_write_boolean */ \ { 0x8000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ @@ -2250,49 +2263,49 @@ { 0x8002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_bitmap16 */ \ { 0x8003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3938) }, /* nullable_bitmap32 */ \ + ZAP_LONG_DEFAULTS_INDEX(3942) }, /* nullable_bitmap32 */ \ { 0x8004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3942) }, /* nullable_bitmap64 */ \ + ZAP_LONG_DEFAULTS_INDEX(3946) }, /* nullable_bitmap64 */ \ { 0x8005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int8u */ \ { 0x8006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int16u */ \ { 0x8007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3950) }, /* nullable_int24u */ \ + ZAP_LONG_DEFAULTS_INDEX(3954) }, /* nullable_int24u */ \ { 0x8008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3953) }, /* nullable_int32u */ \ + ZAP_LONG_DEFAULTS_INDEX(3957) }, /* nullable_int32u */ \ { 0x8009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3957) }, /* nullable_int40u */ \ + ZAP_LONG_DEFAULTS_INDEX(3961) }, /* nullable_int40u */ \ { 0x800A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3962) }, /* nullable_int48u */ \ + ZAP_LONG_DEFAULTS_INDEX(3966) }, /* nullable_int48u */ \ { 0x800B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3968) }, /* nullable_int56u */ \ + ZAP_LONG_DEFAULTS_INDEX(3972) }, /* nullable_int56u */ \ { 0x800C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3975) }, /* nullable_int64u */ \ + ZAP_LONG_DEFAULTS_INDEX(3979) }, /* nullable_int64u */ \ { 0x800D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int8s */ \ { 0x800E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int16s */ \ { 0x800F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3983) }, /* nullable_int24s */ \ + ZAP_LONG_DEFAULTS_INDEX(3987) }, /* nullable_int24s */ \ { 0x8010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3986) }, /* nullable_int32s */ \ + ZAP_LONG_DEFAULTS_INDEX(3990) }, /* nullable_int32s */ \ { 0x8011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3990) }, /* nullable_int40s */ \ + ZAP_LONG_DEFAULTS_INDEX(3994) }, /* nullable_int40s */ \ { 0x8012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3995) }, /* nullable_int48s */ \ + ZAP_LONG_DEFAULTS_INDEX(3999) }, /* nullable_int48s */ \ { 0x8013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4001) }, /* nullable_int56s */ \ + ZAP_LONG_DEFAULTS_INDEX(4005) }, /* nullable_int56s */ \ { 0x8014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4008) }, /* nullable_int64s */ \ + ZAP_LONG_DEFAULTS_INDEX(4012) }, /* nullable_int64s */ \ { 0x8015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_enum8 */ \ { 0x8016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_enum16 */ \ { 0x8017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4016) }, /* nullable_float_single */ \ + ZAP_LONG_DEFAULTS_INDEX(4020) }, /* nullable_float_single */ \ { 0x8018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4020) }, /* nullable_float_double */ \ + ZAP_LONG_DEFAULTS_INDEX(4024) }, /* nullable_float_double */ \ { 0x8019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* nullable_octet_string */ \ { 0x801E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ @@ -2317,8 +2330,8 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ - { 0x0000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4028) }, /* measurement type */ \ - { 0x0304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4032) }, /* total active power */ \ + { 0x0000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4032) }, /* measurement type */ \ + { 0x0304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4036) }, /* total active power */ \ { 0x0505, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms voltage */ \ { 0x0506, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage min */ \ { 0x0507, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage max */ \ @@ -2340,7 +2353,7 @@ { 0x4001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnTime */ \ { 0x4002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OffWaitTime */ \ { 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4036) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4040) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ @@ -2521,177 +2534,177 @@ }, /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(210), \ - 15, \ - 23, \ + 16, \ + 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x000F, ZAP_ATTRIBUTE_INDEX(225), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x000F, ZAP_ATTRIBUTE_INDEX(226), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(229), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(230), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x001E, ZAP_ATTRIBUTE_INDEX(234), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001E, ZAP_ATTRIBUTE_INDEX(235), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { \ - 0x0025, ZAP_ATTRIBUTE_INDEX(235), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0025, ZAP_ATTRIBUTE_INDEX(236), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(239), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(240), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Localization Configuration (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(241), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002F, ZAP_ATTRIBUTE_INDEX(242), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(252), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(253), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(262), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(263), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(263), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(264), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(268), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(269), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(270), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(271), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: User Label (server) */ \ { \ - 0x0045, ZAP_ATTRIBUTE_INDEX(272), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0045, ZAP_ATTRIBUTE_INDEX(273), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Boolean State (server) */ \ { \ - 0x0050, ZAP_ATTRIBUTE_INDEX(274), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0050, ZAP_ATTRIBUTE_INDEX(275), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Mode Select (server) */ \ { 0x0101, \ - ZAP_ATTRIBUTE_INDEX(280), \ + ZAP_ATTRIBUTE_INDEX(281), \ 28, \ 49, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(308), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(309), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(328), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(329), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { \ 0x0200, \ - ZAP_ATTRIBUTE_INDEX(333), \ + ZAP_ATTRIBUTE_INDEX(334), \ 26, \ 54, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayPumpConfigurationAndControlServer \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ { 0x0201, \ - ZAP_ATTRIBUTE_INDEX(359), \ + ZAP_ATTRIBUTE_INDEX(360), \ 19, \ 34, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayThermostatServer }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { \ 0x0204, \ - ZAP_ATTRIBUTE_INDEX(378), \ + ZAP_ATTRIBUTE_INDEX(379), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayThermostatUserInterfaceConfigurationServer \ }, /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(382), \ + ZAP_ATTRIBUTE_INDEX(383), \ 53, \ 341, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x0400, ZAP_ATTRIBUTE_INDEX(435), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0400, ZAP_ATTRIBUTE_INDEX(436), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(441), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(442), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(446), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(447), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(450), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(451), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(455), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(456), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(460), \ + ZAP_ATTRIBUTE_INDEX(461), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { 0x0500, \ - ZAP_ATTRIBUTE_INDEX(464), \ + ZAP_ATTRIBUTE_INDEX(465), \ 6, \ 16, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ chipFuncArrayIasZoneServer }, /* Endpoint: 1, Cluster: IAS Zone (server) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(470), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(471), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(472), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(473), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(474), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(475), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(477), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(478), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(484), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(485), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(487), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(488), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(488), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(489), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(489), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(490), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(492), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(493), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(495), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(496), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(497), 8, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(498), 8, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(505), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(506), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(506), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(507), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ - 0x0B04, ZAP_ATTRIBUTE_INDEX(584), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0B04, ZAP_ATTRIBUTE_INDEX(585), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ { 0x0004, \ - ZAP_ATTRIBUTE_INDEX(596), \ + ZAP_ATTRIBUTE_INDEX(597), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 2, Cluster: Groups (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(598), \ + ZAP_ATTRIBUTE_INDEX(599), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(605), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(606), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(610), \ + ZAP_ATTRIBUTE_INDEX(611), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2703,7 +2716,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 24, 1755 }, { ZAP_CLUSTER_INDEX(24), 47, 6226 }, { ZAP_CLUSTER_INDEX(71), 4, 21 }, \ + { ZAP_CLUSTER_INDEX(0), 24, 1755 }, { ZAP_CLUSTER_INDEX(24), 47, 6230 }, { ZAP_CLUSTER_INDEX(71), 4, 21 }, \ } // Largest attribute size is needed for various buffers @@ -2713,7 +2726,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (689) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (8002) +#define ATTRIBUTE_MAX_SIZE (8006) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/all-clusters-app/zap-generated/gen_config.h b/zzz_generated/all-clusters-app/zap-generated/gen_config.h index 1f00a31f29ed1b..43bf17db7efe33 100644 --- a/zzz_generated/all-clusters-app/zap-generated/gen_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/gen_config.h @@ -260,7 +260,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 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 8e9bf8fad3186e..7038c647ad73de 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 @@ -3568,24 +3568,27 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace StartUpCurrentLevel { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -3595,6 +3598,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace StartUpCurrentLevel namespace FeatureMap { 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 1acd7c9462845c..f715ef9bcc5ec6 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 @@ -632,8 +632,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl } // namespace DefaultMoveRate namespace StartUpCurrentLevel { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace StartUpCurrentLevel namespace FeatureMap { 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 eac0efeb0fa85b..58bd22d5af126a 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 @@ -3278,6 +3278,14 @@ enum class StepMode : uint8_t using StepMode = EmberAfStepMode; #endif +// Bitmap for LevelControlFeature +enum class LevelControlFeature : uint32_t +{ + kOnOff = 0x1, + kLighting = 0x2, + kFrequency = 0x4, +}; + namespace Commands { // Forward-declarations so we can reference these later. @@ -3784,9 +3792,9 @@ struct TypeInfo namespace StartUpCurrentLevel { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::StartUpCurrentLevel::Id; } @@ -3851,7 +3859,7 @@ struct TypeInfo Attributes::OnTransitionTime::TypeInfo::DecodableType onTransitionTime; Attributes::OffTransitionTime::TypeInfo::DecodableType offTransitionTime; Attributes::DefaultMoveRate::TypeInfo::DecodableType defaultMoveRate; - Attributes::StartUpCurrentLevel::TypeInfo::DecodableType startUpCurrentLevel = static_cast(0); + Attributes::StartUpCurrentLevel::TypeInfo::DecodableType startUpCurrentLevel; Attributes::AttributeList::TypeInfo::DecodableType attributeList; Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); diff --git a/zzz_generated/app-common/app-common/zap-generated/enums.h b/zzz_generated/app-common/app-common/zap-generated/enums.h index e7e484c85776e0..46c60a79884f31 100644 --- a/zzz_generated/app-common/app-common/zap-generated/enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/enums.h @@ -902,6 +902,12 @@ enum EmberAfWiFiVersionType : uint8_t #define EMBER_AF_KEYPAD_INPUT_FEATURE_NUMBER_KEYS_OFFSET (2) #define EMBER_AF_LAMP_ALARM_MODE_LAMP_BURN_HOURS (1) #define EMBER_AF_LAMP_ALARM_MODE_LAMP_BURN_HOURS_OFFSET (0) +#define EMBER_AF_LEVEL_CONTROL_FEATURE_ON_OFF (1) +#define EMBER_AF_LEVEL_CONTROL_FEATURE_ON_OFF_OFFSET (0) +#define EMBER_AF_LEVEL_CONTROL_FEATURE_LIGHTING (2) +#define EMBER_AF_LEVEL_CONTROL_FEATURE_LIGHTING_OFFSET (1) +#define EMBER_AF_LEVEL_CONTROL_FEATURE_FREQUENCY (4) +#define EMBER_AF_LEVEL_CONTROL_FEATURE_FREQUENCY_OFFSET (2) #define EMBER_AF_MAINS_ALARM_MASK_VOLTAGE_TOO_LOW (1) #define EMBER_AF_MAINS_ALARM_MASK_VOLTAGE_TOO_LOW_OFFSET (0) #define EMBER_AF_MAINS_ALARM_MASK_VOLTAGE_TOO_HIGH (2) diff --git a/zzz_generated/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index 6b91a3e0efab7c..9adb525d614173 100644 --- a/zzz_generated/bridge-app/zap-generated/endpoint_config.h +++ b/zzz_generated/bridge-app/zap-generated/endpoint_config.h @@ -272,14 +272,19 @@ /* 611 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ - /* Endpoint: 1, Cluster: Switch (server), big-endian */ \ + /* Endpoint: 1, Cluster: Level Control (server), big-endian */ \ \ /* 615 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x03, \ + \ + /* Endpoint: 1, Cluster: Switch (server), big-endian */ \ + \ + /* 619 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), big-endian */ \ \ - /* 619 - label list, */ \ + /* 623 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -545,14 +550,19 @@ /* 611 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: Switch (server), little-endian */ \ + /* Endpoint: 1, Cluster: Level Control (server), little-endian */ \ \ /* 615 - FeatureMap, */ \ + 0x03, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Switch (server), little-endian */ \ + \ + /* 619 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), little-endian */ \ \ - /* 619 - label list, */ \ + /* 623 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -571,7 +581,7 @@ #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (74) +#define GENERATED_DEFAULTS_COUNT (75) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -604,7 +614,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 184 +#define GENERATED_ATTRIBUTE_COUNT 185 #define GENERATED_ATTRIBUTES \ { \ \ @@ -805,13 +815,13 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFE) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -823,9 +833,12 @@ { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, \ + ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -838,11 +851,11 @@ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* number of positions */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* current position */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* multi press max */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* label list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(623) }, /* label list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ } @@ -919,18 +932,18 @@ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(157), \ - 15, \ - 23, \ + 16, \ + 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(172), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(173), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(177), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(178), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(182), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(183), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ } @@ -939,7 +952,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 15, 1031 }, { ZAP_CLUSTER_INDEX(15), 5, 291 }, \ + { ZAP_CLUSTER_INDEX(0), 15, 1031 }, { ZAP_CLUSTER_INDEX(15), 5, 295 }, \ } // Largest attribute size is needed for various buffers @@ -949,7 +962,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (246) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1322) +#define ATTRIBUTE_MAX_SIZE (1326) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/bridge-app/zap-generated/gen_config.h b/zzz_generated/bridge-app/zap-generated/gen_config.h index c996e9c9ea84ab..3bedda895a0570 100644 --- a/zzz_generated/bridge-app/zap-generated/gen_config.h +++ b/zzz_generated/bridge-app/zap-generated/gen_config.h @@ -95,7 +95,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 9ecf0953e6d6bc..2dcb480bf0b253 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -23272,6 +23272,7 @@ class ReportKeypadInputClusterRevision : public ModelCommand | * DefaultMoveRate | 0x0014 | | * StartUpCurrentLevel | 0x4000 | | * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | @@ -24573,7 +24574,7 @@ class ReadLevelControlStartUpCurrentLevel : public ModelCommand this, OnAttributeResponse, OnDefaultFailure); } - static void OnAttributeResponse(void * context, uint8_t value) + static void OnAttributeResponse(void * context, const chip::app::DataModel::Nullable & value) { OnGeneralAttributeEventResponse(context, "LevelControl.StartUpCurrentLevel response", value); } @@ -24602,7 +24603,7 @@ class WriteLevelControlStartUpCurrentLevel : public ModelCommand } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class ReportLevelControlStartUpCurrentLevel : public ModelCommand @@ -24636,7 +24637,10 @@ class ReportLevelControlStartUpCurrentLevel : public ModelCommand return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); } - static void OnValueReport(void * context, uint8_t value) { LogValue("LevelControl.StartUpCurrentLevel report", 0, value); } + static void OnValueReport(void * context, const chip::app::DataModel::Nullable & value) + { + LogValue("LevelControl.StartUpCurrentLevel report", 0, value); + } private: uint16_t mMinInterval; @@ -24674,6 +24678,36 @@ class ReadLevelControlAttributeList : public ModelCommand } }; +/* + * Attribute FeatureMap + */ +class ReadLevelControlFeatureMap : public ModelCommand +{ +public: + ReadLevelControlFeatureMap() : ModelCommand("read") + { + AddArgument("attr-name", "feature-map"); + ModelCommand::AddArguments(); + } + + ~ReadLevelControlFeatureMap() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) ReadAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute(this, OnAttributeResponse, + OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, uint32_t value) + { + OnGeneralAttributeEventResponse(context, "LevelControl.FeatureMap response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -56758,6 +56792,7 @@ void registerClusterLevelControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 34f2af8e8da1f1..40c03087c7ec0e 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -17361,13 +17361,29 @@ class Test_TC_LVL_1_1 : public TestCommand err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + break; + case 3: ChipLogProgress(chipTool, - " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); + " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); + err = TestReadsBackGlobalAttributeClusterRevision_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional global attribute : FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : write the default values to optional global attribute: FeatureMap\n"); + err = TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_6(); break; } @@ -17380,7 +17396,7 @@ class Test_TC_LVL_1_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 7; chip::Optional mCluster; chip::Optional mEndpoint; @@ -17400,7 +17416,44 @@ class Test_TC_LVL_1_1 : public TestCommand (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } + static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) + { + (static_cast(context))->OnSuccessResponse_2(clusterRevision); + } + + static void OnFailureCallback_3(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_3(status); + } + + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } + + static void OnFailureCallback_4(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_4(status); + } + + static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) + { + (static_cast(context))->OnSuccessResponse_4(clusterRevision); + } + + static void OnFailureCallback_5(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_5(status); + } + + static void OnSuccessCallback_5(void * context, uint32_t featureMap) + { + (static_cast(context))->OnSuccessResponse_5(featureMap); + } + + static void OnFailureCallback_6(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_6(status); + } + + static void OnSuccessCallback_6(void * context) { (static_cast(context))->OnSuccessResponse_6(); } // // Tests methods @@ -17412,7 +17465,7 @@ class Test_TC_LVL_1_1 : public TestCommand return WaitForCommissionee(); } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; @@ -17426,12 +17479,32 @@ class Test_TC_LVL_1_1 : public TestCommand void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } void OnSuccessResponse_1(uint16_t clusterRevision) + { + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 5U)); + + NextTest(); + } + + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_2(uint16_t clusterRevision) { VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() + CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; @@ -17441,17 +17514,78 @@ class Test_TC_LVL_1_1 : public TestCommand clusterRevisionArgument = 4U; ReturnErrorOnFailure(cluster.WriteAttribute( - clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) + void OnFailureResponse_3(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_2() { ThrowSuccessResponse(); } + void OnSuccessResponse_3() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_4(uint16_t clusterRevision) + { + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 5U)); + + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_5() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_5(uint32_t featureMap) + { + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + NextTest(); + } + + CHIP_ERROR TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_6() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint32_t featureMapArgument; + featureMapArgument = 0UL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + featureMapArgument, this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_6(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + } + + void OnSuccessResponse_6() { ThrowSuccessResponse(); } }; class Test_TC_LVL_2_1 : public TestCommand @@ -17495,64 +17629,64 @@ class Test_TC_LVL_2_1 : public TestCommand err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the CurrentLevel attribute\n"); - err = TestReadsTheCurrentLevelAttribute_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reset level to 254\n"); + err = TestResetLevelTo254_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentLevel attribute\n"); - err = TestReadsTheCurrentLevelAttribute_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Wait 100ms\n"); + err = TestWait100ms_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the RemainingTime attribute\n"); - err = TestReadsTheRemainingTimeAttribute_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the CurrentLevel attribute\n"); + err = TestReadsTheCurrentLevelAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the MinLevel attribute\n"); - err = TestReadsTheMinLevelAttribute_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the RemainingTime attribute\n"); + err = TestReadsTheRemainingTimeAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the MaxLevel attribute\n"); - err = TestReadsTheMaxLevelAttribute_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the MinLevel attribute\n"); + err = TestReadsTheMinLevelAttribute_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the CurrentFrequency attribute\n"); - err = TestReadsTheCurrentFrequencyAttribute_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the MaxLevel attribute\n"); + err = TestReadsTheMaxLevelAttribute_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the MinFrequency attribute\n"); - err = TestReadsTheMinFrequencyAttribute_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the CurrentFrequency attribute\n"); + err = TestReadsTheCurrentFrequencyAttribute_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the MaxFrequency attribute\n"); - err = TestReadsTheMaxFrequencyAttribute_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the MinFrequency attribute\n"); + err = TestReadsTheMinFrequencyAttribute_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the OnOffTransitionTime attribute\n"); - err = TestReadsTheOnOffTransitionTimeAttribute_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the MaxFrequency attribute\n"); + err = TestReadsTheMaxFrequencyAttribute_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the OnLevel attribute \n"); - err = TestReadsTheOnLevelAttribute_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the OnOffTransitionTime attribute\n"); + err = TestReadsTheOnOffTransitionTimeAttribute_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the OnTransitionTime attribute \n"); - err = TestReadsTheOnTransitionTimeAttribute_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the OnLevel attribute \n"); + err = TestReadsTheOnLevelAttribute_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Reads the OffTransitionTime attribute \n"); - err = TestReadsTheOffTransitionTimeAttribute_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Reads the OnTransitionTime attribute \n"); + err = TestReadsTheOnTransitionTimeAttribute_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the DefaultMoveRate attribute \n"); - err = TestReadsTheDefaultMoveRateAttribute_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the OffTransitionTime attribute \n"); + err = TestReadsTheOffTransitionTimeAttribute_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the Options attribute \n"); - err = TestReadsTheOptionsAttribute_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the DefaultMoveRate attribute \n"); + err = TestReadsTheDefaultMoveRateAttribute_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the StartUpCurrentLevel attribute \n"); - err = TestReadsTheStartUpCurrentLevelAttribute_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the Options attribute \n"); + err = TestReadsTheOptionsAttribute_15(); break; } @@ -17570,34 +17704,14 @@ class Test_TC_LVL_2_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; - static void OnFailureCallback_1(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_1(status); - } - - static void OnSuccessCallback_1(void * context, uint8_t currentLevel) - { - (static_cast(context))->OnSuccessResponse_1(currentLevel); - } - - static void OnFailureCallback_2(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_2(status); - } - - static void OnSuccessCallback_2(void * context, uint8_t currentLevel) - { - (static_cast(context))->OnSuccessResponse_2(currentLevel); - } - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint16_t remainingTime) + static void OnSuccessCallback_3(void * context, uint8_t currentLevel) { - (static_cast(context))->OnSuccessResponse_3(remainingTime); + (static_cast(context))->OnSuccessResponse_3(currentLevel); } static void OnFailureCallback_4(void * context, EmberAfStatus status) @@ -17605,9 +17719,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint8_t minLevel) + static void OnSuccessCallback_4(void * context, uint16_t remainingTime) { - (static_cast(context))->OnSuccessResponse_4(minLevel); + (static_cast(context))->OnSuccessResponse_4(remainingTime); } static void OnFailureCallback_5(void * context, EmberAfStatus status) @@ -17615,9 +17729,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, uint8_t maxLevel) + static void OnSuccessCallback_5(void * context, uint8_t minLevel) { - (static_cast(context))->OnSuccessResponse_5(maxLevel); + (static_cast(context))->OnSuccessResponse_5(minLevel); } static void OnFailureCallback_6(void * context, EmberAfStatus status) @@ -17625,9 +17739,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, uint16_t currentFrequency) + static void OnSuccessCallback_6(void * context, uint8_t maxLevel) { - (static_cast(context))->OnSuccessResponse_6(currentFrequency); + (static_cast(context))->OnSuccessResponse_6(maxLevel); } static void OnFailureCallback_7(void * context, EmberAfStatus status) @@ -17635,9 +17749,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, uint16_t minFrequency) + static void OnSuccessCallback_7(void * context, uint16_t currentFrequency) { - (static_cast(context))->OnSuccessResponse_7(minFrequency); + (static_cast(context))->OnSuccessResponse_7(currentFrequency); } static void OnFailureCallback_8(void * context, EmberAfStatus status) @@ -17645,9 +17759,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, uint16_t maxFrequency) + static void OnSuccessCallback_8(void * context, uint16_t minFrequency) { - (static_cast(context))->OnSuccessResponse_8(maxFrequency); + (static_cast(context))->OnSuccessResponse_8(minFrequency); } static void OnFailureCallback_9(void * context, EmberAfStatus status) @@ -17655,9 +17769,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, uint16_t onOffTransitionTime) + static void OnSuccessCallback_9(void * context, uint16_t maxFrequency) { - (static_cast(context))->OnSuccessResponse_9(onOffTransitionTime); + (static_cast(context))->OnSuccessResponse_9(maxFrequency); } static void OnFailureCallback_10(void * context, EmberAfStatus status) @@ -17665,9 +17779,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context, const chip::app::DataModel::Nullable & onLevel) + static void OnSuccessCallback_10(void * context, uint16_t onOffTransitionTime) { - (static_cast(context))->OnSuccessResponse_10(onLevel); + (static_cast(context))->OnSuccessResponse_10(onOffTransitionTime); } static void OnFailureCallback_11(void * context, EmberAfStatus status) @@ -17675,9 +17789,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context, const chip::app::DataModel::Nullable & onTransitionTime) + static void OnSuccessCallback_11(void * context, const chip::app::DataModel::Nullable & onLevel) { - (static_cast(context))->OnSuccessResponse_11(onTransitionTime); + (static_cast(context))->OnSuccessResponse_11(onLevel); } static void OnFailureCallback_12(void * context, EmberAfStatus status) @@ -17685,9 +17799,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context, const chip::app::DataModel::Nullable & offTransitionTime) + static void OnSuccessCallback_12(void * context, const chip::app::DataModel::Nullable & onTransitionTime) { - (static_cast(context))->OnSuccessResponse_12(offTransitionTime); + (static_cast(context))->OnSuccessResponse_12(onTransitionTime); } static void OnFailureCallback_13(void * context, EmberAfStatus status) @@ -17695,9 +17809,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context, const chip::app::DataModel::Nullable & defaultMoveRate) + static void OnSuccessCallback_13(void * context, const chip::app::DataModel::Nullable & offTransitionTime) { - (static_cast(context))->OnSuccessResponse_13(defaultMoveRate); + (static_cast(context))->OnSuccessResponse_13(offTransitionTime); } static void OnFailureCallback_14(void * context, EmberAfStatus status) @@ -17705,9 +17819,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context, uint8_t options) + static void OnSuccessCallback_14(void * context, const chip::app::DataModel::Nullable & defaultMoveRate) { - (static_cast(context))->OnSuccessResponse_14(options); + (static_cast(context))->OnSuccessResponse_14(defaultMoveRate); } static void OnFailureCallback_15(void * context, EmberAfStatus status) @@ -17715,9 +17829,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_15(status); } - static void OnSuccessCallback_15(void * context, uint8_t startUpCurrentLevel) + static void OnSuccessCallback_15(void * context, uint8_t options) { - (static_cast(context))->OnSuccessResponse_15(startUpCurrentLevel); + (static_cast(context))->OnSuccessResponse_15(options); } // @@ -17730,296 +17844,290 @@ class Test_TC_LVL_2_1 : public TestCommand return WaitForCommissionee(); } - CHIP_ERROR TestReadsTheCurrentLevelAttribute_1() + CHIP_ERROR TestResetLevelTo254_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } + using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; - void OnSuccessResponse_1(uint8_t currentLevel) - { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 254)); + RequestType request; + request.level = 254; + request.transitionTime = 0U; + request.optionMask = 1; + request.optionOverride = 1; - NextTest(); - } + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_1(); + }; - CHIP_ERROR TestReadsTheCurrentLevelAttribute_2() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_1(status); + }; - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_2, OnFailureCallback_2)); + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2(uint8_t currentLevel) + void OnSuccessResponse_1() { NextTest(); } + + CHIP_ERROR TestWait100ms_2() { - VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); - NextTest(); + SetIdentity(kIdentityAlpha); + return WaitForMs(100); } - CHIP_ERROR TestReadsTheRemainingTimeAttribute_3() + CHIP_ERROR TestReadsTheCurrentLevelAttribute_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_3, OnFailureCallback_3)); return CHIP_NO_ERROR; } void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3(uint16_t remainingTime) + void OnSuccessResponse_3(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("remainingTime", remainingTime, 0U)); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 254)); NextTest(); } - CHIP_ERROR TestReadsTheMinLevelAttribute_4() + CHIP_ERROR TestReadsTheRemainingTimeAttribute_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_4, OnFailureCallback_4)); return CHIP_NO_ERROR; } void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4(uint8_t minLevel) + void OnSuccessResponse_4(uint16_t remainingTime) { - VerifyOrReturn(CheckValue("minLevel", minLevel, 0)); + VerifyOrReturn(CheckValue("remainingTime", remainingTime, 0U)); NextTest(); } - CHIP_ERROR TestReadsTheMaxLevelAttribute_5() + CHIP_ERROR TestReadsTheMinLevelAttribute_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_5, OnFailureCallback_5)); return CHIP_NO_ERROR; } void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5(uint8_t maxLevel) + void OnSuccessResponse_5(uint8_t minLevel) { - VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); + VerifyOrReturn(CheckValue("minLevel", minLevel, 0)); + NextTest(); } - CHIP_ERROR TestReadsTheCurrentFrequencyAttribute_6() + CHIP_ERROR TestReadsTheMaxLevelAttribute_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_6, OnFailureCallback_6)); return CHIP_NO_ERROR; } void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6(uint16_t currentFrequency) + void OnSuccessResponse_6(uint8_t maxLevel) { - VerifyOrReturn(CheckValue("currentFrequency", currentFrequency, 0U)); - + VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadsTheMinFrequencyAttribute_7() + CHIP_ERROR TestReadsTheCurrentFrequencyAttribute_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_7, OnFailureCallback_7)); return CHIP_NO_ERROR; } void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7(uint16_t minFrequency) + void OnSuccessResponse_7(uint16_t currentFrequency) { - VerifyOrReturn(CheckValue("minFrequency", minFrequency, 0U)); + VerifyOrReturn(CheckValue("currentFrequency", currentFrequency, 0U)); NextTest(); } - CHIP_ERROR TestReadsTheMaxFrequencyAttribute_8() + CHIP_ERROR TestReadsTheMinFrequencyAttribute_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_8, OnFailureCallback_8)); return CHIP_NO_ERROR; } void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8(uint16_t maxFrequency) + void OnSuccessResponse_8(uint16_t minFrequency) { - VerifyOrReturn(CheckValue("maxFrequency", maxFrequency, 0U)); + VerifyOrReturn(CheckValue("minFrequency", minFrequency, 0U)); NextTest(); } - CHIP_ERROR TestReadsTheOnOffTransitionTimeAttribute_9() + CHIP_ERROR TestReadsTheMaxFrequencyAttribute_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_9, OnFailureCallback_9)); return CHIP_NO_ERROR; } void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9(uint16_t onOffTransitionTime) + void OnSuccessResponse_9(uint16_t maxFrequency) { - VerifyOrReturn(CheckValue("onOffTransitionTime", onOffTransitionTime, 0U)); + VerifyOrReturn(CheckValue("maxFrequency", maxFrequency, 0U)); NextTest(); } - CHIP_ERROR TestReadsTheOnLevelAttribute_10() + CHIP_ERROR TestReadsTheOnOffTransitionTimeAttribute_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_10, OnFailureCallback_10)); return CHIP_NO_ERROR; } void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10(const chip::app::DataModel::Nullable & onLevel) + void OnSuccessResponse_10(uint16_t onOffTransitionTime) { - VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); + VerifyOrReturn(CheckValue("onOffTransitionTime", onOffTransitionTime, 0U)); + NextTest(); } - CHIP_ERROR TestReadsTheOnTransitionTimeAttribute_11() + CHIP_ERROR TestReadsTheOnLevelAttribute_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_11, OnFailureCallback_11)); return CHIP_NO_ERROR; } void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11(const chip::app::DataModel::Nullable & onTransitionTime) + void OnSuccessResponse_11(const chip::app::DataModel::Nullable & onLevel) { - VerifyOrReturn(CheckConstraintType("onTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadsTheOffTransitionTimeAttribute_12() + CHIP_ERROR TestReadsTheOnTransitionTimeAttribute_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_12, OnFailureCallback_12)); return CHIP_NO_ERROR; } void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_12(const chip::app::DataModel::Nullable & offTransitionTime) + void OnSuccessResponse_12(const chip::app::DataModel::Nullable & onTransitionTime) { - VerifyOrReturn(CheckConstraintType("offTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onTransitionTime", "", "uint16")); NextTest(); } - CHIP_ERROR TestReadsTheDefaultMoveRateAttribute_13() + CHIP_ERROR TestReadsTheOffTransitionTimeAttribute_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_13, OnFailureCallback_13)); return CHIP_NO_ERROR; } void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_13(const chip::app::DataModel::Nullable & defaultMoveRate) + void OnSuccessResponse_13(const chip::app::DataModel::Nullable & offTransitionTime) { - VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); + VerifyOrReturn(CheckConstraintType("offTransitionTime", "", "uint16")); NextTest(); } - CHIP_ERROR TestReadsTheOptionsAttribute_14() + CHIP_ERROR TestReadsTheDefaultMoveRateAttribute_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_14, OnFailureCallback_14)); return CHIP_NO_ERROR; } void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_14(uint8_t options) + void OnSuccessResponse_14(const chip::app::DataModel::Nullable & defaultMoveRate) { - VerifyOrReturn(CheckValue("options", options, 0)); - + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadsTheStartUpCurrentLevelAttribute_15() + CHIP_ERROR TestReadsTheOptionsAttribute_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_15, OnFailureCallback_15)); return CHIP_NO_ERROR; } void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_15(uint8_t startUpCurrentLevel) + void OnSuccessResponse_15(uint8_t options) { - VerifyOrReturn(CheckValue("startUpCurrentLevel", startUpCurrentLevel, 0)); + VerifyOrReturn(CheckValue("options", options, 0)); NextTest(); } @@ -18118,16 +18226,12 @@ class Test_TC_LVL_2_2 : public TestCommand err = TestReadsTheDefaultMoveRateAttributeFromTheDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the StartUpCurrentLevel attribute from the DUT\n"); - err = TestReadsTheStartUpCurrentLevelAttributeFromTheDut_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : writes the StartUpCurrentLevel attribute on the DUT\n"); + err = TestWritesTheStartUpCurrentLevelAttributeOnTheDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : writes the StartUpCurrentLevel attribute on the DUT\n"); - err = TestWritesTheStartUpCurrentLevelAttributeOnTheDut_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : reads the StartUpCurrentLevel attribute from the DUT\n"); - err = TestReadsTheStartUpCurrentLevelAttributeFromTheDut_16(); + ChipLogProgress(chipTool, " ***** Test Step 15 : reads the StartUpCurrentLevel attribute from the DUT\n"); + err = TestReadsTheStartUpCurrentLevelAttributeFromTheDut_15(); break; } @@ -18140,7 +18244,7 @@ class Test_TC_LVL_2_2 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 17; + const uint16_t mTestCount = 16; chip::Optional mCluster; chip::Optional mEndpoint; @@ -18262,26 +18366,16 @@ class Test_TC_LVL_2_2 : public TestCommand (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context, uint8_t startUpCurrentLevel) - { - (static_cast(context))->OnSuccessResponse_14(startUpCurrentLevel); - } + static void OnSuccessCallback_14(void * context) { (static_cast(context))->OnSuccessResponse_14(); } static void OnFailureCallback_15(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_15(status); } - static void OnSuccessCallback_15(void * context) { (static_cast(context))->OnSuccessResponse_15(); } - - static void OnFailureCallback_16(void * context, EmberAfStatus status) + static void OnSuccessCallback_15(void * context, const chip::app::DataModel::Nullable & startUpCurrentLevel) { - (static_cast(context))->OnFailureResponse_16(status); - } - - static void OnSuccessCallback_16(void * context, uint8_t startUpCurrentLevel) - { - (static_cast(context))->OnSuccessResponse_16(startUpCurrentLevel); + (static_cast(context))->OnSuccessResponse_15(startUpCurrentLevel); } // @@ -18378,7 +18472,7 @@ class Test_TC_LVL_2_2 : public TestCommand chip::app::DataModel::Nullable onLevelArgument; onLevelArgument.SetNonNull(); - onLevelArgument.Value() = 1; + onLevelArgument.Value() = 254; ReturnErrorOnFailure(cluster.WriteAttribute( onLevelArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); @@ -18405,7 +18499,7 @@ class Test_TC_LVL_2_2 : public TestCommand void OnSuccessResponse_6(const chip::app::DataModel::Nullable & onLevel) { VerifyOrReturn(CheckValueNonNull("onLevel", onLevel)); - VerifyOrReturn(CheckValue("onLevel.Value()", onLevel.Value(), 1)); + VerifyOrReturn(CheckValue("onLevel.Value()", onLevel.Value(), 254)); NextTest(); } @@ -18551,60 +18645,42 @@ class Test_TC_LVL_2_2 : public TestCommand NextTest(); } - CHIP_ERROR TestReadsTheStartUpCurrentLevelAttributeFromTheDut_14() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_14(uint8_t startUpCurrentLevel) - { - VerifyOrReturn(CheckValue("startUpCurrentLevel", startUpCurrentLevel, 0)); - - NextTest(); - } - - CHIP_ERROR TestWritesTheStartUpCurrentLevelAttributeOnTheDut_15() + CHIP_ERROR TestWritesTheStartUpCurrentLevelAttributeOnTheDut_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t startUpCurrentLevelArgument; - startUpCurrentLevelArgument = 1; + chip::app::DataModel::Nullable startUpCurrentLevelArgument; + startUpCurrentLevelArgument.SetNonNull(); + startUpCurrentLevelArgument.Value() = 254; ReturnErrorOnFailure(cluster.WriteAttribute( - startUpCurrentLevelArgument, this, OnSuccessCallback_15, OnFailureCallback_15)); + startUpCurrentLevelArgument, this, OnSuccessCallback_14, OnFailureCallback_14)); return CHIP_NO_ERROR; } - void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_15() { NextTest(); } + void OnSuccessResponse_14() { NextTest(); } - CHIP_ERROR TestReadsTheStartUpCurrentLevelAttributeFromTheDut_16() + CHIP_ERROR TestReadsTheStartUpCurrentLevelAttributeFromTheDut_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_16, OnFailureCallback_16)); + this, OnSuccessCallback_15, OnFailureCallback_15)); return CHIP_NO_ERROR; } - void OnFailureResponse_16(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_16(uint8_t startUpCurrentLevel) + void OnSuccessResponse_15(const chip::app::DataModel::Nullable & startUpCurrentLevel) { - VerifyOrReturn(CheckValue("startUpCurrentLevel", startUpCurrentLevel, 1)); + VerifyOrReturn(CheckValueNonNull("startUpCurrentLevel", startUpCurrentLevel)); + VerifyOrReturn(CheckValue("startUpCurrentLevel.Value()", startUpCurrentLevel.Value(), 254)); NextTest(); } @@ -18861,7 +18937,7 @@ class Test_TC_LVL_3_1 : public TestCommand void OnSuccessResponse_3(uint8_t maxLevel) { - VerifyOrReturn(CheckValue("maxLevel", maxLevel, 255)); + VerifyOrReturn(CheckValue("maxLevel", maxLevel, 254)); NextTest(); } @@ -19022,7 +19098,7 @@ class Test_TC_LVL_3_1 : public TestCommand CHIP_ERROR TestWait10ms_12() { SetIdentity(kIdentityAlpha); - return WaitForMs(10); + return WaitForMs(100); } CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() @@ -19321,7 +19397,7 @@ class Test_TC_LVL_4_1 : public TestCommand void OnSuccessResponse_2(uint8_t maxLevel) { - VerifyOrReturn(CheckValue("maxLevel", maxLevel, 255)); + VerifyOrReturn(CheckValue("maxLevel", maxLevel, 254)); NextTest(); } @@ -19374,7 +19450,7 @@ class Test_TC_LVL_4_1 : public TestCommand void OnSuccessResponse_5(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 255)); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 254)); NextTest(); } @@ -19447,8 +19523,8 @@ class Test_TC_LVL_4_1 : public TestCommand void OnSuccessResponse_9(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 0)); - + VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 0)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 1)); NextTest(); } @@ -20170,8 +20246,8 @@ class Test_TC_LVL_6_1 : public TestCommand void OnSuccessResponse_4(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 0)); - + VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 0)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 1)); NextTest(); } @@ -20248,8 +20324,8 @@ class Test_TC_LVL_6_1 : public TestCommand void OnSuccessResponse_8(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 2)); - + VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 2)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 3)); NextTest(); } diff --git a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h index f38eedda6b7b15..d9cd693bcbd68f 100644 --- a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h +++ b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h @@ -27,34 +27,39 @@ #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 1, Cluster: General Commissioning (client), big-endian */ \ + /* Endpoint: 1, Cluster: Level Control (client), big-endian */ \ \ /* 0 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: Network Commissioning (client), big-endian */ \ + /* Endpoint: 1, Cluster: General Commissioning (client), big-endian */ \ \ /* 4 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Network Commissioning (client), big-endian */ \ + \ + /* 8 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 1, Cluster: Software Diagnostics (client), big-endian */ \ \ - /* 8 - FeatureMap, */ \ + /* 12 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thread Network Diagnostics (client), big-endian */ \ \ - /* 12 - FeatureMap, */ \ + /* 16 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Ethernet Network Diagnostics (client), big-endian */ \ \ - /* 16 - FeatureMap, */ \ + /* 20 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (client), big-endian */ \ \ - /* 20 - FeatureMap, */ \ + /* 24 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } @@ -62,40 +67,45 @@ #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 1, Cluster: General Commissioning (client), little-endian */ \ + /* Endpoint: 1, Cluster: Level Control (client), little-endian */ \ \ /* 0 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: Network Commissioning (client), little-endian */ \ + /* Endpoint: 1, Cluster: General Commissioning (client), little-endian */ \ \ /* 4 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Network Commissioning (client), little-endian */ \ + \ + /* 8 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Software Diagnostics (client), little-endian */ \ \ - /* 8 - FeatureMap, */ \ + /* 12 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thread Network Diagnostics (client), little-endian */ \ \ - /* 12 - FeatureMap, */ \ + /* 16 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Ethernet Network Diagnostics (client), little-endian */ \ \ - /* 16 - FeatureMap, */ \ + /* 20 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (client), little-endian */ \ \ - /* 20 - FeatureMap, */ \ + /* 24 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (6) +#define GENERATED_DEFAULTS_COUNT (7) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -123,7 +133,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 64 +#define GENERATED_ATTRIBUTE_COUNT 65 #define GENERATED_ATTRIBUTES \ { \ \ @@ -143,7 +153,8 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(0) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ @@ -178,29 +189,29 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: General Commissioning (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(0) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(4) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Network Commissioning (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(4) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(8) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: General Diagnostics (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Software Diagnostics (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(8) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(12) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thread Network Diagnostics (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(12) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(16) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: WiFi Network Diagnostics (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Ethernet Network Diagnostics (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(16) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(20) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (client) */ \ @@ -238,7 +249,7 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(20) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(24) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat (client) */ \ @@ -329,166 +340,166 @@ 0x0007, ZAP_ATTRIBUTE_INDEX(4), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: On/off Switch Configuration (client) */ \ { \ - 0x0008, ZAP_ATTRIBUTE_INDEX(5), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0008, ZAP_ATTRIBUTE_INDEX(5), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Level Control (client) */ \ { \ - 0x000F, ZAP_ATTRIBUTE_INDEX(6), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x000F, ZAP_ATTRIBUTE_INDEX(7), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (client) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(7), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(8), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (client) */ \ - { 0x001E, ZAP_ATTRIBUTE_INDEX(8), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Binding (client) */ \ + { 0x001E, ZAP_ATTRIBUTE_INDEX(9), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Binding (client) */ \ { \ - 0x001F, ZAP_ATTRIBUTE_INDEX(9), 1, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x001F, ZAP_ATTRIBUTE_INDEX(10), 1, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Access Control (client) */ \ { \ - 0x0025, ZAP_ATTRIBUTE_INDEX(10), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0025, ZAP_ATTRIBUTE_INDEX(11), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Bridged Actions (client) */ \ - { 0x0028, ZAP_ATTRIBUTE_INDEX(11), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Basic (client) */ \ + { 0x0028, ZAP_ATTRIBUTE_INDEX(12), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Basic (client) */ \ { \ - 0x0029, ZAP_ATTRIBUTE_INDEX(12), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0029, ZAP_ATTRIBUTE_INDEX(13), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: OTA Software Update Provider (client) */ \ { \ - 0x002A, ZAP_ATTRIBUTE_INDEX(13), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x002A, ZAP_ATTRIBUTE_INDEX(14), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: OTA Software Update Requestor (client) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(14), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(15), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Localization Configuration (client) */ \ { \ - 0x002E, ZAP_ATTRIBUTE_INDEX(14), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x002E, ZAP_ATTRIBUTE_INDEX(15), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Power Source Configuration (client) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(15), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x002F, ZAP_ATTRIBUTE_INDEX(16), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Power Source (client) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(16), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0030, ZAP_ATTRIBUTE_INDEX(17), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: General Commissioning (client) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(18), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(19), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Network Commissioning (client) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(20), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(21), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Diagnostic Logs (client) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(20), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(21), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: General Diagnostics (client) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(21), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(22), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Software Diagnostics (client) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(23), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(24), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Thread Network Diagnostics (client) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(25), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(26), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: WiFi Network Diagnostics (client) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(26), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(27), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Ethernet Network Diagnostics (client) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(28), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(29), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (client) */ \ - { 0x003B, ZAP_ATTRIBUTE_INDEX(29), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Switch (client) */ \ + { 0x003B, ZAP_ATTRIBUTE_INDEX(30), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Switch (client) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(30), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(31), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: AdministratorCommissioning (client) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(31), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(32), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Operational Credentials (client) */ \ { \ - 0x003F, ZAP_ATTRIBUTE_INDEX(32), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x003F, ZAP_ATTRIBUTE_INDEX(33), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Group Key Management (client) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(33), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (client) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(34), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(35), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: User Label (client) */ \ { \ - 0x0045, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0045, ZAP_ATTRIBUTE_INDEX(35), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Boolean State (client) */ \ { \ - 0x0050, ZAP_ATTRIBUTE_INDEX(35), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0050, ZAP_ATTRIBUTE_INDEX(36), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Mode Select (client) */ \ { \ - 0x0101, ZAP_ATTRIBUTE_INDEX(36), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0101, ZAP_ATTRIBUTE_INDEX(37), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Door Lock (client) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(37), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(38), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (client) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(38), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(39), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (client) */ \ { \ - 0x0200, ZAP_ATTRIBUTE_INDEX(39), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0200, ZAP_ATTRIBUTE_INDEX(40), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (client) */ \ { \ - 0x0201, ZAP_ATTRIBUTE_INDEX(41), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0201, ZAP_ATTRIBUTE_INDEX(42), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Thermostat (client) */ \ { \ - 0x0204, ZAP_ATTRIBUTE_INDEX(42), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0204, ZAP_ATTRIBUTE_INDEX(43), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (client) */ \ { \ - 0x0300, ZAP_ATTRIBUTE_INDEX(43), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0300, ZAP_ATTRIBUTE_INDEX(44), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Color Control (client) */ \ { \ - 0x0400, ZAP_ATTRIBUTE_INDEX(44), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0400, ZAP_ATTRIBUTE_INDEX(45), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Illuminance Measurement (client) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(45), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(46), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(46), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(47), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (client) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(47), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(48), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (client) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(48), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(49), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (client) */ \ { \ - 0x0406, ZAP_ATTRIBUTE_INDEX(49), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0406, ZAP_ATTRIBUTE_INDEX(50), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Occupancy Sensing (client) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(50), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(51), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (client) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(51), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(52), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Channel (client) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(52), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(53), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (client) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(53), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(54), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (client) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(54), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(55), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Input (client) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(55), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(56), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Low Power (client) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(56), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(57), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (client) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(57), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(58), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (client) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(58), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(59), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (client) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(59), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(60), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (client) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(60), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(61), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (client) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(61), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(62), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Account Login (client) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(62), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(63), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (client) */ \ { \ - 0x0B04, ZAP_ATTRIBUTE_INDEX(63), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0B04, ZAP_ATTRIBUTE_INDEX(64), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (client) */ \ } @@ -497,7 +508,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 61, 138 }, \ + { ZAP_CLUSTER_INDEX(0), 61, 142 }, \ } // Largest attribute size is needed for various buffers @@ -507,7 +518,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (4) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (138) +#define ATTRIBUTE_MAX_SIZE (142) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (1) diff --git a/zzz_generated/lighting-app/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/zap-generated/endpoint_config.h index 3ec287cc36faa6..46a74e4fad741c 100644 --- a/zzz_generated/lighting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lighting-app/zap-generated/endpoint_config.h @@ -276,6 +276,11 @@ \ /* 615 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Level Control (server), big-endian */ \ + \ + /* 619 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x03, \ } #else // !BIGENDIAN_CPU @@ -531,11 +536,16 @@ \ /* 615 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Level Control (server), little-endian */ \ + \ + /* 619 - FeatureMap, */ \ + 0x03, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (73) +#define GENERATED_DEFAULTS_COUNT (74) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -577,7 +587,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 229 +#define GENERATED_ATTRIBUTE_COUNT 230 #define GENERATED_ATTRIBUTES \ { \ \ @@ -799,22 +809,23 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/Off (server) */ \ - { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ + { 0x0000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ { 0x4000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* GlobalSceneControl */ \ { 0x4001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OnTime */ \ { 0x4002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OffWaitTime */ \ - { 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ + { 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x01) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFE) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -826,9 +837,12 @@ { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, \ + ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -976,30 +990,30 @@ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(179), \ - 15, \ - 23, \ + 16, \ + 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(194), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(195), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(199), \ + ZAP_ATTRIBUTE_INDEX(200), \ 22, \ 36, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(221), \ + ZAP_ATTRIBUTE_INDEX(222), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { \ - 0x0006, ZAP_ATTRIBUTE_INDEX(225), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0006, ZAP_ATTRIBUTE_INDEX(226), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 2, Cluster: On/Off (client) */ \ { \ - 0x0007, ZAP_ATTRIBUTE_INDEX(226), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0007, ZAP_ATTRIBUTE_INDEX(227), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: On/off Switch Configuration (server) */ \ } @@ -1008,7 +1022,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 18, 1479 }, { ZAP_CLUSTER_INDEX(18), 6, 82 }, { ZAP_CLUSTER_INDEX(24), 2, 6 }, \ + { ZAP_CLUSTER_INDEX(0), 18, 1479 }, { ZAP_CLUSTER_INDEX(18), 6, 86 }, { ZAP_CLUSTER_INDEX(24), 2, 6 }, \ } // Largest attribute size is needed for various buffers @@ -1018,7 +1032,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (687) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1567) +#define ATTRIBUTE_MAX_SIZE (1571) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/lighting-app/zap-generated/gen_config.h b/zzz_generated/lighting-app/zap-generated/gen_config.h index e801337b0acc11..0107a4d822f95a 100644 --- a/zzz_generated/lighting-app/zap-generated/gen_config.h +++ b/zzz_generated/lighting-app/zap-generated/gen_config.h @@ -116,7 +116,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 diff --git a/zzz_generated/placeholder/app1/zap-generated/gen_config.h b/zzz_generated/placeholder/app1/zap-generated/gen_config.h index ff71d08595d15d..0072840d51d6ad 100644 --- a/zzz_generated/placeholder/app1/zap-generated/gen_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/gen_config.h @@ -84,7 +84,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 diff --git a/zzz_generated/placeholder/app2/zap-generated/gen_config.h b/zzz_generated/placeholder/app2/zap-generated/gen_config.h index ff71d08595d15d..0072840d51d6ad 100644 --- a/zzz_generated/placeholder/app2/zap-generated/gen_config.h +++ b/zzz_generated/placeholder/app2/zap-generated/gen_config.h @@ -84,7 +84,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 diff --git a/zzz_generated/pump-app/zap-generated/gen_config.h b/zzz_generated/pump-app/zap-generated/gen_config.h index f7026fcb38420f..ae1bc0f0452caf 100644 --- a/zzz_generated/pump-app/zap-generated/gen_config.h +++ b/zzz_generated/pump-app/zap-generated/gen_config.h @@ -103,7 +103,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index 5c6861c64f3ea3..dcf9fca56f83dd 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -404,9 +404,14 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 2, Cluster: Level Control (server), big-endian */ \ + \ + /* 2401 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x01, \ + \ /* Endpoint: 2, Cluster: Audio Output (server), big-endian */ \ \ - /* 2401 - audio output list, */ \ + /* 2405 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -424,24 +429,24 @@ \ /* Endpoint: 3, Cluster: Media Playback (server), big-endian */ \ \ - /* 2655 - start time, */ \ + /* 2659 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 2663 - duration, */ \ + /* 2667 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2671 - playback speed, */ \ + /* 2675 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2675 - seek range end, */ \ + /* 2679 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2683 - seek range start, */ \ + /* 2687 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 3, Cluster: Content Launcher (server), big-endian */ \ \ - /* 2691 - accept header list, */ \ + /* 2695 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -457,18 +462,18 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2945 - supported streaming protocols, */ \ + /* 2949 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 3, Cluster: Application Basic (server), big-endian */ \ \ - /* 2949 - allowed vendor list, */ \ + /* 2953 - allowed vendor list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 4, Cluster: Content Launcher (server), big-endian */ \ \ - /* 2981 - accept header list, */ \ + /* 2985 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -484,12 +489,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3235 - supported streaming protocols, */ \ + /* 3239 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 4, Cluster: Application Basic (server), big-endian */ \ \ - /* 3239 - allowed vendor list, */ \ + /* 3243 - allowed vendor list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } @@ -875,9 +880,14 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 2, Cluster: Level Control (server), little-endian */ \ + \ + /* 2401 - FeatureMap, */ \ + 0x01, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 2, Cluster: Audio Output (server), little-endian */ \ \ - /* 2401 - audio output list, */ \ + /* 2405 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -895,24 +905,24 @@ \ /* Endpoint: 3, Cluster: Media Playback (server), little-endian */ \ \ - /* 2655 - start time, */ \ + /* 2659 - start time, */ \ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2663 - duration, */ \ + /* 2667 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2671 - playback speed, */ \ + /* 2675 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2675 - seek range end, */ \ + /* 2679 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2683 - seek range start, */ \ + /* 2687 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 3, Cluster: Content Launcher (server), little-endian */ \ \ - /* 2691 - accept header list, */ \ + /* 2695 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -928,18 +938,18 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2945 - supported streaming protocols, */ \ + /* 2949 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 3, Cluster: Application Basic (server), little-endian */ \ \ - /* 2949 - allowed vendor list, */ \ + /* 2953 - allowed vendor list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 4, Cluster: Content Launcher (server), little-endian */ \ \ - /* 2981 - accept header list, */ \ + /* 2985 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -955,19 +965,19 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3235 - supported streaming protocols, */ \ + /* 3239 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 4, Cluster: Application Basic (server), little-endian */ \ \ - /* 3239 - allowed vendor list, */ \ + /* 3243 - allowed vendor list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (93) +#define GENERATED_DEFAULTS_COUNT (94) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -1000,7 +1010,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 284 +#define GENERATED_ATTRIBUTE_COUNT 285 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1290,13 +1300,13 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1308,9 +1318,12 @@ { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, \ + ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(2401) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -1320,7 +1333,7 @@ { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Audio Output (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2401) }, /* audio output list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2405) }, /* audio output list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current audio output */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ @@ -1333,19 +1346,19 @@ \ /* Endpoint: 3, Cluster: Media Playback (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ - { 0x0001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2655) }, /* start time */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2663) }, /* duration */ \ + { 0x0001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2659) }, /* start time */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2667) }, /* duration */ \ { 0x0003, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* position */ \ - { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(2671) }, /* playback speed */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2675) }, /* seek range end */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2683) }, /* seek range start */ \ + { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(2675) }, /* playback speed */ \ + { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2679) }, /* seek range end */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2687) }, /* seek range start */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Content Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2691) }, /* accept header list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2695) }, /* accept header list */ \ { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(2945) }, /* supported streaming protocols */ \ + ZAP_LONG_DEFAULTS_INDEX(2949) }, /* supported streaming protocols */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Application Basic (server) */ \ @@ -1357,7 +1370,7 @@ ZAP_EMPTY_DEFAULT() }, /* application app */ \ { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ { 0x0006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ - { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2949) }, /* allowed vendor list */ \ + { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2953) }, /* allowed vendor list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Account Login (server) */ \ @@ -1371,9 +1384,9 @@ { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 4, Cluster: Content Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2981) }, /* accept header list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2985) }, /* accept header list */ \ { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3235) }, /* supported streaming protocols */ \ + ZAP_LONG_DEFAULTS_INDEX(3239) }, /* supported streaming protocols */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 4, Cluster: Application Basic (server) */ \ @@ -1385,7 +1398,7 @@ ZAP_EMPTY_DEFAULT() }, /* application app */ \ { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ { 0x0006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ - { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(3239) }, /* allowed vendor list */ \ + { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(3243) }, /* allowed vendor list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 5, Cluster: Descriptor (server) */ \ @@ -1533,45 +1546,45 @@ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(205), \ - 15, \ - 23, \ + 16, \ + 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 2, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(220), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(221), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(225), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(226), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Audio Output (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(228), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(229), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Descriptor (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(233), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(234), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Media Playback (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(241), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(242), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Content Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(244), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(245), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(253), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(254), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Account Login (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(254), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(255), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Descriptor (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(259), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(260), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Content Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(262), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(263), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Application Basic (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(271), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(272), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Descriptor (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(276), 8, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(277), 8, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Application Basic (server) */ \ } @@ -1580,7 +1593,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 23, 2005 }, { ZAP_CLUSTER_INDEX(23), 10, 1328 }, { ZAP_CLUSTER_INDEX(33), 4, 283 }, \ + { ZAP_CLUSTER_INDEX(0), 23, 2005 }, { ZAP_CLUSTER_INDEX(23), 10, 1328 }, { ZAP_CLUSTER_INDEX(33), 4, 287 }, \ { ZAP_CLUSTER_INDEX(37), 5, 439 }, { ZAP_CLUSTER_INDEX(42), 3, 398 }, { ZAP_CLUSTER_INDEX(45), 2, 106 }, \ } @@ -1591,7 +1604,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (686) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (4559) +#define ATTRIBUTE_MAX_SIZE (4563) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (6) diff --git a/zzz_generated/tv-app/zap-generated/gen_config.h b/zzz_generated/tv-app/zap-generated/gen_config.h index 6bfc53dfb17504..0d1f199a7701fb 100644 --- a/zzz_generated/tv-app/zap-generated/gen_config.h +++ b/zzz_generated/tv-app/zap-generated/gen_config.h @@ -167,7 +167,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index 3bf6bc97daa0e7..b5df347029fb0d 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -1126,13 +1126,13 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1144,9 +1144,11 @@ { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, \ + ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { 0x0051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ diff --git a/zzz_generated/tv-casting-app/zap-generated/gen_config.h b/zzz_generated/tv-casting-app/zap-generated/gen_config.h index 6d1336ae44732a..db956ac807034a 100644 --- a/zzz_generated/tv-casting-app/zap-generated/gen_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/gen_config.h @@ -215,7 +215,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 From 6e3c109e74cf83bd75987d3ae23006d1633aa505 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 14 Jan 2022 15:30:21 -0500 Subject: [PATCH 023/124] Use ZAP to generate a more minimal code/reviewable IDL of what is enabled. (#13544) * Start building a 'matter IDL' generator. I would like to see what data is being generated WITHOUT trying to parse code. This would make it easier on code reviews and generally understanding what xml + zap actually mean. * Some initial example: can generate clusters and attributes and a lot of data types * make fabric scoped by show up * Add listing of commands * make commands take arguments * Only add cluster enums to the IDL * Ran zap-all generate to get a lot of matter IDL files * Support full command request/response and start describing endpoints * Much better display: only used structs and group by cluster and global as well * regen all and this time the content seems smaller and focused * Update FIXME to actual doc ... fixme was done * ZAP regen all again * Restyle fixes * Split longer line ifs onto separate lines * Code review noticed readonly and readwrite were switched. Fix that * Add support for flagging list attributes with [] * Add detection of array types, optionallity and nullability in struct items * Optionality, nullability and list in request/response structs * regen all * Propper support for events, fix namings for structs * Add indices to request and response parameters. Do not include empty requests (they serve no purpose) * re-ran zap, made some things non-reportable --- src/app/zap-templates/app-templates.json | 13 + .../zap-templates/common/ClustersHelper.js | 139 +- .../partials/idl/structure_definition.zapt | 8 + .../partials/idl/structure_member.zapt | 8 + .../templates/app/MatterIDL.zapt | 87 + .../zap-templates/templates/chip/helper.js | 50 +- .../zap-generated/Clusters.matter | 3008 +++++++++++++++ .../bridge-app/zap-generated/Clusters.matter | 901 +++++ .../zap-generated/Clusters.matter | 3319 +++++++++++++++++ .../zap-generated/Clusters.matter | 1110 ++++++ .../zap-generated/Clusters.matter | 1390 +++++++ .../lock-app/zap-generated/Clusters.matter | 806 ++++ .../zap-generated/Clusters.matter | 316 ++ .../zap-generated/Clusters.matter | 360 ++ .../zap-generated/Clusters.matter | 471 +++ .../app1/zap-generated/Clusters.matter | 717 ++++ .../app2/zap-generated/Clusters.matter | 717 ++++ .../pump-app/zap-generated/Clusters.matter | 902 +++++ .../zap-generated/Clusters.matter | 951 +++++ .../zap-generated/Clusters.matter | 605 +++ .../thermostat/zap-generated/Clusters.matter | 1179 ++++++ .../tv-app/zap-generated/Clusters.matter | 1801 +++++++++ .../zap-generated/Clusters.matter | 2469 ++++++++++++ .../window-app/zap-generated/Clusters.matter | 847 +++++ 24 files changed, 22164 insertions(+), 10 deletions(-) create mode 100644 src/app/zap-templates/partials/idl/structure_definition.zapt create mode 100644 src/app/zap-templates/partials/idl/structure_member.zapt create mode 100644 src/app/zap-templates/templates/app/MatterIDL.zapt create mode 100644 zzz_generated/all-clusters-app/zap-generated/Clusters.matter create mode 100644 zzz_generated/bridge-app/zap-generated/Clusters.matter create mode 100644 zzz_generated/controller-clusters/zap-generated/Clusters.matter create mode 100644 zzz_generated/door-lock-app/zap-generated/Clusters.matter create mode 100644 zzz_generated/lighting-app/zap-generated/Clusters.matter create mode 100644 zzz_generated/lock-app/zap-generated/Clusters.matter create mode 100644 zzz_generated/log-source-app/zap-generated/Clusters.matter create mode 100644 zzz_generated/ota-provider-app/zap-generated/Clusters.matter create mode 100644 zzz_generated/ota-requestor-app/zap-generated/Clusters.matter create mode 100644 zzz_generated/placeholder/app1/zap-generated/Clusters.matter create mode 100644 zzz_generated/placeholder/app2/zap-generated/Clusters.matter create mode 100644 zzz_generated/pump-app/zap-generated/Clusters.matter create mode 100644 zzz_generated/pump-controller-app/zap-generated/Clusters.matter create mode 100644 zzz_generated/temperature-measurement-app/zap-generated/Clusters.matter create mode 100644 zzz_generated/thermostat/zap-generated/Clusters.matter create mode 100644 zzz_generated/tv-app/zap-generated/Clusters.matter create mode 100644 zzz_generated/tv-casting-app/zap-generated/Clusters.matter create mode 100644 zzz_generated/window-app/zap-generated/Clusters.matter diff --git a/src/app/zap-templates/app-templates.json b/src/app/zap-templates/app-templates.json index eee83bf5ab9ef7..e7b05ff21a8bc0 100644 --- a/src/app/zap-templates/app-templates.json +++ b/src/app/zap-templates/app-templates.json @@ -26,6 +26,14 @@ { "name": "im_command_handler_cluster_commands", "path": "partials/im_command_handler_cluster_commands.zapt" + }, + { + "name": "idl_structure_definition", + "path": "partials/idl/structure_definition.zapt" + }, + { + "name": "idl_structure_member", + "path": "partials/idl/structure_member.zapt" } ], "templates": [ @@ -78,6 +86,11 @@ "path": "templates/app/CHIPClusters-src.zapt", "name": "C++ ZCL API", "output": "CHIPClusters.cpp" + }, + { + "path": "templates/app/MatterIDL.zapt", + "name": "Human-readable Matter IDL", + "output": "Clusters.matter" } ] } diff --git a/src/app/zap-templates/common/ClustersHelper.js b/src/app/zap-templates/common/ClustersHelper.js index 66c5a6d3ecdefd..5199808eeba921 100644 --- a/src/app/zap-templates/common/ClustersHelper.js +++ b/src/app/zap-templates/common/ClustersHelper.js @@ -477,9 +477,105 @@ function enhancedAttributes(attributes, globalAttributes, types) } const Clusters = { - ready : new Deferred() + ready : new Deferred(), + post_processing_ready : new Deferred() }; +class ClusterStructUsage { + constructor() + { + this.usedStructures = new Map(); // Structure label -> structure + this.clustersForStructure = new Map(); // Structure label -> Set(Cluster name) + this.structuresForCluster = new Map(); // Cluster name -> Set(Structure label) + } + + addUsedStructure(clusterName, structure) + { + // Record that generally this structure is used + this.usedStructures.set(structure.label, structure); + + // Record that this structure is used by a + // particular cluster name + let clusterSet = this.clustersForStructure.get(structure.label); + if (!clusterSet) { + clusterSet = new Set(); + this.clustersForStructure.set(structure.label, clusterSet); + } + clusterSet.add(clusterName); + + let structureLabelSet = this.structuresForCluster.get(clusterName); + if (!structureLabelSet) { + structureLabelSet = new Set(); + this.structuresForCluster.set(clusterName, structureLabelSet); + } + structureLabelSet.add(structure.label); + } + + /** + * Finds structures that are specific to one cluster: + * - they belong to the cluster + * - only that cluster ever uses it + */ + structuresSpecificToCluster(clusterName) + { + let clusterStructures = this.structuresForCluster.get(clusterName); + if (!clusterStructures) { + return []; + } + + return Array.from(clusterStructures) + .filter(name => this.clustersForStructure.get(name).size == 1) + .map(name => this.usedStructures.get(name)); + } + + structuresUsedByMultipleClusters() + { + return Array.from(this.usedStructures.values()).filter(s => this.clustersForStructure.get(s.label).size > 1); + } +} + +Clusters._addUsedStructureNames = async function(clusterName, startType, allKnownStructs) { + const struct = getStruct(allKnownStructs, startType.type); + if (!struct) { + return; + } + + this._cluster_structures.addUsedStructure(clusterName, struct); + + for (const item of struct.items) { + this._addUsedStructureNames(clusterName, item, allKnownStructs); + } +} + +Clusters._computeUsedStructureNames = async function(structs) { + // NOTE: this MUST be called only after attribute promise is resolved + // as iteration of `get*ByClusterName` needs that data. + for (const cluster of this._clusters) { + const attributes = await this.getAttributesByClusterName(cluster.name); + for (const attribute of attributes) { + if (attribute.isStruct) { + this._addUsedStructureNames(cluster.name, attribute, structs); + } + } + + const commands = await this.getCommandsByClusterName(cluster.name); + for (const command of commands) { + for (const argument of command.arguments) { + this._addUsedStructureNames(cluster.name, argument, structs); + } + } + + const responses = await this.getResponsesByClusterName(cluster.name); + for (const response of responses) { + for (const argument of response.arguments) { + this._addUsedStructureNames(cluster.name, argument, structs); + } + } + } + + this._used_structure_names = new Set(this._cluster_structures.usedStructures.keys()) +} + Clusters.init = async function(context) { if (this.ready.running) { @@ -505,14 +601,20 @@ Clusters.init = async function(context) { loadEvents.call(context, packageId), ]; - return Promise.all(promises).then(([types, clusters, commands, attributes, globalAttributes, events]) => { - this._clusters = clusters; - this._commands = enhancedCommands(commands, types); - this._attributes = enhancedAttributes(attributes, globalAttributes, types); - this._events = enhancedEvents(events, types); + let [types, clusters, commands, attributes, globalAttributes, events] = await Promise.all(promises); + + this._clusters = clusters; + this._commands = enhancedCommands(commands, types); + this._attributes = enhancedAttributes(attributes, globalAttributes, types); + this._events = enhancedEvents(events, types); + this._cluster_structures = new ClusterStructUsage(); + + // data is ready, but not full post - processing + this.ready.resolve(); + + await this._computeUsedStructureNames(types[3]); - return this.ready.resolve(); - }, err => this.ready.reject(err)); + return this.post_processing_ready.resolve(); } @@ -545,6 +647,12 @@ Clusters.ensureReady = function() return this.ready; } +Clusters.ensurePostProcessingDone = function() +{ + ensureState(this.ready.running); + return this.post_processing_ready; +} + Clusters.getClusters = function() { return this.ensureReady().then(() => this._clusters); @@ -681,6 +789,21 @@ Clusters.getServerAttributes = function(name) return this.getAttributesByClusterName(name).then(items => items.filter(kServerSideFilter)); } +Clusters.getUsedStructureNames = function() +{ + return this.ensurePostProcessingDone().then(() => this._used_structure_names); +} + +Clusters.getStructuresByClusterName = function(name) +{ + return this.ensurePostProcessingDone().then(() => this._cluster_structures.structuresSpecificToCluster(name)); +} + +Clusters.getSharedStructs = function() +{ + return this.ensurePostProcessingDone().then(() => this._cluster_structures.structuresUsedByMultipleClusters()); +} + Clusters.getServerEvents = function(name) { return this.getEventsByClusterName(name).then(items => items.filter(kServerSideFilter)); diff --git a/src/app/zap-templates/partials/idl/structure_definition.zapt b/src/app/zap-templates/partials/idl/structure_definition.zapt new file mode 100644 index 00000000000000..af6fbaea7124c0 --- /dev/null +++ b/src/app/zap-templates/partials/idl/structure_definition.zapt @@ -0,0 +1,8 @@ +{{#if struct_is_fabric_scoped}} +{{indent extraIndent~}} [fabric_scoped_by={{asUpperCamelCase struct_fabric_idx_field}}] +{{/if}} +{{indent extraIndent~}} struct {{name}} { +{{#zcl_struct_items}} + {{indent extraIndent~}} {{> idl_structure_member}} +{{/zcl_struct_items}} +{{indent extraIndent~}} } diff --git a/src/app/zap-templates/partials/idl/structure_member.zapt b/src/app/zap-templates/partials/idl/structure_member.zapt new file mode 100644 index 00000000000000..d64eeefbc98d53 --- /dev/null +++ b/src/app/zap-templates/partials/idl/structure_member.zapt @@ -0,0 +1,8 @@ +{{~#if isOptional~}} optional {{/if~}} +{{~#if isNullable~}} nullable {{/if~}} + +{{type}} {{asLowerCamelCase label~}} + +{{~#if isArray~}} + [] +{{~/if}} = {{fieldIdentifier}}; \ No newline at end of file diff --git a/src/app/zap-templates/templates/app/MatterIDL.zapt b/src/app/zap-templates/templates/app/MatterIDL.zapt new file mode 100644 index 00000000000000..024d66efd4526b --- /dev/null +++ b/src/app/zap-templates/templates/app/MatterIDL.zapt @@ -0,0 +1,87 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +{{#chip_shared_structs}} +{{>idl_structure_definition extraIndent=0}} + +{{/chip_shared_structs}} +{{!TODO: consider #chip_clusters as iteration point as well. +{{! Unsure about the differences}} +{{#all_user_clusters}} +{{side}} cluster {{asUpperCamelCase name}} = {{code}} { + {{#zcl_enums}} + enum {{asUpperCamelCase name}} : {{type}} { + {{#zcl_enum_items}} + k{{asUpperCamelCase label}} = {{value}}; + {{/zcl_enum_items}} + } + + {{/zcl_enums}} + {{#chip_cluster_specific_structs}} +{{>idl_structure_definition extraIndent=1}} + + {{/chip_cluster_specific_structs}} + {{#zcl_events}} + {{priority}} event {{asUpperCamelCase name}} = {{code}} { + {{#zcl_event_fields}} + {{>idl_structure_member label=name}} + + {{/zcl_event_fields}} + } + + {{/zcl_events}} + {{#chip_cluster_attributes}} + attribute( + {{~#if isWritableAttribute~}} + writable + {{~else~}} + readonly + {{~/if~}} + {{~#if isReportableAttribute~}} + , reportable + {{~/if~}} + ) {{type}} {{asLowerCamelCase name~}} + {{~#if isList~}} + [] + {{~/if}} = {{code}}; + {{/chip_cluster_attributes}} + {{#chip_cluster_commands}} + {{#if arguments}} + + request struct {{asUpperCamelCase name}}Request { + {{#chip_cluster_command_arguments}} + {{> idl_structure_member}} + + {{/chip_cluster_command_arguments}} + } + {{/if}} + {{/chip_cluster_commands}} + {{#chip_cluster_responses}} + + response struct {{asUpperCamelCase name}} { + {{#chip_cluster_response_arguments}} + {{> idl_structure_member}} + + {{/chip_cluster_response_arguments}} + } + {{/chip_cluster_responses}} + {{#chip_cluster_commands}} + {{#first}} + + {{/first}} + command {{asUpperCamelCase name}}( + {{~#if arguments~}} + {{asUpperCamelCase name}}Request + {{~/if~}} + ): {{asUpperCamelCase responseName}} = {{code}}; + {{/chip_cluster_commands}} +} + +{{/all_user_clusters}} + +{{#user_endpoints}} +endpoint {{endpointId}} { + {{!TODO: report device types and cluster instantionation. }} +} + +{{/user_endpoints}} diff --git a/src/app/zap-templates/templates/chip/helper.js b/src/app/zap-templates/templates/chip/helper.js index 49c3c3fae558ed..b6f845abaa937e 100644 --- a/src/app/zap-templates/templates/chip/helper.js +++ b/src/app/zap-templates/templates/chip/helper.js @@ -84,6 +84,12 @@ function getCommands(methodName) : ensureClusters(this).getServerCommands(clusterName); } +function getAttributes(methodName) +{ + const { clusterName, clusterSide } = checkIsInsideClusterBlock(this, methodName); + return ensureClusters(this).getAttributesByClusterName(clusterName); +} + function getResponses(methodName) { const { clusterName, clusterSide } = checkIsInsideClusterBlock(this, methodName); @@ -215,6 +221,20 @@ function chip_cluster_commands(options) return asBlocks.call(this, commands, options); } +/** + * Creates block iterator over the cluster attributes for a given cluster/side. + * + * This function is meant to be used inside a {{#chip_*_clusters}} + * block. It will throw otherwise. + * + * @param {*} options + */ +function chip_cluster_attributes(options) +{ + const attributes = getAttributes.call(this, 'chip_cluster_attributes'); + + return asBlocks.call(this, attributes, options); +} /** * Creates block iterator over the cluster responses for a given cluster/side. * @@ -244,7 +264,8 @@ function chip_cluster_command_arguments(options) const commands = getCommands.call(this.parent, 'chip_cluster_commands_argments'); const filter = command => command.id == commandId; - return asBlocks.call(this, commands.then(items => items.find(filter).arguments), options); + return asBlocks.call(this, + commands.then(items => items.find(filter).arguments.map((value, index) => ({...value, fieldIdentifier : index }))), options); } /** @@ -293,7 +314,8 @@ function chip_cluster_response_arguments(options) const responses = getResponses.call(this.parent, 'chip_cluster_responses_argments'); const filter = command => command.id == commandId; - return asBlocks.call(this, responses.then(items => items.find(filter).arguments), options); + return asBlocks.call(this, + responses.then(items => items.find(filter).arguments.map((value, index) => ({...value, fieldIdentifier : index }))), options); } /** @@ -391,6 +413,27 @@ function chip_available_cluster_commands(options) return promise; } +/** + * Creates block iterator over structures belonging to the current cluster + */ +async function chip_cluster_specific_structs(options) +{ + const { clusterName, clusterSide } = checkIsInsideClusterBlock(this, 'chip_cluster_specific_structs'); + + const structs = await ensureClusters(this).getStructuresByClusterName(clusterName); + + return templateUtil.collectBlocks(structs, options, this); +} + +/** + * Creates block iterator over structures that are shared between clusters + */ +async function chip_shared_structs(options) +{ + const structs = await ensureClusters(this).getSharedStructs(); + return templateUtil.collectBlocks(structs, options, this); +} + /** * Checks whether a type is an enum for purposes of its chipType. That includes * both spec-defined enum types and types that we map to enum types in our code. @@ -424,6 +467,7 @@ exports.chip_has_server_clusters = chip_has_server_c exports.chip_cluster_commands = chip_cluster_commands; exports.chip_cluster_command_arguments = chip_cluster_command_arguments; exports.chip_cluster_command_arguments_with_structs_expanded = chip_cluster_command_arguments_with_structs_expanded; +exports.chip_cluster_attributes = chip_cluster_attributes; exports.chip_server_global_responses = chip_server_global_responses; exports.chip_cluster_responses = chip_cluster_responses; exports.chip_cluster_response_arguments = chip_cluster_response_arguments @@ -434,3 +478,5 @@ exports.chip_server_has_list_attributes = chip_server_has_l exports.chip_available_cluster_commands = chip_available_cluster_commands; exports.if_chip_enum = if_chip_enum; exports.if_in_global_responses = if_in_global_responses; +exports.chip_cluster_specific_structs = chip_cluster_specific_structs; +exports.chip_shared_structs = chip_shared_structs; diff --git a/zzz_generated/all-clusters-app/zap-generated/Clusters.matter b/zzz_generated/all-clusters-app/zap-generated/Clusters.matter new file mode 100644 index 00000000000000..0de63708b7ad50 --- /dev/null +++ b/zzz_generated/all-clusters-app/zap-generated/Clusters.matter @@ -0,0 +1,3008 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AccessControl = 31 { + enum AuthMode : ENUM8 { + kPase = 1; + kCase = 2; + kGroup = 3; + } + + enum Privilege : ENUM8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + struct AccessControlEntry { + fabric_idx fabricIndex = 0; + Privilege privilege = 1; + AuthMode authMode = 2; + nullable INT64U subjects[] = 3; + nullable Target targets[] = 4; + } + + struct Target { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + struct ExtensionEntry { + fabric_idx fabricIndex = 0; + OCTET_STRING data = 1; + } + + attribute(writable, reportable) AccessControlEntry acl[] = 0; + attribute(writable, reportable) ExtensionEntry extension[] = 1; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster AccountLogin = 1294 { + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster ApplicationBasic = 1293 { + enum ApplicationStatusEnum : ENUM8 { + kStopped = 0; + kActiveVisibleFocus = 1; + kActiveHidden = 2; + kActiveVisibleNotFocus = 3; + } + + attribute(readonly, reportable) char_string vendorName = 0; + attribute(readonly, reportable) int16u vendorId = 1; + attribute(readonly, reportable) char_string applicationName = 2; + attribute(readonly, reportable) int16u productId = 3; + attribute(readonly, reportable) ApplicationStatusEnum applicationStatus = 5; + attribute(readonly, reportable) char_string applicationVersion = 6; + attribute(readonly) vendor_id allowedVendorList[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ApplicationLauncher = 1292 { + enum StatusEnum : ENUM8 { + kSuccess = 0; + kAppNotAvailable = 1; + kSystemBusy = 2; + } + + struct ApplicationLauncherApplication { + INT16U catalogVendorId = 1; + CHAR_STRING applicationId = 2; + } + + attribute(readonly, reportable) INT16U applicationLauncherList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster AudioOutput = 1291 { + enum OutputTypeEnum : ENUM8 { + kHdmi = 0; + kBt = 1; + kOptical = 2; + kHeadphone = 3; + kInternal = 4; + kOther = 5; + } + + struct OutputInfo { + INT8U index = 1; + OutputTypeEnum outputType = 2; + CHAR_STRING name = 3; + } + + attribute(readonly, reportable) OutputInfo audioOutputList[] = 0; + attribute(readonly, reportable) int8u currentAudioOutput = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster BarrierControl = 259 { + attribute(readonly, reportable) enum8 barrierMovingState = 1; + attribute(readonly, reportable) bitmap16 barrierSafetyStatus = 2; + attribute(readonly, reportable) bitmap8 barrierCapabilities = 3; + attribute(readonly, reportable) int8u barrierPosition = 10; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct BarrierControlGoToPercentRequest { + INT8U percentOpen = 0; + } + + command BarrierControlGoToPercent(BarrierControlGoToPercentRequest): DefaultSuccess = 0; + command BarrierControlStop(): DefaultSuccess = 1; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) char_string manufacturingDate = 11; + attribute(readonly, reportable) char_string partNumber = 12; + attribute(readonly, reportable) long_char_string productURL = 13; + attribute(readonly, reportable) char_string productLabel = 14; + attribute(readonly, reportable) char_string serialNumber = 15; + attribute(writable, reportable) boolean localConfigDisabled = 16; + attribute(readonly, reportable) boolean reachable = 17; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +server cluster BinaryInputBasic = 15 { + attribute(writable, reportable) boolean outOfService = 81; + attribute(writable, reportable) boolean presentValue = 85; + attribute(readonly, reportable) bitmap8 statusFlags = 111; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Binding = 30 { + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct BindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + request struct UnbindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + command Bind(BindRequest): DefaultSuccess = 0; + command Unbind(UnbindRequest): DefaultSuccess = 1; +} + +server cluster BooleanState = 69 { + info event StateChange = 0 { + boolean stateValue = 0; + } + + attribute(readonly, reportable) boolean stateValue = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster BridgedActions = 37 { + enum ActionErrorEnum : ENUM8 { + kUnknown = 0; + kInterrupted = 1; + } + + enum ActionStateEnum : ENUM8 { + kInactive = 0; + kActive = 1; + kPaused = 2; + kDisabled = 3; + } + + enum ActionTypeEnum : ENUM8 { + kOther = 0; + kScene = 1; + kSequence = 2; + kAutomation = 3; + kException = 4; + kNotification = 5; + kAlarm = 6; + } + + enum EndpointListTypeEnum : ENUM8 { + kOther = 0; + kRoom = 1; + kZone = 2; + } + + struct ActionStruct { + INT16U actionID = 1; + CHAR_STRING name = 2; + ActionTypeEnum type = 3; + INT16U endpointListID = 4; + INT16U supportedCommands = 5; + ActionStateEnum status = 6; + } + + struct EndpointListStruct { + INT16U endpointListID = 1; + CHAR_STRING name = 2; + EndpointListTypeEnum type = 3; + ENDPOINT_NO endpoints[] = 4; + } + + info event StateChanged = 0 { + INT16U actionID = 0; + INT32U invokeID = 1; + ActionStateEnum newState = 2; + } + + info event ActionFailed = 1 { + INT16U actionID = 0; + INT32U invokeID = 1; + ActionStateEnum newState = 2; + ActionErrorEnum error = 3; + } + + attribute(readonly, reportable) ActionStruct actionList[] = 0; + attribute(readonly, reportable) EndpointListStruct endpointList[] = 1; + attribute(readonly, reportable) long_char_string setupUrl = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster BridgedDeviceBasic = 57 { + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Channel = 1284 { + enum ErrorTypeEnum : ENUM8 { + kMultipleMatches = 0; + kNoMatches = 1; + } + + enum LineupInfoTypeEnum : ENUM8 { + kMso = 0; + } + + struct ChannelInfo { + INT16U majorNumber = 1; + INT16U minorNumber = 2; + CHAR_STRING name = 3; + CHAR_STRING callSign = 4; + CHAR_STRING affiliateCallSign = 5; + } + + attribute(readonly, reportable) ChannelInfo channelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ColorControl = 768 { + enum ColorLoopAction : ENUM8 { + kDeactivate = 0; + kActivateFromColorLoopStartEnhancedHue = 1; + kActivateFromEnhancedCurrentHue = 2; + } + + enum ColorLoopDirection : ENUM8 { + kDecrementHue = 0; + kIncrementHue = 1; + } + + enum ColorMode : ENUM8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperature = 2; + } + + enum HueDirection : ENUM8 { + kShortestDistance = 0; + kLongestDistance = 1; + kUp = 2; + kDown = 3; + } + + enum HueMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum HueStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + enum SaturationMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum SaturationStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + attribute(readonly, reportable) int8u currentHue = 0; + attribute(readonly, reportable) int8u currentSaturation = 1; + attribute(readonly, reportable) int16u remainingTime = 2; + attribute(readonly, reportable) int16u currentX = 3; + attribute(readonly, reportable) int16u currentY = 4; + attribute(readonly, reportable) enum8 driftCompensation = 5; + attribute(readonly, reportable) char_string compensationText = 6; + attribute(readonly, reportable) int16u colorTemperature = 7; + attribute(readonly, reportable) enum8 colorMode = 8; + attribute(writable, reportable) bitmap8 colorControlOptions = 15; + attribute(readonly, reportable) int8u numberOfPrimaries = 16; + attribute(readonly, reportable) int16u primary1X = 17; + attribute(readonly, reportable) int16u primary1Y = 18; + attribute(readonly, reportable) int8u primary1Intensity = 19; + attribute(readonly, reportable) int16u primary2X = 21; + attribute(readonly, reportable) int16u primary2Y = 22; + attribute(readonly, reportable) int8u primary2Intensity = 23; + attribute(readonly, reportable) int16u primary3X = 25; + attribute(readonly, reportable) int16u primary3Y = 26; + attribute(readonly, reportable) int8u primary3Intensity = 27; + attribute(readonly, reportable) int16u primary4X = 32; + attribute(readonly, reportable) int16u primary4Y = 33; + attribute(readonly, reportable) int8u primary4Intensity = 34; + attribute(readonly, reportable) int16u primary5X = 36; + attribute(readonly, reportable) int16u primary5Y = 37; + attribute(readonly, reportable) int8u primary5Intensity = 38; + attribute(readonly, reportable) int16u primary6X = 40; + attribute(readonly, reportable) int16u primary6Y = 41; + attribute(readonly, reportable) int8u primary6Intensity = 42; + attribute(writable, reportable) int16u whitePointX = 48; + attribute(writable, reportable) int16u whitePointY = 49; + attribute(writable, reportable) int16u colorPointRX = 50; + attribute(writable, reportable) int16u colorPointRY = 51; + attribute(writable, reportable) int8u colorPointRIntensity = 52; + attribute(writable, reportable) int16u colorPointGX = 54; + attribute(writable, reportable) int16u colorPointGY = 55; + attribute(writable, reportable) int8u colorPointGIntensity = 56; + attribute(writable, reportable) int16u colorPointBX = 58; + attribute(writable, reportable) int16u colorPointBY = 59; + attribute(writable, reportable) int8u colorPointBIntensity = 60; + attribute(readonly, reportable) int16u enhancedCurrentHue = 16384; + attribute(readonly, reportable) enum8 enhancedColorMode = 16385; + attribute(readonly, reportable) int8u colorLoopActive = 16386; + attribute(readonly, reportable) int8u colorLoopDirection = 16387; + attribute(readonly, reportable) int16u colorLoopTime = 16388; + attribute(readonly, reportable) int16u colorLoopStartEnhancedHue = 16389; + attribute(readonly, reportable) int16u colorLoopStoredEnhancedHue = 16390; + attribute(readonly, reportable) bitmap16 colorCapabilities = 16394; + attribute(readonly, reportable) int16u colorTempPhysicalMin = 16395; + attribute(readonly, reportable) int16u colorTempPhysicalMax = 16396; + attribute(readonly, reportable) int16u coupleColorTempToLevelMinMireds = 16397; + attribute(writable, reportable) int16u startUpColorTemperatureMireds = 16400; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ColorLoopSetRequest { + ColorLoopUpdateFlags updateFlags = 0; + ColorLoopAction action = 1; + ColorLoopDirection direction = 2; + INT16U time = 3; + INT16U startHue = 4; + BITMAP8 optionsMask = 5; + BITMAP8 optionsOverride = 6; + } + + request struct EnhancedMoveHueRequest { + HueMoveMode moveMode = 0; + INT16U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct EnhancedMoveToHueRequest { + INT16U enhancedHue = 0; + HueDirection direction = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct EnhancedMoveToHueAndSaturationRequest { + INT16U enhancedHue = 0; + INT8U saturation = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct EnhancedStepHueRequest { + HueStepMode stepMode = 0; + INT16U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveColorRequest { + INT16S rateX = 0; + INT16S rateY = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveColorTemperatureRequest { + HueMoveMode moveMode = 0; + INT16U rate = 1; + INT16U colorTemperatureMinimum = 2; + INT16U colorTemperatureMaximum = 3; + BITMAP8 optionsMask = 4; + BITMAP8 optionsOverride = 5; + } + + request struct MoveHueRequest { + HueMoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveSaturationRequest { + SaturationMoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveToColorRequest { + INT16U colorX = 0; + INT16U colorY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToColorTemperatureRequest { + INT16U colorTemperature = 0; + INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveToHueRequest { + INT8U hue = 0; + HueDirection direction = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToHueAndSaturationRequest { + INT8U hue = 0; + INT8U saturation = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToSaturationRequest { + INT8U saturation = 0; + INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct StepColorRequest { + INT16S stepX = 0; + INT16S stepY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StepColorTemperatureRequest { + HueStepMode stepMode = 0; + INT16U stepSize = 1; + INT16U transitionTime = 2; + INT16U colorTemperatureMinimum = 3; + INT16U colorTemperatureMaximum = 4; + BITMAP8 optionsMask = 5; + BITMAP8 optionsOverride = 6; + } + + request struct StepHueRequest { + HueStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StepSaturationRequest { + SaturationStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopMoveStepRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; + } + + command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + command MoveColor(MoveColorRequest): DefaultSuccess = 8; + command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + command MoveHue(MoveHueRequest): DefaultSuccess = 1; + command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + command StepColor(StepColorRequest): DefaultSuccess = 9; + command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; + command StepHue(StepHueRequest): DefaultSuccess = 2; + command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; +} + +server cluster ContentLauncher = 1290 { + enum MetricTypeEnum : ENUM8 { + kPixels = 0; + kPercentage = 1; + } + + enum ParameterEnum : ENUM8 { + kActor = 0; + kChannel = 1; + kCharacter = 2; + kDirector = 3; + kEvent = 4; + kFranchise = 5; + kGenre = 6; + kLeague = 7; + kPopularity = 8; + kProvider = 9; + kSport = 10; + kSportsTeam = 11; + kType = 12; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kUrlNotAvailable = 1; + kAuthFailed = 2; + } + + struct ContentSearch { + Parameter parameterList[] = 1; + } + + struct Parameter { + ParameterEnum type = 1; + CHAR_STRING value = 2; + AdditionalInfo externalIDList[] = 3; + } + + struct AdditionalInfo { + CHAR_STRING name = 1; + CHAR_STRING value = 2; + } + + struct BrandingInformation { + CHAR_STRING providerName = 1; + StyleInformation background = 2; + StyleInformation logo = 3; + StyleInformation progressBar = 4; + StyleInformation splash = 5; + StyleInformation waterMark = 6; + } + + struct StyleInformation { + CHAR_STRING imageUrl = 1; + CHAR_STRING color = 2; + Dimension size = 3; + } + + struct Dimension { + double width = 1; + double height = 2; + MetricTypeEnum metric = 3; + } + + attribute(readonly, reportable) CHAR_STRING acceptHeaderList[] = 0; + attribute(writable, reportable) bitmap32 supportedStreamingProtocols = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster DoorLock = 257 { + enum DlAlarmCode : ENUM8 { + kLockJammed = 0; + kLockFactoryReset = 1; + kLockRadioPowerCycled = 3; + kWrongCodeEntryLimit = 4; + kFrontEsceutcheonRemoved = 5; + kDoorForcedOpen = 6; + kDoorAjar = 7; + kForcedUser = 8; + } + + enum DlCredentialRule : ENUM8 { + kSingle = 0; + kDouble = 1; + kTri = 2; + } + + enum DlCredentialType : ENUM8 { + kProgrammingPIN = 0; + kPin = 1; + kRfid = 2; + kFingerprint = 3; + kFingerVein = 4; + kFace = 5; + } + + enum DlDataOperationType : ENUM8 { + kAdd = 0; + kClear = 1; + kModify = 2; + } + + enum DlDoorLockStatus : ENUM8 { + kDuplicate = 2; + kOccupied = 3; + } + + enum DlDoorState : ENUM8 { + kDoorOpen = 0; + kDoorClosed = 1; + kDoorJammed = 2; + kDoorForcedOpen = 3; + kDoorUnspecifiedError = 4; + kDoorAjar = 5; + } + + enum DlLockDataType : ENUM8 { + kUnspecified = 0; + kProgrammingCode = 1; + kUserIndex = 2; + kWeekDaySchedule = 3; + kYearDaySchedule = 4; + kHolidaySchedule = 5; + kPin = 6; + kRfid = 7; + kFingerprint = 8; + } + + enum DlLockOperationType : ENUM8 { + kLock = 0; + kUnlock = 1; + kNonAccessUserEvent = 2; + kForcedUserEvent = 3; + } + + enum DlLockState : ENUM8 { + kNotFullyLocked = 0; + kLocked = 1; + kUnlocked = 2; + } + + enum DlLockType : ENUM8 { + kDeadBolt = 0; + kMagnetic = 1; + kOther = 2; + kMortise = 3; + kRim = 4; + kLatchBolt = 5; + kCylindricalLock = 6; + kTubularLock = 7; + kInterconnectedLock = 8; + kDeadLatch = 9; + kDoorFurniture = 10; + } + + enum DlOperatingMode : ENUM8 { + kNormal = 0; + kVacation = 1; + kPrivacy = 2; + kNoRemoteLockUnlock = 3; + kPassage = 4; + } + + enum DlOperationError : ENUM8 { + kUnspecified = 0; + kInvalidCredential = 1; + kDisabledUserDenied = 2; + kRestricted = 3; + kInsufficientBattery = 4; + } + + enum DlOperationSource : ENUM8 { + kUnspecified = 0; + kManual = 1; + kProprietaryRemote = 2; + kKeypad = 3; + kAuto = 4; + kButton = 5; + kSchedule = 6; + kRemote = 7; + kRfid = 8; + kBiometric = 9; + } + + enum DlStatus : ENUM8 { + kSuccess = 0; + kFailure = 1; + kDuplicate = 2; + kOccupied = 3; + kInvalidField = 133; + kNotFound = 139; + } + + enum DlUserStatus : ENUM8 { + kAvailable = 0; + kOccupiedEnabled = 1; + kOccupiedDisabled = 3; + } + + enum DlUserType : ENUM8 { + kUnrestrictedUser = 0; + kYearDayScheduleUser = 1; + kWeekDayScheduleUser = 2; + kProgrammingUser = 3; + kNonAccessUser = 4; + kForcedUser = 5; + kDisposableUser = 6; + kExpiringUser = 7; + kScheduleRestrictedUser = 8; + kRemoteOnlyUser = 9; + } + + enum DoorLockOperationEventCode : ENUM8 { + kUnknownOrMfgSpecific = 0; + kLock = 1; + kUnlock = 2; + kLockInvalidPinOrId = 3; + kLockInvalidSchedule = 4; + kUnlockInvalidPinOrId = 5; + kUnlockInvalidSchedule = 6; + kOneTouchLock = 7; + kKeyLock = 8; + kKeyUnlock = 9; + kAutoLock = 10; + kScheduleLock = 11; + kScheduleUnlock = 12; + kManualLock = 13; + kManualUnlock = 14; + } + + enum DoorLockProgrammingEventCode : ENUM8 { + kUnknownOrMfgSpecific = 0; + kMasterCodeChanged = 1; + kPinAdded = 2; + kPinDeleted = 3; + kPinChanged = 4; + kIdAdded = 5; + kIdDeleted = 6; + } + + enum DoorLockSetPinOrIdStatus : ENUM8 { + kSuccess = 0; + kGeneralFailure = 1; + kMemoryFull = 2; + kDuplicateCodeError = 3; + } + + enum DoorLockUserStatus : ENUM8 { + kAvailable = 0; + kOccupiedEnabled = 1; + kOccupiedDisabled = 3; + kNotSupported = 255; + } + + enum DoorLockUserType : ENUM8 { + kUnrestricted = 0; + kYearDayScheduleUser = 1; + kWeekDayScheduleUser = 2; + kMasterUser = 3; + kNonAccessUser = 4; + kNotSupported = 255; + } + + struct DlCredential { + DlCredentialType credentialType = 1; + INT16U credentialIndex = 2; + } + + critical event DoorLockAlarm = 0 { + DlAlarmCode alarmCode = 0; + } + + critical event DoorStateChange = 1 { + DlDoorState doorState = 0; + } + + critical event LockOperation = 2 { + DlLockOperationType lockOperationType = 0; + DlOperationSource operationSource = 1; + nullable INT16U userIndex = 2; + nullable fabric_idx fabricIndex = 3; + nullable NODE_ID sourceNode = 4; + optional nullable DlCredential credentials[] = 5; + } + + critical event LockOperationError = 3 { + DlLockOperationType lockOperationType = 0; + DlOperationSource operationSource = 1; + DlOperationError operationError = 2; + nullable INT16U userIndex = 3; + nullable fabric_idx fabricIndex = 4; + nullable NODE_ID sourceNode = 5; + optional nullable DlCredential credentials[] = 6; + } + + info event LockUserChange = 4 { + DlLockDataType lockDataType = 0; + DlDataOperationType dataOperationType = 1; + DlOperationSource operationSource = 2; + nullable INT16U userIndex = 3; + nullable fabric_idx fabricIndex = 4; + nullable NODE_ID sourceNode = 5; + nullable INT16U dataIndex = 6; + } + + attribute(readonly, reportable) DlLockState lockState = 0; + attribute(readonly, reportable) DlLockType lockType = 1; + attribute(readonly, reportable) boolean actuatorEnabled = 2; + attribute(readonly, reportable) DlDoorState doorState = 3; + attribute(writable) int32u doorOpenEvents = 4; + attribute(writable) int32u doorClosedEvents = 5; + attribute(writable) int16u openPeriod = 6; + attribute(readonly) int16u numberOfTotalUsersSupported = 17; + attribute(readonly) int16u numberOfPINUsersSupported = 18; + attribute(readonly) int16u numberOfWeekDaySchedulesSupportedPerUser = 20; + attribute(readonly) int16u numberOfYearDaySchedulesSupportedPerUser = 21; + attribute(readonly) int16u numberOfHolidaySchedulesSupported = 22; + attribute(readonly) int8u maxPINCodeLength = 23; + attribute(readonly) int8u minPINCodeLength = 24; + attribute(readonly) bitmap8 credentialRulesSupport = 27; + attribute(writable, reportable) char_string language = 33; + attribute(writable, reportable) int32u autoRelockTime = 35; + attribute(writable, reportable) int8u soundVolume = 36; + attribute(writable, reportable) DlOperatingMode operatingMode = 37; + attribute(readonly) bitmap16 supportedOperatingModes = 38; + attribute(readonly) bitmap16 defaultConfigurationRegister = 39; + attribute(writable, reportable) boolean enableOneTouchLocking = 41; + attribute(writable) boolean enableInsideStatusLED = 42; + attribute(writable, reportable) boolean enablePrivacyModeButton = 43; + attribute(writable, reportable) int8u wrongCodeEntryLimit = 48; + attribute(writable, reportable) int8u userCodeTemporaryDisableTime = 49; + attribute(writable) boolean requirePINforRemoteOperation = 51; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ClearCredentialRequest { + DlCredential credential = 0; + } + + request struct ClearUserRequest { + INT16U userIndex = 0; + } + + request struct GetCredentialStatusRequest { + DlCredential credential = 0; + } + + request struct GetUserRequest { + INT16U userIndex = 0; + } + + request struct LockDoorRequest { + optional OCTET_STRING pinCode = 0; + } + + request struct SetCredentialRequest { + DlDataOperationType operationType = 0; + DlCredential credential = 1; + LONG_OCTET_STRING credentialData = 2; + INT16U userIndex = 3; + DlUserStatus userStatus = 4; + } + + request struct SetUserRequest { + DlDataOperationType operationType = 0; + INT16U userIndex = 1; + nullable CHAR_STRING userName = 2; + nullable INT32U userUniqueId = 3; + DlUserStatus userStatus = 4; + DlUserType userType = 5; + DlCredentialRule credentialRule = 6; + } + + request struct UnlockDoorRequest { + optional OCTET_STRING pinCode = 0; + } + + response struct GetCredentialStatusResponse { + boolean credentialExists = 0; + nullable INT16U userIndex = 1; + nullable INT16U nextCredentialIndex = 2; + } + + response struct GetUserResponse { + INT16U userIndex = 0; + nullable CHAR_STRING userName = 1; + nullable INT32U userUniqueId = 2; + nullable DlUserStatus userStatus = 3; + nullable DlUserType userType = 4; + nullable DlCredentialRule credentialRule = 5; + nullable DlCredential credentials[] = 6; + nullable fabric_idx creatorFabricIndex = 7; + nullable fabric_idx lastModifiedFabricIndex = 8; + INT16U nextUserIndex = 9; + } + + response struct SetCredentialResponse { + DlStatus status = 0; + nullable INT16U userIndex = 1; + nullable INT16U nextCredentialIndex = 2; + } + + command ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; + command ClearUser(ClearUserRequest): DefaultSuccess = 29; + command GetCredentialStatus(GetCredentialStatusRequest): GetCredentialStatusResponse = 36; + command GetUser(GetUserRequest): GetUserResponse = 27; + command LockDoor(LockDoorRequest): DefaultSuccess = 0; + command SetCredential(SetCredentialRequest): SetCredentialResponse = 34; + command SetUser(SetUserRequest): DefaultSuccess = 26; + command UnlockDoor(UnlockDoorRequest): DefaultSuccess = 1; +} + +server cluster ElectricalMeasurement = 2820 { + attribute(readonly, reportable) bitmap32 measurementType = 0; + attribute(readonly, reportable) int32s totalActivePower = 772; + attribute(readonly, reportable) int16u rmsVoltage = 1285; + attribute(readonly, reportable) int16u rmsVoltageMin = 1286; + attribute(readonly, reportable) int16u rmsVoltageMax = 1287; + attribute(readonly, reportable) int16u rmsCurrent = 1288; + attribute(readonly, reportable) int16u rmsCurrentMin = 1289; + attribute(readonly, reportable) int16u rmsCurrentMax = 1290; + attribute(readonly, reportable) int16s activePower = 1291; + attribute(readonly, reportable) int16s activePowerMin = 1292; + attribute(readonly, reportable) int16s activePowerMax = 1293; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster FlowMeasurement = 1028 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u tolerance = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicy : ENUM8 { + kStandard = 0; + kLowLatency = 1; + } + + struct GroupKey { + fabric_idx fabricIndex = 0; + INT16U groupId = 1; + INT16U groupKeySetID = 2; + } + + struct GroupInfo { + INT16U fabricIndex = 0; + INT16U groupId = 1; + INT16U endpoints[] = 2; + CHAR_STRING groupName = 3; + } + + struct GroupKeySet { + INT16U groupKeySetID = 0; + GroupKeySecurityPolicy securityPolicy = 1; + OCTET_STRING epochKey0 = 2; + INT64U epochStartTime0 = 3; + OCTET_STRING epochKey1 = 4; + INT64U epochStartTime1 = 5; + OCTET_STRING epochKey2 = 6; + INT64U epochStartTime2 = 7; + } + + attribute(readonly, reportable) GroupKey groupKeyMap[] = 0; + attribute(readonly, reportable) GroupInfo groupTable[] = 1; + attribute(readonly) int16u maxGroupsPerFabric = 2; + attribute(readonly) int16u maxGroupKeysPerFabric = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct KeySetReadRequest { + INT16U groupKeySetID = 0; + } + + request struct KeySetReadAllIndicesRequest { + INT16U groupKeySetIDs[] = 0; + } + + request struct KeySetRemoveRequest { + INT16U groupKeySetID = 0; + } + + request struct KeySetWriteRequest { + GroupKeySet groupKeySet = 0; + } + + response struct KeySetReadAllIndicesResponse { + INT16U groupKeySetIDs[] = 0; + } + + response struct KeySetReadResponse { + GroupKeySet groupKeySet = 0; + } + + command KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + command KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + command KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + command KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; +} + +server cluster Groups = 4 { + attribute(readonly, reportable) bitmap8 nameSupport = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddGroupRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct AddGroupIfIdentifyingRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct GetGroupMembershipRequest { + INT16U groupList[] = 0; + } + + request struct RemoveGroupRequest { + INT16U groupId = 0; + } + + request struct ViewGroupRequest { + INT16U groupId = 0; + } + + response struct AddGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct GetGroupMembershipResponse { + INT8U capacity = 0; + INT16U groupList[] = 1; + } + + response struct RemoveGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct ViewGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + CHAR_STRING groupName = 2; + } + + command AddGroup(AddGroupRequest): AddGroupResponse = 0; + command AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + command RemoveAllGroups(): DefaultSuccess = 4; + command RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; +} + +server cluster IasZone = 1280 { + enum IasEnrollResponseCode : ENUM8 { + kSuccess = 0; + kNotSupported = 1; + kNoEnrollPermit = 2; + kTooManyZones = 3; + } + + enum IasZoneType : ENUM16 { + kStandardCie = 0; + kMotionSensor = 13; + kContactSwitch = 21; + kFireSensor = 40; + kWaterSensor = 42; + kGasSensor = 43; + kPersonalEmergencyDevice = 44; + kVibrationMovementSensor = 45; + kRemoteControl = 271; + kKeyFob = 277; + kKeypad = 541; + kStandardWarningDevice = 549; + kGlassBreakSensor = 550; + kCarbonMonoxideSensor = 551; + kSecurityRepeater = 553; + kInvalidZoneType = 65535; + } + + attribute(readonly, reportable) enum8 zoneState = 0; + attribute(readonly, reportable) enum16 zoneType = 1; + attribute(readonly, reportable) bitmap16 zoneStatus = 2; + attribute(writable, reportable) node_id iasCieAddress = 16; + attribute(readonly, reportable) int8u zoneId = 17; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ZoneEnrollRequestRequest { + IasZoneType zoneType = 0; + INT16U manufacturerCode = 1; + } + + request struct ZoneStatusChangeNotificationRequest { + IasZoneStatus zoneStatus = 0; + BITMAP8 extendedStatus = 1; + INT8U zoneId = 2; + INT16U delay = 3; + } + + response struct ZoneEnrollResponse { + IasEnrollResponseCode enrollResponseCode = 0; + INT8U zoneId = 1; + } + + command ZoneEnrollRequest(ZoneEnrollRequestRequest): ZoneEnrollResponse = 1; + command ZoneStatusChangeNotification(ZoneStatusChangeNotificationRequest): DefaultSuccess = 0; +} + +server cluster Identify = 3 { + enum IdentifyEffectIdentifier : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum IdentifyEffectVariant : ENUM8 { + kDefault = 0; + } + + enum IdentifyIdentifyType : ENUM8 { + kNone = 0; + kVisibleLight = 1; + kVisibleLED = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute(writable, reportable) int16u identifyTime = 0; + attribute(readonly, reportable) enum8 identifyType = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + request struct TriggerEffectRequest { + IdentifyEffectIdentifier effectIdentifier = 0; + IdentifyEffectVariant effectVariant = 1; + } + + response struct IdentifyQueryResponse { + INT16U timeout = 0; + } + + command Identify(IdentifyRequest): DefaultSuccess = 0; + command IdentifyQuery(): IdentifyQueryResponse = 1; + command TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +server cluster IlluminanceMeasurement = 1024 { + enum LightSensorType : ENUM8 { + kPhotodiode = 0; + kCmos = 1; + } + + attribute(readonly, reportable) int16u measuredValue = 0; + attribute(readonly, reportable) int16u minMeasuredValue = 1; + attribute(readonly, reportable) int16u maxMeasuredValue = 2; + attribute(readonly, reportable) int16u tolerance = 3; + attribute(readonly, reportable) enum8 lightSensorType = 4; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster KeypadInput = 1289 { + enum CecKeyCode : ENUM8 { + kSelect = 0; + kUp = 1; + kDown = 2; + kLeft = 3; + kRight = 4; + kRightUp = 5; + kRightDown = 6; + kLeftUp = 7; + kLeftDown = 8; + kRootMenu = 9; + kSetupMenu = 10; + kContentsMenu = 11; + kFavoriteMenu = 12; + kExit = 13; + kMediaTopMenu = 16; + kMediaContextSensitiveMenu = 17; + kNumberEntryMode = 29; + kNumber11 = 30; + kNumber12 = 31; + kNumber0OrNumber10 = 32; + kNumbers1 = 33; + kNumbers2 = 34; + kNumbers3 = 35; + kNumbers4 = 36; + kNumbers5 = 37; + kNumbers6 = 38; + kNumbers7 = 39; + kNumbers8 = 40; + kNumbers9 = 41; + kDot = 42; + kEnter = 43; + kClear = 44; + kNextFavorite = 47; + kChannelUp = 48; + kChannelDown = 49; + kPreviousChannel = 50; + kSoundSelect = 51; + kInputSelect = 52; + kDisplayInformation = 53; + kHelp = 54; + kPageUp = 55; + kPageDown = 56; + kPower = 64; + kVolumeUp = 65; + kVolumeDown = 66; + kMute = 67; + kPlay = 68; + kStop = 69; + kPause = 70; + kRecord = 71; + kRewind = 72; + kFastForward = 73; + kEject = 74; + kForward = 75; + kBackward = 76; + kStopRecord = 77; + kPauseRecord = 78; + kReserved = 79; + kAngle = 80; + kSubPicture = 81; + kVideoOnDemand = 82; + kElectronicProgramGuide = 83; + kTimerProgramming = 84; + kInitialConfiguration = 85; + kSelectBroadcastType = 86; + kSelectSoundPresentation = 87; + kPlayFunction = 96; + kPausePlayFunction = 97; + kRecordFunction = 98; + kPauseRecordFunction = 99; + kStopFunction = 100; + kMuteFunction = 101; + kRestoreVolumeFunction = 102; + kTuneFunction = 103; + kSelectMediaFunction = 104; + kSelectAvInputFunction = 105; + kSelectAudioInputFunction = 106; + kPowerToggleFunction = 107; + kPowerOffFunction = 108; + kPowerOnFunction = 109; + kF1Blue = 113; + kF2Red = 114; + kF3Green = 115; + kF4Yellow = 116; + kF5 = 117; + kData = 118; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kUnsupportedKey = 1; + kInvalidKeyInCurrentState = 2; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + attribute(readonly, reportable) int8u currentLevel = 0; + attribute(readonly, reportable) int16u remainingTime = 1; + attribute(readonly, reportable) int8u minLevel = 2; + attribute(readonly, reportable) int8u maxLevel = 3; + attribute(readonly, reportable) int16u currentFrequency = 4; + attribute(readonly, reportable) int16u minFrequency = 5; + attribute(readonly, reportable) int16u maxFrequency = 6; + attribute(writable, reportable) bitmap8 options = 15; + attribute(writable, reportable) int16u onOffTransitionTime = 16; + attribute(writable, reportable) int8u onLevel = 17; + attribute(writable, reportable) int16u onTransitionTime = 18; + attribute(writable, reportable) int16u offTransitionTime = 19; + attribute(writable, reportable) int8u defaultMoveRate = 20; + attribute(writable, reportable) int8u startUpCurrentLevel = 16384; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelRequest { + INT8U level = 0; + INT16U transitionTime = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + INT16U transitionTime = 1; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionMask = 3; + BITMAP8 optionOverride = 4; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + } + + request struct StopRequest { + BITMAP8 optionMask = 0; + BITMAP8 optionOverride = 1; + } + + command Move(MoveRequest): DefaultSuccess = 1; + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command Step(StepRequest): DefaultSuccess = 2; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command Stop(StopRequest): DefaultSuccess = 3; + command StopWithOnOff(): DefaultSuccess = 7; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster LowPower = 1288 { + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Sleep(): DefaultSuccess = 0; +} + +server cluster MediaInput = 1287 { + enum InputTypeEnum : ENUM8 { + kInternal = 0; + kAux = 1; + kCoax = 2; + kComposite = 3; + kHdmi = 4; + kInput = 5; + kLine = 6; + kOptical = 7; + kVideo = 8; + kScart = 9; + kUsb = 10; + kOther = 11; + } + + struct InputInfo { + INT8U index = 1; + InputTypeEnum inputType = 2; + CHAR_STRING name = 3; + CHAR_STRING description = 4; + } + + attribute(readonly, reportable) InputInfo mediaInputList[] = 0; + attribute(readonly, reportable) int8u currentMediaInput = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster MediaPlayback = 1286 { + enum PlaybackStateEnum : ENUM8 { + kPlaying = 0; + kPaused = 1; + kNotPlaying = 2; + kBuffering = 3; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kInvalidStateForCommand = 1; + kNotAllowed = 2; + kNotActive = 3; + kSpeedOutOfRange = 4; + kSeekOutOfRange = 5; + } + + attribute(readonly, reportable) PlaybackStateEnum playbackState = 0; + attribute(readonly, reportable) epoch_us startTime = 1; + attribute(readonly, reportable) int64u duration = 2; + attribute(readonly, reportable) single playbackSpeed = 4; + attribute(readonly, reportable) int64u seekRangeEnd = 5; + attribute(readonly, reportable) int64u seekRangeStart = 6; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ModeSelect = 80 { + struct ModeOptionStruct { + CHAR_STRING label = 1; + INT8U mode = 2; + INT32U semanticTag = 3; + } + + attribute(readonly, reportable) int8u currentMode = 0; + attribute(readonly, reportable) ModeOptionStruct supportedModes[] = 1; + attribute(writable, reportable) int8u onMode = 2; + attribute(readonly, reportable) int8u startUpMode = 3; + attribute(readonly, reportable) char_string description = 4; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ChangeToModeRequest { + INT8U newMode = 0; + } + + command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +client cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHttps = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : ENUM8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ApplyUpdateRequestRequest { + OCTET_STRING updateToken = 0; + INT32U newVersion = 1; + } + + request struct NotifyUpdateAppliedRequest { + OCTET_STRING updateToken = 0; + INT32U softwareVersion = 1; + } + + request struct QueryImageRequest { + vendor_id vendorId = 0; + INT16U productId = 1; + INT32U softwareVersion = 2; + OTADownloadProtocol protocolsSupported[] = 3; + optional INT16U hardwareVersion = 4; + optional CHAR_STRING location = 5; + optional BOOLEAN requestorCanConsent = 6; + optional OCTET_STRING metadataForProvider = 7; + } + + response struct ApplyUpdateResponse { + OTAApplyUpdateAction action = 0; + INT32U delayedActionTime = 1; + } + + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; + command QueryImage(QueryImageRequest): QueryImageResponse = 0; +} + +server cluster OtaSoftwareUpdateRequestor = 42 { + enum OTAAnnouncementReason : ENUM8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum OTAChangeReasonEnum : ENUM8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum OTAUpdateStateEnum : ENUM8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + struct ProviderLocation { + fabric_idx fabricIndex = 0; + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + } + + info event StateTransition = 0 { + nullable OTAUpdateStateEnum previousState = 0; + OTAUpdateStateEnum newState = 1; + OTAChangeReasonEnum reason = 2; + nullable INT32U targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + INT32U softwareVersion = 0; + INT16U productID = 1; + } + + info event DownloadError = 2 { + INT32U softwareVersion = 0; + INT64U bytesDownloaded = 1; + INT8U progressPercent = 2; + nullable INT64S platformCode = 3; + } + + attribute(writable, reportable) ProviderLocation defaultOtaProviders[] = 0; + attribute(readonly, reportable) boolean updatePossible = 1; + attribute(readonly, reportable) OTAUpdateStateEnum updateState = 2; + attribute(readonly, reportable) int8u updateStateProgress = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AnnounceOtaProviderRequest { + node_id providerNodeId = 0; + vendor_id vendorId = 1; + OTAAnnouncementReason announcementReason = 2; + optional OCTET_STRING metadataForNode = 3; + endpoint_no endpoint = 4; + } + + command AnnounceOtaProvider(AnnounceOtaProviderRequest): DefaultSuccess = 0; +} + +server cluster OccupancySensing = 1030 { + attribute(readonly, reportable) bitmap8 occupancy = 0; + attribute(readonly, reportable) enum8 occupancySensorType = 1; + attribute(readonly, reportable) bitmap8 occupancySensorTypeBitmap = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) boolean globalSceneControl = 16384; + attribute(writable, reportable) int16u onTime = 16385; + attribute(writable, reportable) int16u offWaitTime = 16386; + attribute(writable, reportable) enum8 startUpOnOff = 16387; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OffWithEffectRequest { + OnOffEffectIdentifier effectId = 0; + OnOffDelayedAllOffEffectVariant effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControl onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + command Off(): DefaultSuccess = 0; + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + command On(): DefaultSuccess = 1; + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; + command Toggle(): DefaultSuccess = 2; +} + +server cluster OnOffSwitchConfiguration = 7 { + attribute(readonly, reportable) enum8 switchType = 0; + attribute(writable, reportable) enum8 switchActions = 16; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster PowerSource = 47 { + attribute(readonly, reportable) enum8 status = 0; + attribute(readonly, reportable) int8u order = 1; + attribute(readonly, reportable) char_string description = 2; + attribute(readonly, reportable) int32u batteryVoltage = 11; + attribute(readonly, reportable) int8u batteryPercentRemaining = 12; + attribute(readonly, reportable) int32u batteryTimeRemaining = 13; + attribute(readonly, reportable) enum8 batteryChargeLevel = 14; + attribute(readonly, reportable) ENUM8 activeBatteryFaults[] = 18; + attribute(readonly, reportable) enum8 batteryChargeState = 26; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster PowerSourceConfiguration = 46 { + attribute(readonly) INT8U sources[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster PressureMeasurement = 1027 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster PumpConfigurationAndControl = 512 { + enum PumpControlMode : ENUM8 { + kConstantSpeed = 0; + kConstantPressure = 1; + kProportionalPressure = 2; + kConstantFlow = 3; + kConstantTemperature = 5; + kAutomatic = 7; + } + + enum PumpOperationMode : ENUM8 { + kNormal = 0; + kMinimum = 1; + kMaximum = 2; + kLocal = 3; + } + + info event SupplyVoltageLow = 0 { + } + + info event SupplyVoltageHigh = 1 { + } + + info event PowerMissingPhase = 2 { + } + + info event SystemPressureLow = 3 { + } + + info event SystemPressureHigh = 4 { + } + + critical event DryRunning = 5 { + } + + info event MotorTemperatureHigh = 6 { + } + + critical event PumpMotorFatalFailure = 7 { + } + + info event ElectronicTemperatureHigh = 8 { + } + + critical event PumpBlocked = 9 { + } + + info event SensorFailure = 10 { + } + + info event ElectronicNonFatalFailure = 11 { + } + + critical event ElectronicFatalFailure = 12 { + } + + info event GeneralFault = 13 { + } + + info event Leakage = 14 { + } + + info event AirDetection = 15 { + } + + info event TurbineOperation = 16 { + } + + attribute(readonly, reportable) int16s maxPressure = 0; + attribute(readonly, reportable) int16u maxSpeed = 1; + attribute(readonly, reportable) int16u maxFlow = 2; + attribute(readonly, reportable) int16s minConstPressure = 3; + attribute(readonly, reportable) int16s maxConstPressure = 4; + attribute(readonly, reportable) int16s minCompPressure = 5; + attribute(readonly, reportable) int16s maxCompPressure = 6; + attribute(readonly, reportable) int16u minConstSpeed = 7; + attribute(readonly, reportable) int16u maxConstSpeed = 8; + attribute(readonly, reportable) int16u minConstFlow = 9; + attribute(readonly, reportable) int16u maxConstFlow = 10; + attribute(readonly, reportable) int16s minConstTemp = 11; + attribute(readonly, reportable) int16s maxConstTemp = 12; + attribute(readonly, reportable) bitmap16 pumpStatus = 16; + attribute(readonly, reportable) enum8 effectiveOperationMode = 17; + attribute(readonly, reportable) enum8 effectiveControlMode = 18; + attribute(readonly, reportable) int16s capacity = 19; + attribute(readonly, reportable) int16u speed = 20; + attribute(writable, reportable) int24u lifetimeRunningHours = 21; + attribute(readonly, reportable) int24u power = 22; + attribute(writable, reportable) int32u lifetimeEnergyConsumed = 23; + attribute(writable, reportable) enum8 operationMode = 32; + attribute(writable, reportable) enum8 controlMode = 33; + attribute(readonly, reportable) bitmap16 alarmMask = 34; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster RelativeHumidityMeasurement = 1029 { + attribute(readonly, reportable) int16u measuredValue = 0; + attribute(readonly, reportable) int16u minMeasuredValue = 1; + attribute(readonly, reportable) int16u maxMeasuredValue = 2; + attribute(readonly, reportable) int16u tolerance = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Scenes = 5 { + struct SceneExtensionFieldSet { + CLUSTER_ID clusterId = 1; + INT8U length = 2; + INT8U value = 3; + } + + attribute(readonly, reportable) int8u sceneCount = 0; + attribute(readonly, reportable) int8u currentScene = 1; + attribute(readonly, reportable) int16u currentGroup = 2; + attribute(readonly, reportable) boolean sceneValid = 3; + attribute(readonly, reportable) bitmap8 nameSupport = 4; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + CHAR_STRING sceneName = 3; + SceneExtensionFieldSet extensionFieldSets[] = 4; + } + + request struct GetSceneMembershipRequest { + INT16U groupId = 0; + } + + request struct RecallSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + } + + request struct RemoveAllScenesRequest { + INT16U groupId = 0; + } + + request struct RemoveSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct StoreSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct ViewSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + response struct AddSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct GetSceneMembershipResponse { + ENUM8 status = 0; + INT8U capacity = 1; + INT16U groupId = 2; + INT8U sceneCount = 3; + INT8U sceneList[] = 4; + } + + response struct RemoveAllScenesResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct RemoveSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct StoreSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct ViewSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + INT16U transitionTime = 3; + CHAR_STRING sceneName = 4; + SceneExtensionFieldSet extensionFieldSets[] = 5; + } + + command AddScene(AddSceneRequest): AddSceneResponse = 0; + command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + command RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + command RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + command StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetWatermarks(): DefaultSuccess = 0; +} + +server cluster Switch = 59 { + info event SwitchLatched = 0 { + INT8U newPosition = 0; + } + + info event InitialPress = 1 { + INT8U newPosition = 0; + } + + info event LongPress = 2 { + INT8U newPosition = 0; + } + + info event ShortRelease = 3 { + INT8U previousPosition = 0; + } + + info event LongRelease = 4 { + INT8U previousPosition = 0; + } + + info event MultiPressOngoing = 5 { + INT8U newPosition = 0; + INT8U currentNumberOfPressesCounted = 1; + } + + info event MultiPressComplete = 6 { + INT8U newPosition = 0; + INT8U totalNumberOfPressesCounted = 1; + } + + attribute(readonly, reportable) int8u numberOfPositions = 0; + attribute(readonly, reportable) int8u currentPosition = 1; + attribute(readonly, reportable) int8u multiPressMax = 2; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster TargetNavigator = 1285 { + enum StatusEnum : ENUM8 { + kSuccess = 0; + kAppNotAvailable = 1; + kSystemBusy = 2; + } + + struct TargetInfo { + INT8U identifier = 1; + CHAR_STRING name = 2; + } + + attribute(readonly, reportable) TargetInfo targetNavigatorList[] = 0; + attribute(readonly) int8u currentNavigatorTarget = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u tolerance = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster TestCluster = 1295 { + enum SimpleEnum : ENUM8 { + kUnspecified = 0; + kValueA = 1; + kValueB = 2; + kValueC = 3; + } + + struct TestListStructOctet { + INT64U fabricIndex = 1; + OCTET_STRING operationalCert = 2; + } + + struct NullablesAndOptionalsStruct { + nullable INT16U nullableInt = 1; + optional INT16U optionalInt = 2; + optional nullable INT16U nullableOptionalInt = 3; + nullable CHAR_STRING nullableString = 4; + optional CHAR_STRING optionalString = 5; + optional nullable CHAR_STRING nullableOptionalString = 6; + nullable SimpleStruct nullableStruct = 7; + optional SimpleStruct optionalStruct = 8; + optional nullable SimpleStruct nullableOptionalStruct = 9; + nullable SimpleEnum nullableList[] = 10; + optional SimpleEnum optionalList[] = 11; + optional nullable SimpleEnum nullableOptionalList[] = 12; + } + + struct SimpleStruct { + INT8U a = 1; + BOOLEAN b = 2; + SimpleEnum c = 3; + OCTET_STRING d = 4; + CHAR_STRING e = 5; + SimpleBitmap f = 6; + single g = 7; + double h = 8; + } + + struct NestedStructList { + INT8U a = 1; + BOOLEAN b = 2; + SimpleStruct c = 3; + SimpleStruct d[] = 4; + INT32U e[] = 5; + OCTET_STRING f[] = 6; + INT8U g[] = 7; + } + + struct NestedStruct { + INT8U a = 1; + BOOLEAN b = 2; + SimpleStruct c = 3; + } + + info event TestEvent = 1 { + INT8U arg1 = 1; + SimpleEnum arg2 = 2; + BOOLEAN arg3 = 3; + SimpleStruct arg4 = 4; + SimpleStruct arg5[] = 5; + SimpleEnum arg6[] = 6; + } + + attribute(writable, reportable) boolean boolean = 0; + attribute(writable, reportable) bitmap8 bitmap8 = 1; + attribute(writable, reportable) bitmap16 bitmap16 = 2; + attribute(writable, reportable) bitmap32 bitmap32 = 3; + attribute(writable, reportable) bitmap64 bitmap64 = 4; + attribute(writable, reportable) int8u int8u = 5; + attribute(writable, reportable) int16u int16u = 6; + attribute(writable, reportable) int24u int24u = 7; + attribute(writable, reportable) int32u int32u = 8; + attribute(writable, reportable) int40u int40u = 9; + attribute(writable, reportable) int48u int48u = 10; + attribute(writable, reportable) int56u int56u = 11; + attribute(writable, reportable) int64u int64u = 12; + attribute(writable, reportable) int8s int8s = 13; + attribute(writable, reportable) int16s int16s = 14; + attribute(writable, reportable) int24s int24s = 15; + attribute(writable, reportable) int32s int32s = 16; + attribute(writable, reportable) int40s int40s = 17; + attribute(writable, reportable) int48s int48s = 18; + attribute(writable, reportable) int56s int56s = 19; + attribute(writable, reportable) int64s int64s = 20; + attribute(writable, reportable) enum8 enum8 = 21; + attribute(writable, reportable) enum16 enum16 = 22; + attribute(writable, reportable) single floatSingle = 23; + attribute(writable, reportable) double floatDouble = 24; + attribute(writable, reportable) octet_string octetString = 25; + attribute(writable, reportable) INT8U listInt8u[] = 26; + attribute(writable, reportable) OCTET_STRING listOctetString[] = 27; + attribute(writable, reportable) TestListStructOctet listStructOctetString[] = 28; + attribute(writable, reportable) long_octet_string longOctetString = 29; + attribute(writable, reportable) char_string charString = 30; + attribute(writable, reportable) long_char_string longCharString = 31; + attribute(writable, reportable) epoch_us epochUs = 32; + attribute(writable, reportable) epoch_s epochS = 33; + attribute(writable, reportable) vendor_id vendorId = 34; + attribute(writable, reportable) NullablesAndOptionalsStruct listNullablesAndOptionalsStruct[] = 35; + attribute(writable, reportable) SimpleEnum enumAttr = 36; + attribute(writable, reportable) SimpleStruct structAttr = 37; + attribute(writable, reportable) int8u rangeRestrictedInt8u = 38; + attribute(writable, reportable) int8s rangeRestrictedInt8s = 39; + attribute(writable, reportable) int16u rangeRestrictedInt16u = 40; + attribute(writable, reportable) int16s rangeRestrictedInt16s = 41; + attribute(readonly) LONG_OCTET_STRING listLongOctetString[] = 42; + attribute(writable, reportable) boolean timedWriteBoolean = 48; + attribute(writable, reportable) boolean nullableBoolean = 32768; + attribute(writable, reportable) bitmap8 nullableBitmap8 = 32769; + attribute(writable, reportable) bitmap16 nullableBitmap16 = 32770; + attribute(writable, reportable) bitmap32 nullableBitmap32 = 32771; + attribute(writable, reportable) bitmap64 nullableBitmap64 = 32772; + attribute(writable, reportable) int8u nullableInt8u = 32773; + attribute(writable, reportable) int16u nullableInt16u = 32774; + attribute(writable, reportable) int24u nullableInt24u = 32775; + attribute(writable, reportable) int32u nullableInt32u = 32776; + attribute(writable, reportable) int40u nullableInt40u = 32777; + attribute(writable, reportable) int48u nullableInt48u = 32778; + attribute(writable, reportable) int56u nullableInt56u = 32779; + attribute(writable, reportable) int64u nullableInt64u = 32780; + attribute(writable, reportable) int8s nullableInt8s = 32781; + attribute(writable, reportable) int16s nullableInt16s = 32782; + attribute(writable, reportable) int24s nullableInt24s = 32783; + attribute(writable, reportable) int32s nullableInt32s = 32784; + attribute(writable, reportable) int40s nullableInt40s = 32785; + attribute(writable, reportable) int48s nullableInt48s = 32786; + attribute(writable, reportable) int56s nullableInt56s = 32787; + attribute(writable, reportable) int64s nullableInt64s = 32788; + attribute(writable, reportable) enum8 nullableEnum8 = 32789; + attribute(writable, reportable) enum16 nullableEnum16 = 32790; + attribute(writable, reportable) single nullableFloatSingle = 32791; + attribute(writable, reportable) double nullableFloatDouble = 32792; + attribute(writable, reportable) octet_string nullableOctetString = 32793; + attribute(writable, reportable) char_string nullableCharString = 32798; + attribute(writable, reportable) SimpleEnum nullableEnumAttr = 32804; + attribute(writable, reportable) SimpleStruct nullableStruct = 32805; + attribute(writable, reportable) int8u nullableRangeRestrictedInt8u = 32806; + attribute(writable, reportable) int8s nullableRangeRestrictedInt8s = 32807; + attribute(writable, reportable) int16u nullableRangeRestrictedInt16u = 32808; + attribute(writable, reportable) int16s nullableRangeRestrictedInt16s = 32809; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct SimpleStructEchoRequestRequest { + SimpleStruct arg1 = 0; + } + + request struct TestAddArgumentsRequest { + INT8U arg1 = 0; + INT8U arg2 = 1; + } + + request struct TestEmitTestEventRequestRequest { + INT8U arg1 = 0; + SimpleEnum arg2 = 1; + BOOLEAN arg3 = 2; + } + + request struct TestEnumsRequestRequest { + vendor_id arg1 = 0; + SimpleEnum arg2 = 1; + } + + request struct TestListInt8UArgumentRequestRequest { + INT8U arg1[] = 0; + } + + request struct TestListInt8UReverseRequestRequest { + INT8U arg1[] = 0; + } + + request struct TestListNestedStructListArgumentRequestRequest { + NestedStructList arg1[] = 0; + } + + request struct TestListStructArgumentRequestRequest { + SimpleStruct arg1[] = 0; + } + + request struct TestNestedStructArgumentRequestRequest { + NestedStruct arg1 = 0; + } + + request struct TestNestedStructListArgumentRequestRequest { + NestedStructList arg1 = 0; + } + + request struct TestNullableOptionalRequestRequest { + optional nullable INT8U arg1 = 0; + } + + request struct TestSimpleOptionalArgumentRequestRequest { + optional BOOLEAN arg1 = 0; + } + + request struct TestStructArgumentRequestRequest { + SimpleStruct arg1 = 0; + } + + response struct SimpleStructResponse { + SimpleStruct arg1 = 0; + } + + response struct TestAddArgumentsResponse { + INT8U returnValue = 0; + } + + response struct TestEmitTestEventResponse { + INT64U value = 0; + } + + response struct TestEnumsResponse { + vendor_id arg1 = 0; + SimpleEnum arg2 = 1; + } + + response struct TestListInt8UReverseResponse { + INT8U arg1[] = 0; + } + + response struct TestNullableOptionalResponse { + BOOLEAN wasPresent = 0; + optional BOOLEAN wasNull = 1; + optional INT8U value = 2; + optional nullable INT8U originalValue = 3; + } + + response struct TestSpecificResponse { + INT8U returnValue = 0; + } + + command SimpleStructEchoRequest(SimpleStructEchoRequestRequest): SimpleStructResponse = 17; + command Test(): DefaultSuccess = 0; + command TestAddArguments(TestAddArgumentsRequest): TestAddArgumentsResponse = 4; + command TestEmitTestEventRequest(TestEmitTestEventRequestRequest): TestEmitTestEventResponse = 20; + command TestEnumsRequest(TestEnumsRequestRequest): TestEnumsResponse = 14; + command TestListInt8UArgumentRequest(TestListInt8UArgumentRequestRequest): BooleanResponse = 10; + command TestListInt8UReverseRequest(TestListInt8UReverseRequestRequest): TestListInt8UReverseResponse = 13; + command TestListNestedStructListArgumentRequest(TestListNestedStructListArgumentRequestRequest): BooleanResponse = 12; + command TestListStructArgumentRequest(TestListStructArgumentRequestRequest): BooleanResponse = 9; + command TestNestedStructArgumentRequest(TestNestedStructArgumentRequestRequest): BooleanResponse = 8; + command TestNestedStructListArgumentRequest(TestNestedStructListArgumentRequestRequest): BooleanResponse = 11; + command TestNotHandled(): DefaultSuccess = 1; + command TestNullableOptionalRequest(TestNullableOptionalRequestRequest): TestNullableOptionalResponse = 15; + command TestSimpleOptionalArgumentRequest(TestSimpleOptionalArgumentRequestRequest): DefaultSuccess = 19; + command TestSpecific(): TestSpecificResponse = 2; + command TestStructArgumentRequest(TestStructArgumentRequestRequest): BooleanResponse = 7; + command TimedInvokeRequest(): DefaultSuccess = 18; +} + +server cluster Thermostat = 513 { + enum SetpointAdjustMode : ENUM8 { + kHeatSetpoint = 0; + kCoolSetpoint = 1; + kHeatAndCoolSetpoints = 2; + } + + attribute(readonly, reportable) int16s localTemperature = 0; + attribute(readonly, reportable) int16s absMinHeatSetpointLimit = 3; + attribute(readonly, reportable) int16s absMaxHeatSetpointLimit = 4; + attribute(readonly, reportable) int16s absMinCoolSetpointLimit = 5; + attribute(readonly, reportable) int16s absMaxCoolSetpointLimit = 6; + attribute(writable, reportable) int16s occupiedCoolingSetpoint = 17; + attribute(writable, reportable) int16s occupiedHeatingSetpoint = 18; + attribute(writable, reportable) int16s minHeatSetpointLimit = 21; + attribute(writable, reportable) int16s maxHeatSetpointLimit = 22; + attribute(writable, reportable) int16s minCoolSetpointLimit = 23; + attribute(writable, reportable) int16s maxCoolSetpointLimit = 24; + attribute(writable, reportable) int8s minSetpointDeadBand = 25; + attribute(writable, reportable) enum8 controlSequenceOfOperation = 27; + attribute(writable, reportable) enum8 systemMode = 28; + attribute(readonly, reportable) enum8 startOfWeek = 32; + attribute(readonly, reportable) int8u numberOfWeeklyTransitions = 33; + attribute(readonly, reportable) int8u numberOfDailyTransitions = 34; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ThermostatUserInterfaceConfiguration = 516 { + attribute(writable, reportable) enum8 temperatureDisplayMode = 0; + attribute(writable, reportable) enum8 keypadLockout = 1; + attribute(writable, reportable) enum8 scheduleProgrammingVisibility = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WakeOnLan = 1283 { + attribute(readonly, reportable) char_string wakeOnLanMacAddress = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +server cluster WindowCovering = 258 { + attribute(readonly, reportable) enum8 type = 0; + attribute(readonly, reportable) int16u currentPositionLift = 3; + attribute(readonly, reportable) int16u currentPositionTilt = 4; + attribute(readonly, reportable) bitmap8 configStatus = 7; + attribute(readonly, reportable) Percent currentPositionLiftPercentage = 8; + attribute(readonly, reportable) Percent currentPositionTiltPercentage = 9; + attribute(readonly, reportable) bitmap8 operationalStatus = 10; + attribute(readonly, reportable) Percent100ths targetPositionLiftPercent100ths = 11; + attribute(readonly, reportable) Percent100ths targetPositionTiltPercent100ths = 12; + attribute(readonly, reportable) enum8 endProductType = 13; + attribute(readonly, reportable) Percent100ths currentPositionLiftPercent100ths = 14; + attribute(readonly, reportable) Percent100ths currentPositionTiltPercent100ths = 15; + attribute(readonly, reportable) int16u installedOpenLimitLift = 16; + attribute(readonly, reportable) int16u installedClosedLimitLift = 17; + attribute(readonly, reportable) int16u installedOpenLimitTilt = 18; + attribute(readonly, reportable) int16u installedClosedLimitTilt = 19; + attribute(writable, reportable) bitmap8 mode = 23; + attribute(readonly, reportable) bitmap16 safetyStatus = 26; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command DownOrClose(): DefaultSuccess = 1; + command StopMotion(): DefaultSuccess = 2; + command UpOrOpen(): DefaultSuccess = 0; +} + + +endpoint 0 { +} + +endpoint 1 { +} + +endpoint 2 { +} + diff --git a/zzz_generated/bridge-app/zap-generated/Clusters.matter b/zzz_generated/bridge-app/zap-generated/Clusters.matter new file mode 100644 index 00000000000000..c67128cbb27093 --- /dev/null +++ b/zzz_generated/bridge-app/zap-generated/Clusters.matter @@ -0,0 +1,901 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + attribute(readonly, reportable) int8u currentLevel = 0; + attribute(readonly, reportable) int16u remainingTime = 1; + attribute(readonly, reportable) int8u minLevel = 2; + attribute(readonly, reportable) int8u maxLevel = 3; + attribute(readonly, reportable) int16u currentFrequency = 4; + attribute(readonly, reportable) int16u minFrequency = 5; + attribute(readonly, reportable) int16u maxFrequency = 6; + attribute(writable, reportable) bitmap8 options = 15; + attribute(writable, reportable) int16u onOffTransitionTime = 16; + attribute(writable, reportable) int8u onLevel = 17; + attribute(writable, reportable) int16u onTransitionTime = 18; + attribute(writable, reportable) int16u offTransitionTime = 19; + attribute(writable, reportable) int8u defaultMoveRate = 20; + attribute(writable, reportable) int8u startUpCurrentLevel = 16384; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelRequest { + INT8U level = 0; + INT16U transitionTime = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + INT16U transitionTime = 1; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionMask = 3; + BITMAP8 optionOverride = 4; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + } + + request struct StopRequest { + BITMAP8 optionMask = 0; + BITMAP8 optionOverride = 1; + } + + command Move(MoveRequest): DefaultSuccess = 1; + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command Step(StepRequest): DefaultSuccess = 2; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command Stop(StopRequest): DefaultSuccess = 3; + command StopWithOnOff(): DefaultSuccess = 7; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Switch = 59 { + info event SwitchLatched = 0 { + INT8U newPosition = 0; + } + + info event InitialPress = 1 { + INT8U newPosition = 0; + } + + info event LongPress = 2 { + INT8U newPosition = 0; + } + + info event ShortRelease = 3 { + INT8U previousPosition = 0; + } + + info event LongRelease = 4 { + INT8U previousPosition = 0; + } + + info event MultiPressOngoing = 5 { + INT8U newPosition = 0; + INT8U currentNumberOfPressesCounted = 1; + } + + info event MultiPressComplete = 6 { + INT8U newPosition = 0; + INT8U totalNumberOfPressesCounted = 1; + } + + attribute(readonly, reportable) int8u numberOfPositions = 0; + attribute(readonly, reportable) int8u currentPosition = 1; + attribute(readonly, reportable) int8u multiPressMax = 2; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + + +endpoint 0 { +} + +endpoint 1 { +} + diff --git a/zzz_generated/controller-clusters/zap-generated/Clusters.matter b/zzz_generated/controller-clusters/zap-generated/Clusters.matter new file mode 100644 index 00000000000000..d36d63d3ac4ad7 --- /dev/null +++ b/zzz_generated/controller-clusters/zap-generated/Clusters.matter @@ -0,0 +1,3319 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +client cluster AccessControl = 31 { + enum AuthMode : ENUM8 { + kPase = 1; + kCase = 2; + kGroup = 3; + } + + enum Privilege : ENUM8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + struct AccessControlEntry { + fabric_idx fabricIndex = 0; + Privilege privilege = 1; + AuthMode authMode = 2; + nullable INT64U subjects[] = 3; + nullable Target targets[] = 4; + } + + struct Target { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + struct ExtensionEntry { + fabric_idx fabricIndex = 0; + OCTET_STRING data = 1; + } + + attribute(writable, reportable) AccessControlEntry acl[] = 0; + attribute(writable, reportable) ExtensionEntry extension[] = 1; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; +} + +client cluster AccountLogin = 1294 { + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct GetSetupPINRequestRequest { + CHAR_STRING tempAccountIdentifier = 0; + } + + request struct LoginRequestRequest { + CHAR_STRING tempAccountIdentifier = 0; + CHAR_STRING setupPIN = 1; + } + + response struct GetSetupPINResponse { + CHAR_STRING setupPIN = 0; + } + + command GetSetupPINRequest(GetSetupPINRequestRequest): GetSetupPINResponse = 0; + command LoginRequest(LoginRequestRequest): DefaultSuccess = 2; + command LogoutRequest(): DefaultSuccess = 3; +} + +client cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +client cluster ApplicationBasic = 1293 { + enum ApplicationStatusEnum : ENUM8 { + kStopped = 0; + kActiveVisibleFocus = 1; + kActiveHidden = 2; + kActiveVisibleNotFocus = 3; + } + + struct ApplicationBasicApplication { + INT16U catalogVendorId = 1; + CHAR_STRING applicationId = 2; + } + + attribute(readonly, reportable) char_string vendorName = 0; + attribute(readonly, reportable) int16u vendorId = 1; + attribute(readonly, reportable) char_string applicationName = 2; + attribute(readonly, reportable) int16u productId = 3; + attribute(writable) ApplicationBasicApplication applicationApp = 4; + attribute(readonly, reportable) ApplicationStatusEnum applicationStatus = 5; + attribute(readonly, reportable) char_string applicationVersion = 6; + attribute(readonly) vendor_id allowedVendorList[] = 7; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster ApplicationLauncher = 1292 { + enum StatusEnum : ENUM8 { + kSuccess = 0; + kAppNotAvailable = 1; + kSystemBusy = 2; + } + + struct ApplicationLauncherApplication { + INT16U catalogVendorId = 1; + CHAR_STRING applicationId = 2; + } + + attribute(readonly, reportable) INT16U applicationLauncherList[] = 0; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct HideAppRequestRequest { + ApplicationLauncherApplication application = 0; + } + + request struct LaunchAppRequestRequest { + CHAR_STRING data = 0; + ApplicationLauncherApplication application = 1; + } + + request struct StopAppRequestRequest { + ApplicationLauncherApplication application = 0; + } + + response struct LauncherResponse { + StatusEnum status = 0; + CHAR_STRING data = 1; + } + + command HideAppRequest(HideAppRequestRequest): LauncherResponse = 2; + command LaunchAppRequest(LaunchAppRequestRequest): LauncherResponse = 0; + command StopAppRequest(StopAppRequestRequest): LauncherResponse = 1; +} + +client cluster AudioOutput = 1291 { + enum OutputTypeEnum : ENUM8 { + kHdmi = 0; + kBt = 1; + kOptical = 2; + kHeadphone = 3; + kInternal = 4; + kOther = 5; + } + + struct OutputInfo { + INT8U index = 1; + OutputTypeEnum outputType = 2; + CHAR_STRING name = 3; + } + + attribute(readonly, reportable) OutputInfo audioOutputList[] = 0; + attribute(readonly, reportable) int8u currentAudioOutput = 1; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct RenameOutputRequestRequest { + INT8U index = 0; + CHAR_STRING name = 1; + } + + request struct SelectOutputRequestRequest { + INT8U index = 0; + } + + command RenameOutputRequest(RenameOutputRequestRequest): DefaultSuccess = 1; + command SelectOutputRequest(SelectOutputRequestRequest): DefaultSuccess = 0; +} + +client cluster BarrierControl = 259 { + attribute(readonly, reportable) enum8 barrierMovingState = 1; + attribute(readonly, reportable) bitmap16 barrierSafetyStatus = 2; + attribute(readonly, reportable) bitmap8 barrierCapabilities = 3; + attribute(readonly, reportable) int8u barrierPosition = 10; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct BarrierControlGoToPercentRequest { + INT8U percentOpen = 0; + } + + command BarrierControlGoToPercent(BarrierControlGoToPercentRequest): DefaultSuccess = 0; + command BarrierControlStop(): DefaultSuccess = 1; +} + +client cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) char_string manufacturingDate = 11; + attribute(readonly, reportable) char_string partNumber = 12; + attribute(readonly, reportable) long_char_string productURL = 13; + attribute(readonly, reportable) char_string productLabel = 14; + attribute(readonly, reportable) char_string serialNumber = 15; + attribute(writable, reportable) boolean localConfigDisabled = 16; + attribute(readonly, reportable) boolean reachable = 17; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +client cluster BinaryInputBasic = 15 { + attribute(writable, reportable) boolean outOfService = 81; + attribute(writable, reportable) boolean presentValue = 85; + attribute(readonly, reportable) bitmap8 statusFlags = 111; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster Binding = 30 { + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct BindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + request struct UnbindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + command Bind(BindRequest): DefaultSuccess = 0; + command Unbind(UnbindRequest): DefaultSuccess = 1; +} + +client cluster BooleanState = 69 { + info event StateChange = 0 { + boolean stateValue = 0; + } + + attribute(readonly, reportable) boolean stateValue = 0; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster BridgedActions = 37 { + enum ActionErrorEnum : ENUM8 { + kUnknown = 0; + kInterrupted = 1; + } + + enum ActionStateEnum : ENUM8 { + kInactive = 0; + kActive = 1; + kPaused = 2; + kDisabled = 3; + } + + enum ActionTypeEnum : ENUM8 { + kOther = 0; + kScene = 1; + kSequence = 2; + kAutomation = 3; + kException = 4; + kNotification = 5; + kAlarm = 6; + } + + enum EndpointListTypeEnum : ENUM8 { + kOther = 0; + kRoom = 1; + kZone = 2; + } + + struct ActionStruct { + INT16U actionID = 1; + CHAR_STRING name = 2; + ActionTypeEnum type = 3; + INT16U endpointListID = 4; + INT16U supportedCommands = 5; + ActionStateEnum status = 6; + } + + struct EndpointListStruct { + INT16U endpointListID = 1; + CHAR_STRING name = 2; + EndpointListTypeEnum type = 3; + ENDPOINT_NO endpoints[] = 4; + } + + info event StateChanged = 0 { + INT16U actionID = 0; + INT32U invokeID = 1; + ActionStateEnum newState = 2; + } + + info event ActionFailed = 1 { + INT16U actionID = 0; + INT32U invokeID = 1; + ActionStateEnum newState = 2; + ActionErrorEnum error = 3; + } + + attribute(readonly, reportable) ActionStruct actionList[] = 0; + attribute(readonly, reportable) EndpointListStruct endpointList[] = 1; + attribute(readonly, reportable) long_char_string setupUrl = 2; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct DisableActionRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + } + + request struct DisableActionWithDurationRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + INT32U duration = 2; + } + + request struct EnableActionRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + } + + request struct EnableActionWithDurationRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + INT32U duration = 2; + } + + request struct InstantActionRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + } + + request struct InstantActionWithTransitionRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + INT16U transitionTime = 2; + } + + request struct PauseActionRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + } + + request struct PauseActionWithDurationRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + INT32U duration = 2; + } + + request struct ResumeActionRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + } + + request struct StartActionRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + } + + request struct StartActionWithDurationRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + INT32U duration = 2; + } + + request struct StopActionRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + } + + command DisableAction(DisableActionRequest): DefaultSuccess = 10; + command DisableActionWithDuration(DisableActionWithDurationRequest): DefaultSuccess = 11; + command EnableAction(EnableActionRequest): DefaultSuccess = 8; + command EnableActionWithDuration(EnableActionWithDurationRequest): DefaultSuccess = 9; + command InstantAction(InstantActionRequest): DefaultSuccess = 0; + command InstantActionWithTransition(InstantActionWithTransitionRequest): DefaultSuccess = 1; + command PauseAction(PauseActionRequest): DefaultSuccess = 5; + command PauseActionWithDuration(PauseActionWithDurationRequest): DefaultSuccess = 6; + command ResumeAction(ResumeActionRequest): DefaultSuccess = 7; + command StartAction(StartActionRequest): DefaultSuccess = 2; + command StartActionWithDuration(StartActionWithDurationRequest): DefaultSuccess = 3; + command StopAction(StopActionRequest): DefaultSuccess = 4; +} + +client cluster BridgedDeviceBasic = 57 { + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster Channel = 1284 { + enum ErrorTypeEnum : ENUM8 { + kMultipleMatches = 0; + kNoMatches = 1; + } + + enum LineupInfoTypeEnum : ENUM8 { + kMso = 0; + } + + struct ChannelInfo { + INT16U majorNumber = 1; + INT16U minorNumber = 2; + CHAR_STRING name = 3; + CHAR_STRING callSign = 4; + CHAR_STRING affiliateCallSign = 5; + } + + attribute(readonly, reportable) ChannelInfo channelList[] = 0; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ChangeChannelByNumberRequestRequest { + INT16U majorNumber = 0; + INT16U minorNumber = 1; + } + + request struct ChangeChannelRequestRequest { + CHAR_STRING match = 0; + } + + request struct SkipChannelRequestRequest { + INT16U count = 0; + } + + response struct ChangeChannelResponse { + ChannelInfo channelMatch = 0; + ErrorTypeEnum errorType = 1; + } + + command ChangeChannelByNumberRequest(ChangeChannelByNumberRequestRequest): DefaultSuccess = 2; + command ChangeChannelRequest(ChangeChannelRequestRequest): ChangeChannelResponse = 0; + command SkipChannelRequest(SkipChannelRequestRequest): DefaultSuccess = 3; +} + +client cluster ColorControl = 768 { + enum ColorLoopAction : ENUM8 { + kDeactivate = 0; + kActivateFromColorLoopStartEnhancedHue = 1; + kActivateFromEnhancedCurrentHue = 2; + } + + enum ColorLoopDirection : ENUM8 { + kDecrementHue = 0; + kIncrementHue = 1; + } + + enum ColorMode : ENUM8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperature = 2; + } + + enum HueDirection : ENUM8 { + kShortestDistance = 0; + kLongestDistance = 1; + kUp = 2; + kDown = 3; + } + + enum HueMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum HueStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + enum SaturationMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum SaturationStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + attribute(readonly, reportable) int8u currentHue = 0; + attribute(readonly, reportable) int8u currentSaturation = 1; + attribute(readonly, reportable) int16u remainingTime = 2; + attribute(readonly, reportable) int16u currentX = 3; + attribute(readonly, reportable) int16u currentY = 4; + attribute(readonly, reportable) enum8 driftCompensation = 5; + attribute(readonly, reportable) char_string compensationText = 6; + attribute(readonly, reportable) int16u colorTemperature = 7; + attribute(readonly, reportable) enum8 colorMode = 8; + attribute(writable, reportable) bitmap8 colorControlOptions = 15; + attribute(readonly, reportable) int8u numberOfPrimaries = 16; + attribute(readonly, reportable) int16u primary1X = 17; + attribute(readonly, reportable) int16u primary1Y = 18; + attribute(readonly, reportable) int8u primary1Intensity = 19; + attribute(readonly, reportable) int16u primary2X = 21; + attribute(readonly, reportable) int16u primary2Y = 22; + attribute(readonly, reportable) int8u primary2Intensity = 23; + attribute(readonly, reportable) int16u primary3X = 25; + attribute(readonly, reportable) int16u primary3Y = 26; + attribute(readonly, reportable) int8u primary3Intensity = 27; + attribute(readonly, reportable) int16u primary4X = 32; + attribute(readonly, reportable) int16u primary4Y = 33; + attribute(readonly, reportable) int8u primary4Intensity = 34; + attribute(readonly, reportable) int16u primary5X = 36; + attribute(readonly, reportable) int16u primary5Y = 37; + attribute(readonly, reportable) int8u primary5Intensity = 38; + attribute(readonly, reportable) int16u primary6X = 40; + attribute(readonly, reportable) int16u primary6Y = 41; + attribute(readonly, reportable) int8u primary6Intensity = 42; + attribute(writable, reportable) int16u whitePointX = 48; + attribute(writable, reportable) int16u whitePointY = 49; + attribute(writable, reportable) int16u colorPointRX = 50; + attribute(writable, reportable) int16u colorPointRY = 51; + attribute(writable, reportable) int8u colorPointRIntensity = 52; + attribute(writable, reportable) int16u colorPointGX = 54; + attribute(writable, reportable) int16u colorPointGY = 55; + attribute(writable, reportable) int8u colorPointGIntensity = 56; + attribute(writable, reportable) int16u colorPointBX = 58; + attribute(writable, reportable) int16u colorPointBY = 59; + attribute(writable, reportable) int8u colorPointBIntensity = 60; + attribute(readonly, reportable) int16u enhancedCurrentHue = 16384; + attribute(readonly, reportable) enum8 enhancedColorMode = 16385; + attribute(readonly, reportable) int8u colorLoopActive = 16386; + attribute(readonly, reportable) int8u colorLoopDirection = 16387; + attribute(readonly, reportable) int16u colorLoopTime = 16388; + attribute(readonly, reportable) int16u colorLoopStartEnhancedHue = 16389; + attribute(readonly, reportable) int16u colorLoopStoredEnhancedHue = 16390; + attribute(readonly, reportable) bitmap16 colorCapabilities = 16394; + attribute(readonly, reportable) int16u colorTempPhysicalMin = 16395; + attribute(readonly, reportable) int16u colorTempPhysicalMax = 16396; + attribute(readonly, reportable) int16u coupleColorTempToLevelMinMireds = 16397; + attribute(writable, reportable) int16u startUpColorTemperatureMireds = 16400; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ColorLoopSetRequest { + ColorLoopUpdateFlags updateFlags = 0; + ColorLoopAction action = 1; + ColorLoopDirection direction = 2; + INT16U time = 3; + INT16U startHue = 4; + BITMAP8 optionsMask = 5; + BITMAP8 optionsOverride = 6; + } + + request struct EnhancedMoveHueRequest { + HueMoveMode moveMode = 0; + INT16U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct EnhancedMoveToHueRequest { + INT16U enhancedHue = 0; + HueDirection direction = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct EnhancedMoveToHueAndSaturationRequest { + INT16U enhancedHue = 0; + INT8U saturation = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct EnhancedStepHueRequest { + HueStepMode stepMode = 0; + INT16U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveColorRequest { + INT16S rateX = 0; + INT16S rateY = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveColorTemperatureRequest { + HueMoveMode moveMode = 0; + INT16U rate = 1; + INT16U colorTemperatureMinimum = 2; + INT16U colorTemperatureMaximum = 3; + BITMAP8 optionsMask = 4; + BITMAP8 optionsOverride = 5; + } + + request struct MoveHueRequest { + HueMoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveSaturationRequest { + SaturationMoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveToColorRequest { + INT16U colorX = 0; + INT16U colorY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToColorTemperatureRequest { + INT16U colorTemperature = 0; + INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveToHueRequest { + INT8U hue = 0; + HueDirection direction = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToHueAndSaturationRequest { + INT8U hue = 0; + INT8U saturation = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToSaturationRequest { + INT8U saturation = 0; + INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct StepColorRequest { + INT16S stepX = 0; + INT16S stepY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StepColorTemperatureRequest { + HueStepMode stepMode = 0; + INT16U stepSize = 1; + INT16U transitionTime = 2; + INT16U colorTemperatureMinimum = 3; + INT16U colorTemperatureMaximum = 4; + BITMAP8 optionsMask = 5; + BITMAP8 optionsOverride = 6; + } + + request struct StepHueRequest { + HueStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StepSaturationRequest { + SaturationStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopMoveStepRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; + } + + command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + command MoveColor(MoveColorRequest): DefaultSuccess = 8; + command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + command MoveHue(MoveHueRequest): DefaultSuccess = 1; + command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + command StepColor(StepColorRequest): DefaultSuccess = 9; + command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; + command StepHue(StepHueRequest): DefaultSuccess = 2; + command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; +} + +client cluster ContentLauncher = 1290 { + enum MetricTypeEnum : ENUM8 { + kPixels = 0; + kPercentage = 1; + } + + enum ParameterEnum : ENUM8 { + kActor = 0; + kChannel = 1; + kCharacter = 2; + kDirector = 3; + kEvent = 4; + kFranchise = 5; + kGenre = 6; + kLeague = 7; + kPopularity = 8; + kProvider = 9; + kSport = 10; + kSportsTeam = 11; + kType = 12; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kUrlNotAvailable = 1; + kAuthFailed = 2; + } + + struct ContentSearch { + Parameter parameterList[] = 1; + } + + struct Parameter { + ParameterEnum type = 1; + CHAR_STRING value = 2; + AdditionalInfo externalIDList[] = 3; + } + + struct AdditionalInfo { + CHAR_STRING name = 1; + CHAR_STRING value = 2; + } + + struct BrandingInformation { + CHAR_STRING providerName = 1; + StyleInformation background = 2; + StyleInformation logo = 3; + StyleInformation progressBar = 4; + StyleInformation splash = 5; + StyleInformation waterMark = 6; + } + + struct StyleInformation { + CHAR_STRING imageUrl = 1; + CHAR_STRING color = 2; + Dimension size = 3; + } + + struct Dimension { + double width = 1; + double height = 2; + MetricTypeEnum metric = 3; + } + + attribute(readonly, reportable) CHAR_STRING acceptHeaderList[] = 0; + attribute(writable, reportable) bitmap32 supportedStreamingProtocols = 1; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct LaunchContentRequestRequest { + BOOLEAN autoPlay = 0; + CHAR_STRING data = 1; + ContentSearch search[] = 2; + } + + request struct LaunchURLRequestRequest { + CHAR_STRING contentURL = 0; + CHAR_STRING displayString = 1; + BrandingInformation brandingInformation = 2; + } + + response struct LaunchResponse { + StatusEnum status = 0; + CHAR_STRING data = 1; + } + + command LaunchContentRequest(LaunchContentRequestRequest): LaunchResponse = 0; + command LaunchURLRequest(LaunchURLRequestRequest): LaunchResponse = 1; +} + +client cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + attribute(readonly) attrib_id attributeList[] = 65531; + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + response struct RetrieveLogsResponse { + LogsStatus status = 0; + OCTET_STRING content = 1; + epoch_s timeStamp = 2; + INT32U timeSinceBoot = 3; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +client cluster DoorLock = 257 { + enum DlAlarmCode : ENUM8 { + kLockJammed = 0; + kLockFactoryReset = 1; + kLockRadioPowerCycled = 3; + kWrongCodeEntryLimit = 4; + kFrontEsceutcheonRemoved = 5; + kDoorForcedOpen = 6; + kDoorAjar = 7; + kForcedUser = 8; + } + + enum DlCredentialRule : ENUM8 { + kSingle = 0; + kDouble = 1; + kTri = 2; + } + + enum DlCredentialType : ENUM8 { + kProgrammingPIN = 0; + kPin = 1; + kRfid = 2; + kFingerprint = 3; + kFingerVein = 4; + kFace = 5; + } + + enum DlDataOperationType : ENUM8 { + kAdd = 0; + kClear = 1; + kModify = 2; + } + + enum DlDoorLockStatus : ENUM8 { + kDuplicate = 2; + kOccupied = 3; + } + + enum DlDoorState : ENUM8 { + kDoorOpen = 0; + kDoorClosed = 1; + kDoorJammed = 2; + kDoorForcedOpen = 3; + kDoorUnspecifiedError = 4; + kDoorAjar = 5; + } + + enum DlLockDataType : ENUM8 { + kUnspecified = 0; + kProgrammingCode = 1; + kUserIndex = 2; + kWeekDaySchedule = 3; + kYearDaySchedule = 4; + kHolidaySchedule = 5; + kPin = 6; + kRfid = 7; + kFingerprint = 8; + } + + enum DlLockOperationType : ENUM8 { + kLock = 0; + kUnlock = 1; + kNonAccessUserEvent = 2; + kForcedUserEvent = 3; + } + + enum DlLockState : ENUM8 { + kNotFullyLocked = 0; + kLocked = 1; + kUnlocked = 2; + } + + enum DlLockType : ENUM8 { + kDeadBolt = 0; + kMagnetic = 1; + kOther = 2; + kMortise = 3; + kRim = 4; + kLatchBolt = 5; + kCylindricalLock = 6; + kTubularLock = 7; + kInterconnectedLock = 8; + kDeadLatch = 9; + kDoorFurniture = 10; + } + + enum DlOperatingMode : ENUM8 { + kNormal = 0; + kVacation = 1; + kPrivacy = 2; + kNoRemoteLockUnlock = 3; + kPassage = 4; + } + + enum DlOperationError : ENUM8 { + kUnspecified = 0; + kInvalidCredential = 1; + kDisabledUserDenied = 2; + kRestricted = 3; + kInsufficientBattery = 4; + } + + enum DlOperationSource : ENUM8 { + kUnspecified = 0; + kManual = 1; + kProprietaryRemote = 2; + kKeypad = 3; + kAuto = 4; + kButton = 5; + kSchedule = 6; + kRemote = 7; + kRfid = 8; + kBiometric = 9; + } + + enum DlStatus : ENUM8 { + kSuccess = 0; + kFailure = 1; + kDuplicate = 2; + kOccupied = 3; + kInvalidField = 133; + kNotFound = 139; + } + + enum DlUserStatus : ENUM8 { + kAvailable = 0; + kOccupiedEnabled = 1; + kOccupiedDisabled = 3; + } + + enum DlUserType : ENUM8 { + kUnrestrictedUser = 0; + kYearDayScheduleUser = 1; + kWeekDayScheduleUser = 2; + kProgrammingUser = 3; + kNonAccessUser = 4; + kForcedUser = 5; + kDisposableUser = 6; + kExpiringUser = 7; + kScheduleRestrictedUser = 8; + kRemoteOnlyUser = 9; + } + + enum DoorLockOperationEventCode : ENUM8 { + kUnknownOrMfgSpecific = 0; + kLock = 1; + kUnlock = 2; + kLockInvalidPinOrId = 3; + kLockInvalidSchedule = 4; + kUnlockInvalidPinOrId = 5; + kUnlockInvalidSchedule = 6; + kOneTouchLock = 7; + kKeyLock = 8; + kKeyUnlock = 9; + kAutoLock = 10; + kScheduleLock = 11; + kScheduleUnlock = 12; + kManualLock = 13; + kManualUnlock = 14; + } + + enum DoorLockProgrammingEventCode : ENUM8 { + kUnknownOrMfgSpecific = 0; + kMasterCodeChanged = 1; + kPinAdded = 2; + kPinDeleted = 3; + kPinChanged = 4; + kIdAdded = 5; + kIdDeleted = 6; + } + + enum DoorLockSetPinOrIdStatus : ENUM8 { + kSuccess = 0; + kGeneralFailure = 1; + kMemoryFull = 2; + kDuplicateCodeError = 3; + } + + enum DoorLockUserStatus : ENUM8 { + kAvailable = 0; + kOccupiedEnabled = 1; + kOccupiedDisabled = 3; + kNotSupported = 255; + } + + enum DoorLockUserType : ENUM8 { + kUnrestricted = 0; + kYearDayScheduleUser = 1; + kWeekDayScheduleUser = 2; + kMasterUser = 3; + kNonAccessUser = 4; + kNotSupported = 255; + } + + struct DlCredential { + DlCredentialType credentialType = 1; + INT16U credentialIndex = 2; + } + + critical event DoorLockAlarm = 0 { + DlAlarmCode alarmCode = 0; + } + + critical event DoorStateChange = 1 { + DlDoorState doorState = 0; + } + + critical event LockOperation = 2 { + DlLockOperationType lockOperationType = 0; + DlOperationSource operationSource = 1; + nullable INT16U userIndex = 2; + nullable fabric_idx fabricIndex = 3; + nullable NODE_ID sourceNode = 4; + optional nullable DlCredential credentials[] = 5; + } + + critical event LockOperationError = 3 { + DlLockOperationType lockOperationType = 0; + DlOperationSource operationSource = 1; + DlOperationError operationError = 2; + nullable INT16U userIndex = 3; + nullable fabric_idx fabricIndex = 4; + nullable NODE_ID sourceNode = 5; + optional nullable DlCredential credentials[] = 6; + } + + info event LockUserChange = 4 { + DlLockDataType lockDataType = 0; + DlDataOperationType dataOperationType = 1; + DlOperationSource operationSource = 2; + nullable INT16U userIndex = 3; + nullable fabric_idx fabricIndex = 4; + nullable NODE_ID sourceNode = 5; + nullable INT16U dataIndex = 6; + } + + attribute(readonly, reportable) DlLockState lockState = 0; + attribute(readonly, reportable) DlLockType lockType = 1; + attribute(readonly, reportable) boolean actuatorEnabled = 2; + attribute(readonly, reportable) DlDoorState doorState = 3; + attribute(readonly) int16u numberOfTotalUsersSupported = 17; + attribute(readonly) int16u numberOfPINUsersSupported = 18; + attribute(readonly) int8u maxPINCodeLength = 23; + attribute(readonly) int8u minPINCodeLength = 24; + attribute(writable, reportable) char_string language = 33; + attribute(writable, reportable) int32u autoRelockTime = 35; + attribute(writable, reportable) int8u soundVolume = 36; + attribute(writable, reportable) DlOperatingMode operatingMode = 37; + attribute(readonly) bitmap16 supportedOperatingModes = 38; + attribute(writable, reportable) boolean enableOneTouchLocking = 41; + attribute(writable, reportable) boolean enablePrivacyModeButton = 43; + attribute(writable, reportable) int8u wrongCodeEntryLimit = 48; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ClearCredentialRequest { + DlCredential credential = 0; + } + + request struct ClearUserRequest { + INT16U userIndex = 0; + } + + request struct GetCredentialStatusRequest { + DlCredential credential = 0; + } + + request struct GetUserRequest { + INT16U userIndex = 0; + } + + request struct LockDoorRequest { + optional OCTET_STRING pinCode = 0; + } + + request struct SetCredentialRequest { + DlDataOperationType operationType = 0; + DlCredential credential = 1; + LONG_OCTET_STRING credentialData = 2; + INT16U userIndex = 3; + DlUserStatus userStatus = 4; + } + + request struct SetUserRequest { + DlDataOperationType operationType = 0; + INT16U userIndex = 1; + nullable CHAR_STRING userName = 2; + nullable INT32U userUniqueId = 3; + DlUserStatus userStatus = 4; + DlUserType userType = 5; + DlCredentialRule credentialRule = 6; + } + + request struct UnlockDoorRequest { + optional OCTET_STRING pinCode = 0; + } + + response struct GetCredentialStatusResponse { + boolean credentialExists = 0; + nullable INT16U userIndex = 1; + nullable INT16U nextCredentialIndex = 2; + } + + response struct GetUserResponse { + INT16U userIndex = 0; + nullable CHAR_STRING userName = 1; + nullable INT32U userUniqueId = 2; + nullable DlUserStatus userStatus = 3; + nullable DlUserType userType = 4; + nullable DlCredentialRule credentialRule = 5; + nullable DlCredential credentials[] = 6; + nullable fabric_idx creatorFabricIndex = 7; + nullable fabric_idx lastModifiedFabricIndex = 8; + INT16U nextUserIndex = 9; + } + + response struct SetCredentialResponse { + DlStatus status = 0; + nullable INT16U userIndex = 1; + nullable INT16U nextCredentialIndex = 2; + } + + command ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; + command ClearUser(ClearUserRequest): DefaultSuccess = 29; + command GetCredentialStatus(GetCredentialStatusRequest): GetCredentialStatusResponse = 36; + command GetUser(GetUserRequest): GetUserResponse = 27; + command LockDoor(LockDoorRequest): DefaultSuccess = 0; + command SetCredential(SetCredentialRequest): SetCredentialResponse = 34; + command SetUser(SetUserRequest): DefaultSuccess = 26; + command UnlockDoor(UnlockDoorRequest): DefaultSuccess = 1; +} + +client cluster ElectricalMeasurement = 2820 { + attribute(readonly, reportable) bitmap32 measurementType = 0; + attribute(readonly, reportable) int32s totalActivePower = 772; + attribute(readonly, reportable) int16u rmsVoltage = 1285; + attribute(readonly, reportable) int16u rmsVoltageMin = 1286; + attribute(readonly, reportable) int16u rmsVoltageMax = 1287; + attribute(readonly, reportable) int16u rmsCurrent = 1288; + attribute(readonly, reportable) int16u rmsCurrentMin = 1289; + attribute(readonly, reportable) int16u rmsCurrentMax = 1290; + attribute(readonly, reportable) int16s activePower = 1291; + attribute(readonly, reportable) int16s activePowerMin = 1292; + attribute(readonly, reportable) int16s activePowerMax = 1293; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +client cluster FixedLabel = 64 { + attribute(readonly, reportable) LabelStruct labelList[] = 0; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster FlowMeasurement = 1028 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u tolerance = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +client cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicy : ENUM8 { + kStandard = 0; + kLowLatency = 1; + } + + struct GroupKey { + fabric_idx fabricIndex = 0; + INT16U groupId = 1; + INT16U groupKeySetID = 2; + } + + struct GroupInfo { + INT16U fabricIndex = 0; + INT16U groupId = 1; + INT16U endpoints[] = 2; + CHAR_STRING groupName = 3; + } + + struct GroupKeySet { + INT16U groupKeySetID = 0; + GroupKeySecurityPolicy securityPolicy = 1; + OCTET_STRING epochKey0 = 2; + INT64U epochStartTime0 = 3; + OCTET_STRING epochKey1 = 4; + INT64U epochStartTime1 = 5; + OCTET_STRING epochKey2 = 6; + INT64U epochStartTime2 = 7; + } + + attribute(readonly, reportable) GroupKey groupKeyMap[] = 0; + attribute(readonly, reportable) GroupInfo groupTable[] = 1; + attribute(readonly) int16u maxGroupsPerFabric = 2; + attribute(readonly) int16u maxGroupKeysPerFabric = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct KeySetReadRequest { + INT16U groupKeySetID = 0; + } + + request struct KeySetReadAllIndicesRequest { + INT16U groupKeySetIDs[] = 0; + } + + request struct KeySetRemoveRequest { + INT16U groupKeySetID = 0; + } + + request struct KeySetWriteRequest { + GroupKeySet groupKeySet = 0; + } + + response struct KeySetReadAllIndicesResponse { + INT16U groupKeySetIDs[] = 0; + } + + response struct KeySetReadResponse { + GroupKeySet groupKeySet = 0; + } + + command KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + command KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + command KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + command KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; +} + +client cluster Groups = 4 { + attribute(readonly, reportable) bitmap8 nameSupport = 0; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddGroupRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct AddGroupIfIdentifyingRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct GetGroupMembershipRequest { + INT16U groupList[] = 0; + } + + request struct RemoveGroupRequest { + INT16U groupId = 0; + } + + request struct ViewGroupRequest { + INT16U groupId = 0; + } + + response struct AddGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct GetGroupMembershipResponse { + INT8U capacity = 0; + INT16U groupList[] = 1; + } + + response struct RemoveGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct ViewGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + CHAR_STRING groupName = 2; + } + + command AddGroup(AddGroupRequest): AddGroupResponse = 0; + command AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + command RemoveAllGroups(): DefaultSuccess = 4; + command RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; +} + +client cluster Identify = 3 { + enum IdentifyEffectIdentifier : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum IdentifyEffectVariant : ENUM8 { + kDefault = 0; + } + + enum IdentifyIdentifyType : ENUM8 { + kNone = 0; + kVisibleLight = 1; + kVisibleLED = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute(writable, reportable) int16u identifyTime = 0; + attribute(readonly, reportable) enum8 identifyType = 1; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + request struct TriggerEffectRequest { + IdentifyEffectIdentifier effectIdentifier = 0; + IdentifyEffectVariant effectVariant = 1; + } + + response struct IdentifyQueryResponse { + INT16U timeout = 0; + } + + command Identify(IdentifyRequest): DefaultSuccess = 0; + command IdentifyQuery(): IdentifyQueryResponse = 1; + command TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +client cluster IlluminanceMeasurement = 1024 { + enum LightSensorType : ENUM8 { + kPhotodiode = 0; + kCmos = 1; + } + + attribute(readonly, reportable) int16u measuredValue = 0; + attribute(readonly, reportable) int16u minMeasuredValue = 1; + attribute(readonly, reportable) int16u maxMeasuredValue = 2; + attribute(readonly, reportable) int16u tolerance = 3; + attribute(readonly, reportable) enum8 lightSensorType = 4; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster KeypadInput = 1289 { + enum CecKeyCode : ENUM8 { + kSelect = 0; + kUp = 1; + kDown = 2; + kLeft = 3; + kRight = 4; + kRightUp = 5; + kRightDown = 6; + kLeftUp = 7; + kLeftDown = 8; + kRootMenu = 9; + kSetupMenu = 10; + kContentsMenu = 11; + kFavoriteMenu = 12; + kExit = 13; + kMediaTopMenu = 16; + kMediaContextSensitiveMenu = 17; + kNumberEntryMode = 29; + kNumber11 = 30; + kNumber12 = 31; + kNumber0OrNumber10 = 32; + kNumbers1 = 33; + kNumbers2 = 34; + kNumbers3 = 35; + kNumbers4 = 36; + kNumbers5 = 37; + kNumbers6 = 38; + kNumbers7 = 39; + kNumbers8 = 40; + kNumbers9 = 41; + kDot = 42; + kEnter = 43; + kClear = 44; + kNextFavorite = 47; + kChannelUp = 48; + kChannelDown = 49; + kPreviousChannel = 50; + kSoundSelect = 51; + kInputSelect = 52; + kDisplayInformation = 53; + kHelp = 54; + kPageUp = 55; + kPageDown = 56; + kPower = 64; + kVolumeUp = 65; + kVolumeDown = 66; + kMute = 67; + kPlay = 68; + kStop = 69; + kPause = 70; + kRecord = 71; + kRewind = 72; + kFastForward = 73; + kEject = 74; + kForward = 75; + kBackward = 76; + kStopRecord = 77; + kPauseRecord = 78; + kReserved = 79; + kAngle = 80; + kSubPicture = 81; + kVideoOnDemand = 82; + kElectronicProgramGuide = 83; + kTimerProgramming = 84; + kInitialConfiguration = 85; + kSelectBroadcastType = 86; + kSelectSoundPresentation = 87; + kPlayFunction = 96; + kPausePlayFunction = 97; + kRecordFunction = 98; + kPauseRecordFunction = 99; + kStopFunction = 100; + kMuteFunction = 101; + kRestoreVolumeFunction = 102; + kTuneFunction = 103; + kSelectMediaFunction = 104; + kSelectAvInputFunction = 105; + kSelectAudioInputFunction = 106; + kPowerToggleFunction = 107; + kPowerOffFunction = 108; + kPowerOnFunction = 109; + kF1Blue = 113; + kF2Red = 114; + kF3Green = 115; + kF4Yellow = 116; + kF5 = 117; + kData = 118; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kUnsupportedKey = 1; + kInvalidKeyInCurrentState = 2; + } + + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct SendKeyRequestRequest { + CecKeyCode keyCode = 0; + } + + response struct SendKeyResponse { + StatusEnum status = 0; + } + + command SendKeyRequest(SendKeyRequestRequest): SendKeyResponse = 0; +} + +client cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + attribute(readonly, reportable) int8u currentLevel = 0; + attribute(readonly, reportable) int16u remainingTime = 1; + attribute(readonly, reportable) int8u minLevel = 2; + attribute(readonly, reportable) int8u maxLevel = 3; + attribute(readonly, reportable) int16u currentFrequency = 4; + attribute(readonly, reportable) int16u minFrequency = 5; + attribute(readonly, reportable) int16u maxFrequency = 6; + attribute(writable, reportable) bitmap8 options = 15; + attribute(writable, reportable) int16u onOffTransitionTime = 16; + attribute(writable, reportable) int8u onLevel = 17; + attribute(writable, reportable) int16u onTransitionTime = 18; + attribute(writable, reportable) int16u offTransitionTime = 19; + attribute(writable, reportable) int8u defaultMoveRate = 20; + attribute(writable, reportable) int8u startUpCurrentLevel = 16384; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelRequest { + INT8U level = 0; + INT16U transitionTime = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + INT16U transitionTime = 1; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionMask = 3; + BITMAP8 optionOverride = 4; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + } + + request struct StopRequest { + BITMAP8 optionMask = 0; + BITMAP8 optionOverride = 1; + } + + command Move(MoveRequest): DefaultSuccess = 1; + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command Step(StepRequest): DefaultSuccess = 2; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command Stop(StopRequest): DefaultSuccess = 3; + command StopWithOnOff(): DefaultSuccess = 7; +} + +client cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +client cluster LowPower = 1288 { + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Sleep(): DefaultSuccess = 0; +} + +client cluster MediaInput = 1287 { + enum InputTypeEnum : ENUM8 { + kInternal = 0; + kAux = 1; + kCoax = 2; + kComposite = 3; + kHdmi = 4; + kInput = 5; + kLine = 6; + kOptical = 7; + kVideo = 8; + kScart = 9; + kUsb = 10; + kOther = 11; + } + + struct InputInfo { + INT8U index = 1; + InputTypeEnum inputType = 2; + CHAR_STRING name = 3; + CHAR_STRING description = 4; + } + + attribute(readonly, reportable) InputInfo mediaInputList[] = 0; + attribute(readonly, reportable) int8u currentMediaInput = 1; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct RenameInputRequestRequest { + INT8U index = 0; + CHAR_STRING name = 1; + } + + request struct SelectInputRequestRequest { + INT8U index = 0; + } + + command HideInputStatusRequest(): DefaultSuccess = 2; + command RenameInputRequest(RenameInputRequestRequest): DefaultSuccess = 3; + command SelectInputRequest(SelectInputRequestRequest): DefaultSuccess = 0; + command ShowInputStatusRequest(): DefaultSuccess = 1; +} + +client cluster MediaPlayback = 1286 { + enum PlaybackStateEnum : ENUM8 { + kPlaying = 0; + kPaused = 1; + kNotPlaying = 2; + kBuffering = 3; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kInvalidStateForCommand = 1; + kNotAllowed = 2; + kNotActive = 3; + kSpeedOutOfRange = 4; + kSeekOutOfRange = 5; + } + + attribute(readonly, reportable) PlaybackStateEnum playbackState = 0; + attribute(readonly, reportable) epoch_us startTime = 1; + attribute(readonly, reportable) int64u duration = 2; + attribute(readonly) single playbackSpeed = 4; + attribute(readonly, reportable) int64u seekRangeEnd = 5; + attribute(readonly, reportable) int64u seekRangeStart = 6; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct SeekRequestRequest { + INT64U position = 0; + } + + request struct SkipBackwardRequestRequest { + INT64U deltaPositionMilliseconds = 0; + } + + request struct SkipForwardRequestRequest { + INT64U deltaPositionMilliseconds = 0; + } + + response struct PlaybackResponse { + StatusEnum status = 0; + } + + command FastForwardRequest(): PlaybackResponse = 7; + command NextRequest(): PlaybackResponse = 5; + command PauseRequest(): PlaybackResponse = 1; + command PlayRequest(): PlaybackResponse = 0; + command PreviousRequest(): PlaybackResponse = 4; + command RewindRequest(): PlaybackResponse = 6; + command SeekRequest(SeekRequestRequest): PlaybackResponse = 11; + command SkipBackwardRequest(SkipBackwardRequestRequest): PlaybackResponse = 9; + command SkipForwardRequest(SkipForwardRequestRequest): PlaybackResponse = 8; + command StartOverRequest(): PlaybackResponse = 3; + command StopRequest(): PlaybackResponse = 2; +} + +client cluster ModeSelect = 80 { + struct ModeOptionStruct { + CHAR_STRING label = 1; + INT8U mode = 2; + INT32U semanticTag = 3; + } + + attribute(readonly, reportable) int8u currentMode = 0; + attribute(readonly, reportable) ModeOptionStruct supportedModes[] = 1; + attribute(writable, reportable) int8u onMode = 2; + attribute(readonly, reportable) int8u startUpMode = 3; + attribute(readonly, reportable) char_string description = 4; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ChangeToModeRequest { + INT8U newMode = 0; + } + + command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; +} + +client cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +client cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHttps = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : ENUM8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ApplyUpdateRequestRequest { + OCTET_STRING updateToken = 0; + INT32U newVersion = 1; + } + + request struct NotifyUpdateAppliedRequest { + OCTET_STRING updateToken = 0; + INT32U softwareVersion = 1; + } + + request struct QueryImageRequest { + vendor_id vendorId = 0; + INT16U productId = 1; + INT32U softwareVersion = 2; + OTADownloadProtocol protocolsSupported[] = 3; + optional INT16U hardwareVersion = 4; + optional CHAR_STRING location = 5; + optional BOOLEAN requestorCanConsent = 6; + optional OCTET_STRING metadataForProvider = 7; + } + + response struct ApplyUpdateResponse { + OTAApplyUpdateAction action = 0; + INT32U delayedActionTime = 1; + } + + response struct QueryImageResponse { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING softwareVersionString = 4; + optional OCTET_STRING updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING metadataForRequestor = 7; + } + + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; + command QueryImage(QueryImageRequest): QueryImageResponse = 0; +} + +client cluster OtaSoftwareUpdateRequestor = 42 { + enum OTAAnnouncementReason : ENUM8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum OTAChangeReasonEnum : ENUM8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum OTAUpdateStateEnum : ENUM8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + struct ProviderLocation { + fabric_idx fabricIndex = 0; + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + } + + info event StateTransition = 0 { + nullable OTAUpdateStateEnum previousState = 0; + OTAUpdateStateEnum newState = 1; + OTAChangeReasonEnum reason = 2; + nullable INT32U targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + INT32U softwareVersion = 0; + INT16U productID = 1; + } + + info event DownloadError = 2 { + INT32U softwareVersion = 0; + INT64U bytesDownloaded = 1; + INT8U progressPercent = 2; + nullable INT64S platformCode = 3; + } + + attribute(writable, reportable) ProviderLocation defaultOtaProviders[] = 0; + attribute(readonly, reportable) boolean updatePossible = 1; + attribute(readonly, reportable) OTAUpdateStateEnum updateState = 2; + attribute(readonly, reportable) int8u updateStateProgress = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AnnounceOtaProviderRequest { + node_id providerNodeId = 0; + vendor_id vendorId = 1; + OTAAnnouncementReason announcementReason = 2; + optional OCTET_STRING metadataForNode = 3; + endpoint_no endpoint = 4; + } + + command AnnounceOtaProvider(AnnounceOtaProviderRequest): DefaultSuccess = 0; +} + +client cluster OccupancySensing = 1030 { + attribute(readonly, reportable) bitmap8 occupancy = 0; + attribute(readonly, reportable) enum8 occupancySensorType = 1; + attribute(readonly, reportable) bitmap8 occupancySensorTypeBitmap = 2; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) boolean globalSceneControl = 16384; + attribute(writable, reportable) int16u onTime = 16385; + attribute(writable, reportable) int16u offWaitTime = 16386; + attribute(writable, reportable) enum8 startUpOnOff = 16387; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OffWithEffectRequest { + OnOffEffectIdentifier effectId = 0; + OnOffDelayedAllOffEffectVariant effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControl onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + command Off(): DefaultSuccess = 0; + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + command On(): DefaultSuccess = 1; + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; + command Toggle(): DefaultSuccess = 2; +} + +client cluster OnOffSwitchConfiguration = 7 { + attribute(readonly, reportable) enum8 switchType = 0; + attribute(writable, reportable) enum8 switchActions = 16; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +client cluster PowerSource = 47 { + attribute(readonly, reportable) enum8 status = 0; + attribute(readonly, reportable) int8u order = 1; + attribute(readonly, reportable) char_string description = 2; + attribute(readonly, reportable) int32u batteryVoltage = 11; + attribute(readonly, reportable) int8u batteryPercentRemaining = 12; + attribute(readonly, reportable) int32u batteryTimeRemaining = 13; + attribute(readonly, reportable) enum8 batteryChargeLevel = 14; + attribute(readonly, reportable) ENUM8 activeBatteryFaults[] = 18; + attribute(readonly, reportable) enum8 batteryChargeState = 26; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster PowerSourceConfiguration = 46 { + attribute(readonly) INT8U sources[] = 0; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; +} + +client cluster PressureMeasurement = 1027 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster PumpConfigurationAndControl = 512 { + enum PumpControlMode : ENUM8 { + kConstantSpeed = 0; + kConstantPressure = 1; + kProportionalPressure = 2; + kConstantFlow = 3; + kConstantTemperature = 5; + kAutomatic = 7; + } + + enum PumpOperationMode : ENUM8 { + kNormal = 0; + kMinimum = 1; + kMaximum = 2; + kLocal = 3; + } + + info event SupplyVoltageLow = 0 { + } + + info event SupplyVoltageHigh = 1 { + } + + info event PowerMissingPhase = 2 { + } + + info event SystemPressureLow = 3 { + } + + info event SystemPressureHigh = 4 { + } + + critical event DryRunning = 5 { + } + + info event MotorTemperatureHigh = 6 { + } + + critical event PumpMotorFatalFailure = 7 { + } + + info event ElectronicTemperatureHigh = 8 { + } + + critical event PumpBlocked = 9 { + } + + info event SensorFailure = 10 { + } + + info event ElectronicNonFatalFailure = 11 { + } + + critical event ElectronicFatalFailure = 12 { + } + + info event GeneralFault = 13 { + } + + info event Leakage = 14 { + } + + info event AirDetection = 15 { + } + + info event TurbineOperation = 16 { + } + + attribute(readonly, reportable) int16s maxPressure = 0; + attribute(readonly, reportable) int16u maxSpeed = 1; + attribute(readonly, reportable) int16u maxFlow = 2; + attribute(readonly, reportable) int16s minConstPressure = 3; + attribute(readonly, reportable) int16s maxConstPressure = 4; + attribute(readonly, reportable) int16s minCompPressure = 5; + attribute(readonly, reportable) int16s maxCompPressure = 6; + attribute(readonly, reportable) int16u minConstSpeed = 7; + attribute(readonly, reportable) int16u maxConstSpeed = 8; + attribute(readonly, reportable) int16u minConstFlow = 9; + attribute(readonly, reportable) int16u maxConstFlow = 10; + attribute(readonly, reportable) int16s minConstTemp = 11; + attribute(readonly, reportable) int16s maxConstTemp = 12; + attribute(readonly, reportable) bitmap16 pumpStatus = 16; + attribute(readonly, reportable) enum8 effectiveOperationMode = 17; + attribute(readonly, reportable) enum8 effectiveControlMode = 18; + attribute(readonly, reportable) int16s capacity = 19; + attribute(readonly, reportable) int16u speed = 20; + attribute(writable, reportable) int24u lifetimeRunningHours = 21; + attribute(readonly, reportable) int24u power = 22; + attribute(writable, reportable) int32u lifetimeEnergyConsumed = 23; + attribute(writable, reportable) enum8 operationMode = 32; + attribute(writable, reportable) enum8 controlMode = 33; + attribute(readonly, reportable) bitmap16 alarmMask = 34; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster RelativeHumidityMeasurement = 1029 { + attribute(readonly, reportable) int16u measuredValue = 0; + attribute(readonly, reportable) int16u minMeasuredValue = 1; + attribute(readonly, reportable) int16u maxMeasuredValue = 2; + attribute(readonly, reportable) int16u tolerance = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster Scenes = 5 { + struct SceneExtensionFieldSet { + CLUSTER_ID clusterId = 1; + INT8U length = 2; + INT8U value = 3; + } + + attribute(readonly, reportable) int8u sceneCount = 0; + attribute(readonly, reportable) int8u currentScene = 1; + attribute(readonly, reportable) int16u currentGroup = 2; + attribute(readonly, reportable) boolean sceneValid = 3; + attribute(readonly, reportable) bitmap8 nameSupport = 4; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + CHAR_STRING sceneName = 3; + SceneExtensionFieldSet extensionFieldSets[] = 4; + } + + request struct GetSceneMembershipRequest { + INT16U groupId = 0; + } + + request struct RecallSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + } + + request struct RemoveAllScenesRequest { + INT16U groupId = 0; + } + + request struct RemoveSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct StoreSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct ViewSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + response struct AddSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct GetSceneMembershipResponse { + ENUM8 status = 0; + INT8U capacity = 1; + INT16U groupId = 2; + INT8U sceneCount = 3; + INT8U sceneList[] = 4; + } + + response struct RemoveAllScenesResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct RemoveSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct StoreSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct ViewSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + INT16U transitionTime = 3; + CHAR_STRING sceneName = 4; + SceneExtensionFieldSet extensionFieldSets[] = 5; + } + + command AddScene(AddSceneRequest): AddSceneResponse = 0; + command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + command RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + command RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + command StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; +} + +client cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetWatermarks(): DefaultSuccess = 0; +} + +client cluster Switch = 59 { + info event SwitchLatched = 0 { + INT8U newPosition = 0; + } + + info event InitialPress = 1 { + INT8U newPosition = 0; + } + + info event LongPress = 2 { + INT8U newPosition = 0; + } + + info event ShortRelease = 3 { + INT8U previousPosition = 0; + } + + info event LongRelease = 4 { + INT8U previousPosition = 0; + } + + info event MultiPressOngoing = 5 { + INT8U newPosition = 0; + INT8U currentNumberOfPressesCounted = 1; + } + + info event MultiPressComplete = 6 { + INT8U newPosition = 0; + INT8U totalNumberOfPressesCounted = 1; + } + + attribute(readonly, reportable) int8u numberOfPositions = 0; + attribute(readonly, reportable) int8u currentPosition = 1; + attribute(readonly, reportable) int8u multiPressMax = 2; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster TargetNavigator = 1285 { + enum StatusEnum : ENUM8 { + kSuccess = 0; + kAppNotAvailable = 1; + kSystemBusy = 2; + } + + struct TargetInfo { + INT8U identifier = 1; + CHAR_STRING name = 2; + } + + attribute(readonly, reportable) TargetInfo targetNavigatorList[] = 0; + attribute(readonly, reportable) int8u currentNavigatorTarget = 1; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct NavigateTargetRequestRequest { + INT8U target = 0; + CHAR_STRING data = 1; + } + + response struct NavigateTargetResponse { + StatusEnum status = 0; + CHAR_STRING data = 1; + } + + command NavigateTargetRequest(NavigateTargetRequestRequest): NavigateTargetResponse = 0; +} + +client cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u tolerance = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster TestCluster = 1295 { + enum SimpleEnum : ENUM8 { + kUnspecified = 0; + kValueA = 1; + kValueB = 2; + kValueC = 3; + } + + struct TestListStructOctet { + INT64U fabricIndex = 1; + OCTET_STRING operationalCert = 2; + } + + struct NullablesAndOptionalsStruct { + nullable INT16U nullableInt = 1; + optional INT16U optionalInt = 2; + optional nullable INT16U nullableOptionalInt = 3; + nullable CHAR_STRING nullableString = 4; + optional CHAR_STRING optionalString = 5; + optional nullable CHAR_STRING nullableOptionalString = 6; + nullable SimpleStruct nullableStruct = 7; + optional SimpleStruct optionalStruct = 8; + optional nullable SimpleStruct nullableOptionalStruct = 9; + nullable SimpleEnum nullableList[] = 10; + optional SimpleEnum optionalList[] = 11; + optional nullable SimpleEnum nullableOptionalList[] = 12; + } + + struct SimpleStruct { + INT8U a = 1; + BOOLEAN b = 2; + SimpleEnum c = 3; + OCTET_STRING d = 4; + CHAR_STRING e = 5; + SimpleBitmap f = 6; + single g = 7; + double h = 8; + } + + struct NestedStructList { + INT8U a = 1; + BOOLEAN b = 2; + SimpleStruct c = 3; + SimpleStruct d[] = 4; + INT32U e[] = 5; + OCTET_STRING f[] = 6; + INT8U g[] = 7; + } + + struct NestedStruct { + INT8U a = 1; + BOOLEAN b = 2; + SimpleStruct c = 3; + } + + info event TestEvent = 1 { + INT8U arg1 = 1; + SimpleEnum arg2 = 2; + BOOLEAN arg3 = 3; + SimpleStruct arg4 = 4; + SimpleStruct arg5[] = 5; + SimpleEnum arg6[] = 6; + } + + attribute(writable, reportable) boolean boolean = 0; + attribute(writable, reportable) bitmap8 bitmap8 = 1; + attribute(writable, reportable) bitmap16 bitmap16 = 2; + attribute(writable, reportable) bitmap32 bitmap32 = 3; + attribute(writable, reportable) bitmap64 bitmap64 = 4; + attribute(writable, reportable) int8u int8u = 5; + attribute(writable, reportable) int16u int16u = 6; + attribute(writable, reportable) int24u int24u = 7; + attribute(writable, reportable) int32u int32u = 8; + attribute(writable, reportable) int40u int40u = 9; + attribute(writable, reportable) int48u int48u = 10; + attribute(writable, reportable) int56u int56u = 11; + attribute(writable, reportable) int64u int64u = 12; + attribute(writable, reportable) int8s int8s = 13; + attribute(writable, reportable) int16s int16s = 14; + attribute(writable, reportable) int24s int24s = 15; + attribute(writable, reportable) int32s int32s = 16; + attribute(writable, reportable) int40s int40s = 17; + attribute(writable, reportable) int48s int48s = 18; + attribute(writable, reportable) int56s int56s = 19; + attribute(writable, reportable) int64s int64s = 20; + attribute(writable, reportable) enum8 enum8 = 21; + attribute(writable, reportable) enum16 enum16 = 22; + attribute(writable, reportable) single floatSingle = 23; + attribute(writable, reportable) double floatDouble = 24; + attribute(writable, reportable) octet_string octetString = 25; + attribute(writable, reportable) INT8U listInt8u[] = 26; + attribute(writable, reportable) OCTET_STRING listOctetString[] = 27; + attribute(writable, reportable) TestListStructOctet listStructOctetString[] = 28; + attribute(writable, reportable) long_octet_string longOctetString = 29; + attribute(writable, reportable) char_string charString = 30; + attribute(writable, reportable) long_char_string longCharString = 31; + attribute(writable, reportable) epoch_us epochUs = 32; + attribute(writable, reportable) epoch_s epochS = 33; + attribute(writable, reportable) vendor_id vendorId = 34; + attribute(writable, reportable) NullablesAndOptionalsStruct listNullablesAndOptionalsStruct[] = 35; + attribute(writable, reportable) SimpleEnum enumAttr = 36; + attribute(writable, reportable) SimpleStruct structAttr = 37; + attribute(writable, reportable) int8u rangeRestrictedInt8u = 38; + attribute(writable, reportable) int8s rangeRestrictedInt8s = 39; + attribute(writable, reportable) int16u rangeRestrictedInt16u = 40; + attribute(writable, reportable) int16s rangeRestrictedInt16s = 41; + attribute(readonly) LONG_OCTET_STRING listLongOctetString[] = 42; + attribute(writable) boolean timedWriteBoolean = 48; + attribute(writable, reportable) boolean unsupported = 255; + attribute(writable, reportable) boolean nullableBoolean = 32768; + attribute(writable, reportable) bitmap8 nullableBitmap8 = 32769; + attribute(writable, reportable) bitmap16 nullableBitmap16 = 32770; + attribute(writable, reportable) bitmap32 nullableBitmap32 = 32771; + attribute(writable, reportable) bitmap64 nullableBitmap64 = 32772; + attribute(writable, reportable) int8u nullableInt8u = 32773; + attribute(writable, reportable) int16u nullableInt16u = 32774; + attribute(writable, reportable) int24u nullableInt24u = 32775; + attribute(writable, reportable) int32u nullableInt32u = 32776; + attribute(writable, reportable) int40u nullableInt40u = 32777; + attribute(writable, reportable) int48u nullableInt48u = 32778; + attribute(writable, reportable) int56u nullableInt56u = 32779; + attribute(writable, reportable) int64u nullableInt64u = 32780; + attribute(writable, reportable) int8s nullableInt8s = 32781; + attribute(writable, reportable) int16s nullableInt16s = 32782; + attribute(writable, reportable) int24s nullableInt24s = 32783; + attribute(writable, reportable) int32s nullableInt32s = 32784; + attribute(writable, reportable) int40s nullableInt40s = 32785; + attribute(writable, reportable) int48s nullableInt48s = 32786; + attribute(writable, reportable) int56s nullableInt56s = 32787; + attribute(writable, reportable) int64s nullableInt64s = 32788; + attribute(writable, reportable) enum8 nullableEnum8 = 32789; + attribute(writable, reportable) enum16 nullableEnum16 = 32790; + attribute(writable, reportable) single nullableFloatSingle = 32791; + attribute(writable, reportable) double nullableFloatDouble = 32792; + attribute(writable, reportable) octet_string nullableOctetString = 32793; + attribute(writable, reportable) char_string nullableCharString = 32798; + attribute(writable, reportable) SimpleEnum nullableEnumAttr = 32804; + attribute(writable, reportable) SimpleStruct nullableStruct = 32805; + attribute(writable, reportable) int8u nullableRangeRestrictedInt8u = 32806; + attribute(writable, reportable) int8s nullableRangeRestrictedInt8s = 32807; + attribute(writable, reportable) int16u nullableRangeRestrictedInt16u = 32808; + attribute(writable, reportable) int16s nullableRangeRestrictedInt16s = 32809; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct SimpleStructEchoRequestRequest { + SimpleStruct arg1 = 0; + } + + request struct TestAddArgumentsRequest { + INT8U arg1 = 0; + INT8U arg2 = 1; + } + + request struct TestEmitTestEventRequestRequest { + INT8U arg1 = 0; + SimpleEnum arg2 = 1; + BOOLEAN arg3 = 2; + } + + request struct TestEnumsRequestRequest { + vendor_id arg1 = 0; + SimpleEnum arg2 = 1; + } + + request struct TestListInt8UArgumentRequestRequest { + INT8U arg1[] = 0; + } + + request struct TestListInt8UReverseRequestRequest { + INT8U arg1[] = 0; + } + + request struct TestListNestedStructListArgumentRequestRequest { + NestedStructList arg1[] = 0; + } + + request struct TestListStructArgumentRequestRequest { + SimpleStruct arg1[] = 0; + } + + request struct TestNestedStructArgumentRequestRequest { + NestedStruct arg1 = 0; + } + + request struct TestNestedStructListArgumentRequestRequest { + NestedStructList arg1 = 0; + } + + request struct TestNullableOptionalRequestRequest { + optional nullable INT8U arg1 = 0; + } + + request struct TestSimpleOptionalArgumentRequestRequest { + optional BOOLEAN arg1 = 0; + } + + request struct TestStructArgumentRequestRequest { + SimpleStruct arg1 = 0; + } + + response struct BooleanResponse { + BOOLEAN value = 0; + } + + response struct SimpleStructResponse { + SimpleStruct arg1 = 0; + } + + response struct TestAddArgumentsResponse { + INT8U returnValue = 0; + } + + response struct TestEmitTestEventResponse { + INT64U value = 0; + } + + response struct TestEnumsResponse { + vendor_id arg1 = 0; + SimpleEnum arg2 = 1; + } + + response struct TestListInt8UReverseResponse { + INT8U arg1[] = 0; + } + + response struct TestNullableOptionalResponse { + BOOLEAN wasPresent = 0; + optional BOOLEAN wasNull = 1; + optional INT8U value = 2; + optional nullable INT8U originalValue = 3; + } + + response struct TestSpecificResponse { + INT8U returnValue = 0; + } + + command SimpleStructEchoRequest(SimpleStructEchoRequestRequest): SimpleStructResponse = 17; + command Test(): DefaultSuccess = 0; + command TestAddArguments(TestAddArgumentsRequest): TestAddArgumentsResponse = 4; + command TestEmitTestEventRequest(TestEmitTestEventRequestRequest): TestEmitTestEventResponse = 20; + command TestEnumsRequest(TestEnumsRequestRequest): TestEnumsResponse = 14; + command TestListInt8UArgumentRequest(TestListInt8UArgumentRequestRequest): BooleanResponse = 10; + command TestListInt8UReverseRequest(TestListInt8UReverseRequestRequest): TestListInt8UReverseResponse = 13; + command TestListNestedStructListArgumentRequest(TestListNestedStructListArgumentRequestRequest): BooleanResponse = 12; + command TestListStructArgumentRequest(TestListStructArgumentRequestRequest): BooleanResponse = 9; + command TestNestedStructArgumentRequest(TestNestedStructArgumentRequestRequest): BooleanResponse = 8; + command TestNestedStructListArgumentRequest(TestNestedStructListArgumentRequestRequest): BooleanResponse = 11; + command TestNotHandled(): DefaultSuccess = 1; + command TestNullableOptionalRequest(TestNullableOptionalRequestRequest): TestNullableOptionalResponse = 15; + command TestSimpleOptionalArgumentRequest(TestSimpleOptionalArgumentRequestRequest): DefaultSuccess = 19; + command TestSpecific(): TestSpecificResponse = 2; + command TestStructArgumentRequest(TestStructArgumentRequestRequest): BooleanResponse = 7; + command TestUnknownCommand(): DefaultSuccess = 3; + command TimedInvokeRequest(): DefaultSuccess = 18; +} + +client cluster Thermostat = 513 { + enum SetpointAdjustMode : ENUM8 { + kHeatSetpoint = 0; + kCoolSetpoint = 1; + kHeatAndCoolSetpoints = 2; + } + + attribute(readonly, reportable) int16s localTemperature = 0; + attribute(readonly, reportable) int16s absMinHeatSetpointLimit = 3; + attribute(readonly, reportable) int16s absMaxHeatSetpointLimit = 4; + attribute(readonly, reportable) int16s absMinCoolSetpointLimit = 5; + attribute(readonly, reportable) int16s absMaxCoolSetpointLimit = 6; + attribute(writable, reportable) int16s occupiedCoolingSetpoint = 17; + attribute(writable, reportable) int16s occupiedHeatingSetpoint = 18; + attribute(writable, reportable) int16s minHeatSetpointLimit = 21; + attribute(writable, reportable) int16s maxHeatSetpointLimit = 22; + attribute(writable, reportable) int16s minCoolSetpointLimit = 23; + attribute(writable, reportable) int16s maxCoolSetpointLimit = 24; + attribute(writable, reportable) int8s minSetpointDeadBand = 25; + attribute(writable, reportable) enum8 controlSequenceOfOperation = 27; + attribute(writable, reportable) enum8 systemMode = 28; + attribute(readonly, reportable) enum8 startOfWeek = 32; + attribute(readonly, reportable) int8u numberOfWeeklyTransitions = 33; + attribute(readonly, reportable) int8u numberOfDailyTransitions = 34; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct GetWeeklyScheduleRequest { + DayOfWeek daysToReturn = 0; + ModeForSequence modeToReturn = 1; + } + + request struct SetWeeklyScheduleRequest { + ENUM8 numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + INT8U payload[] = 3; + } + + request struct SetpointRaiseLowerRequest { + SetpointAdjustMode mode = 0; + INT8S amount = 1; + } + + response struct GetRelayStatusLogResponse { + INT16U timeOfDay = 0; + BITMAP16 relayStatus = 1; + INT16S localTemperature = 2; + INT8U humidityInPercentage = 3; + INT16S setpoint = 4; + INT16U unreadEntries = 5; + } + + response struct GetWeeklyScheduleResponse { + ENUM8 numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + INT8U payload[] = 3; + } + + command ClearWeeklySchedule(): DefaultSuccess = 3; + command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; + command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; + command SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; + command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; +} + +client cluster ThermostatUserInterfaceConfiguration = 516 { + attribute(writable, reportable) enum8 temperatureDisplayMode = 0; + attribute(writable, reportable) enum8 keypadLockout = 1; + attribute(writable, reportable) enum8 scheduleProgrammingVisibility = 2; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +client cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +client cluster WakeOnLan = 1283 { + attribute(readonly, reportable) char_string wakeOnLanMacAddress = 0; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +client cluster WindowCovering = 258 { + attribute(readonly, reportable) enum8 type = 0; + attribute(readonly, reportable) int16u currentPositionLift = 3; + attribute(readonly, reportable) int16u currentPositionTilt = 4; + attribute(readonly, reportable) bitmap8 configStatus = 7; + attribute(readonly, reportable) Percent currentPositionLiftPercentage = 8; + attribute(readonly, reportable) Percent currentPositionTiltPercentage = 9; + attribute(readonly, reportable) bitmap8 operationalStatus = 10; + attribute(readonly, reportable) Percent100ths targetPositionLiftPercent100ths = 11; + attribute(readonly, reportable) Percent100ths targetPositionTiltPercent100ths = 12; + attribute(readonly, reportable) enum8 endProductType = 13; + attribute(readonly, reportable) Percent100ths currentPositionLiftPercent100ths = 14; + attribute(readonly, reportable) Percent100ths currentPositionTiltPercent100ths = 15; + attribute(readonly, reportable) int16u installedOpenLimitLift = 16; + attribute(readonly, reportable) int16u installedClosedLimitLift = 17; + attribute(readonly, reportable) int16u installedOpenLimitTilt = 18; + attribute(readonly, reportable) int16u installedClosedLimitTilt = 19; + attribute(writable, reportable) bitmap8 mode = 23; + attribute(readonly, reportable) bitmap16 safetyStatus = 26; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct GoToLiftPercentageRequest { + Percent liftPercentageValue = 0; + Percent100ths liftPercent100thsValue = 1; + } + + request struct GoToLiftValueRequest { + INT16U liftValue = 0; + } + + request struct GoToTiltPercentageRequest { + Percent tiltPercentageValue = 0; + Percent100ths tiltPercent100thsValue = 1; + } + + request struct GoToTiltValueRequest { + INT16U tiltValue = 0; + } + + command DownOrClose(): DefaultSuccess = 1; + command GoToLiftPercentage(GoToLiftPercentageRequest): DefaultSuccess = 5; + command GoToLiftValue(GoToLiftValueRequest): DefaultSuccess = 4; + command GoToTiltPercentage(GoToTiltPercentageRequest): DefaultSuccess = 8; + command GoToTiltValue(GoToTiltValueRequest): DefaultSuccess = 7; + command StopMotion(): DefaultSuccess = 2; + command UpOrOpen(): DefaultSuccess = 0; +} + + +endpoint 1 { +} + diff --git a/zzz_generated/door-lock-app/zap-generated/Clusters.matter b/zzz_generated/door-lock-app/zap-generated/Clusters.matter new file mode 100644 index 00000000000000..54a14fed6332a2 --- /dev/null +++ b/zzz_generated/door-lock-app/zap-generated/Clusters.matter @@ -0,0 +1,1110 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster DoorLock = 257 { + enum DlAlarmCode : ENUM8 { + kLockJammed = 0; + kLockFactoryReset = 1; + kLockRadioPowerCycled = 3; + kWrongCodeEntryLimit = 4; + kFrontEsceutcheonRemoved = 5; + kDoorForcedOpen = 6; + kDoorAjar = 7; + kForcedUser = 8; + } + + enum DlCredentialRule : ENUM8 { + kSingle = 0; + kDouble = 1; + kTri = 2; + } + + enum DlCredentialType : ENUM8 { + kProgrammingPIN = 0; + kPin = 1; + kRfid = 2; + kFingerprint = 3; + kFingerVein = 4; + kFace = 5; + } + + enum DlDataOperationType : ENUM8 { + kAdd = 0; + kClear = 1; + kModify = 2; + } + + enum DlDoorLockStatus : ENUM8 { + kDuplicate = 2; + kOccupied = 3; + } + + enum DlDoorState : ENUM8 { + kDoorOpen = 0; + kDoorClosed = 1; + kDoorJammed = 2; + kDoorForcedOpen = 3; + kDoorUnspecifiedError = 4; + kDoorAjar = 5; + } + + enum DlLockDataType : ENUM8 { + kUnspecified = 0; + kProgrammingCode = 1; + kUserIndex = 2; + kWeekDaySchedule = 3; + kYearDaySchedule = 4; + kHolidaySchedule = 5; + kPin = 6; + kRfid = 7; + kFingerprint = 8; + } + + enum DlLockOperationType : ENUM8 { + kLock = 0; + kUnlock = 1; + kNonAccessUserEvent = 2; + kForcedUserEvent = 3; + } + + enum DlLockState : ENUM8 { + kNotFullyLocked = 0; + kLocked = 1; + kUnlocked = 2; + } + + enum DlLockType : ENUM8 { + kDeadBolt = 0; + kMagnetic = 1; + kOther = 2; + kMortise = 3; + kRim = 4; + kLatchBolt = 5; + kCylindricalLock = 6; + kTubularLock = 7; + kInterconnectedLock = 8; + kDeadLatch = 9; + kDoorFurniture = 10; + } + + enum DlOperatingMode : ENUM8 { + kNormal = 0; + kVacation = 1; + kPrivacy = 2; + kNoRemoteLockUnlock = 3; + kPassage = 4; + } + + enum DlOperationError : ENUM8 { + kUnspecified = 0; + kInvalidCredential = 1; + kDisabledUserDenied = 2; + kRestricted = 3; + kInsufficientBattery = 4; + } + + enum DlOperationSource : ENUM8 { + kUnspecified = 0; + kManual = 1; + kProprietaryRemote = 2; + kKeypad = 3; + kAuto = 4; + kButton = 5; + kSchedule = 6; + kRemote = 7; + kRfid = 8; + kBiometric = 9; + } + + enum DlStatus : ENUM8 { + kSuccess = 0; + kFailure = 1; + kDuplicate = 2; + kOccupied = 3; + kInvalidField = 133; + kNotFound = 139; + } + + enum DlUserStatus : ENUM8 { + kAvailable = 0; + kOccupiedEnabled = 1; + kOccupiedDisabled = 3; + } + + enum DlUserType : ENUM8 { + kUnrestrictedUser = 0; + kYearDayScheduleUser = 1; + kWeekDayScheduleUser = 2; + kProgrammingUser = 3; + kNonAccessUser = 4; + kForcedUser = 5; + kDisposableUser = 6; + kExpiringUser = 7; + kScheduleRestrictedUser = 8; + kRemoteOnlyUser = 9; + } + + enum DoorLockOperationEventCode : ENUM8 { + kUnknownOrMfgSpecific = 0; + kLock = 1; + kUnlock = 2; + kLockInvalidPinOrId = 3; + kLockInvalidSchedule = 4; + kUnlockInvalidPinOrId = 5; + kUnlockInvalidSchedule = 6; + kOneTouchLock = 7; + kKeyLock = 8; + kKeyUnlock = 9; + kAutoLock = 10; + kScheduleLock = 11; + kScheduleUnlock = 12; + kManualLock = 13; + kManualUnlock = 14; + } + + enum DoorLockProgrammingEventCode : ENUM8 { + kUnknownOrMfgSpecific = 0; + kMasterCodeChanged = 1; + kPinAdded = 2; + kPinDeleted = 3; + kPinChanged = 4; + kIdAdded = 5; + kIdDeleted = 6; + } + + enum DoorLockSetPinOrIdStatus : ENUM8 { + kSuccess = 0; + kGeneralFailure = 1; + kMemoryFull = 2; + kDuplicateCodeError = 3; + } + + enum DoorLockUserStatus : ENUM8 { + kAvailable = 0; + kOccupiedEnabled = 1; + kOccupiedDisabled = 3; + kNotSupported = 255; + } + + enum DoorLockUserType : ENUM8 { + kUnrestricted = 0; + kYearDayScheduleUser = 1; + kWeekDayScheduleUser = 2; + kMasterUser = 3; + kNonAccessUser = 4; + kNotSupported = 255; + } + + struct DlCredential { + DlCredentialType credentialType = 1; + INT16U credentialIndex = 2; + } + + critical event DoorLockAlarm = 0 { + DlAlarmCode alarmCode = 0; + } + + critical event DoorStateChange = 1 { + DlDoorState doorState = 0; + } + + critical event LockOperation = 2 { + DlLockOperationType lockOperationType = 0; + DlOperationSource operationSource = 1; + nullable INT16U userIndex = 2; + nullable fabric_idx fabricIndex = 3; + nullable NODE_ID sourceNode = 4; + optional nullable DlCredential credentials[] = 5; + } + + critical event LockOperationError = 3 { + DlLockOperationType lockOperationType = 0; + DlOperationSource operationSource = 1; + DlOperationError operationError = 2; + nullable INT16U userIndex = 3; + nullable fabric_idx fabricIndex = 4; + nullable NODE_ID sourceNode = 5; + optional nullable DlCredential credentials[] = 6; + } + + info event LockUserChange = 4 { + DlLockDataType lockDataType = 0; + DlDataOperationType dataOperationType = 1; + DlOperationSource operationSource = 2; + nullable INT16U userIndex = 3; + nullable fabric_idx fabricIndex = 4; + nullable NODE_ID sourceNode = 5; + nullable INT16U dataIndex = 6; + } + + attribute(readonly, reportable) DlLockState lockState = 0; + attribute(readonly, reportable) DlLockType lockType = 1; + attribute(readonly, reportable) boolean actuatorEnabled = 2; + attribute(readonly, reportable) DlDoorState doorState = 3; + attribute(readonly) int16u numberOfTotalUsersSupported = 17; + attribute(readonly) int16u numberOfPINUsersSupported = 18; + attribute(readonly) int8u maxPINCodeLength = 23; + attribute(readonly) int8u minPINCodeLength = 24; + attribute(readonly) bitmap8 credentialRulesSupport = 27; + attribute(writable, reportable) char_string language = 33; + attribute(writable, reportable) int32u autoRelockTime = 35; + attribute(writable, reportable) int8u soundVolume = 36; + attribute(writable, reportable) DlOperatingMode operatingMode = 37; + attribute(readonly) bitmap16 supportedOperatingModes = 38; + attribute(writable, reportable) boolean enableOneTouchLocking = 41; + attribute(writable, reportable) boolean enablePrivacyModeButton = 43; + attribute(writable, reportable) int8u wrongCodeEntryLimit = 48; + attribute(writable, reportable) int8u userCodeTemporaryDisableTime = 49; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ClearCredentialRequest { + DlCredential credential = 0; + } + + request struct ClearUserRequest { + INT16U userIndex = 0; + } + + request struct GetCredentialStatusRequest { + DlCredential credential = 0; + } + + request struct GetUserRequest { + INT16U userIndex = 0; + } + + request struct LockDoorRequest { + optional OCTET_STRING pinCode = 0; + } + + request struct SetCredentialRequest { + DlDataOperationType operationType = 0; + DlCredential credential = 1; + LONG_OCTET_STRING credentialData = 2; + INT16U userIndex = 3; + DlUserStatus userStatus = 4; + } + + request struct SetUserRequest { + DlDataOperationType operationType = 0; + INT16U userIndex = 1; + nullable CHAR_STRING userName = 2; + nullable INT32U userUniqueId = 3; + DlUserStatus userStatus = 4; + DlUserType userType = 5; + DlCredentialRule credentialRule = 6; + } + + request struct UnlockDoorRequest { + optional OCTET_STRING pinCode = 0; + } + + response struct GetCredentialStatusResponse { + boolean credentialExists = 0; + nullable INT16U userIndex = 1; + nullable INT16U nextCredentialIndex = 2; + } + + response struct GetUserResponse { + INT16U userIndex = 0; + nullable CHAR_STRING userName = 1; + nullable INT32U userUniqueId = 2; + nullable DlUserStatus userStatus = 3; + nullable DlUserType userType = 4; + nullable DlCredentialRule credentialRule = 5; + nullable DlCredential credentials[] = 6; + nullable fabric_idx creatorFabricIndex = 7; + nullable fabric_idx lastModifiedFabricIndex = 8; + INT16U nextUserIndex = 9; + } + + response struct SetCredentialResponse { + DlStatus status = 0; + nullable INT16U userIndex = 1; + nullable INT16U nextCredentialIndex = 2; + } + + command ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; + command ClearUser(ClearUserRequest): DefaultSuccess = 29; + command GetCredentialStatus(GetCredentialStatusRequest): GetCredentialStatusResponse = 36; + command GetUser(GetUserRequest): GetUserResponse = 27; + command LockDoor(LockDoorRequest): DefaultSuccess = 0; + command SetCredential(SetCredentialRequest): SetCredentialResponse = 34; + command SetUser(SetUserRequest): DefaultSuccess = 26; + command UnlockDoor(UnlockDoorRequest): DefaultSuccess = 1; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster PowerSource = 47 { + attribute(readonly) enum8 status = 0; + attribute(readonly) int8u order = 1; + attribute(readonly) char_string description = 2; + attribute(readonly) int32u wiredAssessedCurrent = 6; + attribute(readonly) enum8 batteryChargeLevel = 14; + attribute(readonly) boolean batteryReplacementNeeded = 15; + attribute(readonly) enum8 batteryReplaceability = 16; + attribute(readonly) char_string batteryReplacementDescription = 19; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster PowerSourceConfiguration = 46 { + attribute(readonly) INT8U sources[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + + +endpoint 0 { +} + +endpoint 1 { +} + diff --git a/zzz_generated/lighting-app/zap-generated/Clusters.matter b/zzz_generated/lighting-app/zap-generated/Clusters.matter new file mode 100644 index 00000000000000..2e8f0848132f91 --- /dev/null +++ b/zzz_generated/lighting-app/zap-generated/Clusters.matter @@ -0,0 +1,1390 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) char_string manufacturingDate = 11; + attribute(readonly, reportable) char_string partNumber = 12; + attribute(readonly, reportable) long_char_string productURL = 13; + attribute(readonly, reportable) char_string productLabel = 14; + attribute(readonly, reportable) char_string serialNumber = 15; + attribute(writable, reportable) boolean localConfigDisabled = 16; + attribute(readonly, reportable) boolean reachable = 17; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ColorControl = 768 { + enum ColorLoopAction : ENUM8 { + kDeactivate = 0; + kActivateFromColorLoopStartEnhancedHue = 1; + kActivateFromEnhancedCurrentHue = 2; + } + + enum ColorLoopDirection : ENUM8 { + kDecrementHue = 0; + kIncrementHue = 1; + } + + enum ColorMode : ENUM8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperature = 2; + } + + enum HueDirection : ENUM8 { + kShortestDistance = 0; + kLongestDistance = 1; + kUp = 2; + kDown = 3; + } + + enum HueMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum HueStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + enum SaturationMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum SaturationStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + attribute(readonly, reportable) int8u currentHue = 0; + attribute(readonly, reportable) int8u currentSaturation = 1; + attribute(readonly, reportable) int16u remainingTime = 2; + attribute(readonly, reportable) int16u currentX = 3; + attribute(readonly, reportable) int16u currentY = 4; + attribute(readonly, reportable) int16u colorTemperature = 7; + attribute(readonly, reportable) enum8 colorMode = 8; + attribute(writable, reportable) bitmap8 colorControlOptions = 15; + attribute(readonly, reportable) int8u numberOfPrimaries = 16; + attribute(readonly, reportable) int16u enhancedCurrentHue = 16384; + attribute(readonly, reportable) enum8 enhancedColorMode = 16385; + attribute(readonly, reportable) int8u colorLoopActive = 16386; + attribute(readonly, reportable) int8u colorLoopDirection = 16387; + attribute(readonly, reportable) int16u colorLoopTime = 16388; + attribute(readonly, reportable) int16u colorLoopStartEnhancedHue = 16389; + attribute(readonly, reportable) int16u colorLoopStoredEnhancedHue = 16390; + attribute(readonly, reportable) bitmap16 colorCapabilities = 16394; + attribute(readonly, reportable) int16u colorTempPhysicalMin = 16395; + attribute(readonly, reportable) int16u colorTempPhysicalMax = 16396; + attribute(readonly, reportable) int16u coupleColorTempToLevelMinMireds = 16397; + attribute(writable, reportable) int16u startUpColorTemperatureMireds = 16400; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ColorLoopSetRequest { + ColorLoopUpdateFlags updateFlags = 0; + ColorLoopAction action = 1; + ColorLoopDirection direction = 2; + INT16U time = 3; + INT16U startHue = 4; + BITMAP8 optionsMask = 5; + BITMAP8 optionsOverride = 6; + } + + request struct EnhancedMoveHueRequest { + HueMoveMode moveMode = 0; + INT16U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct EnhancedMoveToHueRequest { + INT16U enhancedHue = 0; + HueDirection direction = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct EnhancedMoveToHueAndSaturationRequest { + INT16U enhancedHue = 0; + INT8U saturation = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct EnhancedStepHueRequest { + HueStepMode stepMode = 0; + INT16U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveColorRequest { + INT16S rateX = 0; + INT16S rateY = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveColorTemperatureRequest { + HueMoveMode moveMode = 0; + INT16U rate = 1; + INT16U colorTemperatureMinimum = 2; + INT16U colorTemperatureMaximum = 3; + BITMAP8 optionsMask = 4; + BITMAP8 optionsOverride = 5; + } + + request struct MoveHueRequest { + HueMoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveSaturationRequest { + SaturationMoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveToColorRequest { + INT16U colorX = 0; + INT16U colorY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToColorTemperatureRequest { + INT16U colorTemperature = 0; + INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveToHueRequest { + INT8U hue = 0; + HueDirection direction = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToHueAndSaturationRequest { + INT8U hue = 0; + INT8U saturation = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToSaturationRequest { + INT8U saturation = 0; + INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct StepColorRequest { + INT16S stepX = 0; + INT16S stepY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StepColorTemperatureRequest { + HueStepMode stepMode = 0; + INT16U stepSize = 1; + INT16U transitionTime = 2; + INT16U colorTemperatureMinimum = 3; + INT16U colorTemperatureMaximum = 4; + BITMAP8 optionsMask = 5; + BITMAP8 optionsOverride = 6; + } + + request struct StepHueRequest { + HueStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StepSaturationRequest { + SaturationStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopMoveStepRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; + } + + command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + command MoveColor(MoveColorRequest): DefaultSuccess = 8; + command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + command MoveHue(MoveHueRequest): DefaultSuccess = 1; + command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + command StepColor(StepColorRequest): DefaultSuccess = 9; + command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; + command StepHue(StepHueRequest): DefaultSuccess = 2; + command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Identify = 3 { + enum IdentifyEffectIdentifier : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum IdentifyEffectVariant : ENUM8 { + kDefault = 0; + } + + enum IdentifyIdentifyType : ENUM8 { + kNone = 0; + kVisibleLight = 1; + kVisibleLED = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute(writable, reportable) int16u identifyTime = 0; + attribute(readonly, reportable) enum8 identifyType = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + request struct TriggerEffectRequest { + IdentifyEffectIdentifier effectIdentifier = 0; + IdentifyEffectVariant effectVariant = 1; + } + + response struct IdentifyQueryResponse { + INT16U timeout = 0; + } + + command Identify(IdentifyRequest): DefaultSuccess = 0; + command IdentifyQuery(): IdentifyQueryResponse = 1; + command TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +server cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + attribute(readonly, reportable) int8u currentLevel = 0; + attribute(readonly, reportable) int16u remainingTime = 1; + attribute(readonly, reportable) int8u minLevel = 2; + attribute(readonly, reportable) int8u maxLevel = 3; + attribute(readonly, reportable) int16u currentFrequency = 4; + attribute(readonly, reportable) int16u minFrequency = 5; + attribute(readonly, reportable) int16u maxFrequency = 6; + attribute(writable, reportable) bitmap8 options = 15; + attribute(writable, reportable) int16u onOffTransitionTime = 16; + attribute(writable, reportable) int8u onLevel = 17; + attribute(writable, reportable) int16u onTransitionTime = 18; + attribute(writable, reportable) int16u offTransitionTime = 19; + attribute(writable, reportable) int8u defaultMoveRate = 20; + attribute(writable, reportable) int8u startUpCurrentLevel = 16384; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelRequest { + INT8U level = 0; + INT16U transitionTime = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + INT16U transitionTime = 1; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionMask = 3; + BITMAP8 optionOverride = 4; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + } + + request struct StopRequest { + BITMAP8 optionMask = 0; + BITMAP8 optionOverride = 1; + } + + command Move(MoveRequest): DefaultSuccess = 1; + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command Step(StepRequest): DefaultSuccess = 2; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command Stop(StopRequest): DefaultSuccess = 3; + command StopWithOnOff(): DefaultSuccess = 7; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +client cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHttps = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : ENUM8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ApplyUpdateRequestRequest { + OCTET_STRING updateToken = 0; + INT32U newVersion = 1; + } + + request struct NotifyUpdateAppliedRequest { + OCTET_STRING updateToken = 0; + INT32U softwareVersion = 1; + } + + request struct QueryImageRequest { + vendor_id vendorId = 0; + INT16U productId = 1; + INT32U softwareVersion = 2; + OTADownloadProtocol protocolsSupported[] = 3; + optional INT16U hardwareVersion = 4; + optional CHAR_STRING location = 5; + optional BOOLEAN requestorCanConsent = 6; + optional OCTET_STRING metadataForProvider = 7; + } + + response struct ApplyUpdateResponse { + OTAApplyUpdateAction action = 0; + INT32U delayedActionTime = 1; + } + + response struct QueryImageResponse { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING softwareVersionString = 4; + optional OCTET_STRING updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING metadataForRequestor = 7; + } + + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; + command QueryImage(QueryImageRequest): QueryImageResponse = 0; +} + +server cluster OtaSoftwareUpdateRequestor = 42 { + enum OTAAnnouncementReason : ENUM8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum OTAChangeReasonEnum : ENUM8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum OTAUpdateStateEnum : ENUM8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + struct ProviderLocation { + fabric_idx fabricIndex = 0; + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + } + + info event StateTransition = 0 { + nullable OTAUpdateStateEnum previousState = 0; + OTAUpdateStateEnum newState = 1; + OTAChangeReasonEnum reason = 2; + nullable INT32U targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + INT32U softwareVersion = 0; + INT16U productID = 1; + } + + info event DownloadError = 2 { + INT32U softwareVersion = 0; + INT64U bytesDownloaded = 1; + INT8U progressPercent = 2; + nullable INT64S platformCode = 3; + } + + attribute(writable, reportable) ProviderLocation defaultOtaProviders[] = 0; + attribute(readonly, reportable) boolean updatePossible = 1; + attribute(readonly, reportable) OTAUpdateStateEnum updateState = 2; + attribute(readonly, reportable) int8u updateStateProgress = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AnnounceOtaProviderRequest { + node_id providerNodeId = 0; + vendor_id vendorId = 1; + OTAAnnouncementReason announcementReason = 2; + optional OCTET_STRING metadataForNode = 3; + endpoint_no endpoint = 4; + } + + command AnnounceOtaProvider(AnnounceOtaProviderRequest): DefaultSuccess = 0; +} + +server cluster OccupancySensing = 1030 { + attribute(readonly, reportable) bitmap8 occupancy = 0; + attribute(readonly, reportable) enum8 occupancySensorType = 1; + attribute(readonly, reportable) bitmap8 occupancySensorTypeBitmap = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) boolean globalSceneControl = 16384; + attribute(writable, reportable) int16u onTime = 16385; + attribute(writable, reportable) int16u offWaitTime = 16386; + attribute(writable, reportable) enum8 startUpOnOff = 16387; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) boolean globalSceneControl = 16384; + attribute(writable, reportable) int16u onTime = 16385; + attribute(writable, reportable) int16u offWaitTime = 16386; + attribute(writable, reportable) enum8 startUpOnOff = 16387; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OffWithEffectRequest { + OnOffEffectIdentifier effectId = 0; + OnOffDelayedAllOffEffectVariant effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControl onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + command Off(): DefaultSuccess = 0; + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + command On(): DefaultSuccess = 1; + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; + command Toggle(): DefaultSuccess = 2; +} + +server cluster OnOffSwitchConfiguration = 7 { + attribute(readonly, reportable) enum8 switchType = 0; + attribute(writable, reportable) enum8 switchActions = 16; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetWatermarks(): DefaultSuccess = 0; +} + +server cluster Switch = 59 { + info event SwitchLatched = 0 { + INT8U newPosition = 0; + } + + info event InitialPress = 1 { + INT8U newPosition = 0; + } + + info event LongPress = 2 { + INT8U newPosition = 0; + } + + info event ShortRelease = 3 { + INT8U previousPosition = 0; + } + + info event LongRelease = 4 { + INT8U previousPosition = 0; + } + + info event MultiPressOngoing = 5 { + INT8U newPosition = 0; + INT8U currentNumberOfPressesCounted = 1; + } + + info event MultiPressComplete = 6 { + INT8U newPosition = 0; + INT8U totalNumberOfPressesCounted = 1; + } + +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + + +endpoint 0 { +} + +endpoint 1 { +} + +endpoint 2 { +} + diff --git a/zzz_generated/lock-app/zap-generated/Clusters.matter b/zzz_generated/lock-app/zap-generated/Clusters.matter new file mode 100644 index 00000000000000..61a02536946a64 --- /dev/null +++ b/zzz_generated/lock-app/zap-generated/Clusters.matter @@ -0,0 +1,806 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) boolean globalSceneControl = 16384; + attribute(writable, reportable) int16u onTime = 16385; + attribute(writable, reportable) int16u offWaitTime = 16386; + attribute(writable, reportable) enum8 startUpOnOff = 16387; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster PowerSource = 47 { + attribute(readonly) enum8 status = 0; + attribute(readonly) int8u order = 1; + attribute(readonly) char_string description = 2; + attribute(readonly) int32u wiredAssessedCurrent = 6; + attribute(readonly) enum8 batteryChargeLevel = 14; + attribute(readonly) boolean batteryReplacementNeeded = 15; + attribute(readonly) enum8 batteryReplaceability = 16; + attribute(readonly) char_string batteryReplacementDescription = 19; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster PowerSourceConfiguration = 46 { + attribute(readonly) INT8U sources[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + + +endpoint 0 { +} + +endpoint 1 { +} + diff --git a/zzz_generated/log-source-app/zap-generated/Clusters.matter b/zzz_generated/log-source-app/zap-generated/Clusters.matter new file mode 100644 index 00000000000000..2ff85bdc39da00 --- /dev/null +++ b/zzz_generated/log-source-app/zap-generated/Clusters.matter @@ -0,0 +1,316 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +client cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + response struct RetrieveLogsResponse { + LogsStatus status = 0; + OCTET_STRING content = 1; + epoch_s timeStamp = 2; + INT32U timeSinceBoot = 3; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable) int64u breadcrumb = 0; + attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly) FabricDescriptor fabricsList[] = 1; + attribute(readonly) int8u supportedFabrics = 2; + attribute(readonly) int8u commissionedFabrics = 3; + attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; +} + + +endpoint 0 { +} + diff --git a/zzz_generated/ota-provider-app/zap-generated/Clusters.matter b/zzz_generated/ota-provider-app/zap-generated/Clusters.matter new file mode 100644 index 00000000000000..6dfbaa9bc6520e --- /dev/null +++ b/zzz_generated/ota-provider-app/zap-generated/Clusters.matter @@ -0,0 +1,360 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHttps = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : ENUM8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ApplyUpdateRequestRequest { + OCTET_STRING updateToken = 0; + INT32U newVersion = 1; + } + + request struct NotifyUpdateAppliedRequest { + OCTET_STRING updateToken = 0; + INT32U softwareVersion = 1; + } + + request struct QueryImageRequest { + vendor_id vendorId = 0; + INT16U productId = 1; + INT32U softwareVersion = 2; + OTADownloadProtocol protocolsSupported[] = 3; + optional INT16U hardwareVersion = 4; + optional CHAR_STRING location = 5; + optional BOOLEAN requestorCanConsent = 6; + optional OCTET_STRING metadataForProvider = 7; + } + + response struct ApplyUpdateResponse { + OTAApplyUpdateAction action = 0; + INT32U delayedActionTime = 1; + } + + response struct QueryImageResponse { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING softwareVersionString = 4; + optional OCTET_STRING updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING metadataForRequestor = 7; + } + + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; + command QueryImage(QueryImageRequest): QueryImageResponse = 0; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + + +endpoint 0 { +} + diff --git a/zzz_generated/ota-requestor-app/zap-generated/Clusters.matter b/zzz_generated/ota-requestor-app/zap-generated/Clusters.matter new file mode 100644 index 00000000000000..75059fb5f29a1e --- /dev/null +++ b/zzz_generated/ota-requestor-app/zap-generated/Clusters.matter @@ -0,0 +1,471 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +client cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHttps = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : ENUM8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ApplyUpdateRequestRequest { + OCTET_STRING updateToken = 0; + INT32U newVersion = 1; + } + + request struct NotifyUpdateAppliedRequest { + OCTET_STRING updateToken = 0; + INT32U softwareVersion = 1; + } + + request struct QueryImageRequest { + vendor_id vendorId = 0; + INT16U productId = 1; + INT32U softwareVersion = 2; + OTADownloadProtocol protocolsSupported[] = 3; + optional INT16U hardwareVersion = 4; + optional CHAR_STRING location = 5; + optional BOOLEAN requestorCanConsent = 6; + optional OCTET_STRING metadataForProvider = 7; + } + + response struct ApplyUpdateResponse { + OTAApplyUpdateAction action = 0; + INT32U delayedActionTime = 1; + } + + response struct QueryImageResponse { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING softwareVersionString = 4; + optional OCTET_STRING updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING metadataForRequestor = 7; + } + + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; + command QueryImage(QueryImageRequest): QueryImageResponse = 0; +} + +server cluster OtaSoftwareUpdateRequestor = 42 { + enum OTAAnnouncementReason : ENUM8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum OTAChangeReasonEnum : ENUM8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum OTAUpdateStateEnum : ENUM8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + struct ProviderLocation { + fabric_idx fabricIndex = 0; + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + } + + info event StateTransition = 0 { + nullable OTAUpdateStateEnum previousState = 0; + OTAUpdateStateEnum newState = 1; + OTAChangeReasonEnum reason = 2; + nullable INT32U targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + INT32U softwareVersion = 0; + INT16U productID = 1; + } + + info event DownloadError = 2 { + INT32U softwareVersion = 0; + INT64U bytesDownloaded = 1; + INT8U progressPercent = 2; + nullable INT64S platformCode = 3; + } + + attribute(writable, reportable) ProviderLocation defaultOtaProviders[] = 0; + attribute(readonly, reportable) boolean updatePossible = 1; + attribute(readonly, reportable) OTAUpdateStateEnum updateState = 2; + attribute(readonly, reportable) int8u updateStateProgress = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AnnounceOtaProviderRequest { + node_id providerNodeId = 0; + vendor_id vendorId = 1; + OTAAnnouncementReason announcementReason = 2; + optional OCTET_STRING metadataForNode = 3; + endpoint_no endpoint = 4; + } + + command AnnounceOtaProvider(AnnounceOtaProviderRequest): DefaultSuccess = 0; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + + +endpoint 0 { +} + diff --git a/zzz_generated/placeholder/app1/zap-generated/Clusters.matter b/zzz_generated/placeholder/app1/zap-generated/Clusters.matter new file mode 100644 index 00000000000000..c41fee332c6dca --- /dev/null +++ b/zzz_generated/placeholder/app1/zap-generated/Clusters.matter @@ -0,0 +1,717 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) char_string manufacturingDate = 11; + attribute(readonly, reportable) char_string partNumber = 12; + attribute(readonly, reportable) long_char_string productURL = 13; + attribute(readonly, reportable) char_string productLabel = 14; + attribute(readonly, reportable) char_string serialNumber = 15; + attribute(writable, reportable) boolean localConfigDisabled = 16; + attribute(readonly, reportable) boolean reachable = 17; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ColorControl = 768 { + enum ColorLoopAction : ENUM8 { + kDeactivate = 0; + kActivateFromColorLoopStartEnhancedHue = 1; + kActivateFromEnhancedCurrentHue = 2; + } + + enum ColorLoopDirection : ENUM8 { + kDecrementHue = 0; + kIncrementHue = 1; + } + + enum ColorMode : ENUM8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperature = 2; + } + + enum HueDirection : ENUM8 { + kShortestDistance = 0; + kLongestDistance = 1; + kUp = 2; + kDown = 3; + } + + enum HueMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum HueStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + enum SaturationMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum SaturationStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + attribute(readonly, reportable) int16u currentX = 3; + attribute(readonly, reportable) int16u currentY = 4; + attribute(writable, reportable) bitmap8 colorControlOptions = 15; + attribute(readonly, reportable) int16u coupleColorTempToLevelMinMireds = 16397; + attribute(writable, reportable) int16u startUpColorTemperatureMireds = 16400; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveColorRequest { + INT16S rateX = 0; + INT16S rateY = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveToColorRequest { + INT16U colorX = 0; + INT16U colorY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StepColorRequest { + INT16S stepX = 0; + INT16S stepY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + command MoveColor(MoveColorRequest): DefaultSuccess = 8; + command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + command StepColor(StepColorRequest): DefaultSuccess = 9; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster Groups = 4 { + attribute(readonly, reportable) bitmap8 nameSupport = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddGroupRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct AddGroupIfIdentifyingRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct GetGroupMembershipRequest { + INT16U groupList[] = 0; + } + + request struct RemoveGroupRequest { + INT16U groupId = 0; + } + + request struct ViewGroupRequest { + INT16U groupId = 0; + } + + response struct AddGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct GetGroupMembershipResponse { + INT8U capacity = 0; + INT16U groupList[] = 1; + } + + response struct RemoveGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct ViewGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + CHAR_STRING groupName = 2; + } + + command AddGroup(AddGroupRequest): AddGroupResponse = 0; + command AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + command RemoveAllGroups(): DefaultSuccess = 4; + command RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; +} + +server cluster Identify = 3 { + enum IdentifyEffectIdentifier : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum IdentifyEffectVariant : ENUM8 { + kDefault = 0; + } + + enum IdentifyIdentifyType : ENUM8 { + kNone = 0; + kVisibleLight = 1; + kVisibleLED = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute(writable, reportable) int16u identifyTime = 0; + attribute(readonly, reportable) enum8 identifyType = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + response struct IdentifyQueryResponse { + INT16U timeout = 0; + } + + command Identify(IdentifyRequest): DefaultSuccess = 0; + command IdentifyQuery(): IdentifyQueryResponse = 1; +} + +server cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + attribute(readonly, reportable) int8u currentLevel = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelRequest { + INT8U level = 0; + INT16U transitionTime = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + INT16U transitionTime = 1; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionMask = 3; + BITMAP8 optionOverride = 4; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + } + + request struct StopRequest { + BITMAP8 optionMask = 0; + BITMAP8 optionOverride = 1; + } + + command Move(MoveRequest): DefaultSuccess = 1; + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command Step(StepRequest): DefaultSuccess = 2; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command Stop(StopRequest): DefaultSuccess = 3; + command StopWithOnOff(): DefaultSuccess = 7; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster Scenes = 5 { + struct SceneExtensionFieldSet { + CLUSTER_ID clusterId = 1; + INT8U length = 2; + INT8U value = 3; + } + + attribute(readonly, reportable) int8u sceneCount = 0; + attribute(readonly, reportable) int8u currentScene = 1; + attribute(readonly, reportable) int16u currentGroup = 2; + attribute(readonly, reportable) boolean sceneValid = 3; + attribute(readonly, reportable) bitmap8 nameSupport = 4; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + CHAR_STRING sceneName = 3; + SceneExtensionFieldSet extensionFieldSets[] = 4; + } + + request struct GetSceneMembershipRequest { + INT16U groupId = 0; + } + + request struct RecallSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + } + + request struct RemoveAllScenesRequest { + INT16U groupId = 0; + } + + request struct RemoveSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct StoreSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct ViewSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + response struct AddSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct GetSceneMembershipResponse { + ENUM8 status = 0; + INT8U capacity = 1; + INT16U groupId = 2; + INT8U sceneCount = 3; + INT8U sceneList[] = 4; + } + + response struct RemoveAllScenesResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct RemoveSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct StoreSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct ViewSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + INT16U transitionTime = 3; + CHAR_STRING sceneName = 4; + SceneExtensionFieldSet extensionFieldSets[] = 5; + } + + command AddScene(AddSceneRequest): AddSceneResponse = 0; + command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + command RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + command RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + command StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; +} + +client cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + + +endpoint 0 { +} + +endpoint 1 { +} + diff --git a/zzz_generated/placeholder/app2/zap-generated/Clusters.matter b/zzz_generated/placeholder/app2/zap-generated/Clusters.matter new file mode 100644 index 00000000000000..c41fee332c6dca --- /dev/null +++ b/zzz_generated/placeholder/app2/zap-generated/Clusters.matter @@ -0,0 +1,717 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) char_string manufacturingDate = 11; + attribute(readonly, reportable) char_string partNumber = 12; + attribute(readonly, reportable) long_char_string productURL = 13; + attribute(readonly, reportable) char_string productLabel = 14; + attribute(readonly, reportable) char_string serialNumber = 15; + attribute(writable, reportable) boolean localConfigDisabled = 16; + attribute(readonly, reportable) boolean reachable = 17; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ColorControl = 768 { + enum ColorLoopAction : ENUM8 { + kDeactivate = 0; + kActivateFromColorLoopStartEnhancedHue = 1; + kActivateFromEnhancedCurrentHue = 2; + } + + enum ColorLoopDirection : ENUM8 { + kDecrementHue = 0; + kIncrementHue = 1; + } + + enum ColorMode : ENUM8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperature = 2; + } + + enum HueDirection : ENUM8 { + kShortestDistance = 0; + kLongestDistance = 1; + kUp = 2; + kDown = 3; + } + + enum HueMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum HueStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + enum SaturationMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum SaturationStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + attribute(readonly, reportable) int16u currentX = 3; + attribute(readonly, reportable) int16u currentY = 4; + attribute(writable, reportable) bitmap8 colorControlOptions = 15; + attribute(readonly, reportable) int16u coupleColorTempToLevelMinMireds = 16397; + attribute(writable, reportable) int16u startUpColorTemperatureMireds = 16400; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveColorRequest { + INT16S rateX = 0; + INT16S rateY = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveToColorRequest { + INT16U colorX = 0; + INT16U colorY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StepColorRequest { + INT16S stepX = 0; + INT16S stepY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + command MoveColor(MoveColorRequest): DefaultSuccess = 8; + command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + command StepColor(StepColorRequest): DefaultSuccess = 9; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster Groups = 4 { + attribute(readonly, reportable) bitmap8 nameSupport = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddGroupRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct AddGroupIfIdentifyingRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct GetGroupMembershipRequest { + INT16U groupList[] = 0; + } + + request struct RemoveGroupRequest { + INT16U groupId = 0; + } + + request struct ViewGroupRequest { + INT16U groupId = 0; + } + + response struct AddGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct GetGroupMembershipResponse { + INT8U capacity = 0; + INT16U groupList[] = 1; + } + + response struct RemoveGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct ViewGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + CHAR_STRING groupName = 2; + } + + command AddGroup(AddGroupRequest): AddGroupResponse = 0; + command AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + command RemoveAllGroups(): DefaultSuccess = 4; + command RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; +} + +server cluster Identify = 3 { + enum IdentifyEffectIdentifier : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum IdentifyEffectVariant : ENUM8 { + kDefault = 0; + } + + enum IdentifyIdentifyType : ENUM8 { + kNone = 0; + kVisibleLight = 1; + kVisibleLED = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute(writable, reportable) int16u identifyTime = 0; + attribute(readonly, reportable) enum8 identifyType = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + response struct IdentifyQueryResponse { + INT16U timeout = 0; + } + + command Identify(IdentifyRequest): DefaultSuccess = 0; + command IdentifyQuery(): IdentifyQueryResponse = 1; +} + +server cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + attribute(readonly, reportable) int8u currentLevel = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelRequest { + INT8U level = 0; + INT16U transitionTime = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + INT16U transitionTime = 1; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionMask = 3; + BITMAP8 optionOverride = 4; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + } + + request struct StopRequest { + BITMAP8 optionMask = 0; + BITMAP8 optionOverride = 1; + } + + command Move(MoveRequest): DefaultSuccess = 1; + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command Step(StepRequest): DefaultSuccess = 2; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command Stop(StopRequest): DefaultSuccess = 3; + command StopWithOnOff(): DefaultSuccess = 7; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster Scenes = 5 { + struct SceneExtensionFieldSet { + CLUSTER_ID clusterId = 1; + INT8U length = 2; + INT8U value = 3; + } + + attribute(readonly, reportable) int8u sceneCount = 0; + attribute(readonly, reportable) int8u currentScene = 1; + attribute(readonly, reportable) int16u currentGroup = 2; + attribute(readonly, reportable) boolean sceneValid = 3; + attribute(readonly, reportable) bitmap8 nameSupport = 4; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + CHAR_STRING sceneName = 3; + SceneExtensionFieldSet extensionFieldSets[] = 4; + } + + request struct GetSceneMembershipRequest { + INT16U groupId = 0; + } + + request struct RecallSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + } + + request struct RemoveAllScenesRequest { + INT16U groupId = 0; + } + + request struct RemoveSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct StoreSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct ViewSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + response struct AddSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct GetSceneMembershipResponse { + ENUM8 status = 0; + INT8U capacity = 1; + INT16U groupId = 2; + INT8U sceneCount = 3; + INT8U sceneList[] = 4; + } + + response struct RemoveAllScenesResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct RemoveSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct StoreSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct ViewSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + INT16U transitionTime = 3; + CHAR_STRING sceneName = 4; + SceneExtensionFieldSet extensionFieldSets[] = 5; + } + + command AddScene(AddSceneRequest): AddSceneResponse = 0; + command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + command RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + command RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + command StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; +} + +client cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + + +endpoint 0 { +} + +endpoint 1 { +} + diff --git a/zzz_generated/pump-app/zap-generated/Clusters.matter b/zzz_generated/pump-app/zap-generated/Clusters.matter new file mode 100644 index 00000000000000..fe7a71b3c83ec1 --- /dev/null +++ b/zzz_generated/pump-app/zap-generated/Clusters.matter @@ -0,0 +1,902 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +client cluster FlowMeasurement = 1028 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster FlowMeasurement = 1028 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + attribute(readonly, reportable) int8u currentLevel = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelRequest { + INT8U level = 0; + INT16U transitionTime = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + INT16U transitionTime = 1; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionMask = 3; + BITMAP8 optionOverride = 4; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + } + + request struct StopRequest { + BITMAP8 optionMask = 0; + BITMAP8 optionOverride = 1; + } + + command Move(MoveRequest): DefaultSuccess = 1; + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command Step(StepRequest): DefaultSuccess = 2; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command Stop(StopRequest): DefaultSuccess = 3; + command StopWithOnOff(): DefaultSuccess = 7; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +client cluster PressureMeasurement = 1027 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster PressureMeasurement = 1027 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster PumpConfigurationAndControl = 512 { + enum PumpControlMode : ENUM8 { + kConstantSpeed = 0; + kConstantPressure = 1; + kProportionalPressure = 2; + kConstantFlow = 3; + kConstantTemperature = 5; + kAutomatic = 7; + } + + enum PumpOperationMode : ENUM8 { + kNormal = 0; + kMinimum = 1; + kMaximum = 2; + kLocal = 3; + } + + info event SupplyVoltageLow = 0 { + } + + info event SupplyVoltageHigh = 1 { + } + + info event PowerMissingPhase = 2 { + } + + info event SystemPressureLow = 3 { + } + + info event SystemPressureHigh = 4 { + } + + critical event DryRunning = 5 { + } + + info event MotorTemperatureHigh = 6 { + } + + critical event PumpMotorFatalFailure = 7 { + } + + info event ElectronicTemperatureHigh = 8 { + } + + critical event PumpBlocked = 9 { + } + + info event SensorFailure = 10 { + } + + info event ElectronicNonFatalFailure = 11 { + } + + critical event ElectronicFatalFailure = 12 { + } + + info event GeneralFault = 13 { + } + + info event Leakage = 14 { + } + + info event AirDetection = 15 { + } + + info event TurbineOperation = 16 { + } + + attribute(readonly, reportable) int16s maxPressure = 0; + attribute(readonly, reportable) int16u maxSpeed = 1; + attribute(readonly, reportable) int16u maxFlow = 2; + attribute(readonly, reportable) int16s minConstPressure = 3; + attribute(readonly, reportable) int16s maxConstPressure = 4; + attribute(readonly, reportable) int16s minCompPressure = 5; + attribute(readonly, reportable) int16s maxCompPressure = 6; + attribute(readonly, reportable) int16u minConstSpeed = 7; + attribute(readonly, reportable) int16u maxConstSpeed = 8; + attribute(readonly, reportable) int16u minConstFlow = 9; + attribute(readonly, reportable) int16u maxConstFlow = 10; + attribute(readonly, reportable) int16s minConstTemp = 11; + attribute(readonly, reportable) int16s maxConstTemp = 12; + attribute(readonly, reportable) bitmap16 pumpStatus = 16; + attribute(readonly, reportable) enum8 effectiveOperationMode = 17; + attribute(readonly, reportable) enum8 effectiveControlMode = 18; + attribute(readonly, reportable) int16s capacity = 19; + attribute(readonly, reportable) int16u speed = 20; + attribute(writable, reportable) int24u lifetimeRunningHours = 21; + attribute(readonly, reportable) int24u power = 22; + attribute(writable, reportable) int32u lifetimeEnergyConsumed = 23; + attribute(writable, reportable) enum8 operationMode = 32; + attribute(writable, reportable) enum8 controlMode = 33; + attribute(readonly, reportable) bitmap16 alarmMask = 34; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + + +endpoint 0 { +} + +endpoint 1 { +} + diff --git a/zzz_generated/pump-controller-app/zap-generated/Clusters.matter b/zzz_generated/pump-controller-app/zap-generated/Clusters.matter new file mode 100644 index 00000000000000..487d37b67de362 --- /dev/null +++ b/zzz_generated/pump-controller-app/zap-generated/Clusters.matter @@ -0,0 +1,951 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +client cluster FlowMeasurement = 1028 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + attribute(readonly, reportable) int8u currentLevel = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelRequest { + INT8U level = 0; + INT16U transitionTime = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + INT16U transitionTime = 1; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionMask = 3; + BITMAP8 optionOverride = 4; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + } + + request struct StopRequest { + BITMAP8 optionMask = 0; + BITMAP8 optionOverride = 1; + } + + command Move(MoveRequest): DefaultSuccess = 1; + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command Step(StepRequest): DefaultSuccess = 2; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command Stop(StopRequest): DefaultSuccess = 3; + command StopWithOnOff(): DefaultSuccess = 7; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +client cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +client cluster PressureMeasurement = 1027 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster PumpConfigurationAndControl = 512 { + enum PumpControlMode : ENUM8 { + kConstantSpeed = 0; + kConstantPressure = 1; + kProportionalPressure = 2; + kConstantFlow = 3; + kConstantTemperature = 5; + kAutomatic = 7; + } + + enum PumpOperationMode : ENUM8 { + kNormal = 0; + kMinimum = 1; + kMaximum = 2; + kLocal = 3; + } + + info event SupplyVoltageLow = 0 { + } + + info event SupplyVoltageHigh = 1 { + } + + info event PowerMissingPhase = 2 { + } + + info event SystemPressureLow = 3 { + } + + info event SystemPressureHigh = 4 { + } + + critical event DryRunning = 5 { + } + + info event MotorTemperatureHigh = 6 { + } + + critical event PumpMotorFatalFailure = 7 { + } + + info event ElectronicTemperatureHigh = 8 { + } + + critical event PumpBlocked = 9 { + } + + info event SensorFailure = 10 { + } + + info event ElectronicNonFatalFailure = 11 { + } + + critical event ElectronicFatalFailure = 12 { + } + + info event GeneralFault = 13 { + } + + info event Leakage = 14 { + } + + info event AirDetection = 15 { + } + + info event TurbineOperation = 16 { + } + + attribute(readonly, reportable) int16s maxPressure = 0; + attribute(readonly, reportable) int16u maxSpeed = 1; + attribute(readonly, reportable) int16u maxFlow = 2; + attribute(readonly, reportable) enum8 effectiveOperationMode = 17; + attribute(readonly, reportable) enum8 effectiveControlMode = 18; + attribute(readonly, reportable) int16s capacity = 19; + attribute(writable, reportable) enum8 operationMode = 32; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + + +endpoint 0 { +} + +endpoint 1 { +} + diff --git a/zzz_generated/temperature-measurement-app/zap-generated/Clusters.matter b/zzz_generated/temperature-measurement-app/zap-generated/Clusters.matter new file mode 100644 index 00000000000000..fd6cf4bd1894ce --- /dev/null +++ b/zzz_generated/temperature-measurement-app/zap-generated/Clusters.matter @@ -0,0 +1,605 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster SoftwareDiagnostics = 52 { + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + + +endpoint 0 { +} + +endpoint 1 { +} + diff --git a/zzz_generated/thermostat/zap-generated/Clusters.matter b/zzz_generated/thermostat/zap-generated/Clusters.matter new file mode 100644 index 00000000000000..03e8d4678679fe --- /dev/null +++ b/zzz_generated/thermostat/zap-generated/Clusters.matter @@ -0,0 +1,1179 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) char_string manufacturingDate = 11; + attribute(readonly, reportable) char_string partNumber = 12; + attribute(readonly, reportable) long_char_string productURL = 13; + attribute(readonly, reportable) char_string productLabel = 14; + attribute(readonly, reportable) char_string serialNumber = 15; + attribute(writable, reportable) boolean localConfigDisabled = 16; + attribute(readonly, reportable) boolean reachable = 17; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +server cluster Binding = 30 { + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct BindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + request struct UnbindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + command Bind(BindRequest): DefaultSuccess = 0; + command Unbind(UnbindRequest): DefaultSuccess = 1; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicy : ENUM8 { + kStandard = 0; + kLowLatency = 1; + } + + struct GroupKey { + fabric_idx fabricIndex = 0; + INT16U groupId = 1; + INT16U groupKeySetID = 2; + } + + struct GroupInfo { + INT16U fabricIndex = 0; + INT16U groupId = 1; + INT16U endpoints[] = 2; + CHAR_STRING groupName = 3; + } + + attribute(readonly, reportable) GroupKey groupKeyMap[] = 0; + attribute(readonly, reportable) GroupInfo groupTable[] = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Groups = 4 { + attribute(readonly, reportable) bitmap8 nameSupport = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddGroupRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct AddGroupIfIdentifyingRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct GetGroupMembershipRequest { + INT16U groupList[] = 0; + } + + request struct RemoveGroupRequest { + INT16U groupId = 0; + } + + request struct ViewGroupRequest { + INT16U groupId = 0; + } + + response struct AddGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct GetGroupMembershipResponse { + INT8U capacity = 0; + INT16U groupList[] = 1; + } + + response struct RemoveGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct ViewGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + CHAR_STRING groupName = 2; + } + + command AddGroup(AddGroupRequest): AddGroupResponse = 0; + command AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + command RemoveAllGroups(): DefaultSuccess = 4; + command RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; +} + +client cluster Identify = 3 { + enum IdentifyEffectIdentifier : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum IdentifyEffectVariant : ENUM8 { + kDefault = 0; + } + + enum IdentifyIdentifyType : ENUM8 { + kNone = 0; + kVisibleLight = 1; + kVisibleLED = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute(writable, reportable) int16u identifyTime = 0; + attribute(readonly, reportable) enum8 identifyType = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + response struct IdentifyQueryResponse { + INT16U timeout = 0; + } + + command Identify(IdentifyRequest): DefaultSuccess = 0; + command IdentifyQuery(): IdentifyQueryResponse = 1; +} + +server cluster Identify = 3 { + enum IdentifyEffectIdentifier : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum IdentifyEffectVariant : ENUM8 { + kDefault = 0; + } + + enum IdentifyIdentifyType : ENUM8 { + kNone = 0; + kVisibleLight = 1; + kVisibleLED = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute(writable, reportable) int16u identifyTime = 0; + attribute(readonly, reportable) enum8 identifyType = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + response struct IdentifyQueryResponse { + INT16U timeout = 0; + } + + command Identify(IdentifyRequest): DefaultSuccess = 0; + command IdentifyQuery(): IdentifyQueryResponse = 1; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHttps = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : ENUM8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ApplyUpdateRequestRequest { + OCTET_STRING updateToken = 0; + INT32U newVersion = 1; + } + + request struct NotifyUpdateAppliedRequest { + OCTET_STRING updateToken = 0; + INT32U softwareVersion = 1; + } + + request struct QueryImageRequest { + vendor_id vendorId = 0; + INT16U productId = 1; + INT32U softwareVersion = 2; + OTADownloadProtocol protocolsSupported[] = 3; + optional INT16U hardwareVersion = 4; + optional CHAR_STRING location = 5; + optional BOOLEAN requestorCanConsent = 6; + optional OCTET_STRING metadataForProvider = 7; + } + + response struct ApplyUpdateResponse { + OTAApplyUpdateAction action = 0; + INT32U delayedActionTime = 1; + } + + response struct QueryImageResponse { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING softwareVersionString = 4; + optional OCTET_STRING updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING metadataForRequestor = 7; + } + + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; + command QueryImage(QueryImageRequest): QueryImageResponse = 0; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster Scenes = 5 { + struct SceneExtensionFieldSet { + CLUSTER_ID clusterId = 1; + INT8U length = 2; + INT8U value = 3; + } + + attribute(readonly, reportable) int8u sceneCount = 0; + attribute(readonly, reportable) int8u currentScene = 1; + attribute(readonly, reportable) int16u currentGroup = 2; + attribute(readonly, reportable) boolean sceneValid = 3; + attribute(readonly, reportable) bitmap8 nameSupport = 4; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + CHAR_STRING sceneName = 3; + SceneExtensionFieldSet extensionFieldSets[] = 4; + } + + request struct GetSceneMembershipRequest { + INT16U groupId = 0; + } + + request struct RecallSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + } + + request struct RemoveAllScenesRequest { + INT16U groupId = 0; + } + + request struct RemoveSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct StoreSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct ViewSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + response struct AddSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct GetSceneMembershipResponse { + ENUM8 status = 0; + INT8U capacity = 1; + INT16U groupId = 2; + INT8U sceneCount = 3; + INT8U sceneList[] = 4; + } + + response struct RemoveAllScenesResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct RemoveSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct StoreSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct ViewSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + INT16U transitionTime = 3; + CHAR_STRING sceneName = 4; + SceneExtensionFieldSet extensionFieldSets[] = 5; + } + + command AddScene(AddSceneRequest): AddSceneResponse = 0; + command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + command RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + command RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + command StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Thermostat = 513 { + enum SetpointAdjustMode : ENUM8 { + kHeatSetpoint = 0; + kCoolSetpoint = 1; + kHeatAndCoolSetpoints = 2; + } + + attribute(readonly, reportable) int16s localTemperature = 0; + attribute(readonly, reportable) int16s absMinHeatSetpointLimit = 3; + attribute(readonly, reportable) int16s absMaxHeatSetpointLimit = 4; + attribute(readonly, reportable) int16s absMinCoolSetpointLimit = 5; + attribute(readonly, reportable) int16s absMaxCoolSetpointLimit = 6; + attribute(writable, reportable) int16s occupiedCoolingSetpoint = 17; + attribute(writable, reportable) int16s occupiedHeatingSetpoint = 18; + attribute(writable, reportable) int16s minHeatSetpointLimit = 21; + attribute(writable, reportable) int16s maxHeatSetpointLimit = 22; + attribute(writable, reportable) int16s minCoolSetpointLimit = 23; + attribute(writable, reportable) int16s maxCoolSetpointLimit = 24; + attribute(writable, reportable) int8s minSetpointDeadBand = 25; + attribute(writable, reportable) enum8 controlSequenceOfOperation = 27; + attribute(writable, reportable) enum8 systemMode = 28; + attribute(readonly, reportable) enum8 startOfWeek = 32; + attribute(readonly, reportable) int8u numberOfWeeklyTransitions = 33; + attribute(readonly, reportable) int8u numberOfDailyTransitions = 34; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct GetWeeklyScheduleRequest { + DayOfWeek daysToReturn = 0; + ModeForSequence modeToReturn = 1; + } + + request struct SetWeeklyScheduleRequest { + ENUM8 numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + INT8U payload[] = 3; + } + + request struct SetpointRaiseLowerRequest { + SetpointAdjustMode mode = 0; + INT8S amount = 1; + } + + response struct GetRelayStatusLogResponse { + INT16U timeOfDay = 0; + BITMAP16 relayStatus = 1; + INT16S localTemperature = 2; + INT8U humidityInPercentage = 3; + INT16S setpoint = 4; + INT16U unreadEntries = 5; + } + + response struct GetWeeklyScheduleResponse { + ENUM8 numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + INT8U payload[] = 3; + } + + command ClearWeeklySchedule(): DefaultSuccess = 3; + command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; + command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; + command SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; + command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + + +endpoint 0 { +} + +endpoint 1 { +} + diff --git a/zzz_generated/tv-app/zap-generated/Clusters.matter b/zzz_generated/tv-app/zap-generated/Clusters.matter new file mode 100644 index 00000000000000..bd3d3daa801c38 --- /dev/null +++ b/zzz_generated/tv-app/zap-generated/Clusters.matter @@ -0,0 +1,1801 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AccountLogin = 1294 { + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct GetSetupPINRequestRequest { + CHAR_STRING tempAccountIdentifier = 0; + } + + request struct LoginRequestRequest { + CHAR_STRING tempAccountIdentifier = 0; + CHAR_STRING setupPIN = 1; + } + + response struct GetSetupPINResponse { + CHAR_STRING setupPIN = 0; + } + + command GetSetupPINRequest(GetSetupPINRequestRequest): GetSetupPINResponse = 0; + command LoginRequest(LoginRequestRequest): DefaultSuccess = 2; + command LogoutRequest(): DefaultSuccess = 3; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster ApplicationBasic = 1293 { + enum ApplicationStatusEnum : ENUM8 { + kStopped = 0; + kActiveVisibleFocus = 1; + kActiveHidden = 2; + kActiveVisibleNotFocus = 3; + } + + struct ApplicationBasicApplication { + INT16U catalogVendorId = 1; + CHAR_STRING applicationId = 2; + } + + attribute(readonly, reportable) char_string vendorName = 0; + attribute(readonly, reportable) int16u vendorId = 1; + attribute(readonly, reportable) char_string applicationName = 2; + attribute(readonly, reportable) int16u productId = 3; + attribute(writable) ApplicationBasicApplication applicationApp = 4; + attribute(readonly, reportable) ApplicationStatusEnum applicationStatus = 5; + attribute(readonly, reportable) char_string applicationVersion = 6; + attribute(readonly) vendor_id allowedVendorList[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ApplicationLauncher = 1292 { + enum StatusEnum : ENUM8 { + kSuccess = 0; + kAppNotAvailable = 1; + kSystemBusy = 2; + } + + struct ApplicationEP { + ApplicationLauncherApplication application = 1; + CHAR_STRING endpoint = 2; + } + + struct ApplicationLauncherApplication { + INT16U catalogVendorId = 1; + CHAR_STRING applicationId = 2; + } + + attribute(readonly, reportable) INT16U applicationLauncherList[] = 0; + attribute(writable, reportable) ApplicationEP applicationLauncherApp = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct HideAppRequestRequest { + ApplicationLauncherApplication application = 0; + } + + request struct LaunchAppRequestRequest { + CHAR_STRING data = 0; + ApplicationLauncherApplication application = 1; + } + + request struct StopAppRequestRequest { + ApplicationLauncherApplication application = 0; + } + + response struct LauncherResponse { + StatusEnum status = 0; + CHAR_STRING data = 1; + } + + command HideAppRequest(HideAppRequestRequest): LauncherResponse = 2; + command LaunchAppRequest(LaunchAppRequestRequest): LauncherResponse = 0; + command StopAppRequest(StopAppRequestRequest): LauncherResponse = 1; +} + +server cluster AudioOutput = 1291 { + enum OutputTypeEnum : ENUM8 { + kHdmi = 0; + kBt = 1; + kOptical = 2; + kHeadphone = 3; + kInternal = 4; + kOther = 5; + } + + struct OutputInfo { + INT8U index = 1; + OutputTypeEnum outputType = 2; + CHAR_STRING name = 3; + } + + attribute(readonly, reportable) OutputInfo audioOutputList[] = 0; + attribute(readonly, reportable) int8u currentAudioOutput = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct RenameOutputRequestRequest { + INT8U index = 0; + CHAR_STRING name = 1; + } + + request struct SelectOutputRequestRequest { + INT8U index = 0; + } + + command RenameOutputRequest(RenameOutputRequestRequest): DefaultSuccess = 1; + command SelectOutputRequest(SelectOutputRequestRequest): DefaultSuccess = 0; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) char_string manufacturingDate = 11; + attribute(readonly, reportable) char_string partNumber = 12; + attribute(readonly, reportable) long_char_string productURL = 13; + attribute(readonly, reportable) char_string productLabel = 14; + attribute(readonly, reportable) char_string serialNumber = 15; + attribute(writable, reportable) boolean localConfigDisabled = 16; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +client cluster Binding = 30 { + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct BindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + request struct UnbindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + command Bind(BindRequest): DefaultSuccess = 0; + command Unbind(UnbindRequest): DefaultSuccess = 1; +} + +server cluster Binding = 30 { + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct BindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + request struct UnbindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + command Bind(BindRequest): DefaultSuccess = 0; + command Unbind(UnbindRequest): DefaultSuccess = 1; +} + +server cluster Channel = 1284 { + enum ErrorTypeEnum : ENUM8 { + kMultipleMatches = 0; + kNoMatches = 1; + } + + enum LineupInfoTypeEnum : ENUM8 { + kMso = 0; + } + + struct ChannelInfo { + INT16U majorNumber = 1; + INT16U minorNumber = 2; + CHAR_STRING name = 3; + CHAR_STRING callSign = 4; + CHAR_STRING affiliateCallSign = 5; + } + + struct LineupInfo { + CHAR_STRING operatorName = 1; + CHAR_STRING lineupName = 2; + CHAR_STRING postalCode = 3; + LineupInfoTypeEnum lineupInfoType = 4; + } + + attribute(readonly, reportable) ChannelInfo channelList[] = 0; + attribute(writable, reportable) LineupInfo channelLineup = 1; + attribute(writable, reportable) ChannelInfo currentChannel = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ChangeChannelByNumberRequestRequest { + INT16U majorNumber = 0; + INT16U minorNumber = 1; + } + + request struct ChangeChannelRequestRequest { + CHAR_STRING match = 0; + } + + request struct SkipChannelRequestRequest { + INT16U count = 0; + } + + response struct ChangeChannelResponse { + ChannelInfo channelMatch = 0; + ErrorTypeEnum errorType = 1; + } + + command ChangeChannelByNumberRequest(ChangeChannelByNumberRequestRequest): DefaultSuccess = 2; + command ChangeChannelRequest(ChangeChannelRequestRequest): ChangeChannelResponse = 0; + command SkipChannelRequest(SkipChannelRequestRequest): DefaultSuccess = 3; +} + +server cluster ContentLauncher = 1290 { + enum MetricTypeEnum : ENUM8 { + kPixels = 0; + kPercentage = 1; + } + + enum ParameterEnum : ENUM8 { + kActor = 0; + kChannel = 1; + kCharacter = 2; + kDirector = 3; + kEvent = 4; + kFranchise = 5; + kGenre = 6; + kLeague = 7; + kPopularity = 8; + kProvider = 9; + kSport = 10; + kSportsTeam = 11; + kType = 12; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kUrlNotAvailable = 1; + kAuthFailed = 2; + } + + struct ContentSearch { + Parameter parameterList[] = 1; + } + + struct Parameter { + ParameterEnum type = 1; + CHAR_STRING value = 2; + AdditionalInfo externalIDList[] = 3; + } + + struct AdditionalInfo { + CHAR_STRING name = 1; + CHAR_STRING value = 2; + } + + struct BrandingInformation { + CHAR_STRING providerName = 1; + StyleInformation background = 2; + StyleInformation logo = 3; + StyleInformation progressBar = 4; + StyleInformation splash = 5; + StyleInformation waterMark = 6; + } + + struct StyleInformation { + CHAR_STRING imageUrl = 1; + CHAR_STRING color = 2; + Dimension size = 3; + } + + struct Dimension { + double width = 1; + double height = 2; + MetricTypeEnum metric = 3; + } + + attribute(readonly, reportable) CHAR_STRING acceptHeaderList[] = 0; + attribute(writable, reportable) bitmap32 supportedStreamingProtocols = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct LaunchContentRequestRequest { + BOOLEAN autoPlay = 0; + CHAR_STRING data = 1; + ContentSearch search[] = 2; + } + + request struct LaunchURLRequestRequest { + CHAR_STRING contentURL = 0; + CHAR_STRING displayString = 1; + BrandingInformation brandingInformation = 2; + } + + response struct LaunchResponse { + StatusEnum status = 0; + CHAR_STRING data = 1; + } + + command LaunchContentRequest(LaunchContentRequestRequest): LaunchResponse = 0; + command LaunchURLRequest(LaunchURLRequestRequest): LaunchResponse = 1; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +client cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicy : ENUM8 { + kStandard = 0; + kLowLatency = 1; + } + + struct GroupKey { + fabric_idx fabricIndex = 0; + INT16U groupId = 1; + INT16U groupKeySetID = 2; + } + + struct GroupInfo { + INT16U fabricIndex = 0; + INT16U groupId = 1; + INT16U endpoints[] = 2; + CHAR_STRING groupName = 3; + } + + attribute(readonly, reportable) GroupKey groupKeyMap[] = 0; + attribute(readonly, reportable) GroupInfo groupTable[] = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster KeypadInput = 1289 { + enum CecKeyCode : ENUM8 { + kSelect = 0; + kUp = 1; + kDown = 2; + kLeft = 3; + kRight = 4; + kRightUp = 5; + kRightDown = 6; + kLeftUp = 7; + kLeftDown = 8; + kRootMenu = 9; + kSetupMenu = 10; + kContentsMenu = 11; + kFavoriteMenu = 12; + kExit = 13; + kMediaTopMenu = 16; + kMediaContextSensitiveMenu = 17; + kNumberEntryMode = 29; + kNumber11 = 30; + kNumber12 = 31; + kNumber0OrNumber10 = 32; + kNumbers1 = 33; + kNumbers2 = 34; + kNumbers3 = 35; + kNumbers4 = 36; + kNumbers5 = 37; + kNumbers6 = 38; + kNumbers7 = 39; + kNumbers8 = 40; + kNumbers9 = 41; + kDot = 42; + kEnter = 43; + kClear = 44; + kNextFavorite = 47; + kChannelUp = 48; + kChannelDown = 49; + kPreviousChannel = 50; + kSoundSelect = 51; + kInputSelect = 52; + kDisplayInformation = 53; + kHelp = 54; + kPageUp = 55; + kPageDown = 56; + kPower = 64; + kVolumeUp = 65; + kVolumeDown = 66; + kMute = 67; + kPlay = 68; + kStop = 69; + kPause = 70; + kRecord = 71; + kRewind = 72; + kFastForward = 73; + kEject = 74; + kForward = 75; + kBackward = 76; + kStopRecord = 77; + kPauseRecord = 78; + kReserved = 79; + kAngle = 80; + kSubPicture = 81; + kVideoOnDemand = 82; + kElectronicProgramGuide = 83; + kTimerProgramming = 84; + kInitialConfiguration = 85; + kSelectBroadcastType = 86; + kSelectSoundPresentation = 87; + kPlayFunction = 96; + kPausePlayFunction = 97; + kRecordFunction = 98; + kPauseRecordFunction = 99; + kStopFunction = 100; + kMuteFunction = 101; + kRestoreVolumeFunction = 102; + kTuneFunction = 103; + kSelectMediaFunction = 104; + kSelectAvInputFunction = 105; + kSelectAudioInputFunction = 106; + kPowerToggleFunction = 107; + kPowerOffFunction = 108; + kPowerOnFunction = 109; + kF1Blue = 113; + kF2Red = 114; + kF3Green = 115; + kF4Yellow = 116; + kF5 = 117; + kData = 118; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kUnsupportedKey = 1; + kInvalidKeyInCurrentState = 2; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct SendKeyRequestRequest { + CecKeyCode keyCode = 0; + } + + command SendKeyRequest(SendKeyRequestRequest): SendKeyResponse = 0; +} + +server cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + attribute(readonly, reportable) int8u currentLevel = 0; + attribute(readonly, reportable) int16u remainingTime = 1; + attribute(readonly, reportable) int8u minLevel = 2; + attribute(readonly, reportable) int8u maxLevel = 3; + attribute(readonly, reportable) int16u currentFrequency = 4; + attribute(readonly, reportable) int16u minFrequency = 5; + attribute(readonly, reportable) int16u maxFrequency = 6; + attribute(writable, reportable) bitmap8 options = 15; + attribute(writable, reportable) int16u onOffTransitionTime = 16; + attribute(writable, reportable) int8u onLevel = 17; + attribute(writable, reportable) int16u onTransitionTime = 18; + attribute(writable, reportable) int16u offTransitionTime = 19; + attribute(writable, reportable) int8u defaultMoveRate = 20; + attribute(writable, reportable) int8u startUpCurrentLevel = 16384; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelRequest { + INT8U level = 0; + INT16U transitionTime = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + INT16U transitionTime = 1; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionMask = 3; + BITMAP8 optionOverride = 4; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + } + + request struct StopRequest { + BITMAP8 optionMask = 0; + BITMAP8 optionOverride = 1; + } + + command Move(MoveRequest): DefaultSuccess = 1; + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command Step(StepRequest): DefaultSuccess = 2; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command Stop(StopRequest): DefaultSuccess = 3; + command StopWithOnOff(): DefaultSuccess = 7; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster LowPower = 1288 { + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Sleep(): DefaultSuccess = 0; +} + +server cluster MediaInput = 1287 { + enum InputTypeEnum : ENUM8 { + kInternal = 0; + kAux = 1; + kCoax = 2; + kComposite = 3; + kHdmi = 4; + kInput = 5; + kLine = 6; + kOptical = 7; + kVideo = 8; + kScart = 9; + kUsb = 10; + kOther = 11; + } + + struct InputInfo { + INT8U index = 1; + InputTypeEnum inputType = 2; + CHAR_STRING name = 3; + CHAR_STRING description = 4; + } + + attribute(readonly, reportable) InputInfo mediaInputList[] = 0; + attribute(readonly, reportable) int8u currentMediaInput = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct RenameInputRequestRequest { + INT8U index = 0; + CHAR_STRING name = 1; + } + + request struct SelectInputRequestRequest { + INT8U index = 0; + } + + command HideInputStatusRequest(): DefaultSuccess = 2; + command RenameInputRequest(RenameInputRequestRequest): DefaultSuccess = 3; + command SelectInputRequest(SelectInputRequestRequest): DefaultSuccess = 0; + command ShowInputStatusRequest(): DefaultSuccess = 1; +} + +server cluster MediaPlayback = 1286 { + enum PlaybackStateEnum : ENUM8 { + kPlaying = 0; + kPaused = 1; + kNotPlaying = 2; + kBuffering = 3; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kInvalidStateForCommand = 1; + kNotAllowed = 2; + kNotActive = 3; + kSpeedOutOfRange = 4; + kSeekOutOfRange = 5; + } + + struct PlaybackPosition { + INT64U updatedAt = 1; + INT64U position = 2; + } + + attribute(readonly, reportable) PlaybackStateEnum playbackState = 0; + attribute(readonly, reportable) epoch_us startTime = 1; + attribute(readonly, reportable) int64u duration = 2; + attribute(writable, reportable) PlaybackPosition position = 3; + attribute(readonly, reportable) single playbackSpeed = 4; + attribute(readonly, reportable) int64u seekRangeEnd = 5; + attribute(readonly, reportable) int64u seekRangeStart = 6; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct SeekRequestRequest { + INT64U position = 0; + } + + request struct SkipBackwardRequestRequest { + INT64U deltaPositionMilliseconds = 0; + } + + request struct SkipForwardRequestRequest { + INT64U deltaPositionMilliseconds = 0; + } + + response struct PlaybackResponse { + StatusEnum status = 0; + } + + command FastForwardRequest(): PlaybackResponse = 7; + command NextRequest(): PlaybackResponse = 5; + command PauseRequest(): PlaybackResponse = 1; + command PlayRequest(): PlaybackResponse = 0; + command PreviousRequest(): PlaybackResponse = 4; + command RewindRequest(): PlaybackResponse = 6; + command SeekRequest(SeekRequestRequest): PlaybackResponse = 11; + command SkipBackwardRequest(SkipBackwardRequestRequest): PlaybackResponse = 9; + command SkipForwardRequest(SkipForwardRequestRequest): PlaybackResponse = 8; + command StartOverRequest(): PlaybackResponse = 3; + command StopRequest(): PlaybackResponse = 2; +} + +client cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHttps = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : ENUM8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ApplyUpdateRequestRequest { + OCTET_STRING updateToken = 0; + INT32U newVersion = 1; + } + + request struct NotifyUpdateAppliedRequest { + OCTET_STRING updateToken = 0; + INT32U softwareVersion = 1; + } + + request struct QueryImageRequest { + vendor_id vendorId = 0; + INT16U productId = 1; + INT32U softwareVersion = 2; + OTADownloadProtocol protocolsSupported[] = 3; + optional INT16U hardwareVersion = 4; + optional CHAR_STRING location = 5; + optional BOOLEAN requestorCanConsent = 6; + optional OCTET_STRING metadataForProvider = 7; + } + + response struct ApplyUpdateResponse { + OTAApplyUpdateAction action = 0; + INT32U delayedActionTime = 1; + } + + response struct QueryImageResponse { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING softwareVersionString = 4; + optional OCTET_STRING updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING metadataForRequestor = 7; + } + + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; + command QueryImage(QueryImageRequest): QueryImageResponse = 0; +} + +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; +} + +client cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster RelativeHumidityMeasurement = 1029 { + attribute(readonly, reportable) int16u measuredValue = 0; + attribute(readonly, reportable) int16u minMeasuredValue = 1; + attribute(readonly, reportable) int16u maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster TargetNavigator = 1285 { + enum StatusEnum : ENUM8 { + kSuccess = 0; + kAppNotAvailable = 1; + kSystemBusy = 2; + } + + struct TargetInfo { + INT8U identifier = 1; + CHAR_STRING name = 2; + } + + attribute(readonly, reportable) TargetInfo targetNavigatorList[] = 0; + attribute(readonly) int8u currentNavigatorTarget = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct NavigateTargetRequestRequest { + INT8U target = 0; + CHAR_STRING data = 1; + } + + response struct NavigateTargetResponse { + StatusEnum status = 0; + CHAR_STRING data = 1; + } + + command NavigateTargetRequest(NavigateTargetRequestRequest): NavigateTargetResponse = 0; +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WakeOnLan = 1283 { + attribute(readonly, reportable) char_string wakeOnLanMacAddress = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + + +endpoint 0 { +} + +endpoint 1 { +} + +endpoint 2 { +} + +endpoint 3 { +} + +endpoint 4 { +} + +endpoint 5 { +} + diff --git a/zzz_generated/tv-casting-app/zap-generated/Clusters.matter b/zzz_generated/tv-casting-app/zap-generated/Clusters.matter new file mode 100644 index 00000000000000..09849ef9e8a3bf --- /dev/null +++ b/zzz_generated/tv-casting-app/zap-generated/Clusters.matter @@ -0,0 +1,2469 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +client cluster AccountLogin = 1294 { + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct GetSetupPINRequestRequest { + CHAR_STRING tempAccountIdentifier = 0; + } + + request struct LoginRequestRequest { + CHAR_STRING tempAccountIdentifier = 0; + CHAR_STRING setupPIN = 1; + } + + command GetSetupPINRequest(GetSetupPINRequestRequest): GetSetupPINResponse = 0; + command LoginRequest(LoginRequestRequest): DefaultSuccess = 2; + command LogoutRequest(): DefaultSuccess = 3; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +client cluster ApplicationBasic = 1293 { + enum ApplicationStatusEnum : ENUM8 { + kStopped = 0; + kActiveVisibleFocus = 1; + kActiveHidden = 2; + kActiveVisibleNotFocus = 3; + } + + attribute(readonly, reportable) char_string vendorName = 0; + attribute(readonly, reportable) int16u vendorId = 1; + attribute(readonly, reportable) char_string applicationName = 2; + attribute(readonly, reportable) int16u productId = 3; + attribute(readonly, reportable) ApplicationStatusEnum applicationStatus = 5; + attribute(readonly, reportable) char_string applicationVersion = 6; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster ApplicationLauncher = 1292 { + enum StatusEnum : ENUM8 { + kSuccess = 0; + kAppNotAvailable = 1; + kSystemBusy = 2; + } + + struct ApplicationLauncherApplication { + INT16U catalogVendorId = 1; + CHAR_STRING applicationId = 2; + } + + attribute(readonly, reportable) INT16U applicationLauncherList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct HideAppRequestRequest { + ApplicationLauncherApplication application = 0; + } + + request struct LaunchAppRequestRequest { + CHAR_STRING data = 0; + ApplicationLauncherApplication application = 1; + } + + request struct StopAppRequestRequest { + ApplicationLauncherApplication application = 0; + } + + command HideAppRequest(HideAppRequestRequest): LauncherResponse = 2; + command LaunchAppRequest(LaunchAppRequestRequest): LauncherResponse = 0; + command StopAppRequest(StopAppRequestRequest): LauncherResponse = 1; +} + +client cluster AudioOutput = 1291 { + enum OutputTypeEnum : ENUM8 { + kHdmi = 0; + kBt = 1; + kOptical = 2; + kHeadphone = 3; + kInternal = 4; + kOther = 5; + } + + struct OutputInfo { + INT8U index = 1; + OutputTypeEnum outputType = 2; + CHAR_STRING name = 3; + } + + attribute(readonly, reportable) OutputInfo audioOutputList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct RenameOutputRequestRequest { + INT8U index = 0; + CHAR_STRING name = 1; + } + + request struct SelectOutputRequestRequest { + INT8U index = 0; + } + + command RenameOutputRequest(RenameOutputRequestRequest): DefaultSuccess = 1; + command SelectOutputRequest(SelectOutputRequestRequest): DefaultSuccess = 0; +} + +server cluster BarrierControl = 259 { + attribute(readonly, reportable) enum8 barrierMovingState = 1; + attribute(readonly, reportable) bitmap16 barrierSafetyStatus = 2; + attribute(readonly, reportable) bitmap8 barrierCapabilities = 3; + attribute(readonly, reportable) int8u barrierPosition = 10; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct BarrierControlGoToPercentRequest { + INT8U percentOpen = 0; + } + + command BarrierControlGoToPercent(BarrierControlGoToPercentRequest): DefaultSuccess = 0; + command BarrierControlStop(): DefaultSuccess = 1; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) char_string manufacturingDate = 11; + attribute(readonly, reportable) char_string partNumber = 12; + attribute(readonly, reportable) long_char_string productURL = 13; + attribute(readonly, reportable) char_string productLabel = 14; + attribute(readonly, reportable) char_string serialNumber = 15; + attribute(writable, reportable) boolean localConfigDisabled = 16; + attribute(readonly, reportable) boolean reachable = 17; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +server cluster BinaryInputBasic = 15 { + attribute(writable, reportable) boolean outOfService = 81; + attribute(writable, reportable) boolean presentValue = 85; + attribute(readonly, reportable) bitmap8 statusFlags = 111; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Binding = 30 { + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct BindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + request struct UnbindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + command Bind(BindRequest): DefaultSuccess = 0; + command Unbind(UnbindRequest): DefaultSuccess = 1; +} + +server cluster BridgedDeviceBasic = 57 { + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) int16u vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) char_string manufacturingDate = 11; + attribute(readonly, reportable) char_string partNumber = 12; + attribute(readonly, reportable) long_char_string productURL = 13; + attribute(readonly, reportable) char_string productLabel = 14; + attribute(readonly, reportable) char_string serialNumber = 15; + attribute(readonly, reportable) boolean reachable = 17; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Leave(): DefaultSuccess = 2; + command ReachableChanged(): DefaultSuccess = 3; + command ShutDown(): DefaultSuccess = 1; + command StartUp(): DefaultSuccess = 0; +} + +client cluster Channel = 1284 { + enum ErrorTypeEnum : ENUM8 { + kMultipleMatches = 0; + kNoMatches = 1; + } + + enum LineupInfoTypeEnum : ENUM8 { + kMso = 0; + } + + struct ChannelInfo { + INT16U majorNumber = 1; + INT16U minorNumber = 2; + CHAR_STRING name = 3; + CHAR_STRING callSign = 4; + CHAR_STRING affiliateCallSign = 5; + } + + struct LineupInfo { + CHAR_STRING operatorName = 1; + CHAR_STRING lineupName = 2; + CHAR_STRING postalCode = 3; + LineupInfoTypeEnum lineupInfoType = 4; + } + + attribute(readonly, reportable) ChannelInfo channelList[] = 0; + attribute(writable, reportable) LineupInfo channelLineup = 1; + attribute(writable, reportable) ChannelInfo currentChannel = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ChangeChannelByNumberRequestRequest { + INT16U majorNumber = 0; + INT16U minorNumber = 1; + } + + request struct ChangeChannelRequestRequest { + CHAR_STRING match = 0; + } + + request struct SkipChannelRequestRequest { + INT16U count = 0; + } + + command ChangeChannelByNumberRequest(ChangeChannelByNumberRequestRequest): DefaultSuccess = 2; + command ChangeChannelRequest(ChangeChannelRequestRequest): ChangeChannelResponse = 0; + command SkipChannelRequest(SkipChannelRequestRequest): DefaultSuccess = 3; +} + +server cluster ColorControl = 768 { + enum ColorLoopAction : ENUM8 { + kDeactivate = 0; + kActivateFromColorLoopStartEnhancedHue = 1; + kActivateFromEnhancedCurrentHue = 2; + } + + enum ColorLoopDirection : ENUM8 { + kDecrementHue = 0; + kIncrementHue = 1; + } + + enum ColorMode : ENUM8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperature = 2; + } + + enum HueDirection : ENUM8 { + kShortestDistance = 0; + kLongestDistance = 1; + kUp = 2; + kDown = 3; + } + + enum HueMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum HueStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + enum SaturationMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum SaturationStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + attribute(readonly, reportable) int8u currentHue = 0; + attribute(readonly, reportable) int8u currentSaturation = 1; + attribute(readonly, reportable) int16u remainingTime = 2; + attribute(readonly, reportable) int16u currentX = 3; + attribute(readonly, reportable) int16u currentY = 4; + attribute(readonly, reportable) enum8 driftCompensation = 5; + attribute(readonly, reportable) char_string compensationText = 6; + attribute(readonly, reportable) int16u colorTemperature = 7; + attribute(readonly, reportable) enum8 colorMode = 8; + attribute(writable, reportable) bitmap8 colorControlOptions = 15; + attribute(readonly, reportable) int8u numberOfPrimaries = 16; + attribute(readonly, reportable) int16u primary1X = 17; + attribute(readonly, reportable) int16u primary1Y = 18; + attribute(readonly, reportable) int8u primary1Intensity = 19; + attribute(readonly, reportable) int16u primary2X = 21; + attribute(readonly, reportable) int16u primary2Y = 22; + attribute(readonly, reportable) int8u primary2Intensity = 23; + attribute(readonly, reportable) int16u primary3X = 25; + attribute(readonly, reportable) int16u primary3Y = 26; + attribute(readonly, reportable) int8u primary3Intensity = 27; + attribute(readonly, reportable) int16u primary4X = 32; + attribute(readonly, reportable) int16u primary4Y = 33; + attribute(readonly, reportable) int8u primary4Intensity = 34; + attribute(readonly, reportable) int16u primary5X = 36; + attribute(readonly, reportable) int16u primary5Y = 37; + attribute(readonly, reportable) int8u primary5Intensity = 38; + attribute(readonly, reportable) int16u primary6X = 40; + attribute(readonly, reportable) int16u primary6Y = 41; + attribute(readonly, reportable) int8u primary6Intensity = 42; + attribute(writable, reportable) int16u whitePointX = 48; + attribute(writable, reportable) int16u whitePointY = 49; + attribute(writable, reportable) int16u colorPointRX = 50; + attribute(writable, reportable) int16u colorPointRY = 51; + attribute(writable, reportable) int8u colorPointRIntensity = 52; + attribute(writable, reportable) int16u colorPointGX = 54; + attribute(writable, reportable) int16u colorPointGY = 55; + attribute(writable, reportable) int8u colorPointGIntensity = 56; + attribute(writable, reportable) int16u colorPointBX = 58; + attribute(writable, reportable) int16u colorPointBY = 59; + attribute(writable, reportable) int8u colorPointBIntensity = 60; + attribute(readonly, reportable) int16u enhancedCurrentHue = 16384; + attribute(readonly, reportable) enum8 enhancedColorMode = 16385; + attribute(readonly, reportable) int8u colorLoopActive = 16386; + attribute(readonly, reportable) int8u colorLoopDirection = 16387; + attribute(readonly, reportable) int16u colorLoopTime = 16388; + attribute(readonly, reportable) bitmap16 colorCapabilities = 16394; + attribute(readonly, reportable) int16u colorTempPhysicalMin = 16395; + attribute(readonly, reportable) int16u colorTempPhysicalMax = 16396; + attribute(readonly, reportable) int16u coupleColorTempToLevelMinMireds = 16397; + attribute(writable, reportable) int16u startUpColorTemperatureMireds = 16400; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveColorRequest { + INT16S rateX = 0; + INT16S rateY = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveColorTemperatureRequest { + HueMoveMode moveMode = 0; + INT16U rate = 1; + INT16U colorTemperatureMinimum = 2; + INT16U colorTemperatureMaximum = 3; + BITMAP8 optionsMask = 4; + BITMAP8 optionsOverride = 5; + } + + request struct MoveHueRequest { + HueMoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveSaturationRequest { + SaturationMoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveToColorRequest { + INT16U colorX = 0; + INT16U colorY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToColorTemperatureRequest { + INT16U colorTemperature = 0; + INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveToHueRequest { + INT8U hue = 0; + HueDirection direction = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToHueAndSaturationRequest { + INT8U hue = 0; + INT8U saturation = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToSaturationRequest { + INT8U saturation = 0; + INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct StepColorRequest { + INT16S stepX = 0; + INT16S stepY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StepColorTemperatureRequest { + HueStepMode stepMode = 0; + INT16U stepSize = 1; + INT16U transitionTime = 2; + INT16U colorTemperatureMinimum = 3; + INT16U colorTemperatureMaximum = 4; + BITMAP8 optionsMask = 5; + BITMAP8 optionsOverride = 6; + } + + request struct StepHueRequest { + HueStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StepSaturationRequest { + SaturationStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopMoveStepRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; + } + + command MoveColor(MoveColorRequest): DefaultSuccess = 8; + command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + command MoveHue(MoveHueRequest): DefaultSuccess = 1; + command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + command StepColor(StepColorRequest): DefaultSuccess = 9; + command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; + command StepHue(StepHueRequest): DefaultSuccess = 2; + command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; +} + +client cluster ContentLauncher = 1290 { + enum MetricTypeEnum : ENUM8 { + kPixels = 0; + kPercentage = 1; + } + + enum ParameterEnum : ENUM8 { + kActor = 0; + kChannel = 1; + kCharacter = 2; + kDirector = 3; + kEvent = 4; + kFranchise = 5; + kGenre = 6; + kLeague = 7; + kPopularity = 8; + kProvider = 9; + kSport = 10; + kSportsTeam = 11; + kType = 12; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kUrlNotAvailable = 1; + kAuthFailed = 2; + } + + struct ContentSearch { + Parameter parameterList[] = 1; + } + + struct Parameter { + ParameterEnum type = 1; + CHAR_STRING value = 2; + AdditionalInfo externalIDList[] = 3; + } + + struct AdditionalInfo { + CHAR_STRING name = 1; + CHAR_STRING value = 2; + } + + struct BrandingInformation { + CHAR_STRING providerName = 1; + StyleInformation background = 2; + StyleInformation logo = 3; + StyleInformation progressBar = 4; + StyleInformation splash = 5; + StyleInformation waterMark = 6; + } + + struct StyleInformation { + CHAR_STRING imageUrl = 1; + CHAR_STRING color = 2; + Dimension size = 3; + } + + struct Dimension { + double width = 1; + double height = 2; + MetricTypeEnum metric = 3; + } + + attribute(readonly, reportable) CHAR_STRING acceptHeaderList[] = 0; + attribute(writable, reportable) bitmap32 supportedStreamingProtocols = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct LaunchContentRequestRequest { + BOOLEAN autoPlay = 0; + CHAR_STRING data = 1; + ContentSearch search[] = 2; + } + + request struct LaunchURLRequestRequest { + CHAR_STRING contentURL = 0; + CHAR_STRING displayString = 1; + BrandingInformation brandingInformation = 2; + } + + command LaunchContentRequest(LaunchContentRequestRequest): LaunchResponse = 0; + command LaunchURLRequest(LaunchURLRequestRequest): LaunchResponse = 1; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster DoorLock = 257 { + enum DlAlarmCode : ENUM8 { + kLockJammed = 0; + kLockFactoryReset = 1; + kLockRadioPowerCycled = 3; + kWrongCodeEntryLimit = 4; + kFrontEsceutcheonRemoved = 5; + kDoorForcedOpen = 6; + kDoorAjar = 7; + kForcedUser = 8; + } + + enum DlCredentialRule : ENUM8 { + kSingle = 0; + kDouble = 1; + kTri = 2; + } + + enum DlCredentialType : ENUM8 { + kProgrammingPIN = 0; + kPin = 1; + kRfid = 2; + kFingerprint = 3; + kFingerVein = 4; + kFace = 5; + } + + enum DlDataOperationType : ENUM8 { + kAdd = 0; + kClear = 1; + kModify = 2; + } + + enum DlDoorLockStatus : ENUM8 { + kDuplicate = 2; + kOccupied = 3; + } + + enum DlDoorState : ENUM8 { + kDoorOpen = 0; + kDoorClosed = 1; + kDoorJammed = 2; + kDoorForcedOpen = 3; + kDoorUnspecifiedError = 4; + kDoorAjar = 5; + } + + enum DlLockDataType : ENUM8 { + kUnspecified = 0; + kProgrammingCode = 1; + kUserIndex = 2; + kWeekDaySchedule = 3; + kYearDaySchedule = 4; + kHolidaySchedule = 5; + kPin = 6; + kRfid = 7; + kFingerprint = 8; + } + + enum DlLockOperationType : ENUM8 { + kLock = 0; + kUnlock = 1; + kNonAccessUserEvent = 2; + kForcedUserEvent = 3; + } + + enum DlLockState : ENUM8 { + kNotFullyLocked = 0; + kLocked = 1; + kUnlocked = 2; + } + + enum DlLockType : ENUM8 { + kDeadBolt = 0; + kMagnetic = 1; + kOther = 2; + kMortise = 3; + kRim = 4; + kLatchBolt = 5; + kCylindricalLock = 6; + kTubularLock = 7; + kInterconnectedLock = 8; + kDeadLatch = 9; + kDoorFurniture = 10; + } + + enum DlOperatingMode : ENUM8 { + kNormal = 0; + kVacation = 1; + kPrivacy = 2; + kNoRemoteLockUnlock = 3; + kPassage = 4; + } + + enum DlOperationError : ENUM8 { + kUnspecified = 0; + kInvalidCredential = 1; + kDisabledUserDenied = 2; + kRestricted = 3; + kInsufficientBattery = 4; + } + + enum DlOperationSource : ENUM8 { + kUnspecified = 0; + kManual = 1; + kProprietaryRemote = 2; + kKeypad = 3; + kAuto = 4; + kButton = 5; + kSchedule = 6; + kRemote = 7; + kRfid = 8; + kBiometric = 9; + } + + enum DlStatus : ENUM8 { + kSuccess = 0; + kFailure = 1; + kDuplicate = 2; + kOccupied = 3; + kInvalidField = 133; + kNotFound = 139; + } + + enum DlUserStatus : ENUM8 { + kAvailable = 0; + kOccupiedEnabled = 1; + kOccupiedDisabled = 3; + } + + enum DlUserType : ENUM8 { + kUnrestrictedUser = 0; + kYearDayScheduleUser = 1; + kWeekDayScheduleUser = 2; + kProgrammingUser = 3; + kNonAccessUser = 4; + kForcedUser = 5; + kDisposableUser = 6; + kExpiringUser = 7; + kScheduleRestrictedUser = 8; + kRemoteOnlyUser = 9; + } + + enum DoorLockOperationEventCode : ENUM8 { + kUnknownOrMfgSpecific = 0; + kLock = 1; + kUnlock = 2; + kLockInvalidPinOrId = 3; + kLockInvalidSchedule = 4; + kUnlockInvalidPinOrId = 5; + kUnlockInvalidSchedule = 6; + kOneTouchLock = 7; + kKeyLock = 8; + kKeyUnlock = 9; + kAutoLock = 10; + kScheduleLock = 11; + kScheduleUnlock = 12; + kManualLock = 13; + kManualUnlock = 14; + } + + enum DoorLockProgrammingEventCode : ENUM8 { + kUnknownOrMfgSpecific = 0; + kMasterCodeChanged = 1; + kPinAdded = 2; + kPinDeleted = 3; + kPinChanged = 4; + kIdAdded = 5; + kIdDeleted = 6; + } + + enum DoorLockSetPinOrIdStatus : ENUM8 { + kSuccess = 0; + kGeneralFailure = 1; + kMemoryFull = 2; + kDuplicateCodeError = 3; + } + + enum DoorLockUserStatus : ENUM8 { + kAvailable = 0; + kOccupiedEnabled = 1; + kOccupiedDisabled = 3; + kNotSupported = 255; + } + + enum DoorLockUserType : ENUM8 { + kUnrestricted = 0; + kYearDayScheduleUser = 1; + kWeekDayScheduleUser = 2; + kMasterUser = 3; + kNonAccessUser = 4; + kNotSupported = 255; + } + + struct DlCredential { + DlCredentialType credentialType = 1; + INT16U credentialIndex = 2; + } + + critical event DoorLockAlarm = 0 { + DlAlarmCode alarmCode = 0; + } + + critical event DoorStateChange = 1 { + DlDoorState doorState = 0; + } + + critical event LockOperation = 2 { + DlLockOperationType lockOperationType = 0; + DlOperationSource operationSource = 1; + nullable INT16U userIndex = 2; + nullable fabric_idx fabricIndex = 3; + nullable NODE_ID sourceNode = 4; + optional nullable DlCredential credentials[] = 5; + } + + critical event LockOperationError = 3 { + DlLockOperationType lockOperationType = 0; + DlOperationSource operationSource = 1; + DlOperationError operationError = 2; + nullable INT16U userIndex = 3; + nullable fabric_idx fabricIndex = 4; + nullable NODE_ID sourceNode = 5; + optional nullable DlCredential credentials[] = 6; + } + + info event LockUserChange = 4 { + DlLockDataType lockDataType = 0; + DlDataOperationType dataOperationType = 1; + DlOperationSource operationSource = 2; + nullable INT16U userIndex = 3; + nullable fabric_idx fabricIndex = 4; + nullable NODE_ID sourceNode = 5; + nullable INT16U dataIndex = 6; + } + + attribute(readonly, reportable) DlLockState lockState = 0; + attribute(readonly, reportable) DlLockType lockType = 1; + attribute(readonly, reportable) boolean actuatorEnabled = 2; + attribute(readonly, reportable) DlDoorState doorState = 3; + attribute(writable) int32u doorOpenEvents = 4; + attribute(writable) int32u doorClosedEvents = 5; + attribute(writable) int16u openPeriod = 6; + attribute(readonly) int16u numberOfTotalUsersSupported = 17; + attribute(readonly) int16u numberOfPINUsersSupported = 18; + attribute(readonly) int16u numberOfWeekDaySchedulesSupportedPerUser = 20; + attribute(readonly) int16u numberOfYearDaySchedulesSupportedPerUser = 21; + attribute(readonly) int16u numberOfHolidaySchedulesSupported = 22; + attribute(readonly) int8u maxPINCodeLength = 23; + attribute(readonly) int8u minPINCodeLength = 24; + attribute(readonly) bitmap8 credentialRulesSupport = 27; + attribute(writable, reportable) char_string language = 33; + attribute(writable, reportable) int32u autoRelockTime = 35; + attribute(writable, reportable) int8u soundVolume = 36; + attribute(writable, reportable) DlOperatingMode operatingMode = 37; + attribute(readonly) bitmap16 supportedOperatingModes = 38; + attribute(readonly) bitmap16 defaultConfigurationRegister = 39; + attribute(writable, reportable) boolean enableOneTouchLocking = 41; + attribute(writable) boolean enableInsideStatusLED = 42; + attribute(writable, reportable) boolean enablePrivacyModeButton = 43; + attribute(writable, reportable) int8u wrongCodeEntryLimit = 48; + attribute(writable, reportable) int8u userCodeTemporaryDisableTime = 49; + attribute(writable) boolean requirePINforRemoteOperation = 51; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ClearCredentialRequest { + DlCredential credential = 0; + } + + request struct ClearUserRequest { + INT16U userIndex = 0; + } + + request struct GetCredentialStatusRequest { + DlCredential credential = 0; + } + + request struct GetUserRequest { + INT16U userIndex = 0; + } + + request struct LockDoorRequest { + optional OCTET_STRING pinCode = 0; + } + + request struct SetCredentialRequest { + DlDataOperationType operationType = 0; + DlCredential credential = 1; + LONG_OCTET_STRING credentialData = 2; + INT16U userIndex = 3; + DlUserStatus userStatus = 4; + } + + request struct SetUserRequest { + DlDataOperationType operationType = 0; + INT16U userIndex = 1; + nullable CHAR_STRING userName = 2; + nullable INT32U userUniqueId = 3; + DlUserStatus userStatus = 4; + DlUserType userType = 5; + DlCredentialRule credentialRule = 6; + } + + request struct UnlockDoorRequest { + optional OCTET_STRING pinCode = 0; + } + + response struct GetCredentialStatusResponse { + boolean credentialExists = 0; + nullable INT16U userIndex = 1; + nullable INT16U nextCredentialIndex = 2; + } + + response struct GetUserResponse { + INT16U userIndex = 0; + nullable CHAR_STRING userName = 1; + nullable INT32U userUniqueId = 2; + nullable DlUserStatus userStatus = 3; + nullable DlUserType userType = 4; + nullable DlCredentialRule credentialRule = 5; + nullable DlCredential credentials[] = 6; + nullable fabric_idx creatorFabricIndex = 7; + nullable fabric_idx lastModifiedFabricIndex = 8; + INT16U nextUserIndex = 9; + } + + response struct SetCredentialResponse { + DlStatus status = 0; + nullable INT16U userIndex = 1; + nullable INT16U nextCredentialIndex = 2; + } + + command ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; + command ClearUser(ClearUserRequest): DefaultSuccess = 29; + command GetCredentialStatus(GetCredentialStatusRequest): GetCredentialStatusResponse = 36; + command GetUser(GetUserRequest): GetUserResponse = 27; + command LockDoor(LockDoorRequest): DefaultSuccess = 0; + command SetCredential(SetCredentialRequest): SetCredentialResponse = 34; + command SetUser(SetUserRequest): DefaultSuccess = 26; + command UnlockDoor(UnlockDoorRequest): DefaultSuccess = 1; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster FlowMeasurement = 1028 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicy : ENUM8 { + kStandard = 0; + kLowLatency = 1; + } + + struct GroupKey { + fabric_idx fabricIndex = 0; + INT16U groupId = 1; + INT16U groupKeySetID = 2; + } + + struct GroupInfo { + INT16U fabricIndex = 0; + INT16U groupId = 1; + INT16U endpoints[] = 2; + CHAR_STRING groupName = 3; + } + + attribute(readonly, reportable) GroupKey groupKeyMap[] = 0; + attribute(readonly, reportable) GroupInfo groupTable[] = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Groups = 4 { + attribute(readonly, reportable) bitmap8 nameSupport = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddGroupRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct AddGroupIfIdentifyingRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct GetGroupMembershipRequest { + INT16U groupList[] = 0; + } + + request struct RemoveGroupRequest { + INT16U groupId = 0; + } + + request struct ViewGroupRequest { + INT16U groupId = 0; + } + + response struct AddGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct GetGroupMembershipResponse { + INT8U capacity = 0; + INT16U groupList[] = 1; + } + + response struct RemoveGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct ViewGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + CHAR_STRING groupName = 2; + } + + command AddGroup(AddGroupRequest): AddGroupResponse = 0; + command AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + command RemoveAllGroups(): DefaultSuccess = 4; + command RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; +} + +server cluster IasZone = 1280 { + enum IasEnrollResponseCode : ENUM8 { + kSuccess = 0; + kNotSupported = 1; + kNoEnrollPermit = 2; + kTooManyZones = 3; + } + + enum IasZoneType : ENUM16 { + kStandardCie = 0; + kMotionSensor = 13; + kContactSwitch = 21; + kFireSensor = 40; + kWaterSensor = 42; + kGasSensor = 43; + kPersonalEmergencyDevice = 44; + kVibrationMovementSensor = 45; + kRemoteControl = 271; + kKeyFob = 277; + kKeypad = 541; + kStandardWarningDevice = 549; + kGlassBreakSensor = 550; + kCarbonMonoxideSensor = 551; + kSecurityRepeater = 553; + kInvalidZoneType = 65535; + } + + attribute(readonly, reportable) enum8 zoneState = 0; + attribute(readonly, reportable) enum16 zoneType = 1; + attribute(readonly, reportable) bitmap16 zoneStatus = 2; + attribute(writable, reportable) node_id iasCieAddress = 16; + attribute(readonly, reportable) int8u zoneId = 17; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ZoneEnrollRequestRequest { + IasZoneType zoneType = 0; + INT16U manufacturerCode = 1; + } + + request struct ZoneStatusChangeNotificationRequest { + IasZoneStatus zoneStatus = 0; + BITMAP8 extendedStatus = 1; + INT8U zoneId = 2; + INT16U delay = 3; + } + + response struct ZoneEnrollResponse { + IasEnrollResponseCode enrollResponseCode = 0; + INT8U zoneId = 1; + } + + command ZoneEnrollRequest(ZoneEnrollRequestRequest): ZoneEnrollResponse = 1; + command ZoneStatusChangeNotification(ZoneStatusChangeNotificationRequest): DefaultSuccess = 0; +} + +server cluster Identify = 3 { + enum IdentifyEffectIdentifier : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum IdentifyEffectVariant : ENUM8 { + kDefault = 0; + } + + enum IdentifyIdentifyType : ENUM8 { + kNone = 0; + kVisibleLight = 1; + kVisibleLED = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute(writable, reportable) int16u identifyTime = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + response struct IdentifyQueryResponse { + INT16U timeout = 0; + } + + command Identify(IdentifyRequest): DefaultSuccess = 0; + command IdentifyQuery(): IdentifyQueryResponse = 1; +} + +client cluster KeypadInput = 1289 { + enum CecKeyCode : ENUM8 { + kSelect = 0; + kUp = 1; + kDown = 2; + kLeft = 3; + kRight = 4; + kRightUp = 5; + kRightDown = 6; + kLeftUp = 7; + kLeftDown = 8; + kRootMenu = 9; + kSetupMenu = 10; + kContentsMenu = 11; + kFavoriteMenu = 12; + kExit = 13; + kMediaTopMenu = 16; + kMediaContextSensitiveMenu = 17; + kNumberEntryMode = 29; + kNumber11 = 30; + kNumber12 = 31; + kNumber0OrNumber10 = 32; + kNumbers1 = 33; + kNumbers2 = 34; + kNumbers3 = 35; + kNumbers4 = 36; + kNumbers5 = 37; + kNumbers6 = 38; + kNumbers7 = 39; + kNumbers8 = 40; + kNumbers9 = 41; + kDot = 42; + kEnter = 43; + kClear = 44; + kNextFavorite = 47; + kChannelUp = 48; + kChannelDown = 49; + kPreviousChannel = 50; + kSoundSelect = 51; + kInputSelect = 52; + kDisplayInformation = 53; + kHelp = 54; + kPageUp = 55; + kPageDown = 56; + kPower = 64; + kVolumeUp = 65; + kVolumeDown = 66; + kMute = 67; + kPlay = 68; + kStop = 69; + kPause = 70; + kRecord = 71; + kRewind = 72; + kFastForward = 73; + kEject = 74; + kForward = 75; + kBackward = 76; + kStopRecord = 77; + kPauseRecord = 78; + kReserved = 79; + kAngle = 80; + kSubPicture = 81; + kVideoOnDemand = 82; + kElectronicProgramGuide = 83; + kTimerProgramming = 84; + kInitialConfiguration = 85; + kSelectBroadcastType = 86; + kSelectSoundPresentation = 87; + kPlayFunction = 96; + kPausePlayFunction = 97; + kRecordFunction = 98; + kPauseRecordFunction = 99; + kStopFunction = 100; + kMuteFunction = 101; + kRestoreVolumeFunction = 102; + kTuneFunction = 103; + kSelectMediaFunction = 104; + kSelectAvInputFunction = 105; + kSelectAudioInputFunction = 106; + kPowerToggleFunction = 107; + kPowerOffFunction = 108; + kPowerOnFunction = 109; + kF1Blue = 113; + kF2Red = 114; + kF3Green = 115; + kF4Yellow = 116; + kF5 = 117; + kData = 118; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kUnsupportedKey = 1; + kInvalidKeyInCurrentState = 2; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct SendKeyRequestRequest { + CecKeyCode keyCode = 0; + } + + command SendKeyRequest(SendKeyRequestRequest): SendKeyResponse = 0; +} + +server cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + attribute(readonly, reportable) int8u currentLevel = 0; + attribute(readonly, reportable) int16u remainingTime = 1; + attribute(readonly, reportable) int8u minLevel = 2; + attribute(readonly, reportable) int8u maxLevel = 3; + attribute(readonly, reportable) int16u currentFrequency = 4; + attribute(readonly, reportable) int16u minFrequency = 5; + attribute(readonly, reportable) int16u maxFrequency = 6; + attribute(writable, reportable) bitmap8 options = 15; + attribute(writable, reportable) int16u onOffTransitionTime = 16; + attribute(writable, reportable) int8u onLevel = 17; + attribute(writable, reportable) int16u onTransitionTime = 18; + attribute(writable, reportable) int16u offTransitionTime = 19; + attribute(writable, reportable) int8u defaultMoveRate = 20; + attribute(writable, reportable) int8u startUpCurrentLevel = 16384; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelRequest { + INT8U level = 0; + INT16U transitionTime = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + INT16U transitionTime = 1; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionMask = 3; + BITMAP8 optionOverride = 4; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + } + + request struct StopRequest { + BITMAP8 optionMask = 0; + BITMAP8 optionOverride = 1; + } + + command Move(MoveRequest): DefaultSuccess = 1; + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command Step(StepRequest): DefaultSuccess = 2; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command Stop(StopRequest): DefaultSuccess = 3; + command StopWithOnOff(): DefaultSuccess = 7; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +client cluster MediaInput = 1287 { + enum InputTypeEnum : ENUM8 { + kInternal = 0; + kAux = 1; + kCoax = 2; + kComposite = 3; + kHdmi = 4; + kInput = 5; + kLine = 6; + kOptical = 7; + kVideo = 8; + kScart = 9; + kUsb = 10; + kOther = 11; + } + + struct InputInfo { + INT8U index = 1; + InputTypeEnum inputType = 2; + CHAR_STRING name = 3; + CHAR_STRING description = 4; + } + + attribute(readonly, reportable) InputInfo mediaInputList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct RenameInputRequestRequest { + INT8U index = 0; + CHAR_STRING name = 1; + } + + request struct SelectInputRequestRequest { + INT8U index = 0; + } + + command HideInputStatusRequest(): DefaultSuccess = 2; + command RenameInputRequest(RenameInputRequestRequest): DefaultSuccess = 3; + command SelectInputRequest(SelectInputRequestRequest): DefaultSuccess = 0; + command ShowInputStatusRequest(): DefaultSuccess = 1; +} + +client cluster MediaPlayback = 1286 { + enum PlaybackStateEnum : ENUM8 { + kPlaying = 0; + kPaused = 1; + kNotPlaying = 2; + kBuffering = 3; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kInvalidStateForCommand = 1; + kNotAllowed = 2; + kNotActive = 3; + kSpeedOutOfRange = 4; + kSeekOutOfRange = 5; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct SeekRequestRequest { + INT64U position = 0; + } + + request struct SkipBackwardRequestRequest { + INT64U deltaPositionMilliseconds = 0; + } + + request struct SkipForwardRequestRequest { + INT64U deltaPositionMilliseconds = 0; + } + + command FastForwardRequest(): PlaybackResponse = 7; + command NextRequest(): PlaybackResponse = 5; + command PauseRequest(): PlaybackResponse = 1; + command PlayRequest(): PlaybackResponse = 0; + command PreviousRequest(): PlaybackResponse = 4; + command RewindRequest(): PlaybackResponse = 6; + command SeekRequest(SeekRequestRequest): PlaybackResponse = 11; + command SkipBackwardRequest(SkipBackwardRequestRequest): PlaybackResponse = 9; + command SkipForwardRequest(SkipForwardRequestRequest): PlaybackResponse = 8; + command StartOverRequest(): PlaybackResponse = 3; + command StopRequest(): PlaybackResponse = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHttps = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : ENUM8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ApplyUpdateRequestRequest { + OCTET_STRING updateToken = 0; + INT32U newVersion = 1; + } + + request struct NotifyUpdateAppliedRequest { + OCTET_STRING updateToken = 0; + INT32U softwareVersion = 1; + } + + request struct QueryImageRequest { + vendor_id vendorId = 0; + INT16U productId = 1; + INT32U softwareVersion = 2; + OTADownloadProtocol protocolsSupported[] = 3; + optional INT16U hardwareVersion = 4; + optional CHAR_STRING location = 5; + optional BOOLEAN requestorCanConsent = 6; + optional OCTET_STRING metadataForProvider = 7; + } + + response struct ApplyUpdateResponse { + OTAApplyUpdateAction action = 0; + INT32U delayedActionTime = 1; + } + + response struct QueryImageResponse { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING softwareVersionString = 4; + optional OCTET_STRING updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING metadataForRequestor = 7; + } + + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; + command QueryImage(QueryImageRequest): QueryImageResponse = 0; +} + +server cluster OccupancySensing = 1030 { + attribute(readonly, reportable) bitmap8 occupancy = 0; + attribute(readonly, reportable) enum8 occupancySensorType = 1; + attribute(readonly, reportable) bitmap8 occupancySensorTypeBitmap = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) boolean globalSceneControl = 16384; + attribute(writable, reportable) int16u onTime = 16385; + attribute(writable, reportable) int16u offWaitTime = 16386; + attribute(writable, reportable) enum8 startUpOnOff = 16387; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster PressureMeasurement = 1027 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster RelativeHumidityMeasurement = 1029 { + attribute(readonly, reportable) int16u measuredValue = 0; + attribute(readonly, reportable) int16u minMeasuredValue = 1; + attribute(readonly, reportable) int16u maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Scenes = 5 { + struct SceneExtensionFieldSet { + CLUSTER_ID clusterId = 1; + INT8U length = 2; + INT8U value = 3; + } + + attribute(readonly, reportable) int8u sceneCount = 0; + attribute(readonly, reportable) int8u currentScene = 1; + attribute(readonly, reportable) int16u currentGroup = 2; + attribute(readonly, reportable) boolean sceneValid = 3; + attribute(readonly, reportable) bitmap8 nameSupport = 4; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + CHAR_STRING sceneName = 3; + SceneExtensionFieldSet extensionFieldSets[] = 4; + } + + request struct GetSceneMembershipRequest { + INT16U groupId = 0; + } + + request struct RecallSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + } + + request struct RemoveAllScenesRequest { + INT16U groupId = 0; + } + + request struct RemoveSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct StoreSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct ViewSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + response struct AddSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct GetSceneMembershipResponse { + ENUM8 status = 0; + INT8U capacity = 1; + INT16U groupId = 2; + INT8U sceneCount = 3; + INT8U sceneList[] = 4; + } + + response struct RemoveAllScenesResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct RemoveSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct StoreSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct ViewSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + INT16U transitionTime = 3; + CHAR_STRING sceneName = 4; + SceneExtensionFieldSet extensionFieldSets[] = 5; + } + + command AddScene(AddSceneRequest): AddSceneResponse = 0; + command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + command RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + command RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + command StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Switch = 59 { + info event SwitchLatched = 0 { + INT8U newPosition = 0; + } + + info event InitialPress = 1 { + INT8U newPosition = 0; + } + + info event LongPress = 2 { + INT8U newPosition = 0; + } + + info event ShortRelease = 3 { + INT8U previousPosition = 0; + } + + info event LongRelease = 4 { + INT8U previousPosition = 0; + } + + info event MultiPressOngoing = 5 { + INT8U newPosition = 0; + INT8U currentNumberOfPressesCounted = 1; + } + + info event MultiPressComplete = 6 { + INT8U newPosition = 0; + INT8U totalNumberOfPressesCounted = 1; + } + + attribute(readonly, reportable) int8u numberOfPositions = 0; + attribute(readonly, reportable) int8u currentPosition = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster TargetNavigator = 1285 { + enum StatusEnum : ENUM8 { + kSuccess = 0; + kAppNotAvailable = 1; + kSystemBusy = 2; + } + + struct TargetInfo { + INT8U identifier = 1; + CHAR_STRING name = 2; + } + + attribute(readonly, reportable) TargetInfo targetNavigatorList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct NavigateTargetRequestRequest { + INT8U target = 0; + CHAR_STRING data = 1; + } + + command NavigateTargetRequest(NavigateTargetRequestRequest): NavigateTargetResponse = 0; +} + +server cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster TestCluster = 1295 { + enum SimpleEnum : ENUM8 { + kUnspecified = 0; + kValueA = 1; + kValueB = 2; + kValueC = 3; + } + + struct TestListStructOctet { + INT64U fabricIndex = 1; + OCTET_STRING operationalCert = 2; + } + + info event TestEvent = 1 { + INT8U arg1 = 1; + SimpleEnum arg2 = 2; + BOOLEAN arg3 = 3; + SimpleStruct arg4 = 4; + SimpleStruct arg5[] = 5; + SimpleEnum arg6[] = 6; + } + + attribute(writable, reportable) boolean boolean = 0; + attribute(writable, reportable) bitmap8 bitmap8 = 1; + attribute(writable, reportable) bitmap16 bitmap16 = 2; + attribute(writable, reportable) bitmap32 bitmap32 = 3; + attribute(writable, reportable) bitmap64 bitmap64 = 4; + attribute(writable, reportable) int8u int8u = 5; + attribute(writable, reportable) int16u int16u = 6; + attribute(writable, reportable) int32u int32u = 8; + attribute(writable, reportable) int64u int64u = 12; + attribute(writable, reportable) int8s int8s = 13; + attribute(writable, reportable) int16s int16s = 14; + attribute(writable, reportable) int32s int32s = 16; + attribute(writable, reportable) int64s int64s = 20; + attribute(writable, reportable) enum8 enum8 = 21; + attribute(writable, reportable) enum16 enum16 = 22; + attribute(writable, reportable) octet_string octetString = 25; + attribute(writable, reportable) INT8U listInt8u[] = 26; + attribute(writable, reportable) OCTET_STRING listOctetString[] = 27; + attribute(writable, reportable) TestListStructOctet listStructOctetString[] = 28; + attribute(writable, reportable) long_octet_string longOctetString = 29; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + response struct TestSpecificResponse { + INT8U returnValue = 0; + } + + command Test(): DefaultSuccess = 0; + command TestNotHandled(): DefaultSuccess = 1; + command TestSpecific(): TestSpecificResponse = 2; +} + +server cluster Thermostat = 513 { + enum SetpointAdjustMode : ENUM8 { + kHeatSetpoint = 0; + kCoolSetpoint = 1; + kHeatAndCoolSetpoints = 2; + } + + attribute(readonly, reportable) int16s localTemperature = 0; + attribute(writable, reportable) int16s occupiedCoolingSetpoint = 17; + attribute(writable, reportable) int16s occupiedHeatingSetpoint = 18; + attribute(writable, reportable) enum8 controlSequenceOfOperation = 27; + attribute(writable, reportable) enum8 systemMode = 28; + attribute(readonly, reportable) enum8 startOfWeek = 32; + attribute(readonly, reportable) int8u numberOfWeeklyTransitions = 33; + attribute(readonly, reportable) int8u numberOfDailyTransitions = 34; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + response struct GetWeeklyScheduleResponse { + ENUM8 numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + INT8U payload[] = 3; + } +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WakeOnLan = 1283 { + attribute(readonly, reportable) char_string wakeOnLanMacAddress = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster WindowCovering = 258 { + attribute(readonly, reportable) enum8 type = 0; + attribute(readonly, reportable) int16u currentPositionLift = 3; + attribute(readonly, reportable) int16u currentPositionTilt = 4; + attribute(readonly, reportable) bitmap8 configStatus = 7; + attribute(readonly, reportable) Percent currentPositionLiftPercentage = 8; + attribute(readonly, reportable) Percent currentPositionTiltPercentage = 9; + attribute(readonly, reportable) bitmap8 operationalStatus = 10; + attribute(readonly, reportable) Percent100ths targetPositionLiftPercent100ths = 11; + attribute(readonly, reportable) Percent100ths targetPositionTiltPercent100ths = 12; + attribute(readonly, reportable) enum8 endProductType = 13; + attribute(readonly, reportable) Percent100ths currentPositionLiftPercent100ths = 14; + attribute(readonly, reportable) Percent100ths currentPositionTiltPercent100ths = 15; + attribute(readonly, reportable) int16u installedOpenLimitLift = 16; + attribute(readonly, reportable) int16u installedClosedLimitLift = 17; + attribute(readonly, reportable) int16u installedOpenLimitTilt = 18; + attribute(readonly, reportable) int16u installedClosedLimitTilt = 19; + attribute(writable, reportable) bitmap8 mode = 23; + attribute(readonly, reportable) bitmap16 safetyStatus = 26; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + + +endpoint 0 { +} + +endpoint 1 { +} + +endpoint 2 { +} + diff --git a/zzz_generated/window-app/zap-generated/Clusters.matter b/zzz_generated/window-app/zap-generated/Clusters.matter new file mode 100644 index 00000000000000..03e7017883cf34 --- /dev/null +++ b/zzz_generated/window-app/zap-generated/Clusters.matter @@ -0,0 +1,847 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) char_string manufacturingDate = 11; + attribute(readonly, reportable) char_string partNumber = 12; + attribute(readonly, reportable) long_char_string productURL = 13; + attribute(readonly, reportable) char_string productLabel = 14; + attribute(readonly, reportable) char_string serialNumber = 15; + attribute(writable, reportable) boolean localConfigDisabled = 16; + attribute(readonly, reportable) boolean reachable = 17; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Identify = 3 { + enum IdentifyEffectIdentifier : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum IdentifyEffectVariant : ENUM8 { + kDefault = 0; + } + + enum IdentifyIdentifyType : ENUM8 { + kNone = 0; + kVisibleLight = 1; + kVisibleLED = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute(writable, reportable) int16u identifyTime = 0; + attribute(readonly) enum8 identifyType = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + request struct TriggerEffectRequest { + IdentifyEffectIdentifier effectIdentifier = 0; + IdentifyEffectVariant effectVariant = 1; + } + + response struct IdentifyQueryResponse { + INT16U timeout = 0; + } + + command Identify(IdentifyRequest): DefaultSuccess = 0; + command IdentifyQuery(): IdentifyQueryResponse = 1; + command TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster PowerSource = 47 { + attribute(readonly, reportable) enum8 status = 0; + attribute(readonly, reportable) int8u order = 1; + attribute(readonly, reportable) char_string description = 2; + attribute(readonly, reportable) int32u batteryVoltage = 11; + attribute(readonly, reportable) int8u batteryPercentRemaining = 12; + attribute(readonly, reportable) int32u batteryTimeRemaining = 13; + attribute(readonly, reportable) enum8 batteryChargeLevel = 14; + attribute(readonly, reportable) ENUM8 activeBatteryFaults[] = 18; + attribute(readonly, reportable) enum8 batteryChargeState = 26; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster WindowCovering = 258 { + attribute(readonly, reportable) enum8 type = 0; + attribute(readonly, reportable) int16u currentPositionLift = 3; + attribute(readonly, reportable) int16u currentPositionTilt = 4; + attribute(readonly, reportable) bitmap8 configStatus = 7; + attribute(readonly, reportable) Percent currentPositionLiftPercentage = 8; + attribute(readonly, reportable) Percent currentPositionTiltPercentage = 9; + attribute(readonly, reportable) bitmap8 operationalStatus = 10; + attribute(readonly, reportable) Percent100ths targetPositionLiftPercent100ths = 11; + attribute(readonly, reportable) Percent100ths targetPositionTiltPercent100ths = 12; + attribute(readonly, reportable) enum8 endProductType = 13; + attribute(readonly, reportable) Percent100ths currentPositionLiftPercent100ths = 14; + attribute(readonly, reportable) Percent100ths currentPositionTiltPercent100ths = 15; + attribute(readonly, reportable) int16u installedOpenLimitLift = 16; + attribute(readonly, reportable) int16u installedClosedLimitLift = 17; + attribute(readonly, reportable) int16u installedOpenLimitTilt = 18; + attribute(readonly, reportable) int16u installedClosedLimitTilt = 19; + attribute(writable, reportable) bitmap8 mode = 23; + attribute(readonly, reportable) bitmap16 safetyStatus = 26; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct GoToLiftPercentageRequest { + Percent liftPercentageValue = 0; + Percent100ths liftPercent100thsValue = 1; + } + + request struct GoToLiftValueRequest { + INT16U liftValue = 0; + } + + request struct GoToTiltPercentageRequest { + Percent tiltPercentageValue = 0; + Percent100ths tiltPercent100thsValue = 1; + } + + request struct GoToTiltValueRequest { + INT16U tiltValue = 0; + } + + command DownOrClose(): DefaultSuccess = 1; + command GoToLiftPercentage(GoToLiftPercentageRequest): DefaultSuccess = 5; + command GoToLiftValue(GoToLiftValueRequest): DefaultSuccess = 4; + command GoToTiltPercentage(GoToTiltPercentageRequest): DefaultSuccess = 8; + command GoToTiltValue(GoToTiltValueRequest): DefaultSuccess = 7; + command StopMotion(): DefaultSuccess = 2; + command UpOrOpen(): DefaultSuccess = 0; +} + + +endpoint 0 { +} + +endpoint 1 { +} + +endpoint 2 { +} + From 59e28ede48174a0b6f23709b5559410c486eb24b Mon Sep 17 00:00:00 2001 From: Jean-Francois Penven <67962328+jepenven-silabs@users.noreply.github.com> Date: Fri, 14 Jan 2022 15:58:57 -0500 Subject: [PATCH 024/124] removed hardcoded listening (#13592) --- .../GenericThreadStackManagerImpl_OpenThread_LwIP.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp index 603418cd252ea7..171751d58947e7 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp @@ -261,8 +261,6 @@ void GenericThreadStackManagerImpl_OpenThread_LwIP::UpdateThreadInter it->Release(); } } - - err = transportMgr->MulticastGroupJoinLeave(Transport::PeerAddress::Multicast(0, 1234), true); } #endif // CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_UDP } From 8aca71cc2de04d265fde925396dbb6324c277b1e Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Fri, 14 Jan 2022 15:59:49 -0500 Subject: [PATCH 025/124] Clean-up symettry in SessionManager (#13591) - SessionManager has symetrical processing steps for group and unsecured message, but some side-effects of unicast secure sessions are delegated to SecureMessageCodec that should actually just be encrypt/decrypt logic. - This is needed to assist in having a single point of tracing for incoming/outgoing messages (upcoming PR). Current organization requires putting that logic in several modules due to the side-effects occuring at the wrong layer. Done by this PR: - Hoists those side effects (e.g. updating counter) up from SecureMessageCodec where they do not belong, into SessionManager. - Fix documentation and argument names of SecureMessageCodec that had rotted over many refactors and terminological changes. - Add a bit of processing symmetry in SessionManager Testing done: unit tests pass, integration tests pass --- src/transport/SecureMessageCodec.cpp | 21 +++++------------- src/transport/SecureMessageCodec.h | 32 ++++++++++++++-------------- src/transport/SessionManager.cpp | 23 ++++++++++++++------ 3 files changed, 37 insertions(+), 39 deletions(-) diff --git a/src/transport/SecureMessageCodec.cpp b/src/transport/SecureMessageCodec.cpp index 4664985b1a3960..3fb6775311fd3d 100644 --- a/src/transport/SecureMessageCodec.cpp +++ b/src/transport/SecureMessageCodec.cpp @@ -38,34 +38,24 @@ using System::PacketBufferHandle; namespace SecureMessageCodec { -CHIP_ERROR Encrypt(Transport::SecureSession * state, PayloadHeader & payloadHeader, PacketHeader & packetHeader, - System::PacketBufferHandle & msgBuf, MessageCounter & counter) +CHIP_ERROR Encrypt(Transport::SecureSession * session, PayloadHeader & payloadHeader, PacketHeader & packetHeader, + System::PacketBufferHandle & msgBuf) { VerifyOrReturnError(!msgBuf.IsNull(), CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(!msgBuf->HasChainedBuffer(), CHIP_ERROR_INVALID_MESSAGE_LENGTH); VerifyOrReturnError(msgBuf->TotalLength() <= kMaxAppMessageLen, CHIP_ERROR_MESSAGE_TOO_LONG); - uint32_t messageCounter = counter.Value(); - static_assert(std::is_sameTotalLength()), uint16_t>::value, "Addition to generate payloadLength might overflow"); - packetHeader - .SetMessageCounter(messageCounter) // - .SetSessionId(state->GetPeerSessionId()); - - // TODO set Session Type (Unicast or Group) - // packetHeader.SetSessionType(Header::SessionType::kUnicastSession); - ReturnErrorOnFailure(payloadHeader.EncodeBeforeData(msgBuf)); uint8_t * data = msgBuf->Start(); uint16_t totalLen = msgBuf->TotalLength(); CHIP_TRACE_MESSAGE(payloadHeader, packetHeader, data, totalLen); - MessageAuthenticationCode mac; - ReturnErrorOnFailure(state->EncryptBeforeSend(data, totalLen, data, packetHeader, mac)); + ReturnErrorOnFailure(session->EncryptBeforeSend(data, totalLen, data, packetHeader, mac)); uint16_t taglen = 0; ReturnErrorOnFailure(mac.Encode(packetHeader, &data[totalLen], msgBuf->AvailableDataLength(), &taglen)); @@ -73,11 +63,10 @@ CHIP_ERROR Encrypt(Transport::SecureSession * state, PayloadHeader & payloadHead VerifyOrReturnError(CanCastTo(totalLen + taglen), CHIP_ERROR_INTERNAL); msgBuf->SetDataLength(static_cast(totalLen + taglen)); - ReturnErrorOnFailure(counter.Advance()); return CHIP_NO_ERROR; } -CHIP_ERROR Decrypt(Transport::SecureSession * state, PayloadHeader & payloadHeader, const PacketHeader & packetHeader, +CHIP_ERROR Decrypt(Transport::SecureSession * session, PayloadHeader & payloadHeader, const PacketHeader & packetHeader, System::PacketBufferHandle & msg) { ReturnErrorCodeIf(msg.IsNull(), CHIP_ERROR_INVALID_ARGUMENT); @@ -107,7 +96,7 @@ CHIP_ERROR Decrypt(Transport::SecureSession * state, PayloadHeader & payloadHead msg->SetDataLength(len); uint8_t * plainText = msg->Start(); - ReturnErrorOnFailure(state->DecryptOnReceive(data, len, plainText, packetHeader, mac)); + ReturnErrorOnFailure(session->DecryptOnReceive(data, len, plainText, packetHeader, mac)); ReturnErrorOnFailure(payloadHeader.DecodeAndConsume(msg)); return CHIP_NO_ERROR; diff --git a/src/transport/SecureMessageCodec.h b/src/transport/SecureMessageCodec.h index 455466f374f9ec..2fa0700bb9a101 100644 --- a/src/transport/SecureMessageCodec.h +++ b/src/transport/SecureMessageCodec.h @@ -36,38 +36,38 @@ namespace SecureMessageCodec { /** * @brief * Attach payload header to the message and encrypt the message buffer using - * key from the connection state. + * key from the secure session. * - * @param state The connection state with peer node + * @param session The secure session context with the peer node * @param payloadHeader Reference to the payload header that should be inserted in * the message * @param packetHeader Reference to the packet header that contains unencrypted * portion of the message header * @param msgBuf The message buffer that contains the unencrypted message. If - * the operation is successuful, this buffer will contain the - * encrypted message. - * @param counter The local counter object to be used - * @ return CHIP_ERROR The result of the encode operation + * the operation is successful, this buffer will be mutated to contain + * the encrypted message. + * @return A CHIP_ERROR value consistent with the result of the encryption operation */ -CHIP_ERROR Encrypt(Transport::SecureSession * state, PayloadHeader & payloadHeader, PacketHeader & packetHeader, - System::PacketBufferHandle & msgBuf, MessageCounter & counter); +CHIP_ERROR Encrypt(Transport::SecureSession * session, PayloadHeader & payloadHeader, PacketHeader & packetHeader, + System::PacketBufferHandle & msgBuf); /** * @brief - * Decrypt the message, perform message integrity check, and decode the payload header. + * Decrypt the message, perform message integrity check, and decode the payload header, + * consuming the header from the packet in doing so. * - * @param state The connection state with peer node - * @param payloadHeader Reference to the payload header that should be inserted in - * the message + * @param session The secure session context with the peer node + * @param payloadHeader Reference to the payload header that will be recovered from the message * @param packetHeader Reference to the packet header that contains unencrypted * portion of the message header * @param msgBuf The message buffer that contains the encrypted message. If - * the operation is successuful, this buffer will contain the - * unencrypted message. - * @ return CHIP_ERROR The result of the decode operation + * the operation is successful, this buffer will be mutated to contain + * the decrypted message. + * @return A CHIP_ERROR value consistent with the result of the decryption operation */ -CHIP_ERROR Decrypt(Transport::SecureSession * state, PayloadHeader & payloadHeader, const PacketHeader & packetHeader, +CHIP_ERROR Decrypt(Transport::SecureSession * session, PayloadHeader & payloadHeader, const PacketHeader & packetHeader, System::PacketBufferHandle & msgBuf); + } // namespace SecureMessageCodec } // namespace chip diff --git a/src/transport/SessionManager.cpp b/src/transport/SessionManager.cpp index 29841f0cde4c2e..25a195ff3fca9e 100644 --- a/src/transport/SessionManager.cpp +++ b/src/transport/SessionManager.cpp @@ -150,8 +150,16 @@ CHIP_ERROR SessionManager::PrepareMessage(const SessionHandle & sessionHandle, P { return CHIP_ERROR_NOT_CONNECTED; } + MessageCounter & counter = GetSendCounterForPacket(payloadHeader, *session); - ReturnErrorOnFailure(SecureMessageCodec::Encrypt(session, payloadHeader, packetHeader, message, counter)); + uint32_t messageCounter = counter.Value(); + packetHeader + .SetMessageCounter(messageCounter) // + .SetSessionId(session->GetPeerSessionId()) // + .SetSessionType(Header::SessionType::kUnicastSession); + + ReturnErrorOnFailure(SecureMessageCodec::Encrypt(session, payloadHeader, packetHeader, message)); + ReturnErrorOnFailure(counter.Advance()); #if CHIP_PROGRESS_LOGGING destination = session->GetPeerNodeId(); @@ -420,11 +428,11 @@ void SessionManager::MessageDispatch(const PacketHeader & packetHeader, const Tr } const SessionHandle & session = optionalSession.Value(); + Transport::UnauthenticatedSession * unsecuredSession = session->AsUnauthenticatedSession(); SessionMessageDelegate::DuplicateMessage isDuplicate = SessionMessageDelegate::DuplicateMessage::No; // Verify message counter - CHIP_ERROR err = - session->AsUnauthenticatedSession()->GetPeerMessageCounter().VerifyOrTrustFirst(packetHeader.GetMessageCounter()); + CHIP_ERROR err = unsecuredSession->GetPeerMessageCounter().VerifyOrTrustFirst(packetHeader.GetMessageCounter()); if (err == CHIP_ERROR_DUPLICATE_MESSAGE_RECEIVED) { isDuplicate = SessionMessageDelegate::DuplicateMessage::Yes; @@ -432,7 +440,7 @@ void SessionManager::MessageDispatch(const PacketHeader & packetHeader, const Tr } VerifyOrDie(err == CHIP_NO_ERROR); - session->AsUnauthenticatedSession()->MarkActive(); + unsecuredSession->MarkActive(); PayloadHeader payloadHeader; ReturnOnFailure(payloadHeader.DecodeAndConsume(msg)); @@ -445,11 +453,11 @@ void SessionManager::MessageDispatch(const PacketHeader & packetHeader, const Tr packetHeader.GetMessageCounter(), ChipLogValueExchangeIdFromReceivedHeader(payloadHeader)); } - session->AsUnauthenticatedSession()->GetPeerMessageCounter().Commit(packetHeader.GetMessageCounter()); + unsecuredSession->GetPeerMessageCounter().Commit(packetHeader.GetMessageCounter()); if (mCB != nullptr) { - mCB->OnMessageReceived(packetHeader, payloadHeader, optionalSession.Value(), peerAddress, isDuplicate, std::move(msg)); + mCB->OnMessageReceived(packetHeader, payloadHeader, session, peerAddress, isDuplicate, std::move(msg)); } } @@ -599,10 +607,11 @@ void SessionManager::SecureGroupMessageDispatch(const PacketHeader & packetHeade { Optional session = CreateGroupSession(packetHeader.GetDestinationGroupId().Value()); VerifyOrReturn(session.HasValue(), ChipLogError(Inet, "Error when creating group session handle.")); + Transport::GroupSession * groupSession = session.Value()->AsGroupSession(); mCB->OnMessageReceived(packetHeader, payloadHeader, session.Value(), peerAddress, isDuplicate, std::move(msg)); - RemoveGroupSession(session.Value()->AsGroupSession()); + RemoveGroupSession(groupSession); } } From 69e143814e16fa5f2c7526ab5929ee8b0a445302 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 14 Jan 2022 16:35:38 -0500 Subject: [PATCH 026/124] ZAP regen (#13599) --- zzz_generated/all-clusters-app/zap-generated/Clusters.matter | 1 + zzz_generated/bridge-app/zap-generated/Clusters.matter | 1 + zzz_generated/controller-clusters/zap-generated/Clusters.matter | 1 + zzz_generated/lighting-app/zap-generated/Clusters.matter | 1 + zzz_generated/tv-app/zap-generated/Clusters.matter | 1 + 5 files changed, 5 insertions(+) diff --git a/zzz_generated/all-clusters-app/zap-generated/Clusters.matter b/zzz_generated/all-clusters-app/zap-generated/Clusters.matter index 0de63708b7ad50..6d65f102b01e54 100644 --- a/zzz_generated/all-clusters-app/zap-generated/Clusters.matter +++ b/zzz_generated/all-clusters-app/zap-generated/Clusters.matter @@ -1608,6 +1608,7 @@ server cluster LevelControl = 8 { attribute(writable, reportable) int16u offTransitionTime = 19; attribute(writable, reportable) int8u defaultMoveRate = 20; attribute(writable, reportable) int8u startUpCurrentLevel = 16384; + attribute(readonly) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct MoveRequest { diff --git a/zzz_generated/bridge-app/zap-generated/Clusters.matter b/zzz_generated/bridge-app/zap-generated/Clusters.matter index c67128cbb27093..72cca6fb8b43ce 100644 --- a/zzz_generated/bridge-app/zap-generated/Clusters.matter +++ b/zzz_generated/bridge-app/zap-generated/Clusters.matter @@ -318,6 +318,7 @@ server cluster LevelControl = 8 { attribute(writable, reportable) int16u offTransitionTime = 19; attribute(writable, reportable) int8u defaultMoveRate = 20; attribute(writable, reportable) int8u startUpCurrentLevel = 16384; + attribute(readonly) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct MoveRequest { diff --git a/zzz_generated/controller-clusters/zap-generated/Clusters.matter b/zzz_generated/controller-clusters/zap-generated/Clusters.matter index d36d63d3ac4ad7..02323171533ef5 100644 --- a/zzz_generated/controller-clusters/zap-generated/Clusters.matter +++ b/zzz_generated/controller-clusters/zap-generated/Clusters.matter @@ -1766,6 +1766,7 @@ client cluster LevelControl = 8 { attribute(writable, reportable) int8u defaultMoveRate = 20; attribute(writable, reportable) int8u startUpCurrentLevel = 16384; attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct MoveRequest { diff --git a/zzz_generated/lighting-app/zap-generated/Clusters.matter b/zzz_generated/lighting-app/zap-generated/Clusters.matter index 2e8f0848132f91..461a111a27d381 100644 --- a/zzz_generated/lighting-app/zap-generated/Clusters.matter +++ b/zzz_generated/lighting-app/zap-generated/Clusters.matter @@ -612,6 +612,7 @@ server cluster LevelControl = 8 { attribute(writable, reportable) int16u offTransitionTime = 19; attribute(writable, reportable) int8u defaultMoveRate = 20; attribute(writable, reportable) int8u startUpCurrentLevel = 16384; + attribute(readonly) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct MoveRequest { diff --git a/zzz_generated/tv-app/zap-generated/Clusters.matter b/zzz_generated/tv-app/zap-generated/Clusters.matter index bd3d3daa801c38..922d24260d8f23 100644 --- a/zzz_generated/tv-app/zap-generated/Clusters.matter +++ b/zzz_generated/tv-app/zap-generated/Clusters.matter @@ -820,6 +820,7 @@ server cluster LevelControl = 8 { attribute(writable, reportable) int16u offTransitionTime = 19; attribute(writable, reportable) int8u defaultMoveRate = 20; attribute(writable, reportable) int8u startUpCurrentLevel = 16384; + attribute(readonly) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct MoveRequest { From 572552c057340922e1639209f702f7de8c989e3a Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 14 Jan 2022 16:45:31 -0500 Subject: [PATCH 027/124] Remove manufacturer code from external attibute APIs. (#13587) Matter manufacturer codes go directly inside ids. --- examples/bridge-app/esp32/main/main.cpp | 7 +++---- examples/bridge-app/linux/main.cpp | 7 +++---- src/app/util/ContentAppPlatform.cpp | 7 +++---- src/app/util/attribute-storage.cpp | 14 ++++++-------- .../templates/app/callback-stub-src.zapt | 10 ++++------ src/app/zap-templates/templates/app/callback.zapt | 10 ++++------ .../zap-generated/callback-stub.cpp | 10 ++++------ .../app-common/app-common/zap-generated/callback.h | 13 +++++-------- .../bridge-app/zap-generated/callback-stub.cpp | 10 ++++------ .../zap-generated/callback-stub.cpp | 10 ++++------ .../door-lock-app/zap-generated/callback-stub.cpp | 10 ++++------ .../lighting-app/zap-generated/callback-stub.cpp | 10 ++++------ .../lock-app/zap-generated/callback-stub.cpp | 10 ++++------ .../log-source-app/zap-generated/callback-stub.cpp | 10 ++++------ .../zap-generated/callback-stub.cpp | 10 ++++------ .../zap-generated/callback-stub.cpp | 10 ++++------ .../app1/zap-generated/callback-stub.cpp | 10 ++++------ .../app2/zap-generated/callback-stub.cpp | 10 ++++------ .../pump-app/zap-generated/callback-stub.cpp | 10 ++++------ .../zap-generated/callback-stub.cpp | 10 ++++------ .../zap-generated/callback-stub.cpp | 10 ++++------ .../thermostat/zap-generated/callback-stub.cpp | 10 ++++------ .../tv-app/zap-generated/callback-stub.cpp | 10 ++++------ .../tv-casting-app/zap-generated/callback-stub.cpp | 10 ++++------ .../window-app/zap-generated/callback-stub.cpp | 10 ++++------ 25 files changed, 100 insertions(+), 148 deletions(-) diff --git a/examples/bridge-app/esp32/main/main.cpp b/examples/bridge-app/esp32/main/main.cpp index b80795b56c7821..5139ea438c36d8 100644 --- a/examples/bridge-app/esp32/main/main.cpp +++ b/examples/bridge-app/esp32/main/main.cpp @@ -257,8 +257,8 @@ EmberAfStatus HandleWriteOnOffAttribute(Device * dev, chip::AttributeId attribut } EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer, uint16_t maxReadLength) + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, + uint16_t maxReadLength) { uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); @@ -284,8 +284,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI } EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer) + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) { uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index fa250dc4c276fb..80a0c145b6dabe 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -451,8 +451,8 @@ EmberAfStatus HandleReadSwitchAttribute(DeviceSwitch * dev, chip::AttributeId at } EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer, uint16_t maxReadLength) + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, + uint16_t maxReadLength) { uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); @@ -485,8 +485,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI } EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer) + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) { uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); diff --git a/src/app/util/ContentAppPlatform.cpp b/src/app/util/ContentAppPlatform.cpp index be91bd437438ed..e0a2951e230704 100644 --- a/src/app/util/ContentAppPlatform.cpp +++ b/src/app/util/ContentAppPlatform.cpp @@ -43,8 +43,8 @@ using namespace chip::AppPlatform; #define DEVICE_VERSION_DEFAULT 1 EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer, uint16_t maxReadLength) + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, + uint16_t maxReadLength) { uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); @@ -62,8 +62,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI } EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer) + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) { uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 03adecffaa4d58..07b6cc9714fdfa 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -548,7 +548,7 @@ EmberAfStatus emAfReadOrWriteAttribute(EmberAfAttributeSearchRecord * attRecord, src = buffer; dst = attributeLocation; if (!emberAfAttributeWriteAccessCallback(attRecord->endpoint, attRecord->clusterId, - EMBER_AF_NULL_MANUFACTURER_CODE, am->attributeId)) + am->attributeId)) { return EMBER_ZCL_STATUS_NOT_AUTHORIZED; } @@ -563,7 +563,7 @@ EmberAfStatus emAfReadOrWriteAttribute(EmberAfAttributeSearchRecord * attRecord, src = attributeLocation; dst = buffer; if (!emberAfAttributeReadAccessCallback(attRecord->endpoint, attRecord->clusterId, - EMBER_AF_NULL_MANUFACTURER_CODE, am->attributeId)) + am->attributeId)) { return EMBER_ZCL_STATUS_NOT_AUTHORIZED; } @@ -572,12 +572,10 @@ EmberAfStatus emAfReadOrWriteAttribute(EmberAfAttributeSearchRecord * attRecord, // Is the attribute externally stored? if (am->mask & ATTRIBUTE_MASK_EXTERNAL_STORAGE) { - return (write - ? emberAfExternalAttributeWriteCallback(attRecord->endpoint, attRecord->clusterId, - am, EMBER_AF_NULL_MANUFACTURER_CODE, buffer) - : emberAfExternalAttributeReadCallback(attRecord->endpoint, attRecord->clusterId, - am, EMBER_AF_NULL_MANUFACTURER_CODE, buffer, - emberAfAttributeSize(am))); + return (write ? emberAfExternalAttributeWriteCallback(attRecord->endpoint, attRecord->clusterId, + am, buffer) + : emberAfExternalAttributeReadCallback(attRecord->endpoint, attRecord->clusterId, + am, buffer, emberAfAttributeSize(am))); } else { diff --git a/src/app/zap-templates/templates/app/callback-stub-src.zapt b/src/app/zap-templates/templates/app/callback-stub-src.zapt index 129caa153d22eb..d238f8c092f1be 100644 --- a/src/app/zap-templates/templates/app/callback-stub-src.zapt +++ b/src/app/zap-templates/templates/app/callback-stub-src.zapt @@ -48,15 +48,13 @@ EmberAfAttributeWritePermission __attribute__((weak)) emberAfAllowNetworkWriteAt } bool __attribute__((weak)) emberAfAttributeReadAccessCallback( - EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, - AttributeId attributeId) + EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } bool __attribute__((weak)) emberAfAttributeWriteAccessCallback( - EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, - AttributeId attributeId) + EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -83,7 +81,7 @@ bool __attribute__((weak)) emberAfMessageSentCallback( EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback( EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; @@ -91,7 +89,7 @@ EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback( EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback( EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; diff --git a/src/app/zap-templates/templates/app/callback.zapt b/src/app/zap-templates/templates/app/callback.zapt index 7528d1d4130843..faddc64146d31c 100644 --- a/src/app/zap-templates/templates/app/callback.zapt +++ b/src/app/zap-templates/templates/app/callback.zapt @@ -220,16 +220,14 @@ EmberAfAttributeWritePermission emberAfAllowNetworkWriteAttributeCallback(chip:: * This function is called whenever the Application Framework needs to check * access permission for an attribute read. */ -bool emberAfAttributeReadAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, uint16_t manufacturerCode, - chip::AttributeId attributeId); +bool emberAfAttributeReadAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId); /** @brief Attribute Write Access * * This function is called whenever the Application Framework needs to check * access permission for an attribute write. */ -bool emberAfAttributeWriteAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, uint16_t manufacturerCode, - chip::AttributeId attributeId); +bool emberAfAttributeWriteAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId); /** @brief Default Response * @@ -309,7 +307,7 @@ bool emberAfMessageSentCallback(const chip::MessageSendDestination & destination * application was not able to read the attribute. */ EmberAfStatus emberAfExternalAttributeReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, uint16_t maxReadLength); /** @brief External Attribute Write @@ -353,7 +351,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(chip::EndpointId endpoint, ch * attribute. */ EmberAfStatus emberAfExternalAttributeWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer); /** @brief Get Current Time diff --git a/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp b/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp index 669aad0bc0eb0c..c987dbd3fb4752 100644 --- a/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp @@ -547,14 +547,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -577,14 +575,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } 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 9d208dd4b77cb9..84c3879ff25cca 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -15292,16 +15292,14 @@ EmberAfAttributeWritePermission emberAfAllowNetworkWriteAttributeCallback(chip:: * This function is called whenever the Application Framework needs to check * access permission for an attribute read. */ -bool emberAfAttributeReadAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, uint16_t manufacturerCode, - chip::AttributeId attributeId); +bool emberAfAttributeReadAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId); /** @brief Attribute Write Access * * This function is called whenever the Application Framework needs to check * access permission for an attribute write. */ -bool emberAfAttributeWriteAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, uint16_t manufacturerCode, - chip::AttributeId attributeId); +bool emberAfAttributeWriteAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId); /** @brief Default Response * @@ -15381,8 +15379,8 @@ bool emberAfMessageSentCallback(const chip::MessageSendDestination & destination * application was not able to read the attribute. */ EmberAfStatus emberAfExternalAttributeReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer, uint16_t maxReadLength); + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, + uint16_t maxReadLength); /** @brief External Attribute Write * @@ -15425,8 +15423,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(chip::EndpointId endpoint, ch * attribute. */ EmberAfStatus emberAfExternalAttributeWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer); + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer); /** @brief Get Current Time * diff --git a/zzz_generated/bridge-app/zap-generated/callback-stub.cpp b/zzz_generated/bridge-app/zap-generated/callback-stub.cpp index 80238761f1dba6..995ab3e7539ad5 100644 --- a/zzz_generated/bridge-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/bridge-app/zap-generated/callback-stub.cpp @@ -195,14 +195,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -225,14 +223,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp index 614b3f60bbfb8e..cb7d93c74cd4c2 100644 --- a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp +++ b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp @@ -539,14 +539,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -569,14 +567,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp b/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp index c017282ef1cbe1..4008ea8f60a45d 100644 --- a/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp @@ -195,14 +195,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -225,14 +223,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/lighting-app/zap-generated/callback-stub.cpp b/zzz_generated/lighting-app/zap-generated/callback-stub.cpp index 174b1ba630740f..b5882f6177bf89 100644 --- a/zzz_generated/lighting-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/lighting-app/zap-generated/callback-stub.cpp @@ -243,14 +243,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -273,14 +271,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/lock-app/zap-generated/callback-stub.cpp b/zzz_generated/lock-app/zap-generated/callback-stub.cpp index 476be726134688..643af9fcee2b0e 100644 --- a/zzz_generated/lock-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/lock-app/zap-generated/callback-stub.cpp @@ -195,14 +195,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -225,14 +223,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/log-source-app/zap-generated/callback-stub.cpp b/zzz_generated/log-source-app/zap-generated/callback-stub.cpp index b41bc5cc2758f5..b5715093bc6ba3 100644 --- a/zzz_generated/log-source-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/log-source-app/zap-generated/callback-stub.cpp @@ -83,14 +83,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -113,14 +111,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp b/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp index 66285f85447034..da2554c5273ab3 100644 --- a/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp @@ -107,14 +107,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -137,14 +135,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp b/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp index 468a654cb7820f..936be5c8a6c5e9 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp @@ -123,14 +123,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -153,14 +151,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/placeholder/app1/zap-generated/callback-stub.cpp b/zzz_generated/placeholder/app1/zap-generated/callback-stub.cpp index 8f969cda28131c..dee07e598ee4a3 100644 --- a/zzz_generated/placeholder/app1/zap-generated/callback-stub.cpp +++ b/zzz_generated/placeholder/app1/zap-generated/callback-stub.cpp @@ -147,14 +147,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -177,14 +175,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/placeholder/app2/zap-generated/callback-stub.cpp b/zzz_generated/placeholder/app2/zap-generated/callback-stub.cpp index 8f969cda28131c..dee07e598ee4a3 100644 --- a/zzz_generated/placeholder/app2/zap-generated/callback-stub.cpp +++ b/zzz_generated/placeholder/app2/zap-generated/callback-stub.cpp @@ -147,14 +147,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -177,14 +175,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/pump-app/zap-generated/callback-stub.cpp b/zzz_generated/pump-app/zap-generated/callback-stub.cpp index c7b27ef1c08073..2c9b65ab807bcd 100644 --- a/zzz_generated/pump-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/pump-app/zap-generated/callback-stub.cpp @@ -203,14 +203,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -233,14 +231,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp b/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp index ff093a6a8b0735..7617906bec5971 100644 --- a/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp @@ -219,14 +219,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -249,14 +247,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp b/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp index f00da99a372601..3939d48c14ea98 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp @@ -171,14 +171,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -201,14 +199,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/thermostat/zap-generated/callback-stub.cpp b/zzz_generated/thermostat/zap-generated/callback-stub.cpp index 6639804cde08ba..7f9801076b785c 100644 --- a/zzz_generated/thermostat/zap-generated/callback-stub.cpp +++ b/zzz_generated/thermostat/zap-generated/callback-stub.cpp @@ -227,14 +227,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -257,14 +255,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/tv-app/zap-generated/callback-stub.cpp b/zzz_generated/tv-app/zap-generated/callback-stub.cpp index 020e1eb2ea2a00..2df67b3ff06734 100644 --- a/zzz_generated/tv-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/tv-app/zap-generated/callback-stub.cpp @@ -315,14 +315,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -345,14 +343,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp b/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp index 53e5806d7842f2..4ceb25cb3e3425 100644 --- a/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp @@ -443,14 +443,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -473,14 +471,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/window-app/zap-generated/callback-stub.cpp b/zzz_generated/window-app/zap-generated/callback-stub.cpp index 5415ccc97ce01e..5a7ffa28d86d42 100644 --- a/zzz_generated/window-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/window-app/zap-generated/callback-stub.cpp @@ -187,14 +187,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -217,14 +215,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } From a11413e3df07240f52b7fcea8d28a35e41b419e4 Mon Sep 17 00:00:00 2001 From: yunhanw-google Date: Fri, 14 Jan 2022 13:48:18 -0800 Subject: [PATCH 028/124] Document mHoldSync and mHoldReport (#13476) --- src/app/ReadHandler.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/ReadHandler.h b/src/app/ReadHandler.h index df8e1c443ea366..103b20756bc41a 100644 --- a/src/app/ReadHandler.h +++ b/src/app/ReadHandler.h @@ -217,6 +217,10 @@ class ReadHandler : public Messaging::ExchangeDelegate uint16_t mMinIntervalFloorSeconds = 0; uint16_t mMaxIntervalCeilingSeconds = 0; SessionHolder mSessionHandle; + // mHoldReport is used to prevent subscription data delivery while we are + // waiting for the min reporting interval to elapse. If we have to send a + // report immediately due to an urgent event being queued, + // UnblockUrgentEventDelivery can be used to force mHoldReport to false. bool mHoldReport = false; bool mDirty = false; bool mActiveSubscription = false; @@ -226,8 +230,12 @@ class ReadHandler : public Messaging::ExchangeDelegate NodeId mInitiatorNodeId = kUndefinedNodeId; AttributePathExpandIterator mAttributePathExpandIterator = AttributePathExpandIterator(nullptr); bool mIsFabricFiltered = false; - bool mHoldSync = false; - uint32_t mLastWrittenEventsBytes = 0; + // mHoldSync is used to prevent subscription empty report delivery while we + // are waiting for the max reporting interval to elaps. When mHoldSync + // becomes false, we are allowed to send an empty report to keep the + // subscription alive on the client. + bool mHoldSync = false; + uint32_t mLastWrittenEventsBytes = 0; SubjectDescriptor mSubjectDescriptor; // The detailed encoding state for a single attribute, used by list chunking feature. AttributeValueEncoder::AttributeEncodeState mAttributeEncoderState; From 8aee604a4116158265222a4b9960f16c62a87dd7 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 14 Jan 2022 20:57:28 -0500 Subject: [PATCH 029/124] Move IDL files *.matter to reside together with input zap files (#13603) * A first version of regen all which renames matter IDLs to sit along with source zap file * Re-generate zap (which moves Clusters.matter to stay with zap files) --- .../all-clusters-app.matter | 0 .../bridge-common/bridge-app.matter | 0 .../door-lock-common/door-lock-app.matter | 0 .../lighting-common/lighting-app.matter | 0 .../lock-app/lock-common/lock-app.matter | 0 .../log-source-common/log-source-app.matter | 0 .../ota-provider-app.matter | 0 .../ota-requestor-app.matter | 0 .../placeholder/linux/apps/app1/config.matter | 0 .../placeholder/linux/apps/app2/config.matter | 0 .../pump-app/pump-common/pump-app.matter | 0 .../pump-controller-app.matter | 0 .../esp32/main/temperature-measurement.matter | 0 .../thermostat-common/thermostat.matter | 0 .../tv-app/tv-common/tv-app.matter | 0 .../tv-casting-common/tv-casting-app.matter | 0 .../window-app/common/window-app.matter | 0 scripts/tools/zap_regen_all.py | 77 +++++++++++++++---- .../data_model/controller-clusters.matter | 0 19 files changed, 63 insertions(+), 14 deletions(-) rename zzz_generated/all-clusters-app/zap-generated/Clusters.matter => examples/all-clusters-app/all-clusters-common/all-clusters-app.matter (100%) rename zzz_generated/bridge-app/zap-generated/Clusters.matter => examples/bridge-app/bridge-common/bridge-app.matter (100%) rename zzz_generated/door-lock-app/zap-generated/Clusters.matter => examples/door-lock-app/door-lock-common/door-lock-app.matter (100%) rename zzz_generated/lighting-app/zap-generated/Clusters.matter => examples/lighting-app/lighting-common/lighting-app.matter (100%) rename zzz_generated/lock-app/zap-generated/Clusters.matter => examples/lock-app/lock-common/lock-app.matter (100%) rename zzz_generated/log-source-app/zap-generated/Clusters.matter => examples/log-source-app/log-source-common/log-source-app.matter (100%) rename zzz_generated/ota-provider-app/zap-generated/Clusters.matter => examples/ota-provider-app/ota-provider-common/ota-provider-app.matter (100%) rename zzz_generated/ota-requestor-app/zap-generated/Clusters.matter => examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter (100%) rename zzz_generated/placeholder/app1/zap-generated/Clusters.matter => examples/placeholder/linux/apps/app1/config.matter (100%) rename zzz_generated/placeholder/app2/zap-generated/Clusters.matter => examples/placeholder/linux/apps/app2/config.matter (100%) rename zzz_generated/pump-app/zap-generated/Clusters.matter => examples/pump-app/pump-common/pump-app.matter (100%) rename zzz_generated/pump-controller-app/zap-generated/Clusters.matter => examples/pump-controller-app/pump-controller-common/pump-controller-app.matter (100%) rename zzz_generated/temperature-measurement-app/zap-generated/Clusters.matter => examples/temperature-measurement-app/esp32/main/temperature-measurement.matter (100%) rename zzz_generated/thermostat/zap-generated/Clusters.matter => examples/thermostat/thermostat-common/thermostat.matter (100%) rename zzz_generated/tv-app/zap-generated/Clusters.matter => examples/tv-app/tv-common/tv-app.matter (100%) rename zzz_generated/tv-casting-app/zap-generated/Clusters.matter => examples/tv-casting-app/tv-casting-common/tv-casting-app.matter (100%) rename zzz_generated/window-app/zap-generated/Clusters.matter => examples/window-app/common/window-app.matter (100%) rename zzz_generated/controller-clusters/zap-generated/Clusters.matter => src/controller/data_model/controller-clusters.matter (100%) diff --git a/zzz_generated/all-clusters-app/zap-generated/Clusters.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter similarity index 100% rename from zzz_generated/all-clusters-app/zap-generated/Clusters.matter rename to examples/all-clusters-app/all-clusters-common/all-clusters-app.matter diff --git a/zzz_generated/bridge-app/zap-generated/Clusters.matter b/examples/bridge-app/bridge-common/bridge-app.matter similarity index 100% rename from zzz_generated/bridge-app/zap-generated/Clusters.matter rename to examples/bridge-app/bridge-common/bridge-app.matter diff --git a/zzz_generated/door-lock-app/zap-generated/Clusters.matter b/examples/door-lock-app/door-lock-common/door-lock-app.matter similarity index 100% rename from zzz_generated/door-lock-app/zap-generated/Clusters.matter rename to examples/door-lock-app/door-lock-common/door-lock-app.matter diff --git a/zzz_generated/lighting-app/zap-generated/Clusters.matter b/examples/lighting-app/lighting-common/lighting-app.matter similarity index 100% rename from zzz_generated/lighting-app/zap-generated/Clusters.matter rename to examples/lighting-app/lighting-common/lighting-app.matter diff --git a/zzz_generated/lock-app/zap-generated/Clusters.matter b/examples/lock-app/lock-common/lock-app.matter similarity index 100% rename from zzz_generated/lock-app/zap-generated/Clusters.matter rename to examples/lock-app/lock-common/lock-app.matter diff --git a/zzz_generated/log-source-app/zap-generated/Clusters.matter b/examples/log-source-app/log-source-common/log-source-app.matter similarity index 100% rename from zzz_generated/log-source-app/zap-generated/Clusters.matter rename to examples/log-source-app/log-source-common/log-source-app.matter diff --git a/zzz_generated/ota-provider-app/zap-generated/Clusters.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter similarity index 100% rename from zzz_generated/ota-provider-app/zap-generated/Clusters.matter rename to examples/ota-provider-app/ota-provider-common/ota-provider-app.matter diff --git a/zzz_generated/ota-requestor-app/zap-generated/Clusters.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter similarity index 100% rename from zzz_generated/ota-requestor-app/zap-generated/Clusters.matter rename to examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter diff --git a/zzz_generated/placeholder/app1/zap-generated/Clusters.matter b/examples/placeholder/linux/apps/app1/config.matter similarity index 100% rename from zzz_generated/placeholder/app1/zap-generated/Clusters.matter rename to examples/placeholder/linux/apps/app1/config.matter diff --git a/zzz_generated/placeholder/app2/zap-generated/Clusters.matter b/examples/placeholder/linux/apps/app2/config.matter similarity index 100% rename from zzz_generated/placeholder/app2/zap-generated/Clusters.matter rename to examples/placeholder/linux/apps/app2/config.matter diff --git a/zzz_generated/pump-app/zap-generated/Clusters.matter b/examples/pump-app/pump-common/pump-app.matter similarity index 100% rename from zzz_generated/pump-app/zap-generated/Clusters.matter rename to examples/pump-app/pump-common/pump-app.matter diff --git a/zzz_generated/pump-controller-app/zap-generated/Clusters.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter similarity index 100% rename from zzz_generated/pump-controller-app/zap-generated/Clusters.matter rename to examples/pump-controller-app/pump-controller-common/pump-controller-app.matter diff --git a/zzz_generated/temperature-measurement-app/zap-generated/Clusters.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter similarity index 100% rename from zzz_generated/temperature-measurement-app/zap-generated/Clusters.matter rename to examples/temperature-measurement-app/esp32/main/temperature-measurement.matter diff --git a/zzz_generated/thermostat/zap-generated/Clusters.matter b/examples/thermostat/thermostat-common/thermostat.matter similarity index 100% rename from zzz_generated/thermostat/zap-generated/Clusters.matter rename to examples/thermostat/thermostat-common/thermostat.matter diff --git a/zzz_generated/tv-app/zap-generated/Clusters.matter b/examples/tv-app/tv-common/tv-app.matter similarity index 100% rename from zzz_generated/tv-app/zap-generated/Clusters.matter rename to examples/tv-app/tv-common/tv-app.matter diff --git a/zzz_generated/tv-casting-app/zap-generated/Clusters.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter similarity index 100% rename from zzz_generated/tv-casting-app/zap-generated/Clusters.matter rename to examples/tv-casting-app/tv-casting-common/tv-casting-app.matter diff --git a/zzz_generated/window-app/zap-generated/Clusters.matter b/examples/window-app/common/window-app.matter similarity index 100% rename from zzz_generated/window-app/zap-generated/Clusters.matter rename to examples/window-app/common/window-app.matter diff --git a/scripts/tools/zap_regen_all.py b/scripts/tools/zap_regen_all.py index 99b0fafb4f6257..58f73f0d2a8f71 100755 --- a/scripts/tools/zap_regen_all.py +++ b/scripts/tools/zap_regen_all.py @@ -25,6 +25,56 @@ os.path.join(os.path.dirname(__file__), '../..')) +class ZAPGenerateTarget: + def __init__(self, zap_config, template=None, output_dir=None): + self.script = './scripts/tools/zap/generate.py' + self.zap_config = str(zap_config) + self.template = template + + if output_dir: + # make sure we convert any os.PathLike object to string + self.output_dir = str(output_dir) + else: + self.output_dir = None + + def generate(self): + """Runs a ZAP generate command on the configured zap/template/outputs. + """ + cmd = [self.script, self.zap_config] + + if self.template: + cmd.append('-t') + cmd.append(self.template) + + if self.output_dir: + cmd.append('-o') + cmd.append(self.output_dir) + + logging.info("Generating target: %s" % " ".join(cmd)) + subprocess.check_call(cmd) + + def extractAnyGeneratedIDL(self): + """Searches for Clusters.matter in the output directory and if found, + will move it to stay along with the zap file config + """ + if not self.output_dir: + # TODO: where do things get generated if no output dir? + # Assume here that IDL is not generated in such cases + return + + idl_path = os.path.join(self.output_dir, "Clusters.matter") + if not os.path.exists(idl_path): + return + + target_path = self.zap_config.replace(".zap", ".matter") + if not target_path.endswith(".matter"): + # We expect "something.zap" and don't handle corner cases of + # multiple extensions. This is to work with existing codebase only + raise Error("Unexpected input zap file %s" % self.zap_config) + + os.rename(idl_path, target_path) + + def checkPythonVersion(): if sys.version_info[0] < 3: print('Must use Python 3. Current version is ' + @@ -55,8 +105,10 @@ def getGlobalTemplatesTargets(): if not os.path.exists(output_dir): os.makedirs(output_dir) template = 'examples/placeholder/templates/templates.json' - targets.append([str(filepath), '-o', output_dir]) - targets.append([str(filepath), '-o', output_dir, '-t', template]) + + targets.append(ZAPGenerateTarget(filepath, output_dir=output_dir)) + targets.append( + ZAPGenerateTarget(filepath, output_dir=output_dir, template=template)) continue logging.info("Found example %s (via %s)" % @@ -69,13 +121,11 @@ def getGlobalTemplatesTargets(): if not os.path.exists(output_dir): os.makedirs(output_dir) - targets.append([str(filepath), '-o', output_dir]) + targets.append(ZAPGenerateTarget(filepath, output_dir=output_dir)) - targets.extend([ - [ - './src/controller/data_model/controller-clusters.zap', - '-o', - os.path.join('zzz_generated/controller-clusters/zap-generated')]]) + targets.append(ZAPGenerateTarget( + './src/controller/data_model/controller-clusters.zap', + output_dir=os.path.join('zzz_generated/controller-clusters/zap-generated'))) return targets @@ -94,12 +144,12 @@ def getSpecificTemplatesTargets(): } for template, output_dir in templates.items(): - target = [ - 'src/controller/data_model/controller-clusters.zap', '-t', template] + target = ZAPGenerateTarget( + 'src/controller/data_model/controller-clusters.zap', template=template) if output_dir is not None: if not os.path.exists(output_dir): os.makedirs(output_dir) - target.extend(['-o', output_dir]) + target.output_dir = output_dir targets.append(target) @@ -123,9 +173,8 @@ def main(): targets = getTargets() for target in targets: - exec_list = ['./scripts/tools/zap/generate.py'] + target - logging.info("Generating target: %s" % " ".join(exec_list)) - subprocess.check_call(exec_list) + target.generate() + target.extractAnyGeneratedIDL() if __name__ == '__main__': diff --git a/zzz_generated/controller-clusters/zap-generated/Clusters.matter b/src/controller/data_model/controller-clusters.matter similarity index 100% rename from zzz_generated/controller-clusters/zap-generated/Clusters.matter rename to src/controller/data_model/controller-clusters.matter From 3354032894f226a2d30dcf36393135cb6590f2ed Mon Sep 17 00:00:00 2001 From: Martin Turon Date: Fri, 14 Jan 2022 18:29:14 -0800 Subject: [PATCH 030/124] [clean up] Remove unused helper method. (#13597) --- src/app/WriteClient.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/app/WriteClient.h b/src/app/WriteClient.h index 5be883e501bd04..e81e09d422643d 100644 --- a/src/app/WriteClient.h +++ b/src/app/WriteClient.h @@ -115,11 +115,6 @@ class WriteClient : public Messaging::ExchangeDelegate CHIP_ERROR FinishAttribute(); TLV::TLVWriter * GetAttributeDataIBTLVWriter(); - NodeId GetSourceNodeId() const - { - return mpExchangeCtx != nullptr ? mpExchangeCtx->GetSessionHandle()->AsSecureSession()->GetPeerNodeId() : kUndefinedNodeId; - } - private: friend class TestWriteInteraction; friend class InteractionModelEngine; From d25ac4a8fc41bc3861ff8abdfd1861a066515cfc Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Sat, 15 Jan 2022 00:08:44 -0500 Subject: [PATCH 031/124] Replace cluster_attributes with server_cluster_attributes (#13611) --- .../zap-templates/templates/app/MatterIDL.zapt | 4 ++-- src/app/zap-templates/templates/chip/helper.js | 15 --------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/app/zap-templates/templates/app/MatterIDL.zapt b/src/app/zap-templates/templates/app/MatterIDL.zapt index 024d66efd4526b..1d6d49f9025f8b 100644 --- a/src/app/zap-templates/templates/app/MatterIDL.zapt +++ b/src/app/zap-templates/templates/app/MatterIDL.zapt @@ -30,7 +30,7 @@ } {{/zcl_events}} - {{#chip_cluster_attributes}} + {{#chip_server_cluster_attributes}} attribute( {{~#if isWritableAttribute~}} writable @@ -44,7 +44,7 @@ {{~#if isList~}} [] {{~/if}} = {{code}}; - {{/chip_cluster_attributes}} + {{/chip_server_cluster_attributes}} {{#chip_cluster_commands}} {{#if arguments}} diff --git a/src/app/zap-templates/templates/chip/helper.js b/src/app/zap-templates/templates/chip/helper.js index b6f845abaa937e..dbc201a6a76110 100644 --- a/src/app/zap-templates/templates/chip/helper.js +++ b/src/app/zap-templates/templates/chip/helper.js @@ -221,20 +221,6 @@ function chip_cluster_commands(options) return asBlocks.call(this, commands, options); } -/** - * Creates block iterator over the cluster attributes for a given cluster/side. - * - * This function is meant to be used inside a {{#chip_*_clusters}} - * block. It will throw otherwise. - * - * @param {*} options - */ -function chip_cluster_attributes(options) -{ - const attributes = getAttributes.call(this, 'chip_cluster_attributes'); - - return asBlocks.call(this, attributes, options); -} /** * Creates block iterator over the cluster responses for a given cluster/side. * @@ -467,7 +453,6 @@ exports.chip_has_server_clusters = chip_has_server_c exports.chip_cluster_commands = chip_cluster_commands; exports.chip_cluster_command_arguments = chip_cluster_command_arguments; exports.chip_cluster_command_arguments_with_structs_expanded = chip_cluster_command_arguments_with_structs_expanded; -exports.chip_cluster_attributes = chip_cluster_attributes; exports.chip_server_global_responses = chip_server_global_responses; exports.chip_cluster_responses = chip_cluster_responses; exports.chip_cluster_response_arguments = chip_cluster_response_arguments From ff0bc9107ab096283ad87f42d07819990f98aca7 Mon Sep 17 00:00:00 2001 From: Praveen Chandran Date: Sat, 15 Jan 2022 07:01:48 -0800 Subject: [PATCH 032/124] Support persistent storage of WiFi Credentials for Infineon P6 (#13614) --- examples/lighting-app/p6/src/AppTask.cpp | 7 +- examples/lock-app/p6/src/AppTask.cpp | 7 +- src/platform/P6/ConnectivityManagerImpl.cpp | 30 ++--- .../DeviceNetworkProvisioningDelegateImpl.cpp | 11 +- src/platform/P6/P6Config.cpp | 11 +- src/platform/P6/P6Config.h | 4 + src/platform/P6/P6Utils.cpp | 122 +++++++++++++----- src/platform/P6/P6Utils.h | 12 +- 8 files changed, 138 insertions(+), 66 deletions(-) diff --git a/examples/lighting-app/p6/src/AppTask.cpp b/examples/lighting-app/p6/src/AppTask.cpp index ddfba4aba5fa9c..f85a59158e2aa4 100644 --- a/examples/lighting-app/p6/src/AppTask.cpp +++ b/examples/lighting-app/p6/src/AppTask.cpp @@ -164,11 +164,10 @@ void AppTask::AppTaskMain(void * pvParameter) while (true) { - BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, pdMS_TO_TICKS(10)); - while (eventReceived == pdTRUE) + BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, portMAX_DELAY); + if (eventReceived == pdTRUE) { sAppTask.DispatchEvent(&event); - eventReceived = xQueueReceive(sAppEventQueue, &event, 0); } // Collect connectivity and configuration state from the CHIP stack. Because @@ -335,7 +334,7 @@ void AppTask::FunctionHandler(AppEvent * aEvent) // FACTORY_RESET_TRIGGER_TIMEOUT to signal factory reset has been initiated. // To cancel factory reset: release the APP_FUNCTION_BUTTON once all LEDs // start blinking within the FACTORY_RESET_CANCEL_WINDOW_TIMEOUT - if (aEvent->ButtonEvent.Action == APP_BUTTON_PRESSED) + if (aEvent->ButtonEvent.Action == APP_BUTTON_RELEASED) { if (!sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kNoneSelected) { diff --git a/examples/lock-app/p6/src/AppTask.cpp b/examples/lock-app/p6/src/AppTask.cpp index 0729aea5f97816..94ecddb6a8365e 100644 --- a/examples/lock-app/p6/src/AppTask.cpp +++ b/examples/lock-app/p6/src/AppTask.cpp @@ -161,11 +161,10 @@ void AppTask::AppTaskMain(void * pvParameter) while (true) { - BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, pdMS_TO_TICKS(10)); - while (eventReceived == pdTRUE) + BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, portMAX_DELAY); + if (eventReceived == pdTRUE) { sAppTask.DispatchEvent(&event); - eventReceived = xQueueReceive(sAppEventQueue, &event, 0); } // Collect connectivity and configuration state from the CHIP stack. Because // the CHIP event loop is being run in a separate task, the stack must be @@ -334,7 +333,7 @@ void AppTask::FunctionHandler(AppEvent * event) // FACTORY_RESET_TRIGGER_TIMEOUT to signal factory reset has been initiated. // To cancel factory reset: release the APP_FUNCTION_BUTTON once all LEDs // start blinking within the FACTORY_RESET_CANCEL_WINDOW_TIMEOUT - if (event->ButtonEvent.Action == APP_BUTTON_PRESSED) + if (event->ButtonEvent.Action == APP_BUTTON_RELEASED) { if (!sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kNoneSelected) { diff --git a/src/platform/P6/ConnectivityManagerImpl.cpp b/src/platform/P6/ConnectivityManagerImpl.cpp index aed4bb9d679a49..6819e71a76f685 100644 --- a/src/platform/P6/ConnectivityManagerImpl.cpp +++ b/src/platform/P6/ConnectivityManagerImpl.cpp @@ -55,6 +55,11 @@ ConnectivityManagerImpl ConnectivityManagerImpl::sInstance; ConnectivityManager::WiFiStationMode ConnectivityManagerImpl::_GetWiFiStationMode(void) { + uint32_t curWiFiMode; + mWiFiStationMode = (Internal::P6Utils::wifi_get_mode(curWiFiMode) == CHIP_NO_ERROR && + (curWiFiMode == WIFI_MODE_APSTA || curWiFiMode == WIFI_MODE_STA)) + ? kWiFiStationMode_Enabled + : kWiFiStationMode_Disabled; return mWiFiStationMode; } @@ -181,7 +186,6 @@ CHIP_ERROR ConnectivityManagerImpl::_GetAndLogWiFiStatsCounters(void) CHIP_ERROR ConnectivityManagerImpl::_Init() { CHIP_ERROR err = CHIP_NO_ERROR; - cy_rslt_t result = CY_RSLT_SUCCESS; mLastStationConnectFailTime = System::Clock::kZero; mLastAPDemandTime = System::Clock::kZero; mWiFiStationMode = kWiFiStationMode_Disabled; @@ -208,13 +212,8 @@ CHIP_ERROR ConnectivityManagerImpl::_Init() memcpy(wifiConfig.sta.password, CHIP_DEVICE_CONFIG_DEFAULT_STA_PASSWORD, min(strlen(CHIP_DEVICE_CONFIG_DEFAULT_STA_PASSWORD), sizeof(wifiConfig.sta.password))); wifiConfig.sta.security = CHIP_DEVICE_CONFIG_DEFAULT_STA_SECURITY; - result = Internal::P6Utils::p6_wifi_set_config(WIFI_IF_STA, &wifiConfig); - if (result != CY_RSLT_SUCCESS) - { - ChipLogError(DeviceLayer, "p6_wifi_set_config() failed: %d", (int) result); - SuccessOrExit(CHIP_ERROR_INTERNAL); - } - err = CHIP_NO_ERROR; + err = Internal::P6Utils::p6_wifi_set_config(WIFI_IF_STA, &wifiConfig); + SuccessOrExit(err); } // Force AP mode off for now. err = Internal::P6Utils::SetAPMode(false); @@ -323,7 +322,6 @@ CHIP_ERROR ConnectivityManagerImpl::ConfigureWiFiAP() { CHIP_ERROR err = CHIP_NO_ERROR; wifi_config_t wifiConfig; - cy_rslt_t result = CY_RSLT_SUCCESS; memset(&wifiConfig.ap, 0, sizeof(wifi_config_ap_t)); snprintf((char *) wifiConfig.ap.ssid, sizeof(wifiConfig.ap.ssid), "%s-%04X-%04X", CHIP_DEVICE_CONFIG_WIFI_AP_SSID_PREFIX, @@ -336,13 +334,8 @@ CHIP_ERROR ConnectivityManagerImpl::ConfigureWiFiAP() wifiConfig.ap.ip_settings.gateway = ap_mode_ip_settings.gateway; ChipLogProgress(DeviceLayer, "Configuring WiFi AP: SSID %s, channel %u", wifiConfig.ap.ssid, wifiConfig.ap.channel); - result = Internal::P6Utils::p6_wifi_set_config(WIFI_IF_AP, &wifiConfig); - if (result != CY_RSLT_SUCCESS) - { - ChipLogError(DeviceLayer, "p6_wifi_set_config(WIFI_IF_AP) failed: %d", (int) result); - err = CHIP_ERROR_INTERNAL; - SuccessOrExit(err); - } + err = Internal::P6Utils::p6_wifi_set_config(WIFI_IF_AP, &wifiConfig); + SuccessOrExit(err); err = Internal::P6Utils::p6_start_ap(); if (err != CHIP_NO_ERROR) @@ -478,6 +471,9 @@ void ConnectivityManagerImpl::DriveStationState() CHIP_ERROR err = CHIP_NO_ERROR; bool stationConnected; + // Refresh the current station mode by reading the configuration from storage. + GetWiFiStationMode(); + // If the station interface is NOT under application control... if (mWiFiStationMode != kWiFiStationMode_ApplicationControlled) { @@ -609,6 +605,7 @@ void ConnectivityManagerImpl::UpdateInternetConnectivityState(void) event.Type = DeviceEventType::kInterfaceIpAddressChanged; event.InterfaceIpAddressChanged.Type = InterfaceIpChangeType::kIpV4_Assigned; PlatformMgr().PostEventOrDie(&event); + ChipLogProgress(DeviceLayer, "IPv4 Address Assigned : %s", ip4addr_ntoa(netif_ip4_addr(net_interface))); } // Search among the IPv6 addresses assigned to the interface for a Global Unicast // address (2000::/3) that is in the valid state. If such an address is found... @@ -622,6 +619,7 @@ void ConnectivityManagerImpl::UpdateInternetConnectivityState(void) event.Type = DeviceEventType::kInterfaceIpAddressChanged; event.InterfaceIpAddressChanged.Type = InterfaceIpChangeType::kIpV6_Assigned; PlatformMgr().PostEventOrDie(&event); + ChipLogProgress(DeviceLayer, "IPv6 Address Assigned : %s", ip6addr_ntoa(netif_ip6_addr(net_interface, i))); } } } diff --git a/src/platform/P6/DeviceNetworkProvisioningDelegateImpl.cpp b/src/platform/P6/DeviceNetworkProvisioningDelegateImpl.cpp index 23c1d01f1a5f08..08f8593072584d 100644 --- a/src/platform/P6/DeviceNetworkProvisioningDelegateImpl.cpp +++ b/src/platform/P6/DeviceNetworkProvisioningDelegateImpl.cpp @@ -27,7 +27,6 @@ namespace DeviceLayer { CHIP_ERROR DeviceNetworkProvisioningDelegateImpl::_ProvisionWiFiNetwork(const char * ssid, const char * passwd) { CHIP_ERROR err = CHIP_NO_ERROR; - cy_rslt_t rslt = CY_RSLT_SUCCESS; ChipLogProgress(NetworkProvisioning, "P6NetworkProvisioningDelegate: SSID: %s", ssid); err = ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Disabled); @@ -36,14 +35,10 @@ CHIP_ERROR DeviceNetworkProvisioningDelegateImpl::_ProvisionWiFiNetwork(const ch // Set the wifi configuration wifi_config_t wifi_config; Internal::P6Utils::populate_wifi_config_t(&wifi_config, WIFI_IF_STA, (const cy_wcm_ssid_t *) ssid, - (const cy_wcm_passphrase_t *) passwd, CHIP_DEVICE_CONFIG_DEFAULT_STA_SECURITY); + (const cy_wcm_passphrase_t *) passwd, + (strlen(passwd)) ? CHIP_DEVICE_CONFIG_DEFAULT_STA_SECURITY : CY_WCM_SECURITY_OPEN); - rslt = Internal::P6Utils::p6_wifi_set_config(WIFI_IF_STA, &wifi_config); - if (rslt != CY_RSLT_SUCCESS) - { - err = CHIP_ERROR_INTERNAL; - ChipLogError(DeviceLayer, "p6_wifi_set_config() failed"); - } + err = Internal::P6Utils::p6_wifi_set_config(WIFI_IF_STA, &wifi_config); SuccessOrExit(err); err = ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Enabled); diff --git a/src/platform/P6/P6Config.cpp b/src/platform/P6/P6Config.cpp index d2ad8c7c4e6416..6cfe10aa2f7ebd 100644 --- a/src/platform/P6/P6Config.cpp +++ b/src/platform/P6/P6Config.cpp @@ -73,6 +73,10 @@ const P6Config::Key P6Config::kConfigKey_ActiveLocale = { kConfigNamespace const P6Config::Key P6Config::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; const P6Config::Key P6Config::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; const P6Config::Key P6Config::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; +const P6Config::Key P6Config::kConfigKey_WiFiSSID = { kConfigNamespace_ChipConfig, "wifi-ssid" }; +const P6Config::Key P6Config::kConfigKey_WiFiPassword = { kConfigNamespace_ChipConfig, "wifi-password" }; +const P6Config::Key P6Config::kConfigKey_WiFiSecurity = { kConfigNamespace_ChipConfig, "wifi-security" }; +const P6Config::Key P6Config::kConfigKey_WiFiMode = { kConfigNamespace_ChipConfig, "wifimode" }; // Keys stored in the Chip-counters namespace const P6Config::Key P6Config::kCounterKey_RebootCount = { kConfigNamespace_ChipCounters, "reboot-count" }; @@ -212,9 +216,10 @@ bool P6Config::ConfigValueExists(Key key) // Clear out keys in config namespace CHIP_ERROR P6Config::FactoryResetConfig(void) { - const Key * config_keys[] = { &kConfigKey_FabricId, &kConfigKey_ServiceConfig, &kConfigKey_PairedAccountId, - &kConfigKey_ServiceId, &kConfigKey_GroupKeyIndex, &kConfigKey_LastUsedEpochKeyId, - &kConfigKey_FailSafeArmed, &kConfigKey_WiFiStationSecType }; + const Key * config_keys[] = { &kConfigKey_FabricId, &kConfigKey_ServiceConfig, &kConfigKey_PairedAccountId, + &kConfigKey_ServiceId, &kConfigKey_GroupKeyIndex, &kConfigKey_LastUsedEpochKeyId, + &kConfigKey_FailSafeArmed, &kConfigKey_WiFiStationSecType, &kConfigKey_WiFiSSID, + &kConfigKey_WiFiPassword, &kConfigKey_WiFiSecurity, &kConfigKey_WiFiMode }; for (uint32_t i = 0; i < (sizeof(config_keys) / sizeof(config_keys[0])); i++) { diff --git a/src/platform/P6/P6Config.h b/src/platform/P6/P6Config.h index 3b9cffcfe96731..b59b57f07dd951 100644 --- a/src/platform/P6/P6Config.h +++ b/src/platform/P6/P6Config.h @@ -78,6 +78,10 @@ class P6Config static const Key kConfigKey_Breadcrumb; static const Key kConfigKey_HourFormat; static const Key kConfigKey_CalendarType; + static const Key kConfigKey_WiFiSSID; + static const Key kConfigKey_WiFiPassword; + static const Key kConfigKey_WiFiSecurity; + static const Key kConfigKey_WiFiMode; // CHIP Counter keys static const Key kCounterKey_RebootCount; diff --git a/src/platform/P6/P6Utils.cpp b/src/platform/P6/P6Utils.cpp index 3e08a3e6becddc..4c38e6d89ac255 100644 --- a/src/platform/P6/P6Utils.cpp +++ b/src/platform/P6/P6Utils.cpp @@ -43,6 +43,7 @@ #include "lwip/sys.h" #include "lwip/timeouts.h" #include +#include using namespace ::chip::DeviceLayer::Internal; using chip::DeviceLayer::Internal::DeviceNetworkInfo; @@ -104,8 +105,7 @@ CHIP_ERROR P6Utils::IsAPEnabled(bool & apEnabled) bool P6Utils::IsStationProvisioned(void) { wifi_config_t stationConfig; - return (p6_wifi_get_config(WIFI_IF_STA, &stationConfig) == CY_RSLT_SUCCESS && - strlen((const char *) stationConfig.sta.ssid) != 0); + return (p6_wifi_get_config(WIFI_IF_STA, &stationConfig) == CHIP_NO_ERROR && strlen((const char *) stationConfig.sta.ssid) != 0); } CHIP_ERROR P6Utils::IsStationConnected(bool & connected) @@ -153,6 +153,7 @@ CHIP_ERROR P6Utils::EnableStationMode(void) { WiFiMode = WIFI_MODE_STA; } + wifi_set_mode(WiFiMode); return err; } @@ -202,12 +203,64 @@ const char * P6Utils::WiFiModeToStr(wifi_mode_t wifiMode) return "(unknown)"; } } -cy_rslt_t P6Utils::p6_wifi_set_config(wifi_interface_t interface, wifi_config_t * conf) + +CHIP_ERROR P6Utils::GetWiFiSSID(char * buf, size_t bufSize) +{ + size_t num = 0; + return P6Config::ReadConfigValueStr(P6Config::kConfigKey_WiFiSSID, buf, bufSize, num); +} + +CHIP_ERROR P6Utils::StoreWiFiSSID(char * buf) { + return P6Config::WriteConfigValueStr(P6Config::kConfigKey_WiFiSSID, buf); +} + +CHIP_ERROR P6Utils::GetWiFiPassword(char * buf, size_t bufSize) +{ + size_t num = 0; + return P6Config::ReadConfigValueStr(P6Config::kConfigKey_WiFiPassword, buf, bufSize, num); +} + +CHIP_ERROR P6Utils::StoreWiFiPassword(char * buf) +{ + return P6Config::WriteConfigValueStr(P6Config::kConfigKey_WiFiPassword, buf); +} + +CHIP_ERROR P6Utils::GetWiFiSecurityCode(uint32_t & security) +{ + return P6Config::ReadConfigValue(P6Config::kConfigKey_WiFiSecurity, security); +} + +CHIP_ERROR P6Utils::StoreWiFiSecurityCode(uint32_t security) +{ + return P6Config::WriteConfigValue(P6Config::kConfigKey_WiFiSecurity, security); +} + +CHIP_ERROR P6Utils::wifi_get_mode(uint32_t & mode) +{ + return P6Config::ReadConfigValue(P6Config::kConfigKey_WiFiMode, mode); +} + +CHIP_ERROR P6Utils::wifi_set_mode(uint32_t mode) +{ + return P6Config::WriteConfigValue(P6Config::kConfigKey_WiFiMode, mode); +} + +CHIP_ERROR P6Utils::p6_wifi_set_config(wifi_interface_t interface, wifi_config_t * conf) +{ + CHIP_ERROR err = CHIP_NO_ERROR; if (interface == WIFI_IF_STA) { + /* Store Wi-Fi Configurations in Storage */ + err = StoreWiFiSSID((char *) conf->sta.ssid); + SuccessOrExit(err); + + err = StoreWiFiPassword((char *) conf->sta.password); + SuccessOrExit(err); + + err = StoreWiFiSecurityCode(conf->sta.security); + SuccessOrExit(err); populate_wifi_config_t(&wifi_conf, interface, &conf->sta.ssid, &conf->sta.password, conf->sta.security); - ChipLogProgress(DeviceLayer, "STA %s : [%s] [%s] \r\n", __func__, wifi_conf.sta.ssid, wifi_conf.sta.password); } else { @@ -216,17 +269,37 @@ cy_rslt_t P6Utils::p6_wifi_set_config(wifi_interface_t interface, wifi_config_t wifi_conf.ap.ip_settings.ip_address = conf->ap.ip_settings.ip_address; wifi_conf.ap.ip_settings.netmask = conf->ap.ip_settings.netmask; wifi_conf.ap.ip_settings.gateway = conf->ap.ip_settings.gateway; - ChipLogProgress(DeviceLayer, "AP %s : [%s] [%s] channel %d\r\n", __func__, wifi_conf.ap.ssid, wifi_conf.ap.password, - wifi_conf.ap.channel); } - return CY_RSLT_SUCCESS; + +exit: + return err; } -cy_rslt_t P6Utils::p6_wifi_get_config(wifi_interface_t interface, wifi_config_t * conf) +CHIP_ERROR P6Utils::p6_wifi_get_config(wifi_interface_t interface, wifi_config_t * conf) { + uint32 code = 0; + CHIP_ERROR err = CHIP_NO_ERROR; if (interface == WIFI_IF_STA) { - populate_wifi_config_t(conf, interface, &wifi_conf.sta.ssid, &wifi_conf.sta.password, wifi_conf.sta.security); + if (P6Config::ConfigValueExists(P6Config::kConfigKey_WiFiSSID) && + P6Config::ConfigValueExists(P6Config::kConfigKey_WiFiPassword) && + P6Config::ConfigValueExists(P6Config::kConfigKey_WiFiSecurity)) + { + /* Retrieve Wi-Fi Configurations from Storage */ + err = GetWiFiSSID((char *) conf->sta.ssid, sizeof(conf->sta.ssid)); + SuccessOrExit(err); + + err = GetWiFiPassword((char *) conf->sta.password, sizeof(conf->sta.password)); + SuccessOrExit(err); + + err = GetWiFiSecurityCode(code); + SuccessOrExit(err); + conf->sta.security = static_cast(code); + } + else + { + populate_wifi_config_t(conf, interface, &wifi_conf.sta.ssid, &wifi_conf.sta.password, wifi_conf.sta.security); + } } else { @@ -235,20 +308,19 @@ cy_rslt_t P6Utils::p6_wifi_get_config(wifi_interface_t interface, wifi_config_t conf->ap.ip_settings.ip_address = wifi_conf.ap.ip_settings.ip_address; conf->ap.ip_settings.netmask = wifi_conf.ap.ip_settings.netmask; conf->ap.ip_settings.gateway = wifi_conf.ap.ip_settings.gateway; - ChipLogProgress(DeviceLayer, "AP %s [%s] [%s] channel %d\r\n", __func__, wifi_conf.ap.ssid, wifi_conf.ap.password, - wifi_conf.ap.channel); } - return CY_RSLT_SUCCESS; + +exit: + return err; } CHIP_ERROR P6Utils::GetWiFiStationProvision(Internal::DeviceNetworkInfo & netInfo, bool includeCredentials) { - CHIP_ERROR err = CHIP_NO_ERROR; - cy_rslt_t result = CY_RSLT_SUCCESS; + CHIP_ERROR err = CHIP_NO_ERROR; wifi_config_t stationConfig; - result = p6_wifi_get_config(WIFI_IF_STA, &stationConfig); - VerifyOrExit(result == CY_RSLT_SUCCESS, err = CHIP_ERROR_INTERNAL); + err = p6_wifi_get_config(WIFI_IF_STA, &stationConfig); + SuccessOrExit(err); ChipLogProgress(DeviceLayer, "GetWiFiStationProvision"); VerifyOrExit(strlen((const char *) stationConfig.sta.ssid) != 0, err = CHIP_ERROR_INCORRECT_STATE); @@ -274,8 +346,7 @@ CHIP_ERROR P6Utils::GetWiFiStationProvision(Internal::DeviceNetworkInfo & netInf CHIP_ERROR P6Utils::SetWiFiStationProvision(const Internal::DeviceNetworkInfo & netInfo) { - CHIP_ERROR err = CHIP_NO_ERROR; - cy_rslt_t result = CY_RSLT_SUCCESS; + CHIP_ERROR err = CHIP_NO_ERROR; wifi_config_t wifiConfig; ChipLogProgress(DeviceLayer, "SetWiFiStationProvision"); char wifiSSID[kMaxWiFiSSIDLength + 1]; @@ -301,13 +372,7 @@ CHIP_ERROR P6Utils::SetWiFiStationProvision(const Internal::DeviceNetworkInfo & populate_wifi_config_t(&wifiConfig, WIFI_IF_STA, (cy_wcm_ssid_t *) wifiSSID, (cy_wcm_passphrase_t *) netInfo.WiFiKey); // Configure the P6 WiFi interface. - result = p6_wifi_set_config(WIFI_IF_STA, &wifiConfig); - if (result != CY_RSLT_SUCCESS) - { - ChipLogError(DeviceLayer, "p6_wifi_set_config() failed "); - err = CHIP_ERROR_INTERNAL; - } - SuccessOrExit(err); + ReturnLogErrorOnFailure(p6_wifi_set_config(WIFI_IF_STA, &wifiConfig)); ChipLogProgress(DeviceLayer, "WiFi station provision set (SSID: %s)", netInfo.WiFiSSID); @@ -322,7 +387,7 @@ CHIP_ERROR P6Utils::ClearWiFiStationProvision(void) ChipLogProgress(DeviceLayer, "ClearWiFiStationProvision"); // Clear the P6 WiFi station configuration. memset(&stationConfig.sta, 0, sizeof(stationConfig.sta)); - p6_wifi_set_config(WIFI_IF_STA, &stationConfig); + ReturnLogErrorOnFailure(p6_wifi_set_config(WIFI_IF_STA, &stationConfig)); return err; } @@ -355,8 +420,7 @@ CHIP_ERROR P6Utils::p6_wifi_connect(void) memcpy(&connect_param.ap_credentials.password, &stationConfig.sta.password, strlen((char *) stationConfig.sta.password)); connect_param.ap_credentials.security = stationConfig.sta.security; - ChipLogProgress(DeviceLayer, "p6_wifi_connect ssid %s pass %s sec %d \r\n", connect_param.ap_credentials.SSID, - connect_param.ap_credentials.password, connect_param.ap_credentials.security); + ChipLogProgress(DeviceLayer, "Connecting to AP : [%s] \r\n", connect_param.ap_credentials.SSID); result = cy_wcm_connect_ap(&connect_param, &ip_addr); if (result != CY_RSLT_SUCCESS) @@ -391,7 +455,7 @@ CHIP_ERROR P6Utils::p6_start_ap(void) memcpy(&ap_conf.ip_settings, &stationConfig.ap.ip_settings, sizeof(stationConfig.ap.ip_settings)); ap_conf.ap_credentials.security = stationConfig.ap.security; ap_conf.channel = stationConfig.ap.channel; - ChipLogProgress(DeviceLayer, "p6_start_ap %s %s \r\n", ap_conf.ap_credentials.SSID, ap_conf.ap_credentials.password); + ChipLogProgress(DeviceLayer, "p6_start_ap %s \r\n", ap_conf.ap_credentials.SSID); /* Start AP */ result = cy_wcm_start_ap(&ap_conf); diff --git a/src/platform/P6/P6Utils.h b/src/platform/P6/P6Utils.h index 62afdabdc411ec..411d498e211ea5 100644 --- a/src/platform/P6/P6Utils.h +++ b/src/platform/P6/P6Utils.h @@ -204,8 +204,8 @@ class P6Utils static CHIP_ERROR GetWiFiStationProvision(Internal::DeviceNetworkInfo & netInfo, bool includeCredentials); static CHIP_ERROR SetWiFiStationProvision(const Internal::DeviceNetworkInfo & netInfo); static CHIP_ERROR ClearWiFiStationProvision(void); - static cy_rslt_t p6_wifi_get_config(wifi_interface_t interface, wifi_config_t * conf); - static cy_rslt_t p6_wifi_set_config(wifi_interface_t interface, wifi_config_t * conf); + static CHIP_ERROR p6_wifi_get_config(wifi_interface_t interface, wifi_config_t * conf); + static CHIP_ERROR p6_wifi_set_config(wifi_interface_t interface, wifi_config_t * conf); static CHIP_ERROR p6_wifi_disconnect(void); static CHIP_ERROR p6_wifi_connect(void); static CHIP_ERROR p6_start_ap(void); @@ -218,6 +218,14 @@ class P6Utils static CHIP_ERROR ping_init(void); static void unpack_xtlv_buf(const uint8_t * tlv_buf, uint16_t buflen, wl_cnt_ver_30_t * cnt, wl_cnt_ge40mcst_v1_t * cnt_ge40); static void heap_usage(heap_info_t * heap); + static CHIP_ERROR GetWiFiSSID(char * buf, size_t bufSize); + static CHIP_ERROR StoreWiFiSSID(char * buf); + static CHIP_ERROR GetWiFiPassword(char * buf, size_t bufSize); + static CHIP_ERROR StoreWiFiPassword(char * buf); + static CHIP_ERROR GetWiFiSecurityCode(uint32_t & security); + static CHIP_ERROR StoreWiFiSecurityCode(uint32_t security); + static CHIP_ERROR wifi_get_mode(uint32_t & security); + static CHIP_ERROR wifi_set_mode(uint32_t security); }; } // namespace Internal From fd218ae7f6ccc92c8fcd0d03df39d2ae768b90a1 Mon Sep 17 00:00:00 2001 From: Sergei Lissianoi <54454955+selissia@users.noreply.github.com> Date: Sat, 15 Jan 2022 23:54:45 -0500 Subject: [PATCH 033/124] Increase image write offset counter to 4 bytes (#13616) --- src/platform/EFR32/OTAImageProcessorImpl.cpp | 2 +- src/platform/EFR32/OTAImageProcessorImpl.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/EFR32/OTAImageProcessorImpl.cpp b/src/platform/EFR32/OTAImageProcessorImpl.cpp index 165ccb8b8f3390..d3f2190b588e6d 100644 --- a/src/platform/EFR32/OTAImageProcessorImpl.cpp +++ b/src/platform/EFR32/OTAImageProcessorImpl.cpp @@ -30,7 +30,7 @@ namespace chip { // Define static memebers uint8_t OTAImageProcessorImpl::mSlotId; -uint16_t OTAImageProcessorImpl::mWriteOffset; +uint32_t OTAImageProcessorImpl::mWriteOffset; CHIP_ERROR OTAImageProcessorImpl::PrepareDownload() { diff --git a/src/platform/EFR32/OTAImageProcessorImpl.h b/src/platform/EFR32/OTAImageProcessorImpl.h index 6f60ea0001d8ec..c2318fc6c61525 100644 --- a/src/platform/EFR32/OTAImageProcessorImpl.h +++ b/src/platform/EFR32/OTAImageProcessorImpl.h @@ -55,7 +55,7 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface */ CHIP_ERROR ReleaseBlock(); - static uint16_t mWriteOffset; // End of last written block + static uint32_t mWriteOffset; // End of last written block static uint8_t mSlotId; // Bootloader storage slot MutableByteSpan mBlock; OTADownloader * mDownloader; From e4faade056ad2f27933278657388e0eeb7ad6ec9 Mon Sep 17 00:00:00 2001 From: Carol Yang Date: Mon, 17 Jan 2022 01:04:48 -0800 Subject: [PATCH 034/124] [OTA] Add NotifyUpdateApplied API to OTA Requestor (#13555) - This API should be called after an image has been successfully applied --- .../clusters/ota-provider/ota-provider.cpp | 2 +- .../clusters/ota-requestor/OTARequestor.cpp | 98 ++++++++++++++----- src/app/clusters/ota-requestor/OTARequestor.h | 20 ++++ src/include/platform/OTARequestorDriver.h | 11 ++- src/include/platform/OTARequestorInterface.h | 3 + src/lib/shell/commands/Ota.cpp | 16 +++ src/platform/GenericOTARequestorDriver.cpp | 10 +- src/platform/GenericOTARequestorDriver.h | 5 +- src/platform/Linux/OTAImageProcessorImpl.cpp | 11 +++ src/platform/Linux/OTAImageProcessorImpl.h | 1 + 10 files changed, 143 insertions(+), 34 deletions(-) diff --git a/src/app/clusters/ota-provider/ota-provider.cpp b/src/app/clusters/ota-provider/ota-provider.cpp index bc5b364512fa7d..cbee7aa4ac283b 100644 --- a/src/app/clusters/ota-provider/ota-provider.cpp +++ b/src/app/clusters/ota-provider/ota-provider.cpp @@ -121,7 +121,7 @@ bool emberAfOtaSoftwareUpdateProviderClusterNotifyUpdateAppliedCallback( EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS; OTAProviderDelegate * delegate = GetDelegate(endpoint); - ChipLogDetail(Zcl, "OTA Provider received NotifyUpdateUpplied"); + ChipLogDetail(Zcl, "OTA Provider received NotifyUpdateApplied"); if (SendStatusIfDelegateNull(endpoint)) { diff --git a/src/app/clusters/ota-requestor/OTARequestor.cpp b/src/app/clusters/ota-requestor/OTARequestor.cpp index 1e23db274e6fb6..616e259069ecfc 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.cpp +++ b/src/app/clusters/ota-requestor/OTARequestor.cpp @@ -129,7 +129,7 @@ void OTARequestor::OnQueryImageResponse(void * context, const QueryImageResponse if (err != CHIP_NO_ERROR) { - requestorCore->mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kQuerying, err); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kQuerying, err); return; } @@ -153,7 +153,7 @@ void OTARequestor::OnQueryImageResponse(void * context, const QueryImageResponse SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); break; default: - requestorCore->mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kQuerying, CHIP_ERROR_BAD_REQUEST); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kQuerying, CHIP_ERROR_BAD_REQUEST); SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); break; } @@ -165,7 +165,7 @@ void OTARequestor::OnQueryImageFailure(void * context, EmberAfStatus status) VerifyOrDie(requestorCore != nullptr); ChipLogDetail(SoftwareUpdate, "QueryImage failure response %" PRIu8, status); - requestorCore->mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kQuerying, CHIP_ERROR_BAD_REQUEST); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kQuerying, CHIP_ERROR_BAD_REQUEST); SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); } @@ -198,7 +198,19 @@ void OTARequestor::OnApplyUpdateFailure(void * context, EmberAfStatus status) VerifyOrDie(requestorCore != nullptr); ChipLogDetail(SoftwareUpdate, "ApplyUpdate failure response %" PRIu8, status); - requestorCore->mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kApplying, CHIP_ERROR_BAD_REQUEST); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kApplying, CHIP_ERROR_BAD_REQUEST); + SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); +} + +void OTARequestor::OnNotifyUpdateAppliedResponse(void * context, const app::DataModel::NullObjectType & response) {} + +void OTARequestor::OnNotifyUpdateAppliedFailure(void * context, EmberAfStatus status) +{ + OTARequestor * requestorCore = static_cast(context); + VerifyOrDie(requestorCore != nullptr); + + ChipLogDetail(SoftwareUpdate, "NotifyUpdateApplied failure response %" PRIu8, status); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kNotifying, CHIP_ERROR_BAD_REQUEST); SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); } @@ -287,7 +299,7 @@ void OTARequestor::OnConnected(void * context, OperationalDeviceProxy * devicePr if (err != CHIP_NO_ERROR) { ChipLogError(SoftwareUpdate, "Failed to send QueryImage command: %" CHIP_ERROR_FORMAT, err.Format()); - requestorCore->mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kQuerying, err); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kQuerying, err); return; } @@ -300,7 +312,7 @@ void OTARequestor::OnConnected(void * context, OperationalDeviceProxy * devicePr if (err != CHIP_NO_ERROR) { ChipLogError(SoftwareUpdate, "Failed to start download: %" CHIP_ERROR_FORMAT, err.Format()); - requestorCore->mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kDownloading, err); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kDownloading, err); SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); return; } @@ -314,7 +326,7 @@ void OTARequestor::OnConnected(void * context, OperationalDeviceProxy * devicePr if (err != CHIP_NO_ERROR) { ChipLogError(SoftwareUpdate, "Failed to send ApplyUpdate command: %" CHIP_ERROR_FORMAT, err.Format()); - requestorCore->mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kApplying, err); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kApplying, err); SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); return; } @@ -322,6 +334,20 @@ void OTARequestor::OnConnected(void * context, OperationalDeviceProxy * devicePr SetUpdateStateAttribute(OTAUpdateStateEnum::kApplying); break; } + case kNotifyUpdateApplied: { + CHIP_ERROR err = requestorCore->SendNotifyUpdateAppliedRequest(*deviceProxy); + + if (err != CHIP_NO_ERROR) + { + ChipLogError(SoftwareUpdate, "Failed to send NotifyUpdateApplied command: %" CHIP_ERROR_FORMAT, err.Format()); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kNotifying, err); + SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + return; + } + + SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + break; + } default: break; } @@ -339,13 +365,13 @@ void OTARequestor::OnConnectionFailure(void * context, PeerId peerId, CHIP_ERROR switch (requestorCore->mOnConnectedAction) { case kQueryImage: - requestorCore->mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kQuerying, error); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kQuerying, error); break; case kStartBDX: - requestorCore->mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kDownloading, error); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kDownloading, error); break; case kApplyUpdate: - requestorCore->mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kApplying, error); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kApplying, error); break; default: break; @@ -376,6 +402,11 @@ void OTARequestor::ApplyUpdate() ConnectToProvider(kApplyUpdate); } +void OTARequestor::NotifyUpdateApplied() +{ + ConnectToProvider(kNotifyUpdateApplied); +} + void OTARequestor::OnDownloadStateChanged(OTADownloader::State state) { VerifyOrReturn(mOtaRequestorDriver != nullptr); @@ -386,7 +417,7 @@ void OTARequestor::OnDownloadStateChanged(OTADownloader::State state) mOtaRequestorDriver->UpdateDownloaded(); break; case OTADownloader::State::kIdle: - mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kDownloading, CHIP_ERROR_CONNECTION_ABORTED); + mOtaRequestorDriver->HandleError(UpdateFailureState::kDownloading, CHIP_ERROR_CONNECTION_ABORTED); break; default: break; @@ -398,6 +429,23 @@ void OTARequestor::OnUpdateProgressChanged(uint8_t percent) OtaRequestorServerSetUpdateStateProgress(percent); } +CHIP_ERROR OTARequestor::GenerateUpdateToken() +{ + if (mUpdateToken.empty()) + { + VerifyOrReturnError(mServer != nullptr, CHIP_ERROR_INCORRECT_STATE); + + FabricInfo * fabricInfo = mServer->GetFabricTable().FindFabricWithIndex(mProviderFabricIndex); + VerifyOrReturnError(fabricInfo != nullptr, CHIP_ERROR_INCORRECT_STATE); + + static_assert(sizeof(NodeId) == sizeof(uint64_t), "Unexpected NodeId size"); + Encoding::BigEndian::Put64(mUpdateTokenBuffer, fabricInfo->GetPeerId().GetNodeId()); + mUpdateToken = ByteSpan(mUpdateTokenBuffer, sizeof(NodeId)); + } + + return CHIP_NO_ERROR; +} + CHIP_ERROR OTARequestor::SendQueryImageRequest(OperationalDeviceProxy & deviceProxy) { constexpr OTADownloadProtocol kProtocolsSupported[] = { OTADownloadProtocol::kBDXSynchronous }; @@ -488,19 +536,7 @@ CHIP_ERROR OTARequestor::StartDownload(OperationalDeviceProxy & deviceProxy) CHIP_ERROR OTARequestor::SendApplyUpdateRequest(OperationalDeviceProxy & deviceProxy) { - if (mUpdateToken.empty()) - { - // OTA Requestor shall use its node ID as the update token in case the original update - // token, received in QueryImageResponse, got lost. - VerifyOrReturnError(mServer != nullptr, CHIP_ERROR_INCORRECT_STATE); - - FabricInfo * fabricInfo = mServer->GetFabricTable().FindFabricWithIndex(mProviderFabricIndex); - VerifyOrReturnError(fabricInfo != nullptr, CHIP_ERROR_INCORRECT_STATE); - - static_assert(sizeof(NodeId) == sizeof(uint64_t), "Unexpected NodeId size"); - Encoding::BigEndian::Put64(mUpdateTokenBuffer, fabricInfo->GetPeerId().GetNodeId()); - mUpdateToken = ByteSpan(mUpdateTokenBuffer, sizeof(NodeId)); - } + ReturnErrorOnFailure(GenerateUpdateToken()); ApplyUpdateRequest::Type args; args.updateToken = mUpdateToken; @@ -512,4 +548,18 @@ CHIP_ERROR OTARequestor::SendApplyUpdateRequest(OperationalDeviceProxy & deviceP return cluster.InvokeCommand(args, this, OnApplyUpdateResponse, OnApplyUpdateFailure); } +CHIP_ERROR OTARequestor::SendNotifyUpdateAppliedRequest(OperationalDeviceProxy & deviceProxy) +{ + ReturnErrorOnFailure(GenerateUpdateToken()); + + NotifyUpdateApplied::Type args; + args.updateToken = mUpdateToken; + args.softwareVersion = mUpdateVersion; + + Controller::OtaSoftwareUpdateProviderCluster cluster; + cluster.Associate(&deviceProxy, mProviderEndpointId); + + return cluster.InvokeCommand(args, this, OnNotifyUpdateAppliedResponse, OnNotifyUpdateAppliedFailure); +} + } // namespace chip diff --git a/src/app/clusters/ota-requestor/OTARequestor.h b/src/app/clusters/ota-requestor/OTARequestor.h index ee5184ffaa4d76..fc70e83fab975c 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.h +++ b/src/app/clusters/ota-requestor/OTARequestor.h @@ -43,6 +43,7 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe kQueryImage = 0, kStartBDX, kApplyUpdate, + kNotifyUpdateApplied, }; OTARequestor() : mOnConnectedCallback(OnConnected, this), mOnConnectionFailureCallback(OnConnectionFailure, this) {} @@ -62,6 +63,9 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe // Send ApplyImage void ApplyUpdate() override; + // Send NotifyUpdateApplied + void NotifyUpdateApplied() override; + //////////// BDXDownloader::StateDelegate Implementation /////////////// void OnDownloadStateChanged(OTADownloader::State state) override; void OnUpdateProgressChanged(uint8_t percent) override; @@ -188,6 +192,11 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe chip::BDXDownloader * mDownloader; }; + /** + * Generate an update token using the operational node ID in case of token lost, received in QueryImageResponse + */ + CHIP_ERROR GenerateUpdateToken(); + /** * Send QueryImage request using values matching Basic cluster */ @@ -208,6 +217,11 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe */ CHIP_ERROR SendApplyUpdateRequest(OperationalDeviceProxy & deviceProxy); + /** + * Send NotifyUpdateApplied request + */ + CHIP_ERROR SendNotifyUpdateAppliedRequest(OperationalDeviceProxy & deviceProxy); + /** * Session connection callbacks */ @@ -228,6 +242,12 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe static void OnApplyUpdateResponse(void * context, const ApplyUpdateResponseDecodableType & response); static void OnApplyUpdateFailure(void * context, EmberAfStatus); + /** + * NotifyUpdateApplied callbacks + */ + static void OnNotifyUpdateAppliedResponse(void * context, const app::DataModel::NullObjectType & response); + static void OnNotifyUpdateAppliedFailure(void * context, EmberAfStatus); + OTARequestorDriver * mOtaRequestorDriver = nullptr; NodeId mProviderNodeId = kUndefinedNodeId; FabricIndex mProviderFabricIndex = kUndefinedFabricIndex; diff --git a/src/include/platform/OTARequestorDriver.h b/src/include/platform/OTARequestorDriver.h index 5bfb7be664e645..5a2e2f152c0ead 100644 --- a/src/include/platform/OTARequestorDriver.h +++ b/src/include/platform/OTARequestorDriver.h @@ -40,6 +40,15 @@ struct UpdateDescription ByteSpan metadataForRequestor; }; +enum class UpdateFailureState +{ + kQuerying, + kDownloading, + kApplying, + kNotifying, + kAwaitingNextAction, +}; + enum class UpdateNotFoundReason { Busy, @@ -61,7 +70,7 @@ class OTARequestorDriver virtual uint16_t GetMaxDownloadBlockSize() { return 1024; } /// Called when an error occurs at any OTA requestor operation - virtual void HandleError(app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum state, CHIP_ERROR error) = 0; + virtual void HandleError(UpdateFailureState state, CHIP_ERROR error) = 0; /// Called when the latest query found a software update virtual void UpdateAvailable(const UpdateDescription & update, System::Clock::Seconds32 delay) = 0; diff --git a/src/include/platform/OTARequestorInterface.h b/src/include/platform/OTARequestorInterface.h index b629c67fc85916..7825eb1fde35c8 100644 --- a/src/include/platform/OTARequestorInterface.h +++ b/src/include/platform/OTARequestorInterface.h @@ -64,6 +64,9 @@ class OTARequestorInterface // Send ApplyImage command virtual void ApplyUpdate() = 0; + // Send NotifyUpdateApplied command + virtual void NotifyUpdateApplied() = 0; + // Manually set OTA Provider parameters virtual void TestModeSetProviderParameters(NodeId nodeId, FabricIndex fabIndex, EndpointId endpointId) = 0; }; diff --git a/src/lib/shell/commands/Ota.cpp b/src/lib/shell/commands/Ota.cpp index 3f2067f44e860c..3d0d7ba64338c5 100644 --- a/src/lib/shell/commands/Ota.cpp +++ b/src/lib/shell/commands/Ota.cpp @@ -59,6 +59,20 @@ CHIP_ERROR ApplyImageHandler(int argc, char ** argv) return CHIP_NO_ERROR; } +CHIP_ERROR NotifyImageHandler(int argc, char ** argv) +{ + VerifyOrReturnError(GetRequestorInstance() != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(argc == 3, CHIP_ERROR_INVALID_ARGUMENT); + + const FabricIndex fabricIndex = static_cast(strtoul(argv[0], nullptr, 10)); + const NodeId providerNodeId = static_cast(strtoull(argv[1], nullptr, 10)); + const EndpointId providerEndpointId = static_cast(strtoul(argv[2], nullptr, 10)); + + GetRequestorInstance()->TestModeSetProviderParameters(providerNodeId, fabricIndex, providerEndpointId); + PlatformMgr().ScheduleWork([](intptr_t) { GetRequestorInstance()->NotifyUpdateApplied(); }); + return CHIP_NO_ERROR; +} + CHIP_ERROR OtaHandler(int argc, char ** argv) { if (argc == 0) @@ -85,6 +99,8 @@ void RegisterOtaCommands() { &QueryImageHandler, "query", "Query for a new image. Usage: ota query " }, { &ApplyImageHandler, "apply", "Apply the current update. Usage ota apply " }, + { &NotifyImageHandler, "notify", + "Notify the new image has been applied. Usage: ota notify " }, }; sSubShell.RegisterCommands(subCommands, ArraySize(subCommands)); diff --git a/src/platform/GenericOTARequestorDriver.cpp b/src/platform/GenericOTARequestorDriver.cpp index 5fcacdebe4b184..461696a0168299 100644 --- a/src/platform/GenericOTARequestorDriver.cpp +++ b/src/platform/GenericOTARequestorDriver.cpp @@ -44,7 +44,7 @@ uint16_t GenericOTARequestorDriver::GetMaxDownloadBlockSize() return 1024; } -void GenericOTARequestorDriver::HandleError(OTAUpdateStateEnum state, CHIP_ERROR error) +void GenericOTARequestorDriver::HandleError(UpdateFailureState state, CHIP_ERROR error) { // TODO: Schedule the next QueryImage } @@ -52,7 +52,7 @@ void GenericOTARequestorDriver::HandleError(OTAUpdateStateEnum state, CHIP_ERROR void GenericOTARequestorDriver::UpdateAvailable(const UpdateDescription & update, System::Clock::Seconds32 delay) { VerifyOrDie(mRequestor != nullptr); - ScheduleDelayedAction(OTAUpdateStateEnum::kDelayedOnQuery, delay, + ScheduleDelayedAction(UpdateFailureState::kDownloading, delay, [](System::Layer *, void * context) { ToDriver(context)->mRequestor->DownloadUpdate(); }); } @@ -70,14 +70,14 @@ void GenericOTARequestorDriver::UpdateDownloaded() void GenericOTARequestorDriver::UpdateConfirmed(System::Clock::Seconds32 delay) { VerifyOrDie(mImageProcessor != nullptr); - ScheduleDelayedAction(OTAUpdateStateEnum::kDelayedOnApply, delay, + ScheduleDelayedAction(UpdateFailureState::kApplying, delay, [](System::Layer *, void * context) { ToDriver(context)->mImageProcessor->Apply(); }); } void GenericOTARequestorDriver::UpdateSuspended(System::Clock::Seconds32 delay) { VerifyOrDie(mRequestor != nullptr); - ScheduleDelayedAction(OTAUpdateStateEnum::kDelayedOnApply, delay, + ScheduleDelayedAction(UpdateFailureState::kAwaitingNextAction, delay, [](System::Layer *, void * context) { ToDriver(context)->mRequestor->ApplyUpdate(); }); } @@ -87,7 +87,7 @@ void GenericOTARequestorDriver::UpdateDiscontinued() mImageProcessor->Abort(); } -void GenericOTARequestorDriver::ScheduleDelayedAction(OTAUpdateStateEnum state, System::Clock::Seconds32 delay, +void GenericOTARequestorDriver::ScheduleDelayedAction(UpdateFailureState state, System::Clock::Seconds32 delay, System::TimerCompleteCallback action) { CHIP_ERROR error = SystemLayer().StartTimer(std::chrono::duration_cast(delay), action, this); diff --git a/src/platform/GenericOTARequestorDriver.h b/src/platform/GenericOTARequestorDriver.h index a6533d2fe93cbe..7e9ba69abed85c 100644 --- a/src/platform/GenericOTARequestorDriver.h +++ b/src/platform/GenericOTARequestorDriver.h @@ -45,7 +45,7 @@ class GenericOTARequestorDriver : public OTARequestorDriver bool CanConsent() override; uint16_t GetMaxDownloadBlockSize() override; - void HandleError(app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum state, CHIP_ERROR error) override; + void HandleError(UpdateFailureState state, CHIP_ERROR error) override; void UpdateAvailable(const UpdateDescription & update, System::Clock::Seconds32 delay) override; void UpdateNotFound(UpdateNotFoundReason reason, System::Clock::Seconds32 delay) override; void UpdateDownloaded() override; @@ -54,8 +54,7 @@ class GenericOTARequestorDriver : public OTARequestorDriver void UpdateDiscontinued() override; private: - void ScheduleDelayedAction(app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum state, System::Clock::Seconds32 delay, - System::TimerCompleteCallback action); + void ScheduleDelayedAction(UpdateFailureState state, System::Clock::Seconds32 delay, System::TimerCompleteCallback action); OTARequestorInterface * mRequestor = nullptr; OTAImageProcessorInterface * mImageProcessor = nullptr; diff --git a/src/platform/Linux/OTAImageProcessorImpl.cpp b/src/platform/Linux/OTAImageProcessorImpl.cpp index 14a061484b680e..5c2fa16486ff8c 100644 --- a/src/platform/Linux/OTAImageProcessorImpl.cpp +++ b/src/platform/Linux/OTAImageProcessorImpl.cpp @@ -17,6 +17,7 @@ */ #include +#include #include "OTAImageProcessorImpl.h" @@ -42,6 +43,7 @@ CHIP_ERROR OTAImageProcessorImpl::Finalize() CHIP_ERROR OTAImageProcessorImpl::Apply() { + DeviceLayer::PlatformMgr().ScheduleWork(HandleApply, reinterpret_cast(this)); return CHIP_NO_ERROR; } @@ -121,6 +123,15 @@ void OTAImageProcessorImpl::HandleFinalize(intptr_t context) ChipLogProgress(SoftwareUpdate, "OTA image downloaded to %s", imageProcessor->mParams.imageFile.data()); } +void OTAImageProcessorImpl::HandleApply(intptr_t context) +{ + OTARequestorInterface * requestor = chip::GetRequestorInstance(); + if (requestor != nullptr) + { + requestor->NotifyUpdateApplied(); + } +} + void OTAImageProcessorImpl::HandleAbort(intptr_t context) { auto * imageProcessor = reinterpret_cast(context); diff --git a/src/platform/Linux/OTAImageProcessorImpl.h b/src/platform/Linux/OTAImageProcessorImpl.h index 77a13ca36e890c..c78735485a9a3b 100644 --- a/src/platform/Linux/OTAImageProcessorImpl.h +++ b/src/platform/Linux/OTAImageProcessorImpl.h @@ -42,6 +42,7 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface //////////// Actual handlers for the OTAImageProcessorInterface /////////////// static void HandlePrepareDownload(intptr_t context); static void HandleFinalize(intptr_t context); + static void HandleApply(intptr_t context); static void HandleAbort(intptr_t context); static void HandleProcessBlock(intptr_t context); From de454dbffa7b02623ccd0bb0f93c5ba711f1e83b Mon Sep 17 00:00:00 2001 From: xBill Date: Tue, 18 Jan 2022 00:28:11 +0900 Subject: [PATCH 035/124] fix for esp32c3 after ##12763 (#13619) --- examples/bridge-app/esp32/CMakeLists.txt | 3 +++ examples/ipv6only-app/esp32/CMakeLists.txt | 3 +++ examples/lighting-app/esp32/CMakeLists.txt | 3 +++ examples/lock-app/esp32/CMakeLists.txt | 4 +++- examples/ota-provider-app/esp32/CMakeLists.txt | 3 +++ examples/ota-requestor-app/esp32/CMakeLists.txt | 3 +++ examples/persistent-storage/esp32/CMakeLists.txt | 3 +++ examples/pigweed-app/esp32/CMakeLists.txt | 3 +++ examples/shell/esp32/CMakeLists.txt | 5 ++++- examples/temperature-measurement-app/esp32/CMakeLists.txt | 3 +++ 10 files changed, 31 insertions(+), 2 deletions(-) diff --git a/examples/bridge-app/esp32/CMakeLists.txt b/examples/bridge-app/esp32/CMakeLists.txt index dd174e3e7ec1c8..ba85ac8324d187 100644 --- a/examples/bridge-app/esp32/CMakeLists.txt +++ b/examples/bridge-app/esp32/CMakeLists.txt @@ -27,5 +27,8 @@ set(EXTRA_COMPONENT_DIRS project(chip-bridge-app) idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H;-DCHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT=16" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) +# For the C3, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) flashing_script() diff --git a/examples/ipv6only-app/esp32/CMakeLists.txt b/examples/ipv6only-app/esp32/CMakeLists.txt index 817f75e9e7da9f..db5a44c00c6ad1 100644 --- a/examples/ipv6only-app/esp32/CMakeLists.txt +++ b/examples/ipv6only-app/esp32/CMakeLists.txt @@ -26,6 +26,9 @@ set(EXTRA_COMPONENT_DIRS project(chip-ipv6only-app) idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) +# For the C3, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) get_filename_component(CHIP_ROOT ./third_party/connectedhomeip REALPATH) include(third_party/connectedhomeip/third_party/pigweed/repo/pw_build/pigweed.cmake) diff --git a/examples/lighting-app/esp32/CMakeLists.txt b/examples/lighting-app/esp32/CMakeLists.txt index 3c73988719f27e..22de61188b3741 100644 --- a/examples/lighting-app/esp32/CMakeLists.txt +++ b/examples/lighting-app/esp32/CMakeLists.txt @@ -31,5 +31,8 @@ project(chip-lighting-app) # C++17 is required for RPC build. idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) +# For the C3, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) flashing_script() diff --git a/examples/lock-app/esp32/CMakeLists.txt b/examples/lock-app/esp32/CMakeLists.txt index 794804e12dccff..cc66333a40d22c 100644 --- a/examples/lock-app/esp32/CMakeLists.txt +++ b/examples/lock-app/esp32/CMakeLists.txt @@ -29,6 +29,9 @@ project(chip-lock-app) # C++17 is required for RPC build. idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) +# For the C3, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) if (CONFIG_ENABLE_PW_RPC) get_filename_component(CHIP_ROOT ./third_party/connectedhomeip REALPATH) @@ -48,4 +51,3 @@ set_target_properties(pw_build.cpp17 PROPERTIES INTERFACE_COMPILE_OPTIONS "${_ta endif(CONFIG_ENABLE_PW_RPC) flashing_script() - diff --git a/examples/ota-provider-app/esp32/CMakeLists.txt b/examples/ota-provider-app/esp32/CMakeLists.txt index 07edf22b17cb82..511d3bf006e607 100644 --- a/examples/ota-provider-app/esp32/CMakeLists.txt +++ b/examples/ota-provider-app/esp32/CMakeLists.txt @@ -29,5 +29,8 @@ set(EXTRA_COMPONENT_DIRS project(chip-ota-provider-app) idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) +# For the C3, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) flashing_script() diff --git a/examples/ota-requestor-app/esp32/CMakeLists.txt b/examples/ota-requestor-app/esp32/CMakeLists.txt index 03408d904ae03a..5329989f0dc225 100644 --- a/examples/ota-requestor-app/esp32/CMakeLists.txt +++ b/examples/ota-requestor-app/esp32/CMakeLists.txt @@ -29,5 +29,8 @@ set(EXTRA_COMPONENT_DIRS project(chip-ota-requestor-app) idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) +# For the C3, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) flashing_script() diff --git a/examples/persistent-storage/esp32/CMakeLists.txt b/examples/persistent-storage/esp32/CMakeLists.txt index fb5f8946f15a7e..87a2d5a10342bb 100644 --- a/examples/persistent-storage/esp32/CMakeLists.txt +++ b/examples/persistent-storage/esp32/CMakeLists.txt @@ -26,5 +26,8 @@ set(EXTRA_COMPONENT_DIRS project(chip-persistent-storage) idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) +# For the C3, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) flashing_script() diff --git a/examples/pigweed-app/esp32/CMakeLists.txt b/examples/pigweed-app/esp32/CMakeLists.txt index baeb3a5240ae06..76a867fa539b4e 100644 --- a/examples/pigweed-app/esp32/CMakeLists.txt +++ b/examples/pigweed-app/esp32/CMakeLists.txt @@ -28,6 +28,9 @@ set(EXTRA_COMPONENT_DIRS project(chip-pigweed-app) idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) +# For the C3, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) get_filename_component(CHIP_ROOT ./third_party/connectedhomeip REALPATH) set(PIGWEED_ROOT "${CHIP_ROOT}/third_party/pigweed/repo") diff --git a/examples/shell/esp32/CMakeLists.txt b/examples/shell/esp32/CMakeLists.txt index a65ff36484e12e..cf30fb916714cc 100644 --- a/examples/shell/esp32/CMakeLists.txt +++ b/examples/shell/esp32/CMakeLists.txt @@ -28,5 +28,8 @@ project(chip-shell) idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) -flashing_script() +# For the C3, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) +flashing_script() diff --git a/examples/temperature-measurement-app/esp32/CMakeLists.txt b/examples/temperature-measurement-app/esp32/CMakeLists.txt index 5e40d10a7e2fc5..3bec93f932a9f7 100644 --- a/examples/temperature-measurement-app/esp32/CMakeLists.txt +++ b/examples/temperature-measurement-app/esp32/CMakeLists.txt @@ -35,5 +35,8 @@ set(EXTRA_COMPONENT_DIRS project(chip-temperature-measurement-app) idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) +# For the C3, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) flashing_script() From 9109dff6562d25ccca1f1c697d249d92eac70e54 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 17 Jan 2022 10:57:20 -0500 Subject: [PATCH 036/124] Disable CodeQL until we figure out right timings (#13628) --- .github/workflows/build.yaml | 44 ++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 51da7289a5fe03..68cef7b29446a9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -118,11 +118,11 @@ jobs: uses: actions/checkout@v2 with: submodules: true - - name: Initialize CodeQL - if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} - uses: github/codeql-action/init@v1 - with: - languages: "cpp" + # - name: Initialize CodeQL + # if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} + # uses: github/codeql-action/init@v1 + # with: + # languages: "cpp" - name: Bootstrap timeout-minutes: 10 run: scripts/build/gn_bootstrap.sh @@ -187,15 +187,15 @@ jobs: # - name: Upload Code Coverage # if: ${{ contains('main', env.BUILD_TYPE) }} # run: bash <(curl -s https://codecov.io/bash) - - name: Remove third_party binaries for CodeQL Analysis - run: find out -type d -name "third_party" -exec rm -rf {} + - - name: Remove dbus binaries for CodeQL Analysis - run: find out -type d -name "dbus" -exec rm -rf {} + - - name: Remove nrfxlib binaries for CodeQL Analysis - run: find . -type d -name "nrfxlib" -exec rm -rf {} + - - name: Perform CodeQL Analysis - if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} - uses: github/codeql-action/analyze@v1 + # - name: Remove third_party binaries for CodeQL Analysis + # run: find out -type d -name "third_party" -exec rm -rf {} + + # - name: Remove dbus binaries for CodeQL Analysis + # run: find out -type d -name "dbus" -exec rm -rf {} + + # - name: Remove nrfxlib binaries for CodeQL Analysis + # run: find . -type d -name "nrfxlib" -exec rm -rf {} + + # - name: Perform CodeQL Analysis + # if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} + # uses: github/codeql-action/analyze@v1 build_linux_python_lib: name: Build on Linux (python_lib) timeout-minutes: 60 @@ -249,11 +249,11 @@ jobs: uses: actions/checkout@v2 with: submodules: true - - name: Initialize CodeQL - if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} - uses: github/codeql-action/init@v1 - with: - languages: "cpp" + #- name: Initialize CodeQL + # if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} + # uses: github/codeql-action/init@v1 + # with: + # languages: "cpp" - name: Setup Environment run: brew install openssl pkg-config - name: Try to ensure the directory for diagnostic log collection exists @@ -308,9 +308,9 @@ jobs: with: name: crash-log-darwin path: ~/Library/Logs/DiagnosticReports/ - - name: Perform CodeQL Analysis - if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} - uses: github/codeql-action/analyze@v1 + # - name: Perform CodeQL Analysis + # if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} + # uses: github/codeql-action/analyze@v1 # TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227 # TODO https://github.com/project-chip/connectedhomeip/issues/1512 # - name: Run Code Coverage From 8bdff01e96f12a991676eb9602a92c4ae574b9e1 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 17 Jan 2022 11:20:47 -0500 Subject: [PATCH 037/124] IDL: add information about cluster instantiations on endpoints (#13612) * IDL: output cluster instantiations for each endpoint * Restyle fixes --- .../all-clusters-app.matter | 75 +++++++++++++++++++ .../bridge-common/bridge-app.matter | 20 +++++ .../door-lock-common/door-lock-app.matter | 20 +++++ .../lighting-common/lighting-app.matter | 26 +++++++ examples/lock-app/lock-common/lock-app.matter | 20 +++++ .../log-source-common/log-source-app.matter | 5 ++ .../ota-provider-app.matter | 7 ++ .../ota-requestor-app.matter | 9 +++ .../placeholder/linux/apps/app1/config.matter | 14 ++++ .../placeholder/linux/apps/app2/config.matter | 14 ++++ examples/pump-app/pump-common/pump-app.matter | 23 ++++++ .../pump-controller-app.matter | 22 ++++++ .../esp32/main/temperature-measurement.matter | 16 ++++ .../thermostat-common/thermostat.matter | 25 +++++++ examples/tv-app/tv-common/tv-app.matter | 47 ++++++++++++ .../tv-casting-common/tv-casting-app.matter | 55 ++++++++++++++ examples/window-app/common/window-app.matter | 20 +++++ .../zap-templates/common/ClustersHelper.js | 44 +++++++++-- .../templates/app/MatterIDL.zapt | 8 +- .../zap-templates/templates/chip/helper.js | 14 ++++ .../data_model/controller-clusters.matter | 61 +++++++++++++++ 21 files changed, 537 insertions(+), 8 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 6d65f102b01e54..4814e7bc04dbdb 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 @@ -2999,11 +2999,86 @@ server cluster WindowCovering = 258 { endpoint 0 { + instantiate cluster AccessControl; + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Binding; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster GroupKeyManagement; + instantiate cluster Groups; + instantiate cluster Identify; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OtaSoftwareUpdateRequestor; + instantiate cluster OperationalCredentials; + instantiate cluster PowerSourceConfiguration; + instantiate cluster RelativeHumidityMeasurement; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster AccountLogin; + instantiate cluster ApplicationBasic; + instantiate cluster ApplicationLauncher; + instantiate cluster AudioOutput; + instantiate cluster BarrierControl; + instantiate cluster BinaryInputBasic; + instantiate cluster Binding; + instantiate cluster BooleanState; + instantiate cluster BridgedActions; + instantiate cluster BridgedDeviceBasic; + instantiate cluster Channel; + instantiate cluster ColorControl; + instantiate cluster ContentLauncher; + instantiate cluster Descriptor; + instantiate cluster DoorLock; + instantiate cluster ElectricalMeasurement; + instantiate cluster FixedLabel; + instantiate cluster FlowMeasurement; + instantiate cluster Groups; + instantiate cluster IasZone; + instantiate cluster Identify; + instantiate cluster IlluminanceMeasurement; + instantiate cluster KeypadInput; + instantiate cluster LevelControl; + instantiate cluster LocalizationConfiguration; + instantiate cluster LowPower; + instantiate cluster MediaInput; + instantiate cluster MediaPlayback; + instantiate cluster ModeSelect; + instantiate cluster NetworkCommissioning; + instantiate cluster OccupancySensing; + instantiate cluster OnOff; + instantiate cluster OnOffSwitchConfiguration; + instantiate cluster PowerSource; + instantiate cluster PressureMeasurement; + instantiate cluster PumpConfigurationAndControl; + instantiate cluster RelativeHumidityMeasurement; + instantiate cluster Scenes; + instantiate cluster Switch; + instantiate cluster TargetNavigator; + instantiate cluster TemperatureMeasurement; + instantiate cluster TestCluster; + instantiate cluster Thermostat; + instantiate cluster ThermostatUserInterfaceConfiguration; + instantiate cluster UserLabel; + instantiate cluster WakeOnLan; + instantiate cluster WindowCovering; } endpoint 2 { + instantiate cluster Descriptor; + instantiate cluster Groups; + instantiate cluster OccupancySensing; + instantiate cluster OnOff; } diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 72cca6fb8b43ce..53348e5d62f835 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -895,8 +895,28 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster Descriptor; + instantiate cluster FixedLabel; + instantiate cluster LevelControl; + instantiate cluster OnOff; + instantiate cluster Switch; } diff --git a/examples/door-lock-app/door-lock-common/door-lock-app.matter b/examples/door-lock-app/door-lock-common/door-lock-app.matter index 54a14fed6332a2..d137693236d139 100644 --- a/examples/door-lock-app/door-lock-common/door-lock-app.matter +++ b/examples/door-lock-app/door-lock-common/door-lock-app.matter @@ -1103,8 +1103,28 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster PowerSource; + instantiate cluster PowerSourceConfiguration; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster Descriptor; + instantiate cluster DoorLock; + instantiate cluster PowerSource; } diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 461a111a27d381..51fed51a17869b 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1381,11 +1381,37 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OtaSoftwareUpdateRequestor; + instantiate cluster OperationalCredentials; + instantiate cluster SoftwareDiagnostics; + instantiate cluster Switch; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster ColorControl; + instantiate cluster Descriptor; + instantiate cluster Identify; + instantiate cluster LevelControl; + instantiate cluster OccupancySensing; + instantiate cluster OnOff; } endpoint 2 { + instantiate cluster OnOff; + instantiate cluster OnOffSwitchConfiguration; } diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 61a02536946a64..beb8de0a6679a1 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -799,8 +799,28 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster PowerSource; + instantiate cluster PowerSourceConfiguration; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster Descriptor; + instantiate cluster OnOff; + instantiate cluster PowerSource; } diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index 2ff85bdc39da00..e3ee6a58863a98 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -312,5 +312,10 @@ server cluster OperationalCredentials = 62 { endpoint 0 { + instantiate cluster DiagnosticLogs; + instantiate cluster DiagnosticLogs; + instantiate cluster GeneralCommissioning; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; } 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 6dfbaa9bc6520e..e09ed393b072f5 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 @@ -356,5 +356,12 @@ server cluster UserLabel = 65 { endpoint 0 { + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OperationalCredentials; + instantiate cluster UserLabel; } 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 75059fb5f29a1e..0766042f5b83fb 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 @@ -467,5 +467,14 @@ server cluster UserLabel = 65 { endpoint 0 { + instantiate cluster Basic; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OtaSoftwareUpdateRequestor; + instantiate cluster OperationalCredentials; + instantiate cluster UserLabel; } diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index c41fee332c6dca..2d47e74b46e946 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -710,8 +710,22 @@ server cluster TemperatureMeasurement = 1026 { endpoint 0 { + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster GeneralCommissioning; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster TemperatureMeasurement; + instantiate cluster TemperatureMeasurement; } endpoint 1 { + instantiate cluster Basic; + instantiate cluster ColorControl; + instantiate cluster Groups; + instantiate cluster Identify; + instantiate cluster LevelControl; + instantiate cluster OnOff; + instantiate cluster Scenes; } diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index c41fee332c6dca..2d47e74b46e946 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -710,8 +710,22 @@ server cluster TemperatureMeasurement = 1026 { endpoint 0 { + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster GeneralCommissioning; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster TemperatureMeasurement; + instantiate cluster TemperatureMeasurement; } endpoint 1 { + instantiate cluster Basic; + instantiate cluster ColorControl; + instantiate cluster Groups; + instantiate cluster Identify; + instantiate cluster LevelControl; + instantiate cluster OnOff; + instantiate cluster Scenes; } diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index fe7a71b3c83ec1..36ffee5ef6b96a 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -895,8 +895,31 @@ server cluster UserLabel = 65 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; } endpoint 1 { + instantiate cluster Descriptor; + instantiate cluster FlowMeasurement; + instantiate cluster FlowMeasurement; + instantiate cluster LevelControl; + instantiate cluster OnOff; + instantiate cluster PressureMeasurement; + instantiate cluster PressureMeasurement; + instantiate cluster PumpConfigurationAndControl; + instantiate cluster TemperatureMeasurement; + instantiate cluster TemperatureMeasurement; } 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 487d37b67de362..4cb2a32f5458f2 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 @@ -944,8 +944,30 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LevelControl; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster Descriptor; + instantiate cluster FlowMeasurement; + instantiate cluster OnOff; + instantiate cluster PressureMeasurement; + instantiate cluster PumpConfigurationAndControl; + instantiate cluster TemperatureMeasurement; } diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index fd6cf4bd1894ce..089ceac43d49eb 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -598,8 +598,24 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster SoftwareDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster Descriptor; + instantiate cluster TemperatureMeasurement; } diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 03e8d4678679fe..3698f8ea617aa3 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -1172,8 +1172,33 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Binding; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster GroupKeyManagement; + instantiate cluster Identify; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OperationalCredentials; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster Basic; + instantiate cluster Groups; + instantiate cluster Identify; + instantiate cluster Identify; + instantiate cluster Scenes; + instantiate cluster Thermostat; } diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 922d24260d8f23..dcd7680a42a88e 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -1783,20 +1783,67 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Binding; + instantiate cluster Binding; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster GroupKeyManagement; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OperationalCredentials; + instantiate cluster OperationalCredentials; + instantiate cluster RelativeHumidityMeasurement; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster ApplicationLauncher; + instantiate cluster Channel; + instantiate cluster ContentLauncher; + instantiate cluster Descriptor; + instantiate cluster KeypadInput; + instantiate cluster LowPower; + instantiate cluster MediaInput; + instantiate cluster OnOff; + instantiate cluster TargetNavigator; + instantiate cluster WakeOnLan; } endpoint 2 { + instantiate cluster AudioOutput; + instantiate cluster Descriptor; + instantiate cluster LevelControl; + instantiate cluster OnOff; } endpoint 3 { + instantiate cluster AccountLogin; + instantiate cluster ApplicationBasic; + instantiate cluster ContentLauncher; + instantiate cluster Descriptor; + instantiate cluster MediaPlayback; } endpoint 4 { + instantiate cluster ApplicationBasic; + instantiate cluster ContentLauncher; + instantiate cluster Descriptor; } endpoint 5 { + instantiate cluster ApplicationBasic; + instantiate cluster Descriptor; } 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 09849ef9e8a3bf..0a05c4a5cb976d 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 @@ -2459,11 +2459,66 @@ server cluster WindowCovering = 258 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Binding; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster GroupKeyManagement; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OperationalCredentials; + instantiate cluster RelativeHumidityMeasurement; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster AccountLogin; + instantiate cluster ApplicationBasic; + instantiate cluster ApplicationLauncher; + instantiate cluster AudioOutput; + instantiate cluster BarrierControl; + instantiate cluster BinaryInputBasic; + instantiate cluster Binding; + instantiate cluster BridgedDeviceBasic; + instantiate cluster Channel; + instantiate cluster ColorControl; + instantiate cluster ContentLauncher; + instantiate cluster Descriptor; + instantiate cluster DoorLock; + instantiate cluster FixedLabel; + instantiate cluster FlowMeasurement; + instantiate cluster Groups; + instantiate cluster IasZone; + instantiate cluster Identify; + instantiate cluster KeypadInput; + instantiate cluster LevelControl; + instantiate cluster MediaInput; + instantiate cluster MediaPlayback; + instantiate cluster OnOff; + instantiate cluster PressureMeasurement; + instantiate cluster RelativeHumidityMeasurement; + instantiate cluster Scenes; + instantiate cluster Switch; + instantiate cluster TargetNavigator; + instantiate cluster TemperatureMeasurement; + instantiate cluster TestCluster; + instantiate cluster Thermostat; + instantiate cluster WakeOnLan; + instantiate cluster WindowCovering; } endpoint 2 { + instantiate cluster Descriptor; + instantiate cluster OccupancySensing; + instantiate cluster OnOff; } diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 03e7017883cf34..c24cfbc31c2a4d 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -837,11 +837,31 @@ server cluster WindowCovering = 258 { endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster PowerSource; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; } endpoint 1 { + instantiate cluster Descriptor; + instantiate cluster Identify; + instantiate cluster WindowCovering; } endpoint 2 { + instantiate cluster Descriptor; + instantiate cluster WindowCovering; } diff --git a/src/app/zap-templates/common/ClustersHelper.js b/src/app/zap-templates/common/ClustersHelper.js index 5199808eeba921..ecafa3eb7c3eee 100644 --- a/src/app/zap-templates/common/ClustersHelper.js +++ b/src/app/zap-templates/common/ClustersHelper.js @@ -87,12 +87,39 @@ function loadStructs(packageId) .then(structs => Promise.all(structs.map(struct => loadStructItems.call(this, struct, packageId)))); } -function loadClusters() +/** + * Loads endpoint data, specifically what endpoints are available and what clusters + * are defined within those endpoints. + */ +async function loadEndpoints() { + let result = []; + const { db, sessionId } = this.global; - return queryEndpointType.selectEndpointTypeIds(db, sessionId) - .then(endpointTypes => queryEndpointType.selectAllClustersDetailsFromEndpointTypes(db, endpointTypes)) - .then(clusters => clusters.filter(cluster => cluster.enabled == 1)); + + const endpoints = await queryEndpoint.selectAllEndpoints(db, sessionId); + + // Selection is one by one since existing API does not seem to provide + // linkage between cluster and what endpoint it belongs to. + // + // TODO: there should be a better way + for (const endpoint of endpoints) { + const endpointClusters + = await queryEndpointType.selectAllClustersDetailsFromEndpointTypes(db, [ { endpointTypeId : endpoint.endpointTypeRef } ]); + result.push({...endpoint, clusters : endpointClusters.filter(c => c.enabled == 1) }); + } + + return result; +} + +async function loadClusters() +{ + const { db, sessionId } = this.global; + + const endpointTypes = await queryEndpointType.selectEndpointTypeIds(db, sessionId); + const clusters = await queryEndpointType.selectAllClustersDetailsFromEndpointTypes(db, endpointTypes); + + return clusters.filter(cluster => cluster.enabled == 1); } function loadCommandResponse(command, packageId) @@ -594,6 +621,7 @@ Clusters.init = async function(context) { const promises = [ Promise.all(loadTypes), + loadEndpoints.call(context), loadClusters.call(context), loadCommands.call(context, packageId), loadAttributes.call(context, packageId), @@ -601,8 +629,9 @@ Clusters.init = async function(context) { loadEvents.call(context, packageId), ]; - let [types, clusters, commands, attributes, globalAttributes, events] = await Promise.all(promises); + let [types, endpoints, clusters, commands, attributes, globalAttributes, events] = await Promise.all(promises); + this._endpoints = endpoints; this._clusters = clusters; this._commands = enhancedCommands(commands, types); this._attributes = enhancedAttributes(attributes, globalAttributes, types); @@ -658,6 +687,11 @@ Clusters.getClusters = function() return this.ensureReady().then(() => this._clusters); } +Clusters.getEndPoints = function() +{ + return this.ensureReady().then(() => this._endpoints); +} + Clusters.getCommands = function() { return this.ensureReady().then(() => this._commands.filter(kResponseFilter.bind(null, false))); diff --git a/src/app/zap-templates/templates/app/MatterIDL.zapt b/src/app/zap-templates/templates/app/MatterIDL.zapt index 1d6d49f9025f8b..1407583f775b14 100644 --- a/src/app/zap-templates/templates/app/MatterIDL.zapt +++ b/src/app/zap-templates/templates/app/MatterIDL.zapt @@ -79,9 +79,11 @@ {{/all_user_clusters}} -{{#user_endpoints}} +{{#chip_endpoints}} endpoint {{endpointId}} { - {{!TODO: report device types and cluster instantionation. }} + {{#chip_endpoint_clusters}} + instantiate cluster {{asUpperCamelCase name}}; + {{/chip_endpoint_clusters}} } -{{/user_endpoints}} +{{/chip_endpoints}} diff --git a/src/app/zap-templates/templates/chip/helper.js b/src/app/zap-templates/templates/chip/helper.js index dbc201a6a76110..c7f9ea859b6a02 100644 --- a/src/app/zap-templates/templates/chip/helper.js +++ b/src/app/zap-templates/templates/chip/helper.js @@ -420,6 +420,18 @@ async function chip_shared_structs(options) return templateUtil.collectBlocks(structs, options, this); } +async function chip_endpoints(options) +{ + const endpoints = await ensureClusters(this).getEndPoints(); + return templateUtil.collectBlocks(endpoints, options, this); +} + +async function chip_endpoint_clusters(options) +{ + const clusters = this.clusters; + return templateUtil.collectBlocks(clusters, options, this); +} + /** * Checks whether a type is an enum for purposes of its chipType. That includes * both spec-defined enum types and types that we map to enum types in our code. @@ -461,6 +473,8 @@ exports.chip_server_cluster_attributes = chip_server_clust exports.chip_server_cluster_events = chip_server_cluster_events; exports.chip_server_has_list_attributes = chip_server_has_list_attributes; exports.chip_available_cluster_commands = chip_available_cluster_commands; +exports.chip_endpoints = chip_endpoints; +exports.chip_endpoint_clusters = chip_endpoint_clusters; exports.if_chip_enum = if_chip_enum; exports.if_in_global_responses = if_in_global_responses; exports.chip_cluster_specific_structs = chip_cluster_specific_structs; diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 02323171533ef5..4fed146169f4b1 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3316,5 +3316,66 @@ client cluster WindowCovering = 258 { endpoint 1 { + instantiate cluster AccessControl; + instantiate cluster AccountLogin; + instantiate cluster AdministratorCommissioning; + instantiate cluster ApplicationBasic; + instantiate cluster ApplicationLauncher; + instantiate cluster AudioOutput; + instantiate cluster BarrierControl; + instantiate cluster Basic; + instantiate cluster BinaryInputBasic; + instantiate cluster Binding; + instantiate cluster BooleanState; + instantiate cluster BridgedActions; + instantiate cluster BridgedDeviceBasic; + instantiate cluster Channel; + instantiate cluster ColorControl; + instantiate cluster ContentLauncher; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster DoorLock; + instantiate cluster ElectricalMeasurement; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster FlowMeasurement; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster GroupKeyManagement; + instantiate cluster Groups; + instantiate cluster Identify; + instantiate cluster IlluminanceMeasurement; + instantiate cluster KeypadInput; + instantiate cluster LevelControl; + instantiate cluster LocalizationConfiguration; + instantiate cluster LowPower; + instantiate cluster MediaInput; + instantiate cluster MediaPlayback; + instantiate cluster ModeSelect; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OtaSoftwareUpdateRequestor; + instantiate cluster OccupancySensing; + instantiate cluster OnOff; + instantiate cluster OnOffSwitchConfiguration; + instantiate cluster OperationalCredentials; + instantiate cluster PowerSource; + instantiate cluster PowerSourceConfiguration; + instantiate cluster PressureMeasurement; + instantiate cluster PumpConfigurationAndControl; + instantiate cluster RelativeHumidityMeasurement; + instantiate cluster Scenes; + instantiate cluster SoftwareDiagnostics; + instantiate cluster Switch; + instantiate cluster TargetNavigator; + instantiate cluster TemperatureMeasurement; + instantiate cluster TestCluster; + instantiate cluster Thermostat; + instantiate cluster ThermostatUserInterfaceConfiguration; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WakeOnLan; + instantiate cluster WiFiNetworkDiagnostics; + instantiate cluster WindowCovering; } From 40b407926ab142619cdf557e1180417fcfdf9fa2 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 17 Jan 2022 12:13:37 -0500 Subject: [PATCH 038/124] Disable android studio build (#13631) --- .github/workflows/android.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index 6c06afebdb2897..2737de15bd9bac 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -58,10 +58,10 @@ jobs: run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-{arm,arm64,x64,x86}-chip-*' build" - - name: Build Android Studio build (arm64 only) - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-androidstudio-arm64-chip-tool' build" + # - name: Build Android Studio build (arm64 only) + # run: | + # ./scripts/run_in_build_env.sh \ + # "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-androidstudio-arm64-chip-tool' build" - name: Run Android build rule tests run: | ./scripts/run_in_build_env.sh \ From 3f9352740a968643e02d09be138845b9df1a73ac Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Tue, 18 Jan 2022 00:32:49 +0530 Subject: [PATCH 039/124] [ESP32] Correct Wi-Fi Network Diagnostics data (#13621) Fixed the bssid attribute value, it was reported as zero. Return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE instead of zero for unsupported attributes. --- .../ESP32/DiagnosticDataProviderImpl.cpp | 23 +++++++------------ .../ESP32/DiagnosticDataProviderImpl.h | 2 +- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp index 82396710972711..eb99c5597e8e8d 100644 --- a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp +++ b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp @@ -245,7 +245,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBssId(ByteSpan & BssId) { wifi_ap_record_t ap_info; esp_err_t err; - uint8_t macAddress[kMaxHardwareAddrSize]; + static uint8_t macAddress[kMaxHardwareAddrSize]; err = esp_wifi_sta_get_ap_info(&ap_info); if (err == ESP_OK) @@ -314,44 +314,37 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiRssi(int8_t & rssi) CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBeaconLostCount(uint32_t & beaconLostCount) { - beaconLostCount = 0; - return CHIP_NO_ERROR; + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiCurrentMaxRate(uint64_t & currentMaxRate) { - currentMaxRate = 0; - return CHIP_NO_ERROR; + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketMulticastRxCount(uint32_t & packetMulticastRxCount) { - packetMulticastRxCount = 0; - return CHIP_NO_ERROR; + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketMulticastTxCount(uint32_t & packetMulticastTxCount) { - packetMulticastTxCount = 0; - return CHIP_NO_ERROR; + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketUnicastRxCount(uint32_t & packetUnicastRxCount) { - packetUnicastRxCount = 0; - return CHIP_NO_ERROR; + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketUnicastTxCount(uint32_t & packetUnicastTxCount) { - packetUnicastTxCount = 0; - return CHIP_NO_ERROR; + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiOverrunCount(uint64_t & overrunCount) { - overrunCount = 0; - return CHIP_NO_ERROR; + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } CHIP_ERROR DiagnosticDataProviderImpl::ResetWiFiNetworkDiagnosticsCounts() diff --git a/src/platform/ESP32/DiagnosticDataProviderImpl.h b/src/platform/ESP32/DiagnosticDataProviderImpl.h index 158cf96eae8be7..46257d5ce1a0d6 100644 --- a/src/platform/ESP32/DiagnosticDataProviderImpl.h +++ b/src/platform/ESP32/DiagnosticDataProviderImpl.h @@ -30,7 +30,7 @@ namespace chip { namespace DeviceLayer { /** - * Concrete implementation of the PlatformManager singleton object for Linux platforms. + * Concrete implementation of the PlatformManager singleton object for ESP32 platforms. */ class DiagnosticDataProviderImpl : public DiagnosticDataProvider { From d159b9948e5d445b622c3586162e6e1738774e36 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 17 Jan 2022 14:03:35 -0500 Subject: [PATCH 040/124] Move IDL copy logic into generate.py so we can individually update files (#13626) * Move IDL copy logic into generate.py so we can individually update files * Restyle fixes --- scripts/tools/zap/generate.py | 21 +++++++++++++++++++++ scripts/tools/zap_regen_all.py | 22 ---------------------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/scripts/tools/zap/generate.py b/scripts/tools/zap/generate.py index 2f710cdfa4a5cd..8e393cf968c61c 100755 --- a/scripts/tools/zap/generate.py +++ b/scripts/tools/zap/generate.py @@ -93,12 +93,33 @@ def runArgumentsParser(): return (zap_file, zcl_file, templates_file, output_dir) +def extractGeneratedIdl(output_dir, zap_config_path): + """Find a file Clusters.matter in the output directory and + place it along with the input zap file. + + Intent is to make the "zap content" more humanly understandable. + """ + idl_path = os.path.join(output_dir, "Clusters.matter") + if not os.path.exists(idl_path): + return + + target_path = zap_config_path.replace(".zap", ".matter") + if not target_path.endswith(".matter"): + # We expect "something.zap" and don't handle corner cases of + # multiple extensions. This is to work with existing codebase only + raise Error("Unexpected input zap file %s" % self.zap_config) + + os.rename(idl_path, target_path) + + def runGeneration(zap_file, zcl_file, templates_file, output_dir): generator_dir = getDirPath('third_party/zap/repo') os.chdir(generator_dir) subprocess.check_call(['node', './src-script/zap-generate.js', '-z', zcl_file, '-g', templates_file, '-i', zap_file, '-o', output_dir]) + extractGeneratedIdl(output_dir, zap_file) + def runClangPrettifier(templates_file, output_dir): listOfSupportedFileExtensions = [ diff --git a/scripts/tools/zap_regen_all.py b/scripts/tools/zap_regen_all.py index 58f73f0d2a8f71..eb19dab5089989 100755 --- a/scripts/tools/zap_regen_all.py +++ b/scripts/tools/zap_regen_all.py @@ -53,27 +53,6 @@ def generate(self): logging.info("Generating target: %s" % " ".join(cmd)) subprocess.check_call(cmd) - def extractAnyGeneratedIDL(self): - """Searches for Clusters.matter in the output directory and if found, - will move it to stay along with the zap file config - """ - if not self.output_dir: - # TODO: where do things get generated if no output dir? - # Assume here that IDL is not generated in such cases - return - - idl_path = os.path.join(self.output_dir, "Clusters.matter") - if not os.path.exists(idl_path): - return - - target_path = self.zap_config.replace(".zap", ".matter") - if not target_path.endswith(".matter"): - # We expect "something.zap" and don't handle corner cases of - # multiple extensions. This is to work with existing codebase only - raise Error("Unexpected input zap file %s" % self.zap_config) - - os.rename(idl_path, target_path) - def checkPythonVersion(): if sys.version_info[0] < 3: @@ -174,7 +153,6 @@ def main(): targets = getTargets() for target in targets: target.generate() - target.extractAnyGeneratedIDL() if __name__ == '__main__': From 8952d1c490f5fa13768efe3dd9cebe86d9f8c583 Mon Sep 17 00:00:00 2001 From: Marc Lepage <67919234+mlepage-google@users.noreply.github.com> Date: Mon, 17 Jan 2022 14:05:03 -0500 Subject: [PATCH 041/124] Improve DecodableList when not in list (#13607) * Add support for decoding null valued lists Spec treats empty lists and null valued lists equivalently. However DecodableList expects a container, even if empty, and does not support the case where there is no container (i.e. null valued list). Add support for null valued list (i.e. no container) by handling it as a special case in the Decode function, the DecodableList, and its Iterator. This is done using an "empty" mReader (with container type "not specified") in the "no list" case. * Remove changes to Decode Keep the other changes, and adjust the documentation. --- src/app/data-model/DecodableList.h | 52 +++++++++++++++++++----------- 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/src/app/data-model/DecodableList.h b/src/app/data-model/DecodableList.h index 064a55a0ca6176..4ae9728929dd3a 100644 --- a/src/app/data-model/DecodableList.h +++ b/src/app/data-model/DecodableList.h @@ -32,28 +32,30 @@ namespace DataModel { * This class provides an iteratable decoder of list items within TLV payloads * such that no memory has to be provided ahead of time to store the entirety of the decoded * list contents. - * */ template class DecodableList { public: - DecodableList() - { - // Init to an empty list. - mReader.Init(nullptr, 0); - } + DecodableList() { ClearReader(); } /* * @brief * * This call stores a TLV reader positioned on the list this class is to manage. * - * Specifically, the passed-in TLV reader should be pointing into the list just after + * Specifically, the passed-in reader should be pointing into the list just after * having called `OpenContainer` on the list element. */ void SetReader(const TLV::TLVReader & reader) { mReader = reader; } + /* + * @brief + * + * This call clears the TLV reader managed by this class, so it can be reused. + */ + void ClearReader() { mReader.Init(nullptr, 0); } + class Iterator { public: @@ -61,7 +63,9 @@ class DecodableList * Initialize the iterator with a reference to a reader. * * This reader should be pointing into the list just after - * having called `OpenContainer` on the list element. + * having called `OpenContainer` on the list element, or should + * have a `kTLVType_NotSpecified` container type if there is + * no list. */ Iterator(const TLV::TLVReader & reader) { @@ -77,16 +81,20 @@ class DecodableList * If an element does exist and was successfully decoded, this * shall return true. * - * Otherwise, if the end of list is reached, this call shall return - * false. + * Otherwise, if the end of list is reached, or there was no list, + * this call shall return false. * * If an error was encountered at any point during the iteration or decode, * this shall return false as well. The caller is expected to invoke GetStatus() * to retrieve the status of the operation. - * */ bool Next() { + if (mReader.GetContainerType() == TLV::kTLVType_NotSpecified) + { + return false; + } + if (mStatus == CHIP_NO_ERROR) { mStatus = mReader.Next(); @@ -111,7 +119,6 @@ class DecodableList * * Notably, if the end-of-list was encountered in a previous call to Next, * the status returned shall be CHIP_NO_ERROR. - * */ CHIP_ERROR GetStatus() const { @@ -134,12 +141,24 @@ class DecodableList Iterator begin() const { return Iterator(mReader); } /* - * Compute the size of the list. This can fail if the TLV is malformed. If + * Compute the size of the list. This can fail if the TLV is malformed. If * this succeeds, that does not guarantee that the individual items can be * successfully decoded; consumers should check Iterator::GetStatus() when - * actually decoding them. + * actually decoding them. If there is no list then the size is considered + * to be zero. */ - CHIP_ERROR ComputeSize(size_t * size) const { return mReader.CountRemainingInContainer(size); } + CHIP_ERROR ComputeSize(size_t * size) const + { + if (mReader.GetContainerType() == TLV::kTLVType_NotSpecified) + { + *size = 0; + return CHIP_NO_ERROR; + } + else + { + return mReader.CountRemainingInContainer(size); + } + } private: TLV::TLVReader mReader; @@ -149,13 +168,10 @@ template CHIP_ERROR Decode(TLV::TLVReader & reader, DecodableList & x) { VerifyOrReturnError(reader.GetType() == TLV::kTLVType_Array, CHIP_ERROR_SCHEMA_MISMATCH); - TLV::TLVType type; - ReturnErrorOnFailure(reader.EnterContainer(type)); x.SetReader(reader); ReturnErrorOnFailure(reader.ExitContainer(type)); - return CHIP_NO_ERROR; } From 7b28de4b8f53d06402b921e8a0b28507d942125a Mon Sep 17 00:00:00 2001 From: Praveen Chandran Date: Mon, 17 Jan 2022 12:00:07 -0800 Subject: [PATCH 042/124] Update BLE Service data size for Infineon P6 Platform (#13554) * Update BLE Service data size for Infineon P6 Platform * Add static asset check for ble service data size --- src/platform/P6/BLEManagerImpl.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/platform/P6/BLEManagerImpl.cpp b/src/platform/P6/BLEManagerImpl.cpp index b1211857d88d81..7393472e4ef9f0 100644 --- a/src/platform/P6/BLEManagerImpl.cpp +++ b/src/platform/P6/BLEManagerImpl.cpp @@ -48,6 +48,8 @@ extern "C" { using namespace ::chip; using namespace ::chip::Ble; +#define BLE_SERVICE_DATA_SIZE 10 + namespace chip { namespace DeviceLayer { namespace Internal { @@ -787,9 +789,11 @@ void BLEManagerImpl::SetAdvertisingData(void) ChipBLEDeviceIdentificationInfo mDeviceIdInfo; uint16_t deviceDiscriminator = 0; uint8_t localDeviceNameLen; - uint8_t service_data[9]; + uint8_t service_data[BLE_SERVICE_DATA_SIZE]; uint8_t * p = service_data; + static_assert(BLE_SERVICE_DATA_SIZE == sizeof(ChipBLEDeviceIdentificationInfo) + 2, "BLE Service Data Size is incorrect"); + // Initialize the CHIP BLE Device Identification Information block that will be sent as payload // within the BLE service advertisement data. err = ConfigurationMgr().GetBLEDeviceIdentificationInfo(mDeviceIdInfo); @@ -838,6 +842,7 @@ void BLEManagerImpl::SetAdvertisingData(void) UINT8_TO_STREAM(p, mDeviceIdInfo.DeviceVendorId[1]); UINT8_TO_STREAM(p, mDeviceIdInfo.DeviceProductId[0]); UINT8_TO_STREAM(p, mDeviceIdInfo.DeviceProductId[1]); + UINT8_TO_STREAM(p, 0); // Additional Data Flag adv_elem[num_elem].advert_type = BTM_BLE_ADVERT_TYPE_NAME_COMPLETE; adv_elem[num_elem].len = localDeviceNameLen; From 98201eb70be97bc5625bb05fb048da00ef7072de Mon Sep 17 00:00:00 2001 From: Sharad Binjola <31142146+sharadb-amazon@users.noreply.github.com> Date: Mon, 17 Jan 2022 12:31:04 -0800 Subject: [PATCH 043/124] Adding base build/dir structure for Android port of tv-casting-app (#13559) * Adding base build/dir structure for Android port of tv-casting-app * Including previously dropped files and fix Android build * Adding (forced) gradle-wrapper.jar for the tv-casting-app * Updating Copyright to 2020-2022 --- examples/tv-casting-app/android/.gn | 25 +++ .../tv-casting-app/android/App/.gitignore | 20 ++ .../android/App/.idea/.gitignore | 3 + .../tv-casting-app/android/App/.idea/.name | 1 + .../android/App/.idea/compiler.xml | 6 + .../android/App/.idea/gradle.xml | 20 ++ .../android/App/.idea/jarRepositories.xml | 30 +++ .../tv-casting-app/android/App/.idea/misc.xml | 9 + .../tv-casting-app/android/App/.idea/vcs.xml | 6 + .../tv-casting-app/android/App/app/.gitignore | 1 + .../android/App/app/build.gradle | 65 +++++++ .../android/App/app/libs/README.md | 2 + .../android/App/app/libs/jniLibs/README.md | 4 + .../android/App/app/proguard-rules.pro | 21 ++ .../chip/casting/ExampleInstrumentedTest.java | 24 +++ .../App/app/src/main/AndroidManifest.xml | 34 ++++ .../casting/ChipTvCastingApplication.java | 10 + .../java/com/chip/casting/MainActivity.java | 18 ++ .../drawable-v24/ic_launcher_foreground.xml | 30 +++ .../res/drawable/ic_launcher_background.xml | 170 ++++++++++++++++ .../app/src/main/res/layout/activity_main.xml | 17 ++ .../res/mipmap-anydpi-v26/ic_launcher.xml | 5 + .../mipmap-anydpi-v26/ic_launcher_round.xml | 5 + .../src/main/res/mipmap-hdpi/ic_launcher.webp | Bin 0 -> 1404 bytes .../res/mipmap-hdpi/ic_launcher_round.webp | Bin 0 -> 2898 bytes .../src/main/res/mipmap-mdpi/ic_launcher.webp | Bin 0 -> 982 bytes .../res/mipmap-mdpi/ic_launcher_round.webp | Bin 0 -> 1772 bytes .../main/res/mipmap-xhdpi/ic_launcher.webp | Bin 0 -> 1900 bytes .../res/mipmap-xhdpi/ic_launcher_round.webp | Bin 0 -> 3918 bytes .../main/res/mipmap-xxhdpi/ic_launcher.webp | Bin 0 -> 2884 bytes .../res/mipmap-xxhdpi/ic_launcher_round.webp | Bin 0 -> 5914 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.webp | Bin 0 -> 3844 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.webp | Bin 0 -> 7778 bytes .../app/src/main/res/values-night/themes.xml | 16 ++ .../App/app/src/main/res/values/colors.xml | 10 + .../App/app/src/main/res/values/strings.xml | 3 + .../App/app/src/main/res/values/themes.xml | 16 ++ .../com/chip/casting/ExampleUnitTest.java | 17 ++ .../tv-casting-app/android/App/build.gradle | 25 +++ .../android/App/gradle.properties | 26 +++ .../App/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59536 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 + examples/tv-casting-app/android/App/gradlew | 184 ++++++++++++++++++ .../tv-casting-app/android/App/gradlew.bat | 89 +++++++++ .../android/App/settings.gradle | 2 + examples/tv-casting-app/android/BUILD.gn | 74 +++++++ examples/tv-casting-app/android/args.gni | 31 +++ .../tv-casting-app/android/build_overrides | 1 + .../src/com/chip/casting/TvCastingApp.java | 26 +++ .../android/third_party/connectedhomeip | 1 + scripts/build/build/targets.py | 2 + scripts/build/builders/android.py | 33 +++- .../testdata/all_targets_except_host.txt | 2 + .../build/testdata/build_all_except_host.txt | 54 +++++ .../glob_star_targets_except_host.txt | 2 + 55 files changed, 1137 insertions(+), 8 deletions(-) create mode 100644 examples/tv-casting-app/android/.gn create mode 100644 examples/tv-casting-app/android/App/.gitignore create mode 100644 examples/tv-casting-app/android/App/.idea/.gitignore create mode 100644 examples/tv-casting-app/android/App/.idea/.name create mode 100644 examples/tv-casting-app/android/App/.idea/compiler.xml create mode 100644 examples/tv-casting-app/android/App/.idea/gradle.xml create mode 100644 examples/tv-casting-app/android/App/.idea/jarRepositories.xml create mode 100644 examples/tv-casting-app/android/App/.idea/misc.xml create mode 100644 examples/tv-casting-app/android/App/.idea/vcs.xml create mode 100644 examples/tv-casting-app/android/App/app/.gitignore create mode 100644 examples/tv-casting-app/android/App/app/build.gradle create mode 100644 examples/tv-casting-app/android/App/app/libs/README.md create mode 100644 examples/tv-casting-app/android/App/app/libs/jniLibs/README.md create mode 100644 examples/tv-casting-app/android/App/app/proguard-rules.pro create mode 100644 examples/tv-casting-app/android/App/app/src/androidTest/java/com/chip/casting/ExampleInstrumentedTest.java create mode 100644 examples/tv-casting-app/android/App/app/src/main/AndroidManifest.xml create mode 100644 examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/ChipTvCastingApplication.java create mode 100644 examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/MainActivity.java create mode 100644 examples/tv-casting-app/android/App/app/src/main/res/drawable-v24/ic_launcher_foreground.xml create mode 100644 examples/tv-casting-app/android/App/app/src/main/res/drawable/ic_launcher_background.xml create mode 100644 examples/tv-casting-app/android/App/app/src/main/res/layout/activity_main.xml create mode 100644 examples/tv-casting-app/android/App/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 examples/tv-casting-app/android/App/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml create mode 100644 examples/tv-casting-app/android/App/app/src/main/res/mipmap-hdpi/ic_launcher.webp create mode 100644 examples/tv-casting-app/android/App/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp create mode 100644 examples/tv-casting-app/android/App/app/src/main/res/mipmap-mdpi/ic_launcher.webp create mode 100644 examples/tv-casting-app/android/App/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp create mode 100644 examples/tv-casting-app/android/App/app/src/main/res/mipmap-xhdpi/ic_launcher.webp create mode 100644 examples/tv-casting-app/android/App/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp create mode 100644 examples/tv-casting-app/android/App/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp create mode 100644 examples/tv-casting-app/android/App/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp create mode 100644 examples/tv-casting-app/android/App/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp create mode 100644 examples/tv-casting-app/android/App/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp create mode 100644 examples/tv-casting-app/android/App/app/src/main/res/values-night/themes.xml create mode 100644 examples/tv-casting-app/android/App/app/src/main/res/values/colors.xml create mode 100644 examples/tv-casting-app/android/App/app/src/main/res/values/strings.xml create mode 100644 examples/tv-casting-app/android/App/app/src/main/res/values/themes.xml create mode 100644 examples/tv-casting-app/android/App/app/src/test/java/com/chip/casting/ExampleUnitTest.java create mode 100644 examples/tv-casting-app/android/App/build.gradle create mode 100644 examples/tv-casting-app/android/App/gradle.properties create mode 100644 examples/tv-casting-app/android/App/gradle/wrapper/gradle-wrapper.jar create mode 100644 examples/tv-casting-app/android/App/gradle/wrapper/gradle-wrapper.properties create mode 100755 examples/tv-casting-app/android/App/gradlew create mode 100644 examples/tv-casting-app/android/App/gradlew.bat create mode 100644 examples/tv-casting-app/android/App/settings.gradle create mode 100644 examples/tv-casting-app/android/BUILD.gn create mode 100644 examples/tv-casting-app/android/args.gni create mode 120000 examples/tv-casting-app/android/build_overrides create mode 100644 examples/tv-casting-app/android/java/src/com/chip/casting/TvCastingApp.java create mode 120000 examples/tv-casting-app/android/third_party/connectedhomeip diff --git a/examples/tv-casting-app/android/.gn b/examples/tv-casting-app/android/.gn new file mode 100644 index 00000000000000..5cd171abcda9ff --- /dev/null +++ b/examples/tv-casting-app/android/.gn @@ -0,0 +1,25 @@ +# Copyright (c) 2020-2022 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + import("//args.gni") +} diff --git a/examples/tv-casting-app/android/App/.gitignore b/examples/tv-casting-app/android/App/.gitignore new file mode 100644 index 00000000000000..d59e52c6fd3f22 --- /dev/null +++ b/examples/tv-casting-app/android/App/.gitignore @@ -0,0 +1,20 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties + +# Shared libs & JAR libs (those libs are copied into source tree for easy Android build). +*.so +*.jar +*.map diff --git a/examples/tv-casting-app/android/App/.idea/.gitignore b/examples/tv-casting-app/android/App/.idea/.gitignore new file mode 100644 index 00000000000000..26d33521af10bc --- /dev/null +++ b/examples/tv-casting-app/android/App/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/examples/tv-casting-app/android/App/.idea/.name b/examples/tv-casting-app/android/App/.idea/.name new file mode 100644 index 00000000000000..999e58f66a2f14 --- /dev/null +++ b/examples/tv-casting-app/android/App/.idea/.name @@ -0,0 +1 @@ +CHIPTVCastingApp \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/.idea/compiler.xml b/examples/tv-casting-app/android/App/.idea/compiler.xml new file mode 100644 index 00000000000000..fb7f4a8a465d42 --- /dev/null +++ b/examples/tv-casting-app/android/App/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/.idea/gradle.xml b/examples/tv-casting-app/android/App/.idea/gradle.xml new file mode 100644 index 00000000000000..526b4c25c6813e --- /dev/null +++ b/examples/tv-casting-app/android/App/.idea/gradle.xml @@ -0,0 +1,20 @@ + + + + + + + \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/.idea/jarRepositories.xml b/examples/tv-casting-app/android/App/.idea/jarRepositories.xml new file mode 100644 index 00000000000000..0380d8d3dee94c --- /dev/null +++ b/examples/tv-casting-app/android/App/.idea/jarRepositories.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/.idea/misc.xml b/examples/tv-casting-app/android/App/.idea/misc.xml new file mode 100644 index 00000000000000..2a4d5b521db9a0 --- /dev/null +++ b/examples/tv-casting-app/android/App/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/.idea/vcs.xml b/examples/tv-casting-app/android/App/.idea/vcs.xml new file mode 100644 index 00000000000000..4fce1d86b49521 --- /dev/null +++ b/examples/tv-casting-app/android/App/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/app/.gitignore b/examples/tv-casting-app/android/App/app/.gitignore new file mode 100644 index 00000000000000..42afabfd2abebf --- /dev/null +++ b/examples/tv-casting-app/android/App/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/app/build.gradle b/examples/tv-casting-app/android/App/app/build.gradle new file mode 100644 index 00000000000000..99aabfdba51594 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/build.gradle @@ -0,0 +1,65 @@ +plugins { + id 'com.android.application' +} + +android { + compileSdk 30 + + defaultConfig { + applicationId "com.chip.casting" + minSdk 24 + targetSdk 30 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + externalNativeBuild { + cmake { + targets "default" + } + } + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + + debug { + packagingOptions{ + doNotStrip "**/*.so" + } + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + sourceSets { + main { + jniLibs.srcDirs = ['libs/jniLibs'] + + // uncomment this code to debug +// java.srcDirs = [ +// 'src/main/java', +// '../../third_party/connectedhomeip/src/setup_payload/java/src', +// '../../third_party/connectedhomeip/src/platform/android/java', +// '../../third_party/connectedhomeip/src/app/server/java/src/', +// '../../java/src', +// ] + } + } +} + +dependencies { + implementation fileTree(dir: "libs", include: ["*.jar","*.so"]) + implementation 'androidx.appcompat:appcompat:1.3.1' + implementation 'com.google.android.material:material:1.4.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.1' + testImplementation 'junit:junit:4.+' + androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + implementation 'com.google.zxing:core:3.3.0' +} \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/app/libs/README.md b/examples/tv-casting-app/android/App/app/libs/README.md new file mode 100644 index 00000000000000..ca16fbe7e23cf9 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/libs/README.md @@ -0,0 +1,2 @@ +This directory will contain any .jar files required by the TV Casting demo app +for Android. diff --git a/examples/tv-casting-app/android/App/app/libs/jniLibs/README.md b/examples/tv-casting-app/android/App/app/libs/jniLibs/README.md new file mode 100644 index 00000000000000..3a20e5ae7d72c9 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/libs/jniLibs/README.md @@ -0,0 +1,4 @@ +This directory will contain .so files required by TV Casting demo app for +Android. The .so files must be organized into folders by the name of the +corresponding Android architecture for which they are built, eg. arm64-v8a, x86, +x86_64, etc. diff --git a/examples/tv-casting-app/android/App/app/proguard-rules.pro b/examples/tv-casting-app/android/App/app/proguard-rules.pro new file mode 100644 index 00000000000000..481bb434814107 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/app/src/androidTest/java/com/chip/casting/ExampleInstrumentedTest.java b/examples/tv-casting-app/android/App/app/src/androidTest/java/com/chip/casting/ExampleInstrumentedTest.java new file mode 100644 index 00000000000000..756d0d96a25391 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/androidTest/java/com/chip/casting/ExampleInstrumentedTest.java @@ -0,0 +1,24 @@ +package com.chip.casting; + +import static org.junit.Assert.*; + +import android.content.Context; +import androidx.test.ext.junit.runners.AndroidJUnit4; +import androidx.test.platform.app.InstrumentationRegistry; +import org.junit.Test; +import org.junit.runner.RunWith; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.chip.casting", appContext.getPackageName()); + } +} diff --git a/examples/tv-casting-app/android/App/app/src/main/AndroidManifest.xml b/examples/tv-casting-app/android/App/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000000000..e379d2a7675095 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/AndroidManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/ChipTvCastingApplication.java b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/ChipTvCastingApplication.java new file mode 100644 index 00000000000000..4a3873d84618f1 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/ChipTvCastingApplication.java @@ -0,0 +1,10 @@ +package com.chip.casting; + +import android.app.Application; + +public class ChipTvCastingApplication extends Application { + @Override + public void onCreate() { + super.onCreate(); + } +} diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/MainActivity.java b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/MainActivity.java new file mode 100644 index 00000000000000..74928ce65079a6 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/MainActivity.java @@ -0,0 +1,18 @@ +package com.chip.casting; + +import android.os.Bundle; +import android.widget.TextView; +import androidx.appcompat.app.AppCompatActivity; + +public class MainActivity extends AppCompatActivity { + + private TextView mHelloCastingTxt; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + mHelloCastingTxt = findViewById(R.id.helloCastingTxt); + mHelloCastingTxt.setText("Hello, TV Casting app!"); + } +} diff --git a/examples/tv-casting-app/android/App/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/examples/tv-casting-app/android/App/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 00000000000000..2b068d11462a4b --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/app/src/main/res/drawable/ic_launcher_background.xml b/examples/tv-casting-app/android/App/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 00000000000000..07d5da9cbf1419 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/tv-casting-app/android/App/app/src/main/res/layout/activity_main.xml b/examples/tv-casting-app/android/App/app/src/main/res/layout/activity_main.xml new file mode 100644 index 00000000000000..99d71254d7b2e9 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,17 @@ + + + + + + \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/examples/tv-casting-app/android/App/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 00000000000000..eca70cfe52eac1 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/examples/tv-casting-app/android/App/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 00000000000000..eca70cfe52eac1 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/examples/tv-casting-app/android/App/app/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..c209e78ecd372343283f4157dcfd918ec5165bb3 GIT binary patch literal 1404 zcmV-?1%vuhNk&F=1pok7MM6+kP&il$0000G0000-002h-06|PpNX!5L00Dqw+t%{r zzW2vH!KF=w&cMnnN@{whkTw+#mAh0SV?YL=)3MimFYCWp#fpdtz~8$hD5VPuQgtcN zXl<@<#Cme5f5yr2h%@8TWh?)bSK`O z^Z@d={gn7J{iyxL_y_%J|L>ep{dUxUP8a{byupH&!UNR*OutO~0{*T4q5R6@ApLF! z5{w?Z150gC7#>(VHFJZ-^6O@PYp{t!jH(_Z*nzTK4 zkc{fLE4Q3|mA2`CWQ3{8;gxGizgM!zccbdQoOLZc8hThi-IhN90RFT|zlxh3Ty&VG z?Fe{#9RrRnxzsu|Lg2ddugg7k%>0JeD+{XZ7>Z~{=|M+sh1MF7~ zz>To~`~LVQe1nNoR-gEzkpe{Ak^7{{ZBk2i_<+`Bq<^GB!RYG+z)h;Y3+<{zlMUYd zrd*W4w&jZ0%kBuDZ1EW&KLpyR7r2=}fF2%0VwHM4pUs}ZI2egi#DRMYZPek*^H9YK zay4Iy3WXFG(F14xYsoDA|KXgGc5%2DhmQ1gFCkrgHBm!lXG8I5h*uf{rn48Z!_@ z4Bk6TJAB2CKYqPjiX&mWoW>OPFGd$wqroa($ne7EUK;#3VYkXaew%Kh^3OrMhtjYN?XEoY`tRPQsAkH-DSL^QqyN0>^ zmC>{#F14jz4GeW{pJoRpLFa_*GI{?T93^rX7SPQgT@LbLqpNA}<@2wH;q493)G=1Y z#-sCiRNX~qf3KgiFzB3I>4Z%AfS(3$`-aMIBU+6?gbgDb!)L~A)je+;fR0jWLL-Fu z4)P{c7{B4Hp91&%??2$v9iRSFnuckHUm}or9seH6 z>%NbT+5*@L5(I9j@06@(!{ZI?U0=pKn8uwIg&L{JV14+8s2hnvbRrU|hZCd}IJu7*;;ECgO%8_*W Kmw_-CKmY()leWbG literal 0 HcmV?d00001 diff --git a/examples/tv-casting-app/android/App/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/examples/tv-casting-app/android/App/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..b2dfe3d1ba5cf3ee31b3ecc1ced89044a1f3b7a9 GIT binary patch literal 2898 zcmV-Y3$650Nk&FW3jhFDMM6+kP&il$0000G0000-002h-06|PpNWB9900E$G+qN-D z+81ABX7q?;bwx%xBg?kcwr$(C-Tex-ZCkHUw(Y9#+`E5-zuONG5fgw~E2WDng@Bc@ z24xy+R1n%~6xI#u9vJ8zREI)sb<&Il(016}Z~V1n^PU3-_H17A*Bf^o)&{_uBv}Py zulRfeE8g(g6HFhk_?o_;0@tz?1I+l+Y#Q*;RVC?(ud`_cU-~n|AX-b`JHrOIqn(-t&rOg-o`#C zh0LPxmbOAEb;zHTu!R3LDh1QO zZTf-|lJNUxi-PpcbRjw3n~n-pG;$+dIF6eqM5+L();B2O2tQ~|p{PlpNcvDbd1l%c zLtXn%lu(3!aNK!V#+HNn_D3lp z2%l+hK-nsj|Bi9;V*WIcQRTt5j90A<=am+cc`J zTYIN|PsYAhJ|=&h*4wI4ebv-C=Be#u>}%m;a{IGmJDU`0snWS&$9zdrT(z8#{OZ_Y zxwJx!ZClUi%YJjD6Xz@OP8{ieyJB=tn?>zaI-4JN;rr`JQbb%y5h2O-?_V@7pG_+y z(lqAsqYr!NyVb0C^|uclHaeecG)Sz;WV?rtoqOdAAN{j%?Uo%owya(F&qps@Id|Of zo@~Y-(YmfB+chv^%*3g4k3R0WqvuYUIA+8^SGJ{2Bl$X&X&v02>+0$4?di(34{pt* zG=f#yMs@Y|b&=HyH3k4yP&goF2LJ#tBLJNNDo6lG06r}ghC-pC4Q*=x3;|+W04zte zAl>l4kzUBQFYF(E`KJy?ZXd1tnfbH+Z~SMmA21KokJNs#eqcXWKUIC>{TuoKe^vhF z);H)o`t9j~`$h1D`#bxe@E`oE`cM9w(@)5Bp8BNukIwM>wZHfd0S;5bcXA*5KT3bj zc&_~`&{z7u{Et!Z_k78H75gXf4g8<_ul!H$eVspPeU3j&&Au=2R*Zp#M9$9s;fqwgzfiX=E_?BwVcfx3tG9Q-+<5fw z%Hs64z)@Q*%s3_Xd5>S4dg$s>@rN^ixeVj*tqu3ZV)biDcFf&l?lGwsa zWj3rvK}?43c{IruV2L`hUU0t^MemAn3U~x3$4mFDxj=Byowu^Q+#wKRPrWywLjIAp z9*n}eQ9-gZmnd9Y0WHtwi2sn6n~?i#n9VN1B*074_VbZZ=WrpkMYr{RsI ztM_8X1)J*DZejxkjOTRJ&a*lrvMKBQURNP#K)a5wIitfu(CFYV4FT?LUB$jVwJSZz zNBFTWg->Yk0j&h3e*a5>B=-xM7dE`IuOQna!u$OoxLlE;WdrNlN)1 z7**de7-hZ!(%_ZllHBLg`Ir#|t>2$*xVOZ-ADZKTN?{(NUeLU9GbuG-+Axf*AZ-P1 z0ZZ*fx+ck4{XtFsbcc%GRStht@q!m*ImssGwuK+P@%gEK!f5dHymg<9nSCXsB6 zQ*{<`%^bxB($Z@5286^-A(tR;r+p7B%^%$N5h%lb*Vlz-?DL9x;!j<5>~kmXP$E}m zQV|7uv4SwFs0jUervsxVUm>&9Y3DBIzc1XW|CUZrUdb<&{@D5yuLe%Xniw^x&{A2s z0q1+owDSfc3Gs?ht;3jw49c#mmrViUfX-yvc_B*wY|Lo7; zGh!t2R#BHx{1wFXReX*~`NS-LpSX z#TV*miO^~B9PF%O0huw!1Zv>^d0G3$^8dsC6VI!$oKDKiXdJt{mGkyA`+Gwd4D-^1qtNTUK)`N*=NTG-6}=5k6suNfdLt*dt8D| z%H#$k)z#ZRcf|zDWB|pn<3+7Nz>?WW9WdkO5(a^m+D4WRJ9{wc>Y}IN)2Kbgn;_O? zGqdr&9~|$Y0tP=N(k7^Eu;iO*w+f%W`20BNo)=Xa@M_)+o$4LXJyiw{F?a633SC{B zl~9FH%?^Rm*LVz`lkULs)%idDX^O)SxQol(3jDRyBVR!7d`;ar+D7do)jQ}m`g$TevUD5@?*P8)voa?kEe@_hl{_h8j&5eB-5FrYW&*FHVt$ z$kRF9Nstj%KRzpjdd_9wO=4zO8ritN*NPk_9avYrsF(!4))tm{Ga#OY z(r{0buexOzu7+rw8E08Gxd`LTOID{*AC1m*6Nw@osfB%0oBF5sf<~wH1kL;sd zo)k6^VyRFU`)dt*iX^9&QtWbo6yE8XXH?`ztvpiOLgI3R+=MOBQ9=rMVgi<*CU%+d1PQQ0a1U=&b0vkF207%xU0ssI2 literal 0 HcmV?d00001 diff --git a/examples/tv-casting-app/android/App/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/examples/tv-casting-app/android/App/app/src/main/res/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..4f0f1d64e58ba64d180ce43ee13bf9a17835fbca GIT binary patch literal 982 zcmV;{11bDcNk&G_0{{S5MM6+kP&il$0000G0000l001ul06|PpNU8t;00Dqo+t#w^ z^1csucXz7-Qrhzl9HuHB%l>&>1tG2^vb*E&k^T3$FG1eQZ51g$uv4V+kI`0<^1Z@N zk?Jjh$olyC%l>)Xq;7!>{iBj&BjJ`P&$fsCfpve_epJOBkTF?nu-B7D!hO=2ZR}

C%4 zc_9eOXvPbC4kzU8YowIA8cW~Uv|eB&yYwAObSwL2vY~UYI7NXPvf3b+c^?wcs~_t{ ze_m66-0)^{JdOMKPwjpQ@Sna!*?$wTZ~su*tNv7o!gXT!GRgivP}ec?5>l1!7<(rT zds|8x(qGc673zrvYIz;J23FG{9nHMnAuP}NpAED^laz3mAN1sy+NXK)!6v1FxQ;lh zOBLA>$~P3r4b*NcqR;y6pwyhZ3_PiDb|%n1gGjl3ZU}ujInlP{eks-#oA6>rh&g+!f`hv#_%JrgYPu z(U^&XLW^QX7F9Z*SRPpQl{B%x)_AMp^}_v~?j7 zapvHMKxSf*Mtyx8I}-<*UGn3)oHd(nn=)BZ`d$lDBwq_GL($_TPaS{UeevT(AJ`p0 z9%+hQb6z)U9qjbuXjg|dExCLjpS8$VKQ55VsIC%@{N5t{NsW)=hNGI`J=x97_kbz@ E0Of=7!TQj4N+cqN`nQhxvX7dAV-`K|Ub$-q+H-5I?Tx0g9jWxd@A|?POE8`3b8fO$T))xP* z(X?&brZw({`)WU&rdAs1iTa0x6F@PIxJ&&L|dpySV!ID|iUhjCcKz(@mE z!x@~W#3H<)4Ae(4eQJRk`Iz3<1)6^m)0b_4_TRZ+cz#eD3f8V;2r-1fE!F}W zEi0MEkTTx}8i1{`l_6vo0(Vuh0HD$I4SjZ=?^?k82R51bC)2D_{y8mi_?X^=U?2|F{Vr7s!k(AZC$O#ZMyavHhlQ7 zUR~QXuH~#o#>(b$u4?s~HLF*3IcF7023AlwAYudn0FV~|odGH^05AYPEfR)8p`i{n zwg3zPVp{+wOsxKc>)(pMupKF!Y2HoUqQ3|Yu|8lwR=?5zZuhG6J?H`bSNk_wPoM{u zSL{c@pY7+c2kck>`^q1^^gR0QB7Y?KUD{vz-uVX~;V-rW)PDcI)$_UjgVV?S?=oLR zf4}zz{#*R_{LkiJ#0RdQLNC^2Vp%JPEUvG9ra2BVZ92(p9h7Ka@!yf9(lj#}>+|u* z;^_?KWdzkM`6gqPo9;;r6&JEa)}R3X{(CWv?NvgLeOTq$cZXqf7|sPImi-7cS8DCN zGf;DVt3Am`>hH3{4-WzH43Ftx)SofNe^-#|0HdCo<+8Qs!}TZP{HH8~z5n`ExcHuT zDL1m&|DVpIy=xsLO>8k92HcmfSKhflQ0H~9=^-{#!I1g(;+44xw~=* zxvNz35vfsQE)@)Zsp*6_GjYD};Squ83<_?^SbALb{a`j<0Gn%6JY!zhp=Fg}Ga2|8 z52e1WU%^L1}15Ex0fF$e@eCT(()_P zvV?CA%#Sy08_U6VPt4EtmVQraWJX` zh=N|WQ>LgrvF~R&qOfB$!%D3cGv?;Xh_z$z7k&s4N)$WYf*k=|*jCEkO19{h_(%W4 zPuOqbCw`SeAX*R}UUsbVsgtuG?xs(#Ikx9`JZoQFz0n*7ZG@Fv@kZk`gzO$HoA9kN z8U5{-yY zvV{`&WKU2$mZeoBmiJrEdzUZAv1sRxpePdg1)F*X^Y)zp^Y*R;;z~vOv-z&)&G)JQ{m!C9cmziu1^nHA z`#`0c>@PnQ9CJKgC5NjJD8HM3|KC(g5nnCq$n0Gsu_DXk36@ql%npEye|?%RmG)

FJ$wK}0tWNB{uH;AM~i literal 0 HcmV?d00001 diff --git a/examples/tv-casting-app/android/App/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/examples/tv-casting-app/android/App/app/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..948a3070fe34c611c42c0d3ad3013a0dce358be0 GIT binary patch literal 1900 zcmV-y2b1_xNk&Fw2LJ$9MM6+kP&il$0000G0001A003VA06|PpNH75a00DqwTbm-~ zullQTcXxO9ki!OCRx^i?oR|n!<8G0=kI^!JSjFi-LL*`V;ET0H2IXfU0*i>o6o6Gy zRq6Ap5(_{XLdXcL-MzlN`ugSdZY_`jXhcENAu)N_0?GhF))9R;E`!bo9p?g?SRgw_ zEXHhFG$0{qYOqhdX<(wE4N@es3VIo$%il%6xP9gjiBri+2pI6aY4 zJbgh-Ud|V%3O!IcHKQx1FQH(_*TK;1>FQWbt^$K1zNn^cczkBs=QHCYZ8b&l!UV{K z{L0$KCf_&KR^}&2Fe|L&?1I7~pBENnCtCuH3sjcx6$c zwqkNkru);ie``q+_QI;IYLD9OV0ZxkuyBz|5<$1BH|vtey$> z5oto4=l-R-Aaq`Dk0}o9N0VrkqW_#;!u{!bJLDq%0092{Ghe=F;(kn} z+sQ@1=UlX30+2nWjkL$B^b!H2^QYO@iFc0{(-~yXj2TWz?VG{v`Jg zg}WyYnwGgn>{HFaG7E~pt=)sOO}*yd(UU-D(E&x{xKEl6OcU?pl)K%#U$dn1mDF19 zSw@l8G!GNFB3c3VVK0?uyqN&utT-D5%NM4g-3@Sii9tSXKtwce~uF zS&Jn746EW^wV~8zdQ1XC28~kXu8+Yo9p!<8h&(Q({J*4DBglPdpe4M_mD8AguZFn~ ztiuO~{6Bx?SfO~_ZV(GIboeR9~hAym{{fV|VM=77MxDrbW6`ujX z<3HF(>Zr;#*uCvC*bpoSr~C$h?_%nXps@A)=l_;({Fo#6Y1+Zv`!T5HB+)#^-Ud_; zBwftPN=d8Vx)*O1Mj+0oO=mZ+NVH*ptNDC-&zZ7Hwho6UQ#l-yNvc0Cm+2$$6YUk2D2t#vdZX-u3>-Be1u9gtTBiMB^xwWQ_rgvGpZ6(C@e23c!^K=>ai-Rqu zhqT`ZQof;9Bu!AD(i^PCbYV%yha9zuoKMp`U^z;3!+&d@Hud&_iy!O-$b9ZLcSRh? z)R|826w}TU!J#X6P%@Zh=La$I6zXa#h!B;{qfug}O%z@K{EZECu6zl)7CiNi%xti0 zB{OKfAj83~iJvmpTU|&q1^?^cIMn2RQ?jeSB95l}{DrEPTW{_gmU_pqTc)h@4T>~& zluq3)GM=xa(#^VU5}@FNqpc$?#SbVsX!~RH*5p0p@w z;~v{QMX0^bFT1!cXGM8K9FP+=9~-d~#TK#ZE{4umGT=;dfvWi?rYj;^l_Zxywze`W z^Cr{55U@*BalS}K%Czii_80e0#0#Zkhlij4-~I@}`-JFJ7$5{>LnoJSs??J8kWVl6|8A}RCGAu9^rAsfCE=2}tHwl93t0C?#+jMpvr7O3`2=tr{Hg$=HlnjVG^ewm|Js0J*kfPa6*GhtB>`fN!m#9J(sU!?(OSfzY*zS(FJ<-Vb zfAIg+`U)YaXv#sY(c--|X zEB+TVyZ%Ie4L$gi#Fc++`h6%vzsS$pjz9aLt+ZL(g;n$Dzy5=m=_TV(3H8^C{r0xd zp#a%}ht55dOq?yhwYPrtp-m1xXp;4X;)NhxxUpgP%XTLmO zcjaFva^}dP3$&sfFTIR_jC=2pHh9kpI@2(6V*GQo7Ws)`j)hd+tr@P~gR*2gO@+1? zG<`_tB+LJuF|SZ9tIec;h%}}6WClT`L>HSW?E{Hp1h^+mlbf_$9zA>!ug>NALJsO{ mU%z=YwVD?}XMya)Bp;vlyE5&E_6!fzx9pwrdz474!~g(M6R?N? literal 0 HcmV?d00001 diff --git a/examples/tv-casting-app/android/App/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/examples/tv-casting-app/android/App/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..1b9a6956b3acdc11f40ce2bb3f6efbd845cc243f GIT binary patch literal 3918 zcmV-U53%r4Nk&FS4*&pHMM6+kP&il$0000G0001A003VA06|PpNSy@$00HoY|G(*G z+qV7x14$dSO^Re!iqt-AAIE9iwr$(CZQJL$blA4B`>;C3fBY6Q8_YSjb2%a=fc}4E zrSzssacq<^nmW|Rs93PJni30R<8w<(bK_$LO4L?!_OxLl$}K$MUEllnMK|rg=f3;y z*?;3j|Nh>)p0JQ3A~rf(MibH2r+)3cyV1qF&;8m{w-S*y+0mM){KTK^M5}ksc`qX3 zy>rf^b>~l>SSHds8(I@hz3&PD@LmEs4&prkT=BjsBCXTMhN$_)+kvnl0bLKW5rEsj z*d#KXGDB4P&>etx0X+`R19yC=LS)j!mgs5M0L~+o-T~Jl!p!AJxnGAhV%~rhYUL4hlWhgES3Kb5oA&X z{}?3OBSS-{!v$nCIGj->(-TAG)8LR{htr41^gxsT8yqt2@DEG6Yl`Uma3Nd4;YUoW zTbkYl3CMU5ypMF3EIkYmWL|*BknM`0+Kq6CpvO(y$#j94e+q{vI{Zp8cV_6RK!`&C zob$*5Q|$IZ09dW=L!V zw@#2wviu|<#3lgGE8GEhcx+zBt`} zOwP8j9X%^f7i_bth4PiJ$LYtFJSCN$3xwDN;8mr*B;CJwBP2G0TMq0uNt7S^DO_wE zepk!Wrn#Z#03j{`c*Rf~y3o7?J}w?tEELRUR2cgxB*Y{LzA#pxHgf}q?u5idu>077 zd^=p)`nA}6e`|@`p?u}YU66PP_MA}Zqqe!c{nK&z%Jwq1N4e_q<#4g^xaz=ao;u|6 zwpRcW2Lax=ZGbx=Q*HhlJ`Ns#Y*r0*%!T?P*TTiX;rb)$CGLz=rSUum$)3Qyv{BL2 zO*=OI2|%(Yz~`pNEOnLp>+?T@glq-DujlIp?hdJeZ7ctP4_OKx|5@EOps3rr(pWzg zK4d3&oN-X2qN(d_MkfwB4I)_)!I_6nj2iA9u^pQ{;GckGLxBGrJUM2Wdda!k)Y>lq zmjws>dVQ*vW9lvEMkiN3wE-__6OWD0txS&Qn0n22cyj4Q*8(nG4!G{6OOwNvsrPIL zCl-$W9UwkEUVuLwyD%|inbOF*xMODZ4VMEVAq_zUxZ+K#Gdqf!DW$5f)?7UNOFMz! zrB~tuu=6X2FE(p^iqgxr+?ZK;=yz`e;C$#_@D9Lj-+TDVOrva>(#*PVbaHO>A)mhl z07OJWCqYC60518$!&c`eNBcBW%GnfaQ*$eazV^2_AW?j)h;J1nUjN(I9=0+!RVx~% z3@Tf!P0TE+98jA?WceK-}A1% zW!K)lyKcGqy#M~})315-A#2NXQ`?6NR#Apo=S!oF=JfpX>iR*49ec{7AN$xxpK{D$ z2d%Fz&rdfSqourN$~Y^NFIMV1CZ?J*bMx~H3k&meGtH@q9ra2vZxmA$S(#jaaj-g4 ztJmxG+DLV<*q<|sDXPp$X>E)#S}Vm&sRaO5P&goh2><}FEdZSXDqsL$06sAkh(e+v zAsBhKSRexgwg6tIy~GFJzaTxXD(}|+0eOwFDA%rn`X;MVwDHT9=4=g%OaJ9s%3b9>9EUTnnp0t;2Zpa{*>mk~hZqItE_!dQ zOtC>8`$l|mV43Jbudf0N6&&X;{=z}Zi}d1`2qmJ}i|0*GsulD3>GgQXHN)pkR6sf1 z?5ZU%&xtL}oH;YiAA)d*^Ndw2T$+Mjuzyzz@-SM`9df7LqTxLuIwC~S0092~+=qYv z@*ja;?Wt!T!{U?c*Z0YtGe)XbI&y-?B&G2$`JDM)(dIV9G`Sc#6?sI60de6kv+)Qb zUW~2|WjvJq3TA8`0+sWA3zRhY9a~ow)O~&StBkG2{*{TGiY~S8ep{V&Vo2l<6LWsu z^#p0-v*t2?3&aA1)ozu|%efSR=XnpX$lvTeRdKlvM!@|pM5p2w3u-6 zU>}t2xiYLS+{|%C65AzX+23Mtlq?BS&YdYcYsVjoiE&rT>;Necn6l^K)T^lmE`5u{ zm1i+-a-gc;Z&v-{;8r)z6NYfBUv+=_L}ef}qa9FX01)+Aaf+;xj(mL6|JUzGJR1|fnanb%?BPPIp>SCjP|8qE5qJ{=n5ZGw?81z3(k;pzH%1CtlX50{E7h)$h{qGKfzC`e2o`*IqA#tjA z`Fz&^%$b9F*N`)U-#6>a)Z`55`$Dd0cfcs0$d13^ONrdCu9xcv_=n#WQo8stcz3jP9|2EvdI-RhJM3%Q%oM&!OlShM|0 z?gz?wHZSnm45njLtsz8PVT1S&jAlbKg5kVam$p16=EK@Sj4EP0OtH zmJDmdc^v)x>56Qg_wmYHz6h)>kl_h$>0@J!ypv%APmjZTAQVLy6Fu50RGY&JAVNhx zrF_qG6`x9MkT;1SFWo$)l{M$;3qUDn9JwE}z zRl#E_bDRJFii61kPgBybIgp8dNW!Cc1b*^YYk-#oWLJvtM_v^hQx~9?8LD4VFFxBF z3MlrsSC%f9Oupn*ctPL0U1fwfX?`tRhPD{PSLFPQOmIt$mDy0SgpNVvHS+f#Do>h1Gn?LZU9(KaN>Q_=Y*_T zvtD7%_u^^+{g`0VGzg(VZrpVQ6Ub5M=tI_p7T93R8@3Zulu3|#{iNcu!oiHxZ4Rf*( zfmiN$$ru(*_Zqn=`Gq#OuHRTSwp7uH_SokR&|)RuW5yo=Z|_4?qU-JU+tpt>!B&Is z@N(=SG;bpVc;AO@zbmMM zScqq1)b-ZQIrs={oD}|?6y{$HNB1U0^LsBh8JI&3!GBZxOXI<}&5-$lgkAaYqhOTb z?2vEnZ$-kk;*M_17(upJF3%+iH*s0-r{vttXVB2OUwI1s^+G(Ft(U8gYFXC}#P&E^ z>T@C^tS`Z7{6HT4_nF~n>JlZtk5&qDBl6r|^kzQYe`wq!C)n@$c>WOPA61NDFj<<6 zGW71NMMhwAl!U-yqrq2xrSFqRCI8acw7?}3j;ynxo*-b7Co;g5r%^j=H@9({PXXBf z@r>U>>N;E)81wx`B4f%{PB~MHka_);%kBCb(d|Jy5!MqJ%2p`t&@L)4$T2j&-WHvG zv3(uyA_gwqNu(k?jQTtv3dgPKRZoH8prxe7>pQBW5L&dpumS&5Ld2?(sCpJjvc4L5 zEnh&?91WVm)ZdTj=fjJ$pPDdgAttLXuke+?KdKxu*;kTC(r!tQk6;gxj4h%FdHAt(^M3YvYj(!tOeN)+Hvj6+< zzyJRG?^lZfWuR#t!tUKP&(?%3v&Zd$R2YN>lB(Lq`OInY48%4%yTv2 zYe1{G`3)(PDEio5Y@-I5tUf`c%%OCJMtSW56g3iEg%3`$7XSJJHyA z<|7&N)5Xrlgv~%BO24eFd;Hd;uiK%D`EdK|quUeRZDqbh9l)%j%J#0lfrZumvA<_w zu&=AVvdChf6}eqh(bUz`(`Ue*p01{fBAcTgKyDYLs_I+YyJEk+rM@avU~>fB$n)HS zM7pfJydu`i%gfS<{PF94kZDv$t>06sAkheDzu40NJ$5CMW%n^Lls?8^p^QGWURbKu3ZduZQZ((s2? zzE`}<{;Zt7<$C|9R8A~DJ~@%x>TfP zF>TX8)@v|t)q4GjRt<}5s6hLHwRel7>V@&r-O|Av(yh;Q1A{E>Ir>p+%dHD|=l+lT zpr(Dg&>#Nu=!)6bCLr-ZS%|;h)Ij$+e@r8_{qO19QvDe=&1tmpY*0lcA^Cc-#{9fQ z<~$*<&P$Q<_jy#<$40PMofM7aQ}C=jphI`4kLg}Z7CIN#26D{-4v-_CA-LiE@(%{y!BzsU%gG`Q?sjLUf%qFSl0y)2#ae*+EI>s|i`d^V$Dn)qmzqRq6VJRY|{4ujsIU%#bnqU6MR&-1I_43=|5(6Jr;Jvert) zE?S|Tmn}Tv<-??sxV5@9t}3D=>YZ0JrQe$CO~|EY=Lj9RM&4svQHPQL6%pV5fPFiH zfXDx;l@~et{*{U*#c#Dvzu)|znDO7$#CRx)Z&yp-}SrD{&|(MQtfUz~n35@RLfUy=aqrhCX0M}J_r5QsK~NmRCR|Nm&L z41UdsLjWxSUlL41r^0K&nCCK>fdR-!MYjFg(z9_mF^C|#ZQw?`)f6uVzF^`bRnVY& zo}@M06J&_+>w9@jpaO4snmU;0t-(zYW1qVBHtuD!d?%?AtN7Plp><-1Y8Rqb20ZaP zTCgn*-Sri4Q8Xn>=gNaWQ57%!D35UkA@ksOlPB*Dvw}t02ENAqw|kFhn%ZyyW%+t{ zNdM!uqEM^;2}f+tECHbwLmH*!nZVrb$-az%t50Y2pg(HqhvY-^-lb}>^6l{$jOI6} zo_kBzj%8aX|6H5M0Y<)7pzz_wLkIpRm!;PzY)9+24wk2&TT{w--phDGDCOz{cN_ca zpnm7`$oDy=HX%0i-`769*0M6(e5j-?(?24%)<)&46y0e&6@HCDZAm9W6Ib#Y#BF6- z=30crHGg+RRTe%VBC>T00OV6F+gQDAK38Ne3N9bm|62tPccBJi)5{B z4zc^Db72XiBd}v$CF|yU{Z=M|DZ%-(XarYNclODlb1Kz1_EKLy(NSLCN`eUl(rBCL zT*jx@wNvze0|TSqgE(QArOZU)_?qH(sj#TwzElLs9q)(0u!_P|R%Cy_0JFQxgGV>1 zz4?_uq<8_gM0`c*Hh|;UMz~vrg1gQXp{ufg`hM_qU;U>+zmvc5blCLSq@PrEBSGR# z&8=2Z4uXN`F3p73ueD1l{s{k$WipAvSh5W7ABe?4)t;r@V?y`bNB5FvBuE|0VRTb< zM1Hn^?DSsJY+sX@T5xW=#>T9VEV|?<(=6|ge$X6Sb05!LFdjDcoq*gM(Zq=t;_)Le&jyt(&9jzR73noru`a# zN*<`KwGa^gZU3-)MSLF0aFag#f0<>E(bYTeHmtdbns#|I)-$)mJ`q9ctQ8g0=ET?| zdO}eZ*b_p>ygRTtR^5Ggdam=Zb5wmd{}np+Jn1d_=M`~P=M67jj})fH4ztb5yQqQW z^C|C&^LHAK-u+ooIK)yM)QM?t;|<{P;;{`p=BclzAN#JzL4jCwXkQB1Dy{=^KR`=~ zTrr)y7eiYBzSNs_DvO=4A6#EgGS-zY%Vi)N*Yb`U;6o}KR}dq{r9pT5wqZ@3NOE8- z9-(}D|Nc5732CSYQbL)!gPQ#RbD8BhK3dl{sUuPvei0tkvnJBxDEAYTesU8H$)g(Plra{VH(v3u^CO1~(+ zU0O7#)jaS4{NcwA+LuSm&VBcX2#Im3xg)W}ySNw%->orn1taZ&+d)}8gJTqA!u|5P z{yv?zol_3|(1(%M(EVU=cp?L`{Pi|ixk{U)*guFML3P!OSlz;zGA#T+E@8@cgQ_mv1o7RSU=Zo_82F?&&2r;WE z@wk}JHYEZ9nYUc(Vv~iTCa3u8e4q(yq<29VoNbKk|`mq%I6u)My=gPIDuUb&lzf4`MEA9^g8u z)vp8|$$HE9m_BTV?lOosIGa4jud=jIbw)O2eCMfyw2*S8?hjWw^nqws$O*M$3I1)x zR0PWFb3$ySOcGTe1dz%N0l;RPc`x%05FtT^f^j{YCP}*Q=lvp4$ZXrTZQHhO+w%wJn3c8j%+5C3UAFD&%8dBl_qi9D5g8fry}6Ev z2_Q~)5^N$!IU`BPh1O|=BxQ#*C5*}`lluC515$lxc-vNC)IgW=K|=z7o%cWFpndn= zX}f{`!VK02_kU+Q5a3m37J;c} zTzbxteE{GNf?yLt5X=Bzc-mio^Up0nunMCgp*ZJ;%MJvPM3QK)BryP(_v@ei4UvHr z6+sbCifQaOkL6-;5fL8$W($zZ_;CZp305C;~$hhRquZr-r)jjd1z z31%ZK{-(`P#|Um_Sivn@p$-vz46uqT>QG0B1w9znfS9A8PB2LaHdzA|_)yjXVR*l{ zkcu3@vEf7bxH0nkh`q?8FmoO_Ucui*>_a~P?qQrlZ9@+D7%MTpSnztpylXrt5!-k8_QPB?YL8Kx_On8WD zgT+111d(Op$^$&KLAN5+@?>f7F4~wFi(8TL8+szgVmcMDTp5l&k6~=rA{Dt}!gb^r zSWY<)M7D|Z2P0cEodj6E42PV>&>DFmQpgt)E-|#sSUU@uKed+F680H@<;-x{p|nuH4!_mn85rx>wz;0mPi2ZkL#k6;sznu?cXh!T0S>{w6 zL^gvR05NY64l*<+_L>On$rjx9!US;l;LX6@z}yi#2XHh)F@Oo+l)h%fq$v}DNmF2> zfs^_t0)3N-W<9-N?uedVv{)-J0W5mh#29QM5R5h&KuiRM=0Zvnf#lF=K#WlCgc#9c zS;qvh(P$!_a8JwyhI^ZJV2k+B6Z^64?w|1?5gyo6y{}923CRZfYVe1#?F% z7h2SUiNO3;T#JUOyovSs@@C1GtwipycA=*x5{BpIZ_#GCMuV8XK=x;qCNy{d7?wA~ zC+=vjls;ci&zW=6$H~4^K%v{p}Ab?U%C6Z4p%eC<3ExqU$XR<}LLF67A$Sr20DR_pJ3yeBa~ z^sw{V0FI5;UpwXsScYuhbqGQ`YQ25;6p6W^+tgL&;Ml;>S3CGpSZ>VrTn0m1$y$HU z&65)I!c?oREz};c=nLCliriqQX->4uivHTgd${GqeAlf*!P^B|jkU|*IdNP(&6C>4 zqOW$)Nw9nvjy^&`?E|gotDV{JmJ9Q~vuhy<`^C4XIUDt|j4o6rK^e8_(=YqC zuaR6TRVf@tUFHB079o4MBIh{M~4>WwnGgesQH*3?w(RA%hCZ*7)b!aNV=yOQ%o_Y=Lt0Sl*(9^jfRnC210Om$=y>*o|3z} zAR&vAdrB#mWoaB0fJSw9xw|Am$fzK>rx-~R#7IFSAwdu_EI|SRfB*yl0w8oX09H^q zAjl2?0I)v*odGJ40FVGaF&2qJq9Gv`>V>2r0|c`GX8h>CX8eHcOy>S0@<;M3<_6UM z7yCEpug5NZL!H_0>Hg_HasQGxR`rY&Z{geOy?N92Z z{lER^um|$*?*G63*njwc(R?NT)Bei*3jVzR>FWUDb^gKhtL4A=kE_1p-%Fo2`!8M} z(0AjuCiS;G{?*^1tB-uY%=)SRx&D)pK4u@>f6@KPe3}2j_har$>HqzH;UCR^ssFD0 z7h+VLO4o@_Yt>>AeaZKUxqyvxWCAjKB>qjQ30UA)#w z&=RmdwlT`7a8J8Yae=7*c8XL|{@%wA8uvCqfsNX^?UZsS>wX}QD{K}ad4y~iO*p%4 z_cS{u7Ek%?WV6em2(U9#d8(&JDirb^u~7wK4+xP$iiI6IlD|a&S)6o=kG;59N|>K1 zn(0mUqbG3YIY7dQd+*4~)`!S9m7H6HP6YcKHhBc#b%1L}VIisp%;TckEkcu0>lo@u995$<*Em;XNodjTiCdC%R+TX|_ZR#|1`RR|`^@Teh zl#w@8fI1FTx2Dy+{blUT{`^kY*V-AZUd?ZZqCS4gW(kY5?retkLbF=>p=59Nl|=sf zo1Pc|{{N4>5nt#627ylGF`3n>X%`w%bw-Y~zWM_{Si$dc82|=YhISal{N7OY?O`C4 zD|qb}6nLWJ`hUyL+E>-;ricg9J@ZNYP(x(Sct&OI$Y!QWr*=^VN;G3#i>^1n4e#Je zOVhbFbLpXVu*16enDM+ic;97@R~u&kh__kgP#!R`*rQEnA+_dLkNP~L`0alC|J;c; zeiK=s8;BsLE)KbG3BD&Br@(Ha@SBT&$?xX`=$;eeel=|R_dIr6-Ro?=HEjnsJ_b`1 zK6Yg^-6;^2aW!xeTK)A~3Rm|L^FCHB_I>jIju7ZGo&N_1*QHkxH2!!%@o4iZ?vntS;&zJdPe1dH#04YD93A44o-MpfD zP{rn_aq>U%RDvC2+bp;xPlsOzauIi3*Lf42`jVKKZCRuKdYhi>FDuL2l=v{$BCN#Q6796s%r-AG$Q^t(3c@ zD?w0UhYr11@feiyl9kY_@H8~|xlmO<8PfQmj1!$@WieW@VxR@Psxfe-v9WCi1+f>F4VL?0O~K7T?m4-u|pSkBpUJZZe*16_wAp zSYZ@;k`3;W3UHKUWc8QeI}0jH5Ly=cGWQPw(Kr2fm=-5L(d`lcXofy8tJY3@Tuadz zYWXR{mW7XT!RF#RVCe%}=tM*O6!AD3^(!8un~opNI%Uko7$5t@<8+?; zTxDys(MyyGsUjtSu9$+|_-t!U3fVb1dkK?l`17<+jfl=hrBHnDSV>^R1=TnQeyqbW z>ov#l%!1|S!1>8UUxIdhQq`_klcHVx0{?#>K3#$4GlXncwldt!g17TcvKq-jo_996 z>oA=tH9CqRl6Yw?Uc`am!V?lHJbizOJaVaScf1UP5e7Dbgabq=b!B~T&_F6?ooU>w%x0A zH~&MHJ=q`fCH{U<7MDXE4SD32cDZA)WJeWkllJ`UspWaS#eDe^kg^oU_A14UE9zG-a^g{xaXf$})Wik>gT zl#dkzGr(;h0JZDuFn(+k8wNq?PZ5grQ<+sM?wBGt@JnH6v0#or-5wBQWKU~(S_> zkE!tc*ZJ1Y&*p(xX84POb3cClRMd!^qJ#CAZfIepEj-<`VURS_yCz0(?*Ixcj4 z-!zV1_QZhpm=0<;*(nm+F>T=)o?ep@CK5I%g^VAA+RB25ab?7)A~z~egru=I1S|@v zH7tXV!0wmGS^qj#e+MY;C5eUjEAp$Y?LDkS^QPZ}8WN85?r$u<-Epi;yZ1|J2J`se z$D6DpH~2F=eI0B&=UFAUnJvZAmClJlK)sutJ?M>xpZiWV&0=G4MZP+x+p>EX=HbCz zxls%Mw?*u^;LbHWIWCyq+yi)`GmFn9J112CZda_u@YIP%i;srFg_paU02Ifij*7}l z&CF-(3|>*a|+vbNR`^RP=9G?ymEJ0Z~)d&c*UE$UMepZ zcITr{0WqhxkjUnM15js_gW=e3Uh|y6ZReaXHIz-=p`x5VvB&rH9y>Amv@^WmXFEw) zQXYrk3feir=a{jMQ+wDIkkFnZ$k{sJakHn*?u za%4b!00ev8NVLM1TY=cl?KB&55BY_MU-sg?c>=Dbz_W{(Z~c?HJi*XpYL)C6Bd8WH zt+v-#0&o~@t4qESi*)+eW%@VD0|o^yF)n0hME$UtXF$*Lvh}7sso{`|pn*JDIy5^Fm3s$5*zEE=?u5<=l8FJc3r%+H} zdfoNl2J0^~!-*mOL5o-x32|e0Im*E!yY7F7E5N)W3>+v_LBydlEx?4$RL5f2oYRD# zaR0wv(-p~wO0eLDl3K=%`{5+0Gd$ktO=W)gWlGZJ0`K z$_RNA=ckrfa;H0KA~dR^p�(p-{x$&=IACIfoAR!za)F-^da-t3#0Dycnp zwO~NVXwXCl;jE<}>%@xz|=8fIJAB?>+E{7)|4l${4ngA3G|=r z2Dyv;VVWSgZx9Wj>qUjleGl3Ei9K4>h!(lPS%8VOG>Xu0%6VDz^O=bjJmuP7>DeUv zrbI}MlHB^^d?{zv6d=@_ZD2lg1&G7UjnVN{1}9WkaM3H~btX0GtSzB+tZ^qRgWo4m z!GmimlG$=wgXCnr6j@m<1gAL46#T~5Bnm=2{^@>|t&`9mkEPddj zAvG~@Tv~TAm2i%VW}R-g(Z0)z-Y|szHr@rk>4MAyG*Ma*7Yh#H7(!-5>DZ@8r;_dx z{prSe<>~099F8vsYd2xff7uAS%7{S)f(|@me3t2$iy&NEc7OUEchp@9A|X;;IA>8!oX+y(BKJ$EzV* znR$z;!L$s7uy@{OT~nG#B!NRraT8(X##Ho!0r_o@gg0CA-9H^;-uE&?$2$nHv_00o z%cbuUc-tCx$Uh&EZ4Nf4Zgqv)Y6>usG3>GeQnxx_Z6+PcbX-+ysbt1hQ`K1LDpOE? zrAhIZhSN9yVIAOa22gn577tbc&i3|3V8NWy&!tw##`}9*x}gtI^h1DzZRA>UuaJG) zaZ7j)dq!O}{?#8Y7~7i6fHh4{`pL?>-18|p!S75Y#^DM>-S3)vuZG+Q7l@ek zQP~#cBpWgg#mApc_sPYjpw8odQuRokmTkzcNl`^CcKB7e&;zViV;{Y{o^Y$%7i0m# z62%#1Lq!RC?}lK>%mp}T!3Xv;L*0v*>USLm``N%>w>@fwC+#T&Tx2bN4w(20JB}oU zuSa6v^kXi0xPs?pbaOHnyiqq6By1EZY9OZ^^QA>{q-Hsd&m`pbQ%8121aWG-F5xf zlZ%;B{;C>X19|`^_?dVyCq>n+41w7|!tUS!{9rHlbhX=SZO5CQ^;!Du_E7*`GiR^Q w)2!4MKjfSAeNo!9>IaV6aUZ*?W>} zs4%E?srLW`CJh0GCIK@hTkrW7A15Iu%N&?Q^$0+!{Tv&|t^Y@u%!L zglTg&?Q5q#ijZ;&HBQ?FNPp;k3J5!&{^+SGq?AX~SiOM9jJMRpyP?RCr@z38AQyy&WRMaC;n4una$~nJKSp?q|s8F00c9?Q! zY_ovvjTFm+DeQM^LXJ#v0}6HRt3R1%5PT*}W!k8BEM;Jrj8dIceFo2fhzTqaB3KKk zGlCLI)gU25(#u6ch6GeB1k@eHq7l{EHXv0n6xE#ws#ri}08kkCf8hUt{|Ejb`2YW* zvg}0nSSX1m=76s?sZhRY$K=3dpJ+y*eDULGnL2}4>4nvW^7_<~wIM_5fjvwt4h1|g z)g0Z6ZFq9j<~9~b8((~TN{Z?ZQfw|is&Xp~AC61sj;xItKyCHdI|tCMC_LbXF>~vR z=w6V3^H=W4CbAgR4#xw}ETTwu2guW~=Crl@SMXv85jQ=%y!s^?m4PI0My7MWICO;- z175jm%&PcPWh8QdOU(#8bp4!N7ET-+)N}N2zk2)8ch|4Q&lPFNQgT-thu053`r*h3 z_8dI@G;`zn;lH$zX3RzIk`E8~`J=BBdR}qD%n@vVG1834)!pS1Y?zVkJGtsa(sB~y zNfMYKsOJb%5J(0ivK8d+l2D2y&5X!cg3BG!AJ}910|_${nF}sC1QF^nLIhzXk-Y#x z0)&1iK!O;Og0Ky!;`b~v%b$`S4E&fB)1NB4v@8wr( z&+NX4e^&o)ecb=)dd~C!{(1e6t?&9j{l8%U*k4)?`(L3;Qjw z#w7FS+U(94MaJKS!J9O8^$)36_J8;thW#2$y9i{bB{?M{QS_inZIJ!jwqAbfXYVd$ zQ5fC$6Nc9hFi8m^;oI-%C#BS|c8vy+@{jx6hFcf^_;2VRgkoN(0h!_VSGmgNPRsxI z8$rTo0LaYq-H5i&gtj81=&xU?H-Y2==G@uQV7E`@+2E9XQW@{&j`?EOktk|Ho{HU>ZqDzvgjwBmdex z&uZNd2C1h{{}2k6Ys9$*nFP3;K%u!MhW`uZy7Sn`1M1zs@Es&;z*Z>Gsh@-3Fe6pE zQD2@cqF((NrRevgvLsvM_8;;iNyJ5nyPyy?e!kvKjGj`6diRFBEe49Oa7wwkJFV7Z z$YT&DWloYu-H?3<0BKn9L&JYDT-SK~*6c5pi18P26$JESKRYj{T7Zk6KiRJcbvOO*{P56Q6s8msbeI3>|j>K9}Q9UBeq*inXKemCm`-<5|-$ZyN4u$(3 z&HcvqehFD%5Yrmykg-^d`=BSa8(i=>ZoC77^mWY{evp(km@aHqhUECBz76YiR+VYK zY_avFC~V3$=`6C4JhfHAQ@DZtUOwH`L;oYX6zK0-uI^?hS$ALfq}A7evR;ohJHij} zHSZdW?EKv9U1s4oD*<(0oQ*;MaQ6@cvGL zuHCPgm_NhVsgp^sfr*ia^Db}swo1?O(_Q2)y+S$CBm+g=9wCOUPbz(x)_GbaKa@A7 zuI&!ynLiZRT#V%_y_-D`0Z5lT*auoe{(U5NylTzFSJW()W-#F6*&A`LNO1bV#Y;QJ zSbLBnp|B^dtK|KIWC|No>JjWBWE@n7O)x{&^E(WMeMvp57#qA8m* zeTow*U@_86B#Fm*rxyYu5PRWaWHx8y> z*qmHEp(AMDl0v)ij(AY8fnH=~ZwwjVAbu*m5;xPfidh@ov6d8g zfJsi&!QyK53Es%sC39ts;54V68koALD4b|%tNHW0bIkZAJKa=W&FomJSEDT>W1xIX z1x%Z>AvNIsSPLcn3RTcHXb@KB?cuM)=x6fcIx>&(GxqZ8w3p#jJ(GVgc*`c0HG}dv zIop&Qim!K1NFwic%07KcjWgHBPUkq7f~lj;TPqVGTiT#cUeim>;nY`>h@a*S{qQex zQ`z62WK|Mj)Y{tfF{;T4P;c8$Q|KU?Joh zIkA^z%X7z|r>4aTh@|StTi!-r1D!g=zb#3d#{{&K3CqE$Iz-UH<%37c zRfkO`&uM%#AD3PHv`g5t0e^O%nVL0d{Xlx^EjEC3#skF@`zl-7PF^0oxW)1!C!JxR zWvuAHH?)61FKA1QeT*_sY7;_Id#!GmV4n`MO{~sv}VLSK` zXRw=Y=Clz*00B(5y^K;gCZMAzjT5+c3IC=)l(9VIDdatpxj3y89WwI|bH&$!ZEvp` zPR!T@#!(|KfI-w?!&+7$N3F6>tD{YO4Qg$d_`nNEdfVCha9vaPn0jI0`)`@*72hq! zpU5ND^P*RoEkbD5o#az(-g=Y)L>HH>Oc%}$ zT3Rs_ih0;4+Lv4Y;@Iv(;fUbQ=i-G(#>vghec~*j(I#r|5mqFiJBpzi&hzEcD{u$< zRsm0BVYn=pT;0>R(itW|*D&;O%bOc7et9ACaH#J>z3A1A~6fdP>pmbM%xzm4>|;c_?B+%sl;Qs2{t!60$^u zH1t@9^6>;?!FuusnISi$f5CL&;z?EqJN$FBuWDA#D5`cy_UvCFIVvf{c?4N0teh;d zET$7aVbj08KTQS!x?Nd1Is8q8qFzs}a=!@nJ;7FSfCY^T@D-gpw`w<6e#X3+;O}1h z$%I!M)0bg|EKUA04Qjn@+x{Rj8vt6Wn!R|3A92z}^$KfF5(#CWr4y#~re1CN4i4w0 z#GsypBR{xA3Er7sgAi(|}1-W?s~n$7?K|9WL8kpVfw-;#b9 z+mn;=ep!162U5R>_t}fOt~tE?s#m( zO-S$7>Ay6*hHdZ)7_oU915WYYCIX;hFI-U2EWYX!pllONr@Q--2o~`!isi6vTPLJ4@(|o=%NHYjo0_S&q*UQIROw@*N-By@PaQ&;YxFZ0aR zX&}LeOEz);#m~Hwm^VAY8DK}b$F4bo{jMN?d!lxKPhNklzr^Cd`0f4oJr^z=I|l`* zm8AHm*fPV`0=lF3Pnnp}&J0N1X@}-D94YvmUabFrLGSnTz7Mu^21F#O5tN#CuY9Vh zUZBH=ez%h*wkf0hBtXJh1SN3d+IF{gzT7lp)j}n?03lt;XSQRAh7qd&v;RwTYDuQ# zbI2*r<>?x-G0@hM{;%{VBD7nLKt~D`T~-HAt5;h%i0_=Ifs=yHma5dhJ+QMG?Ux(a z|E?1CMy1!~oA`FP!k~iG=t&5#>bVdz=peT8HMB6Y)#7PpETtNryT^+Rv3vpJaF^zP z{H}0-LyV9Fu21ID%wO9f1IKlFr1p4c{o-?03vyB-tr5duk^&L$;m_|f$vs`^Sl{j2 z95}oY{LlY+=ZS%J+tZoXCd0*sSU7w^gjovXn+g7uyra5{cU49@yHf#Z^Jl-$9cIfo z+AJuxH$VLb=#+uBbVmUjnx zxb1pZ@-O9=AIk4@S)m6fJ2?{HrNYwwnL3a45muuNjr;6$O`bGEM0T4A2_S$t=86*- zcO+0mywg*j#A4mU}enR_!cGmIYQ;qwfchWtFEXL)AK%*;=j znYne+hS4EMy3S)C*mZ1KI>!+)0V@9!N6H$Y}~MJ{rYuf zz^KljIWvFi-?#?V@LPR&c6Nn{!=XM z>}-h$S76;$H{E{Y%@^zlmOl^efBwa%UU+jJD9UVukQ3ti_kH-?H*RC0?M1W%FCvMB zM_+v6fk$6X2sx)-p~B3&Kl{nscK}pNLM*qjtpaf9>AU{-iPKQZR8yCg!TY}Qg*(;) z)gdvCcB%kppZc$VdvsK@)3l1{&DG!d_6OHOS`y=ITLEVu`unSKA2E%JD*DVX{LJ}K z9l>hMRDqxQh0lnpGHpVYneX}eA3Pt|2v%=q;rt)``R|#bDyB)OXY&vI_@|*}h}G?^ z@aZ4_!7cQPX`!fW_?{oT1NTwHs#l5L-0`E|y@48<3Q^HFf8=Idi zpJYD%1MkII!~|7I^WGo)IF=?{>ACnjJ_WUi39C}!Q{QnheVJqeKKqq5^o5CBde(g9 zvw$X6^jz_^E2$wSw4!q5*RG(C2_^XO$HBn_55vbl44OnTTRwRaePP0vo{K)U1#99& z<>rq7V&V(<&@I%MFoN5zrY}sz=(*-L&}1QQ*a%`u25h{cFj===17eB_uGuzG&byQ< zrm8BJZl4r_E$3k|Wo6FW0-6M7>qac5uFQsQcmkLWGfeH74S3Z_rJ!jgN++!@i=HW8 zkyjI(oPH-+-N#Qc^-mpNO`bc6r=2-<%&Wy5K1vfFJB(L_IkpS6fY^NmuL8qsgj>MD zn~BHH9WM~32_3vd=W&B)k7F9q%stJx+b_L_X-4zr^LVUMCmyCTA3sWtkvsmME?Xiy z?xOSfB=_$oY06~J-HcCq&)qcW{j;uP;?Dm}=hkq?zh&n!;m((-G-u_t|6x399Q;>A zgNpxoJNj{u|MFDH7Rhq@FCAl0dE|ddnl!oh9{Lq?@JDoR6L;C941IK`ISfdE$4S zE0AUQ8+2|Ncl_q5QkSp#AODp~(^mfP&%Au@@|TBQwoP`UU+V{6u8|)6ZA{~uKmQ*M zmrMTDU8S~8Eqi{^v0Ug&5Upcm#y7Z1(RbgZAG8jB$eRwCspQ)>5;U)oGZ&E5aeR*K z8Yt`Y0$G))Yd(Y3KH}tA4`-_QmNke5hU_|nq=xtyjwW(_o?itz>B>WM&^63bNdQ)k@-IgDHW*RW$Xo9#RzrTrCn7L2H{9Amq|qNg@#eZY=|P zCoI?2s+L)zsM%WX(NbVEY^`C>lFjIBYmJ6@DKJ0ZT4&F&WHW!dwa%QzOG!?jY_2(S zDcEzZbz*2Q!43|z))9yOP9X1Xt%DXzwY(3tl-TR=Qb_MbZYRrooh;dYYmS!U_as1(=YVB?Q_A|tNu5Ut&_q3jbfDM zoFxT^uEuH`nX3*sB%K?GuHUkweYReBwnHqh3P)~`+s3+Tj!rDA1e)8vuBv5J*IsxC zkd^~b(aGzArj08{>cnzOuy04C+C`}gb|Yz-1avxeWzev3NzcHbz_&4W@QCr$z3~w=8Ua- z`;vfG1~BP8CyLb=F7t1am~ph_#|O%$khSJ9%Vtcn)YmpgQxF?xM^_Vb+5fnpB^W0I`f%X8gb9#X{Q-yJG0{Z56aWeI&zPxnf5pdJA38bM`cYnS#x)% z`n1tFf$i)W-hGm(f9mde^=X@NcV_lFb=P`4&CI&H=IArijGwdCk&X@uQ$5xmj!~^? z#$ROCI)V-~t%L%GS#wo@U27ddR`4`3)WoB{R-4snfNrfee|kI8^bu#yDgYqOwas9# zmcb`3!kRJ`Cr=_tq)8aMt{aGtUZsqwVlj6DgCGre>AEt&x8H_in!x@uwgExIh|-mA zjdaC(29~CTVSaaF7HPbql&*9Uo8P@f)>LqCXclr}peS7_1BQ28u9PO8Eq1@`l3q9o zkfKCaO2?T?ZyA6loW<#9_c^O=m<&h}CA!ineAD@=(gbq`vyT|tiJ6#^B1$P;;qax` z55k&Q?wEh#87niLo*+n4L@65J(Nz~=Ya%7^(miLb(E>A3B@|Jjl;FU&D>o|9#7PJH z?|ago!o;WC^h=|T7PVBg(DAB}72cyUS zb(f>Bwbr!F1eTCO5fpj<{PqhY5>143p?~5ZA5H40);=@M#MYvrB6gqHbU_!GSY??i z%s=>-ciA4*zOOZHds0a(kWewZ4h(k8h(ua7HX)Au&mY~H8KY6(_cb$_&fA@QjIW-*heP3%$d!m5^AdnT}`12qA^c@!g3DOwZ5WwE2?)-yU z!)Vx#Mtxt?FzFTwK!77sy7)sMzUd->w4^bxtpM2j!b1pjgyk zGKwWGeb4)^zjy{9Es&PU1}gwg?|J#L$KJB7ett9@4M%-nGtIQr0>Fl@8-yh`-+1ed zS6r}(MeSvgSoFmH*_WPu@i?}!AB~2?;i&IxrkNg~cQ9Som98tcq)k^|eeER|Zl77t za-TVUc;DNvzVXJ%w52+#weN?+;i#{f#!Oc&z?81*N>^e~ltRS%ZI@lR{rs()HmqG! zx*}ZrI-EZ}ckJMiy>A^oofwDfC~IH)z8{VHKGT@#E5I(Ll&+MnMCl>~AV7+>Gi%mF zkU1QlKASdR0B80!YhP<$Ywi0?W2Ux45oPfxv9QolWzJPD^weBfvo4SONxP35106sAmh(e+vAs0GboFD@PvNs)jNPvarhW}0YliZEg{Gazv z+JDIpoojRVPr<*C|BTq<`6ga{5q^8^!|0cxe=rZ!zxH3%f5ZO0cQ*Z<^$Yt2{|Ek0 zyT|*F+CO@K;(owBKtGg!S^xj-Z~rga2m6nxKl9J=fBSuNKW_dLKWhJKeg^-Xe`^1? z`TyJj)8E!#>_3Y?uKrwqq3LJ#SGU>AzUO|6`nR^u&3FNN_jGOc zw)Nw`wr3yIKhgcee6IaN=ws>M{6677%)hPwx&HzC(f&u~&)6@b2kNRzBDQAP0*H73 zq%McOmRk{B3i47qRe=DA*$&odrbEJZ*pV9XXa&p@wlW~@Yfs>V{yiTtplMhgM*-Bz zsSnlq&pG;z0OUN%$~$3=g1UF+G*>+17eRbBf3=y79J}KR8owon@$1Z7MIrvvWWH)34nK2SD)GsrJ{l z1Cl#oVo3A8qY3e=aF)qzms~FG#2$LzT=gs&aVMOj>(%{y<&O0cG!nCiESl~x=^dF{ zKvj8F1K8Ng171wwM5Fh4KoQw`_c6#y$(5cAm7e}~nJ#A*fx+c9;y#&W!#VukR)ugk zKp3=+;Ut+IYn%m+r4d*<`L2h%aDnX5}^!5R|H;(34AoVWjRx(msBZvk;rCI*|~ zdOijqI@9Z{Vu!~jvHW{lBa$rnl4+!s_5sfK3bCGk-B%iDe&@-}+%fOKU|(9?V1 zHE8&@4z)Kx!RAvAs z!Wic9=o#(bg?kc-G68-m(jZ`^=XGUXb)}t(%&~sjFnV^sEX%hSy6UKC4iOhgV=BHV z2w`4g7Y=s#Vu2B_?#VQ|hP39@eArgfX>-0S+dd&^mx0*wp}>)x;c4RUgxz%;oNe?& z-7-lJ@Y^2^C;=qJsxx5|xF)*pTGhch2B&kxtn;f!7=gznk}I3}Dh}(CoMXgA5-p&kS202!l?!fT3t|HG*rIP~mS* z$Wjo}jq3}z$Qq!9yrtd3fM0N629ZM?LU$nv@Tv9b7I;D|;0H2dsA~g7Z7zp1| zB)XmrkMgF6OQr|R)HHD^TE{Y#j!~SR?b`Xt3Qs`B+x<hxexYeAjMUWdZ-*n9%(1)Wb(n2U<><7&9dwGJmrob)4%H? zlQ%z+L-^$dFhhH|@u$%97Qz?*Ynh2VG@q|?8vY&L74&fs&_b&3$x&Oyjl~LQDRRap zJU4U*R+(2Dd!G+lh8!V{pT_UJn+^1Qg6$` zqkNm(a#hWyc6SP+p5=C4HL8-m`pO`5o~`-LI?_h5CsH?F_%?nDodmz&pWR20WTpJE z?N|wSzLjMUK8E)a2tI}Lf;+;*M|h3Y(U#>)g1>zk9|Hd}oZAa2 zLYBWBoSW!Ts!RwXr^8h+U*@{9{zqS^iH)Op<;r`Uw~nc}<^$V~_i%$GFjaG?X1@E|M`h)nekvFKt`Dh-f>@|0-`Xoq)o` zx;JmzDfOV9qCx|EVpogEe0LK~tGS?5$$L_i6P$P6wIsCQaP_;d{{N=iV@+8LI}o#( zvo*Ejy=IIn{rdIQh1&q-{EuohpVOjJ^Q3lD*YTp37$^RRgn8ihpdu5{Ct%5-KO!VL zcNB6dUajXI9jkm-P|i3~GB-A(X`P1Oqqb$tcku)UJw0w3GeUijb__#QT4j%64z%EeB7S?jlWwx_7&+EEvB|6N=kV}DwnyAlX=?j`) zmU#!$*^@NIu#n_d7;WoJV@*Fbv9|yJO4;n|BNF2xy(54RyB>t~8lUOUW$&2%Nwi1y zx6JxW88>U2$#qhl^6KUbtmg9}D0o5vYDT7kWJthLGkpGnN4T>{St^_EU>4;DmLF9o zr|LqsA8_MoNLQ=}w?8u!ziSZ@PC#Y<#9uJFo-ozVo6D;<8j^1$c|qAE3ZTE5i~zmE z$BU5lw6l=EWsg^y^;8>r9qH{xfL|~PZYK#md$zZ0?o11gV<*WSW~cgy2GYGQir%wf zt4iW8D+;s*;RGrmd(-T<@2&j(Cb9xhV*l-x`TpK`xq|7p?5R%5*s!69?2c!cC*VY* z2DE^9pvOPLU!1e}wA8S8opcTJ3`NB>hY=JQnL~QFXR4K8A$BqJnoEB$wn-%u@E6Mh zCfMF4kusv3N!(aHC}4)Xs^xoOwXd%e^6pi5|DZo=Q25j+6HlJ^7FodH6y1bMROR^q zGu6)fopS`h%Sw<;ZH%TEPf+#81-#_v+@8nlR0jLcIDKQtLleOC)6yLZgC!D9X3GgS zohwU{v$jl=quD#Go^hB{`@Qw*a%`(^jyT~=q^bWgGzRj;|12J55HWdCWV}EB|K=%N z3Nq-qxJJ`>^|1MNN+q}zTB&ooE3j==AgK@^UW<^oSbeALa2peF)Th6{@sj0KyMNHZ zksk1+MXN2tv+22A%cQOGpS9)77(uP9mh+!5T5ERLvF@b}$+WvXM45Z?-kCa)fb~f1 znVbTD$Gx-0Zxc`0D@YgHakge6SL0H`-vN_x?AP0>iGH0_EE&=v83hMJgaKAI0jJXm zVxVz;X<$v6WW7}fxROO7vr#YLP;;lij5VrX{;>7kK6TtOH&6|Ar^xo>00%+u$C4@# z>!jOt6*3><171+WxoZnKDTzJtDRw+T030;yI}~uV@9fCnei^I*j>Bp&mzP2d=FPb_ zCM*l_+$LDR3B*a!A$g#>xsrZvw0lckxmMg>0aQd7tPyN=t{dgXb;Ie+T8{fZH=gdu zM7Rg9c(kg(Jg0?ARRRl=AONFKrvFj)lTY$KfT%6^6s`mk*ABGhsce*LsoD>K{z_M2 ziPpnu+lw22PfF!CoId^6n*G4H(Ix+#+N{C(da7t1BYMGEaE#PdpOLxsVD5riQXHp@OX;`S`8VnpM~)I920w~<3|mo0 zf8~Az`*?2?H&gZ&*K&bRkV@qzvMlRHXys8*Ze2+1c?5o!^+$&MHxB@4Ee5cke52R! zmn7AZtY6ST%ixgU5)%$%QcwHj7Es-Qu^kLAPwy%7pGBw_4Q9#da^W2$}axNHr03)_nw z5?yuNmXrI5HgS46)c5&}B)Tts49oU92>3xBLLy}FMUW=84DQbVq^;7_e7|(Sdz|&J z73N+M`rc2rt*oSWu#7S{*s~nH6HRHJS1SmzeXk|;CA)FI4bat3<%}nkB%;;?=F>B7ms9QSxv#@+69;@>QaR?REYX4&)=itG>rM{<{A79Rmk)`5ON#GL`*KX%}Ihk3w(RtM-WLt z?f&FLF}4N^yE!(pZ&Yj&Bc`~K0@4_}*0Om?wN|}4WJ>WL;G^H2*QpgEkGA~OET-Km zkwz|5{6dnz1U<2Pe9DNL>3g5FEIvp1jzP&2K#z~j%g6!7B;^zF+o95?fV{3mnB8*RMhCDNp>Am-3e@jNfMj?jHV$MWjk!DDKP zkAz$Y?Sr)!GUOX}qTQ5aMh|wq1uq}~joWyKl=b_LboM#wi{CMuz5x6BKlA-qy++cM01D3b7`uD z#l6M4pI;JCypO8JZ6?U&wNxR!{4oB_ zlV!x9+-&Qy6{%MQ{~yoZGkKiTSC`YS_j22~G;xUV855g2&C(zm^V!(wpcm@zn{%!g z4}JGo(sGZ1O~to-}le

UmY2RIYtNPVDpE$%vda+HD#3m z&VuXJ{BK&Qe+rBa7eq}Q(bq|tn(RrJAk|ztj2(i{d>nmQnM?;HF2k&9sA6up5tmjl z7lySlzMbifH17-m-Lwa_F&e7nOH?ESi3#ckR3tsM+jsck3`oG!uMS}|eAwVXv>}qxwq?QY%QJ0}r@^;fhuUA9W z*BVl>TGo&N004@xSiwDUXUvp51sVmqO3m)=B55aPwf@0=e}cN+$-BdKxY`YrT_4)0 z_d10#i44Q*rFr8MC>*)v$EJvz``(pb{e&*6k+b zsMz%($|1+8hn8c2?P(l@;Rb&CsZeYoCI3?2!LqjbwPXW3z4G$Qfj=cT5Yb%vY0(AX oeb?AaKtwrnc|$|zzw9vfvn^aJJ!zd)XFXqqy0000001=f@-~a#s literal 0 HcmV?d00001 diff --git a/examples/tv-casting-app/android/App/app/src/main/res/values-night/themes.xml b/examples/tv-casting-app/android/App/app/src/main/res/values-night/themes.xml new file mode 100644 index 00000000000000..34c9d80faaf11b --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/res/values-night/themes.xml @@ -0,0 +1,16 @@ + + + + \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/app/src/main/res/values/colors.xml b/examples/tv-casting-app/android/App/app/src/main/res/values/colors.xml new file mode 100644 index 00000000000000..f8c6127d327620 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ + + + #FFBB86FC + #FF6200EE + #FF3700B3 + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/app/src/main/res/values/strings.xml b/examples/tv-casting-app/android/App/app/src/main/res/values/strings.xml new file mode 100644 index 00000000000000..48a7fd5890bbf5 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + CHIPTVCastingApp + \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/app/src/main/res/values/themes.xml b/examples/tv-casting-app/android/App/app/src/main/res/values/themes.xml new file mode 100644 index 00000000000000..35a77a16d6c8c8 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/res/values/themes.xml @@ -0,0 +1,16 @@ + + + + \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/app/src/test/java/com/chip/casting/ExampleUnitTest.java b/examples/tv-casting-app/android/App/app/src/test/java/com/chip/casting/ExampleUnitTest.java new file mode 100644 index 00000000000000..9c9e4486d25319 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/test/java/com/chip/casting/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package com.chip.casting; + +import static org.junit.Assert.*; + +import org.junit.Test; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} diff --git a/examples/tv-casting-app/android/App/build.gradle b/examples/tv-casting-app/android/App/build.gradle new file mode 100644 index 00000000000000..79c656c2ab4cc1 --- /dev/null +++ b/examples/tv-casting-app/android/App/build.gradle @@ -0,0 +1,25 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +buildscript { + repositories { + google() + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:4.2.2' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + google() + mavenCentral() + jcenter() // Warning: this repository is going to shut down soon + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/gradle.properties b/examples/tv-casting-app/android/App/gradle.properties new file mode 100644 index 00000000000000..d47c2f04446cf6 --- /dev/null +++ b/examples/tv-casting-app/android/App/gradle.properties @@ -0,0 +1,26 @@ +# Project-wide Gradle settings. +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app"s APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Automatically convert third-party libraries to use AndroidX +android.enableJetifier=true + +# Build SDK from source code and debug in Android Stduio. Must also set matterBuildSrcDir. +matterSdkSourceBuild=false +# Point to the SDK build dir without quotes (out/android-arm64-chip-test for +# example) to build SDK from source code and debug in Android Studio. +# Set to blank to use the SDK prebuilt by scripts/build/build_examples.py. +matterBuildSrcDir=out/android-arm64-chip-tv-casting-app diff --git a/examples/tv-casting-app/android/App/gradle/wrapper/gradle-wrapper.jar b/examples/tv-casting-app/android/App/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..7454180f2ae8848c63b8b4dea2cb829da983f2fa GIT binary patch literal 59536 zcma&NbC71ylI~qywr$(CZQJHswz}-9F59+k+g;UV+cs{`J?GrGXYR~=-ydruB3JCa zB64N^cILAcWk5iofq)<(fq;O7{th4@;QxID0)qN`mJ?GIqLY#rX8-|G{5M0pdVW5^ zzXk$-2kQTAC?_N@B`&6-N-rmVFE=$QD?>*=4<|!MJu@}isLc4AW#{m2if&A5T5g&~ ziuMQeS*U5sL6J698wOd)K@oK@1{peP5&Esut<#VH^u)gp`9H4)`uE!2$>RTctN+^u z=ASkePDZA-X8)rp%D;p*~P?*a_=*Kwc<^>QSH|^<0>o37lt^+Mj1;4YvJ(JR-Y+?%Nu}JAYj5 z_Qc5%Ao#F?q32i?ZaN2OSNhWL;2oDEw_({7ZbgUjna!Fqn3NzLM@-EWFPZVmc>(fZ z0&bF-Ch#p9C{YJT9Rcr3+Y_uR^At1^BxZ#eo>$PLJF3=;t_$2|t+_6gg5(j{TmjYU zK12c&lE?Eh+2u2&6Gf*IdKS&6?rYbSEKBN!rv{YCm|Rt=UlPcW9j`0o6{66#y5t9C zruFA2iKd=H%jHf%ypOkxLnO8#H}#Zt{8p!oi6)7#NqoF({t6|J^?1e*oxqng9Q2Cc zg%5Vu!em)}Yuj?kaP!D?b?(C*w!1;>R=j90+RTkyEXz+9CufZ$C^umX^+4|JYaO<5 zmIM3#dv`DGM;@F6;(t!WngZSYzHx?9&$xEF70D1BvfVj<%+b#)vz)2iLCrTeYzUcL z(OBnNoG6Le%M+@2oo)&jdOg=iCszzv59e zDRCeaX8l1hC=8LbBt|k5?CXgep=3r9BXx1uR8!p%Z|0+4Xro=xi0G!e{c4U~1j6!) zH6adq0}#l{%*1U(Cb%4AJ}VLWKBPi0MoKFaQH6x?^hQ!6em@993xdtS%_dmevzeNl z(o?YlOI=jl(`L9^ z0O+H9k$_@`6L13eTT8ci-V0ljDMD|0ifUw|Q-Hep$xYj0hTO@0%IS^TD4b4n6EKDG z??uM;MEx`s98KYN(K0>c!C3HZdZ{+_53DO%9k5W%pr6yJusQAv_;IA}925Y%;+!tY z%2k!YQmLLOr{rF~!s<3-WEUs)`ix_mSU|cNRBIWxOox_Yb7Z=~Q45ZNe*u|m^|)d* zog=i>`=bTe!|;8F+#H>EjIMcgWcG2ORD`w0WD;YZAy5#s{65~qfI6o$+Ty&-hyMyJ z3Ra~t>R!p=5ZpxA;QkDAoPi4sYOP6>LT+}{xp}tk+<0k^CKCFdNYG(Es>p0gqD)jP zWOeX5G;9(m@?GOG7g;e74i_|SmE?`B2i;sLYwRWKLy0RLW!Hx`=!LH3&k=FuCsM=9M4|GqzA)anEHfxkB z?2iK-u(DC_T1};KaUT@3nP~LEcENT^UgPvp!QC@Dw&PVAhaEYrPey{nkcn(ro|r7XUz z%#(=$7D8uP_uU-oPHhd>>^adbCSQetgSG`e$U|7mr!`|bU0aHl_cmL)na-5x1#OsVE#m*+k84Y^+UMeSAa zbrVZHU=mFwXEaGHtXQq`2ZtjfS!B2H{5A<3(nb-6ARVV8kEmOkx6D2x7~-6hl;*-*}2Xz;J#a8Wn;_B5=m zl3dY;%krf?i-Ok^Pal-}4F`{F@TYPTwTEhxpZK5WCpfD^UmM_iYPe}wpE!Djai6_{ z*pGO=WB47#Xjb7!n2Ma)s^yeR*1rTxp`Mt4sfA+`HwZf%!7ZqGosPkw69`Ix5Ku6G z@Pa;pjzV&dn{M=QDx89t?p?d9gna*}jBly*#1!6}5K<*xDPJ{wv4& zM$17DFd~L*Te3A%yD;Dp9UGWTjRxAvMu!j^Tbc}2v~q^59d4bz zvu#!IJCy(BcWTc`;v$9tH;J%oiSJ_i7s;2`JXZF+qd4C)vY!hyCtl)sJIC{ebI*0> z@x>;EzyBv>AI-~{D6l6{ST=em*U( z(r$nuXY-#CCi^8Z2#v#UXOt`dbYN1z5jzNF2 z411?w)whZrfA20;nl&C1Gi+gk<`JSm+{|*2o<< zqM#@z_D`Cn|0H^9$|Tah)0M_X4c37|KQ*PmoT@%xHc3L1ZY6(p(sNXHa&49Frzto& zR`c~ClHpE~4Z=uKa5S(-?M8EJ$zt0&fJk~p$M#fGN1-y$7!37hld`Uw>Urri(DxLa;=#rK0g4J)pXMC zxzraOVw1+kNWpi#P=6(qxf`zSdUC?D$i`8ZI@F>k6k zz21?d+dw7b&i*>Kv5L(LH-?J%@WnqT7j#qZ9B>|Zl+=> z^U-pV@1y_ptHo4hl^cPRWewbLQ#g6XYQ@EkiP z;(=SU!yhjHp%1&MsU`FV1Z_#K1&(|5n(7IHbx&gG28HNT)*~-BQi372@|->2Aw5It z0CBpUcMA*QvsPy)#lr!lIdCi@1k4V2m!NH)%Px(vu-r(Q)HYc!p zJ^$|)j^E#q#QOgcb^pd74^JUi7fUmMiNP_o*lvx*q%_odv49Dsv$NV;6J z9GOXKomA{2Pb{w}&+yHtH?IkJJu~}Z?{Uk++2mB8zyvh*xhHKE``99>y#TdD z&(MH^^JHf;g(Tbb^&8P*;_i*2&fS$7${3WJtV7K&&(MBV2~)2KB3%cWg#1!VE~k#C z!;A;?p$s{ihyojEZz+$I1)L}&G~ml=udD9qh>Tu(ylv)?YcJT3ihapi!zgPtWb*CP zlLLJSRCj-^w?@;RU9aL2zDZY1`I3d<&OMuW=c3$o0#STpv_p3b9Wtbql>w^bBi~u4 z3D8KyF?YE?=HcKk!xcp@Cigvzy=lnFgc^9c%(^F22BWYNAYRSho@~*~S)4%AhEttv zvq>7X!!EWKG?mOd9&n>vvH1p4VzE?HCuxT-u+F&mnsfDI^}*-d00-KAauEaXqg3k@ zy#)MGX!X;&3&0s}F3q40ZmVM$(H3CLfpdL?hB6nVqMxX)q=1b}o_PG%r~hZ4gUfSp zOH4qlEOW4OMUc)_m)fMR_rl^pCfXc{$fQbI*E&mV77}kRF z&{<06AJyJ!e863o-V>FA1a9Eemx6>^F$~9ppt()ZbPGfg_NdRXBWoZnDy2;#ODgf! zgl?iOcF7Meo|{AF>KDwTgYrJLb$L2%%BEtO>T$C?|9bAB&}s;gI?lY#^tttY&hfr# zKhC+&b-rpg_?~uVK%S@mQleU#_xCsvIPK*<`E0fHE1&!J7!xD#IB|SSPW6-PyuqGn3^M^Rz%WT{e?OI^svARX&SAdU77V(C~ zM$H{Kg59op{<|8ry9ecfP%=kFm(-!W&?U0@<%z*+!*<e0XesMxRFu9QnGqun6R_%T+B%&9Dtk?*d$Q zb~>84jEAPi@&F@3wAa^Lzc(AJz5gsfZ7J53;@D<;Klpl?sK&u@gie`~vTsbOE~Cd4 z%kr56mI|#b(Jk&;p6plVwmNB0H@0SmgdmjIn5Ne@)}7Vty(yb2t3ev@22AE^s!KaN zyQ>j+F3w=wnx7w@FVCRe+`vUH)3gW%_72fxzqX!S&!dchdkRiHbXW1FMrIIBwjsai8`CB2r4mAbwp%rrO>3B$Zw;9=%fXI9B{d(UzVap7u z6piC-FQ)>}VOEuPpuqznpY`hN4dGa_1Xz9rVg(;H$5Te^F0dDv*gz9JS<|>>U0J^# z6)(4ICh+N_Q`Ft0hF|3fSHs*?a=XC;e`sJaU9&d>X4l?1W=|fr!5ShD|nv$GK;j46@BV6+{oRbWfqOBRb!ir88XD*SbC(LF}I1h#6@dvK%Toe%@ zhDyG$93H8Eu&gCYddP58iF3oQH*zLbNI;rN@E{T9%A8!=v#JLxKyUe}e}BJpB{~uN zqgxRgo0*-@-iaHPV8bTOH(rS(huwK1Xg0u+e!`(Irzu@Bld&s5&bWgVc@m7;JgELd zimVs`>vQ}B_1(2#rv#N9O`fJpVfPc7V2nv34PC);Dzbb;p!6pqHzvy?2pD&1NE)?A zt(t-ucqy@wn9`^MN5apa7K|L=9>ISC>xoc#>{@e}m#YAAa1*8-RUMKwbm|;5p>T`Z zNf*ph@tnF{gmDa3uwwN(g=`Rh)4!&)^oOy@VJaK4lMT&5#YbXkl`q?<*XtsqD z9PRK6bqb)fJw0g-^a@nu`^?71k|m3RPRjt;pIkCo1{*pdqbVs-Yl>4E>3fZx3Sv44grW=*qdSoiZ9?X0wWyO4`yDHh2E!9I!ZFi zVL8|VtW38}BOJHW(Ax#KL_KQzarbuE{(%TA)AY)@tY4%A%P%SqIU~8~-Lp3qY;U-} z`h_Gel7;K1h}7$_5ZZT0&%$Lxxr-<89V&&TCsu}LL#!xpQ1O31jaa{U34~^le*Y%L za?7$>Jk^k^pS^_M&cDs}NgXlR>16AHkSK-4TRaJSh#h&p!-!vQY%f+bmn6x`4fwTp z$727L^y`~!exvmE^W&#@uY!NxJi`g!i#(++!)?iJ(1)2Wk;RN zFK&O4eTkP$Xn~4bB|q8y(btx$R#D`O@epi4ofcETrx!IM(kWNEe42Qh(8*KqfP(c0 zouBl6>Fc_zM+V;F3znbo{x#%!?mH3`_ANJ?y7ppxS@glg#S9^MXu|FM&ynpz3o&Qh z2ujAHLF3($pH}0jXQsa#?t--TnF1P73b?4`KeJ9^qK-USHE)4!IYgMn-7z|=ALF5SNGkrtPG@Y~niUQV2?g$vzJN3nZ{7;HZHzWAeQ;5P|@Tl3YHpyznGG4-f4=XflwSJY+58-+wf?~Fg@1p1wkzuu-RF3j2JX37SQUc? zQ4v%`V8z9ZVZVqS8h|@@RpD?n0W<=hk=3Cf8R?d^9YK&e9ZybFY%jdnA)PeHvtBe- zhMLD+SSteHBq*q)d6x{)s1UrsO!byyLS$58WK;sqip$Mk{l)Y(_6hEIBsIjCr5t>( z7CdKUrJTrW%qZ#1z^n*Lb8#VdfzPw~OIL76aC+Rhr<~;4Tl!sw?Rj6hXj4XWa#6Tp z@)kJ~qOV)^Rh*-?aG>ic2*NlC2M7&LUzc9RT6WM%Cpe78`iAowe!>(T0jo&ivn8-7 zs{Qa@cGy$rE-3AY0V(l8wjI^uB8Lchj@?L}fYal^>T9z;8juH@?rG&g-t+R2dVDBe zq!K%{e-rT5jX19`(bP23LUN4+_zh2KD~EAYzhpEO3MUG8@}uBHH@4J zd`>_(K4q&>*k82(dDuC)X6JuPrBBubOg7qZ{?x!r@{%0);*`h*^F|%o?&1wX?Wr4b z1~&cy#PUuES{C#xJ84!z<1tp9sfrR(i%Tu^jnXy;4`Xk;AQCdFC@?V%|; zySdC7qS|uQRcH}EFZH%mMB~7gi}a0utE}ZE_}8PQH8f;H%PN41Cb9R%w5Oi5el^fd z$n{3SqLCnrF##x?4sa^r!O$7NX!}&}V;0ZGQ&K&i%6$3C_dR%I7%gdQ;KT6YZiQrW zk%q<74oVBV>@}CvJ4Wj!d^?#Zwq(b$E1ze4$99DuNg?6t9H}k_|D7KWD7i0-g*EO7 z;5{hSIYE4DMOK3H%|f5Edx+S0VI0Yw!tsaRS2&Il2)ea^8R5TG72BrJue|f_{2UHa z@w;^c|K3da#$TB0P3;MPlF7RuQeXT$ zS<<|C0OF(k)>fr&wOB=gP8!Qm>F41u;3esv7_0l%QHt(~+n; zf!G6%hp;Gfa9L9=AceiZs~tK+Tf*Wof=4!u{nIO90jH@iS0l+#%8=~%ASzFv7zqSB^?!@N7)kp0t&tCGLmzXSRMRyxCmCYUD2!B`? zhs$4%KO~m=VFk3Buv9osha{v+mAEq=ik3RdK@;WWTV_g&-$U4IM{1IhGX{pAu%Z&H zFfwCpUsX%RKg);B@7OUzZ{Hn{q6Vv!3#8fAg!P$IEx<0vAx;GU%}0{VIsmFBPq_mb zpe^BChDK>sc-WLKl<6 zwbW|e&d&dv9Wu0goueyu>(JyPx1mz0v4E?cJjFuKF71Q1)AL8jHO$!fYT3(;U3Re* zPPOe%*O+@JYt1bW`!W_1!mN&=w3G9ru1XsmwfS~BJ))PhD(+_J_^N6j)sx5VwbWK| zwRyC?W<`pOCY)b#AS?rluxuuGf-AJ=D!M36l{ua?@SJ5>e!IBr3CXIxWw5xUZ@Xrw z_R@%?{>d%Ld4p}nEsiA@v*nc6Ah!MUs?GA7e5Q5lPpp0@`%5xY$C;{%rz24$;vR#* zBP=a{)K#CwIY%p} zXVdxTQ^HS@O&~eIftU+Qt^~(DGxrdi3k}DdT^I7Iy5SMOp$QuD8s;+93YQ!OY{eB24%xY7ml@|M7I(Nb@K_-?F;2?et|CKkuZK_>+>Lvg!>JE~wN`BI|_h6$qi!P)+K-1Hh(1;a`os z55)4Q{oJiA(lQM#;w#Ta%T0jDNXIPM_bgESMCDEg6rM33anEr}=|Fn6)|jBP6Y}u{ zv9@%7*#RI9;fv;Yii5CI+KrRdr0DKh=L>)eO4q$1zmcSmglsV`*N(x=&Wx`*v!!hn6X-l0 zP_m;X??O(skcj+oS$cIdKhfT%ABAzz3w^la-Ucw?yBPEC+=Pe_vU8nd-HV5YX6X8r zZih&j^eLU=%*;VzhUyoLF;#8QsEfmByk+Y~caBqSvQaaWf2a{JKB9B>V&r?l^rXaC z8)6AdR@Qy_BxQrE2Fk?ewD!SwLuMj@&d_n5RZFf7=>O>hzVE*seW3U?_p|R^CfoY`?|#x9)-*yjv#lo&zP=uI`M?J zbzC<^3x7GfXA4{FZ72{PE*-mNHyy59Q;kYG@BB~NhTd6pm2Oj=_ zizmD?MKVRkT^KmXuhsk?eRQllPo2Ubk=uCKiZ&u3Xjj~<(!M94c)Tez@9M1Gfs5JV z->@II)CDJOXTtPrQudNjE}Eltbjq>6KiwAwqvAKd^|g!exgLG3;wP+#mZYr`cy3#39e653d=jrR-ulW|h#ddHu(m9mFoW~2yE zz5?dB%6vF}+`-&-W8vy^OCxm3_{02royjvmwjlp+eQDzFVEUiyO#gLv%QdDSI#3W* z?3!lL8clTaNo-DVJw@ynq?q!%6hTQi35&^>P85G$TqNt78%9_sSJt2RThO|JzM$iL zg|wjxdMC2|Icc5rX*qPL(coL!u>-xxz-rFiC!6hD1IR%|HSRsV3>Kq~&vJ=s3M5y8SG%YBQ|{^l#LGlg!D?E>2yR*eV%9m$_J6VGQ~AIh&P$_aFbh zULr0Z$QE!QpkP=aAeR4ny<#3Fwyw@rZf4?Ewq`;mCVv}xaz+3ni+}a=k~P+yaWt^L z@w67!DqVf7D%7XtXX5xBW;Co|HvQ8WR1k?r2cZD%U;2$bsM%u8{JUJ5Z0k= zZJARv^vFkmWx15CB=rb=D4${+#DVqy5$C%bf`!T0+epLJLnh1jwCdb*zuCL}eEFvE z{rO1%gxg>1!W(I!owu*mJZ0@6FM(?C+d*CeceZRW_4id*D9p5nzMY&{mWqrJomjIZ z97ZNnZ3_%Hx8dn;H>p8m7F#^2;T%yZ3H;a&N7tm=Lvs&lgJLW{V1@h&6Vy~!+Ffbb zv(n3+v)_D$}dqd!2>Y2B)#<+o}LH#%ogGi2-?xRIH)1!SD)u-L65B&bsJTC=LiaF+YOCif2dUX6uAA|#+vNR z>U+KQekVGon)Yi<93(d!(yw1h3&X0N(PxN2{%vn}cnV?rYw z$N^}_o!XUB!mckL`yO1rnUaI4wrOeQ(+&k?2mi47hzxSD`N#-byqd1IhEoh!PGq>t z_MRy{5B0eKY>;Ao3z$RUU7U+i?iX^&r739F)itdrTpAi-NN0=?^m%?{A9Ly2pVv>Lqs6moTP?T2-AHqFD-o_ znVr|7OAS#AEH}h8SRPQ@NGG47dO}l=t07__+iK8nHw^(AHx&Wb<%jPc$$jl6_p(b$ z)!pi(0fQodCHfM)KMEMUR&UID>}m^(!{C^U7sBDOA)$VThRCI0_+2=( zV8mMq0R(#z;C|7$m>$>`tX+T|xGt(+Y48@ZYu#z;0pCgYgmMVbFb!$?%yhZqP_nhn zy4<#3P1oQ#2b51NU1mGnHP$cf0j-YOgAA}A$QoL6JVLcmExs(kU{4z;PBHJD%_=0F z>+sQV`mzijSIT7xn%PiDKHOujX;n|M&qr1T@rOxTdxtZ!&u&3HHFLYD5$RLQ=heur zb>+AFokUVQeJy-#LP*^)spt{mb@Mqe=A~-4p0b+Bt|pZ+@CY+%x}9f}izU5;4&QFE zO1bhg&A4uC1)Zb67kuowWY4xbo&J=%yoXlFB)&$d*-}kjBu|w!^zbD1YPc0-#XTJr z)pm2RDy%J3jlqSMq|o%xGS$bPwn4AqitC6&e?pqWcjWPt{3I{>CBy;hg0Umh#c;hU3RhCUX=8aR>rmd` z7Orw(5tcM{|-^J?ZAA9KP|)X6n9$-kvr#j5YDecTM6n z&07(nD^qb8hpF0B^z^pQ*%5ePYkv&FabrlI61ntiVp!!C8y^}|<2xgAd#FY=8b*y( zuQOuvy2`Ii^`VBNJB&R!0{hABYX55ooCAJSSevl4RPqEGb)iy_0H}v@vFwFzD%>#I>)3PsouQ+_Kkbqy*kKdHdfkN7NBcq%V{x^fSxgXpg7$bF& zj!6AQbDY(1u#1_A#1UO9AxiZaCVN2F0wGXdY*g@x$ByvUA?ePdide0dmr#}udE%K| z3*k}Vv2Ew2u1FXBaVA6aerI36R&rzEZeDDCl5!t0J=ug6kuNZzH>3i_VN`%BsaVB3 zQYw|Xub_SGf{)F{$ZX5`Jc!X!;eybjP+o$I{Z^Hsj@D=E{MnnL+TbC@HEU2DjG{3-LDGIbq()U87x4eS;JXnSh;lRlJ z>EL3D>wHt-+wTjQF$fGyDO$>d+(fq@bPpLBS~xA~R=3JPbS{tzN(u~m#Po!?H;IYv zE;?8%^vle|%#oux(Lj!YzBKv+Fd}*Ur-dCBoX*t{KeNM*n~ZPYJ4NNKkI^MFbz9!v z4(Bvm*Kc!-$%VFEewYJKz-CQN{`2}KX4*CeJEs+Q(!kI%hN1!1P6iOq?ovz}X0IOi z)YfWpwW@pK08^69#wSyCZkX9?uZD?C^@rw^Y?gLS_xmFKkooyx$*^5#cPqntNTtSG zlP>XLMj2!VF^0k#ole7`-c~*~+_T5ls?x4)ah(j8vo_ zwb%S8qoaZqY0-$ZI+ViIA_1~~rAH7K_+yFS{0rT@eQtTAdz#8E5VpwnW!zJ_^{Utv zlW5Iar3V5t&H4D6A=>?mq;G92;1cg9a2sf;gY9pJDVKn$DYdQlvfXq}zz8#LyPGq@ z+`YUMD;^-6w&r-82JL7mA8&M~Pj@aK!m{0+^v<|t%APYf7`}jGEhdYLqsHW-Le9TL z_hZZ1gbrz7$f9^fAzVIP30^KIz!!#+DRLL+qMszvI_BpOSmjtl$hh;&UeM{ER@INV zcI}VbiVTPoN|iSna@=7XkP&-4#06C};8ajbxJ4Gcq8(vWv4*&X8bM^T$mBk75Q92j z1v&%a;OSKc8EIrodmIiw$lOES2hzGDcjjB`kEDfJe{r}yE6`eZL zEB`9u>Cl0IsQ+t}`-cx}{6jqcANucqIB>Qmga_&<+80E2Q|VHHQ$YlAt{6`Qu`HA3 z03s0-sSlwbvgi&_R8s={6<~M^pGvBNjKOa>tWenzS8s zR>L7R5aZ=mSU{f?ib4Grx$AeFvtO5N|D>9#)ChH#Fny2maHWHOf2G=#<9Myot#+4u zWVa6d^Vseq_0=#AYS(-m$Lp;*8nC_6jXIjEM`omUmtH@QDs3|G)i4j*#_?#UYVZvJ z?YjT-?!4Q{BNun;dKBWLEw2C-VeAz`%?A>p;)PL}TAZn5j~HK>v1W&anteARlE+~+ zj>c(F;?qO3pXBb|#OZdQnm<4xWmn~;DR5SDMxt0UK_F^&eD|KZ=O;tO3vy4@4h^;2 zUL~-z`-P1aOe?|ZC1BgVsL)2^J-&vIFI%q@40w0{jjEfeVl)i9(~bt2z#2Vm)p`V_ z1;6$Ae7=YXk#=Qkd24Y23t&GvRxaOoad~NbJ+6pxqzJ>FY#Td7@`N5xp!n(c!=RE& z&<<@^a$_Ys8jqz4|5Nk#FY$~|FPC0`*a5HH!|Gssa9=~66&xG9)|=pOOJ2KE5|YrR zw!w6K2aC=J$t?L-;}5hn6mHd%hC;p8P|Dgh6D>hGnXPgi;6r+eA=?f72y9(Cf_ho{ zH6#)uD&R=73^$$NE;5piWX2bzR67fQ)`b=85o0eOLGI4c-Tb@-KNi2pz=Ke@SDcPn za$AxXib84`!Sf;Z3B@TSo`Dz7GM5Kf(@PR>Ghzi=BBxK8wRp>YQoXm+iL>H*Jo9M3 z6w&E?BC8AFTFT&Tv8zf+m9<&S&%dIaZ)Aoqkak_$r-2{$d~0g2oLETx9Y`eOAf14QXEQw3tJne;fdzl@wV#TFXSLXM2428F-Q}t+n2g%vPRMUzYPvzQ9f# zu(liiJem9P*?0%V@RwA7F53r~|I!Ty)<*AsMX3J{_4&}{6pT%Tpw>)^|DJ)>gpS~1rNEh z0$D?uO8mG?H;2BwM5a*26^7YO$XjUm40XmBsb63MoR;bJh63J;OngS5sSI+o2HA;W zdZV#8pDpC9Oez&L8loZO)MClRz!_!WD&QRtQxnazhT%Vj6Wl4G11nUk8*vSeVab@N#oJ}`KyJv+8Mo@T1-pqZ1t|?cnaVOd;1(h9 z!$DrN=jcGsVYE-0-n?oCJ^4x)F}E;UaD-LZUIzcD?W^ficqJWM%QLy6QikrM1aKZC zi{?;oKwq^Vsr|&`i{jIphA8S6G4)$KGvpULjH%9u(Dq247;R#l&I0{IhcC|oBF*Al zvLo7Xte=C{aIt*otJD}BUq)|_pdR>{zBMT< z(^1RpZv*l*m*OV^8>9&asGBo8h*_4q*)-eCv*|Pq=XNGrZE)^(SF7^{QE_~4VDB(o zVcPA_!G+2CAtLbl+`=Q~9iW`4ZRLku!uB?;tWqVjB0lEOf}2RD7dJ=BExy=<9wkb- z9&7{XFA%n#JsHYN8t5d~=T~5DcW4$B%3M+nNvC2`0!#@sckqlzo5;hhGi(D9=*A4` z5ynobawSPRtWn&CDLEs3Xf`(8^zDP=NdF~F^s&={l7(aw&EG}KWpMjtmz7j_VLO;@ zM2NVLDxZ@GIv7*gzl1 zjq78tv*8#WSY`}Su0&C;2F$Ze(q>F(@Wm^Gw!)(j;dk9Ad{STaxn)IV9FZhm*n+U} zi;4y*3v%A`_c7a__DJ8D1b@dl0Std3F||4Wtvi)fCcBRh!X9$1x!_VzUh>*S5s!oq z;qd{J_r79EL2wIeiGAqFstWtkfIJpjVh%zFo*=55B9Zq~y0=^iqHWfQl@O!Ak;(o*m!pZqe9 z%U2oDOhR)BvW8&F70L;2TpkzIutIvNQaTjjs5V#8mV4!NQ}zN=i`i@WI1z0eN-iCS z;vL-Wxc^Vc_qK<5RPh(}*8dLT{~GzE{w2o$2kMFaEl&q zP{V=>&3kW7tWaK-Exy{~`v4J0U#OZBk{a9{&)&QG18L@6=bsZ1zC_d{{pKZ-Ey>I> z;8H0t4bwyQqgu4hmO`3|4K{R*5>qnQ&gOfdy?z`XD%e5+pTDzUt3`k^u~SaL&XMe= z9*h#kT(*Q9jO#w2Hd|Mr-%DV8i_1{J1MU~XJ3!WUplhXDYBpJH><0OU`**nIvPIof z|N8@I=wA)sf45SAvx||f?Z5uB$kz1qL3Ky_{%RPdP5iN-D2!p5scq}buuC00C@jom zhfGKm3|f?Z0iQ|K$Z~!`8{nmAS1r+fp6r#YDOS8V*;K&Gs7Lc&f^$RC66O|)28oh`NHy&vq zJh+hAw8+ybTB0@VhWN^0iiTnLsCWbS_y`^gs!LX!Lw{yE``!UVzrV24tP8o;I6-65 z1MUiHw^{bB15tmrVT*7-#sj6cs~z`wk52YQJ*TG{SE;KTm#Hf#a~|<(|ImHH17nNM z`Ub{+J3dMD!)mzC8b(2tZtokKW5pAwHa?NFiso~# z1*iaNh4lQ4TS)|@G)H4dZV@l*Vd;Rw;-;odDhW2&lJ%m@jz+Panv7LQm~2Js6rOW3 z0_&2cW^b^MYW3)@o;neZ<{B4c#m48dAl$GCc=$>ErDe|?y@z`$uq3xd(%aAsX)D%l z>y*SQ%My`yDP*zof|3@_w#cjaW_YW4BdA;#Glg1RQcJGY*CJ9`H{@|D+*e~*457kd z73p<%fB^PV!Ybw@)Dr%(ZJbX}xmCStCYv#K3O32ej{$9IzM^I{6FJ8!(=azt7RWf4 z7ib0UOPqN40X!wOnFOoddd8`!_IN~9O)#HRTyjfc#&MCZ zZAMzOVB=;qwt8gV?{Y2?b=iSZG~RF~uyx18K)IDFLl})G1v@$(s{O4@RJ%OTJyF+Cpcx4jmy|F3euCnMK!P2WTDu5j z{{gD$=M*pH!GGzL%P)V2*ROm>!$Y=z|D`!_yY6e7SU$~a5q8?hZGgaYqaiLnkK%?0 zs#oI%;zOxF@g*@(V4p!$7dS1rOr6GVs6uYCTt2h)eB4?(&w8{#o)s#%gN@BBosRUe z)@P@8_Zm89pr~)b>e{tbPC~&_MR--iB{=)y;INU5#)@Gix-YpgP<-c2Ms{9zuCX|3 z!p(?VaXww&(w&uBHzoT%!A2=3HAP>SDxcljrego7rY|%hxy3XlODWffO_%g|l+7Y_ zqV(xbu)s4lV=l7M;f>vJl{`6qBm>#ZeMA}kXb97Z)?R97EkoI?x6Lp0yu1Z>PS?2{ z0QQ(8D)|lc9CO3B~e(pQM&5(1y&y=e>C^X$`)_&XuaI!IgDTVqt31wX#n+@!a_A0ZQkA zCJ2@M_4Gb5MfCrm5UPggeyh)8 zO9?`B0J#rkoCx(R0I!ko_2?iO@|oRf1;3r+i)w-2&j?=;NVIdPFsB)`|IC0zk6r9c zRrkfxWsiJ(#8QndNJj@{@WP2Ackr|r1VxV{7S&rSU(^)-M8gV>@UzOLXu9K<{6e{T zXJ6b92r$!|lwjhmgqkdswY&}c)KW4A)-ac%sU;2^fvq7gfUW4Bw$b!i@duy1CAxSn z(pyh$^Z=&O-q<{bZUP+$U}=*#M9uVc>CQVgDs4swy5&8RAHZ~$)hrTF4W zPsSa~qYv_0mJnF89RnnJTH`3}w4?~epFl=D(35$ zWa07ON$`OMBOHgCmfO(9RFc<)?$x)N}Jd2A(<*Ll7+4jrRt9w zwGxExUXd9VB#I|DwfxvJ;HZ8Q{37^wDhaZ%O!oO(HpcqfLH%#a#!~;Jl7F5>EX_=8 z{()l2NqPz>La3qJR;_v+wlK>GsHl;uRA8%j`A|yH@k5r%55S9{*Cp%uw6t`qc1!*T za2OeqtQj7sAp#Q~=5Fs&aCR9v>5V+s&RdNvo&H~6FJOjvaj--2sYYBvMq;55%z8^o z|BJDA4vzfow#DO#ZQHh;Oq_{r+qP{R9ox2TOgwQiv7Ow!zjN+A@BN;0tA2lUb#+zO z(^b89eV)D7UVE+h{mcNc6&GtpOqDn_?VAQ)Vob$hlFwW%xh>D#wml{t&Ofmm_d_+; zKDxzdr}`n2Rw`DtyIjrG)eD0vut$}dJAZ0AohZ+ZQdWXn_Z@dI_y=7t3q8x#pDI-K z2VVc&EGq445Rq-j0=U=Zx`oBaBjsefY;%)Co>J3v4l8V(T8H?49_@;K6q#r~Wwppc z4XW0(4k}cP=5ex>-Xt3oATZ~bBWKv)aw|I|Lx=9C1s~&b77idz({&q3T(Y(KbWO?+ zmcZ6?WeUsGk6>km*~234YC+2e6Zxdl~<_g2J|IE`GH%n<%PRv-50; zH{tnVts*S5*_RxFT9eM0z-pksIb^drUq4>QSww=u;UFCv2AhOuXE*V4z?MM`|ABOC4P;OfhS(M{1|c%QZ=!%rQTDFx`+}?Kdx$&FU?Y<$x;j7z=(;Lyz+?EE>ov!8vvMtSzG!nMie zsBa9t8as#2nH}n8xzN%W%U$#MHNXmDUVr@GX{?(=yI=4vks|V)!-W5jHsU|h_&+kY zS_8^kd3jlYqOoiI`ZqBVY!(UfnAGny!FowZWY_@YR0z!nG7m{{)4OS$q&YDyw6vC$ zm4!$h>*|!2LbMbxS+VM6&DIrL*X4DeMO!@#EzMVfr)e4Tagn~AQHIU8?e61TuhcKD zr!F4(kEebk(Wdk-?4oXM(rJwanS>Jc%<>R(siF+>+5*CqJLecP_we33iTFTXr6W^G z7M?LPC-qFHK;E!fxCP)`8rkxZyFk{EV;G-|kwf4b$c1k0atD?85+|4V%YATWMG|?K zLyLrws36p%Qz6{}>7b>)$pe>mR+=IWuGrX{3ZPZXF3plvuv5Huax86}KX*lbPVr}L z{C#lDjdDeHr~?l|)Vp_}T|%$qF&q#U;ClHEPVuS+Jg~NjC1RP=17=aQKGOcJ6B3mp z8?4*-fAD~}sX*=E6!}^u8)+m2j<&FSW%pYr_d|p_{28DZ#Cz0@NF=gC-o$MY?8Ca8 zr5Y8DSR^*urS~rhpX^05r30Ik#2>*dIOGxRm0#0YX@YQ%Mg5b6dXlS!4{7O_kdaW8PFSdj1=ryI-=5$fiieGK{LZ+SX(1b=MNL!q#lN zv98?fqqTUH8r8C7v(cx#BQ5P9W>- zmW93;eH6T`vuJ~rqtIBg%A6>q>gnWb3X!r0wh_q;211+Om&?nvYzL1hhtjB zK_7G3!n7PL>d!kj){HQE zE8(%J%dWLh1_k%gVXTZt zEdT09XSKAx27Ncaq|(vzL3gm83q>6CAw<$fTnMU05*xAe&rDfCiu`u^1)CD<>sx0i z*hr^N_TeN89G(nunZoLBf^81#pmM}>JgD@Nn1l*lN#a=B=9pN%tmvYFjFIoKe_(GF z-26x{(KXdfsQL7Uv6UtDuYwV`;8V3w>oT_I<`Ccz3QqK9tYT5ZQzbop{=I=!pMOCb zCU68`n?^DT%^&m>A%+-~#lvF!7`L7a{z<3JqIlk1$<||_J}vW1U9Y&eX<}l8##6i( zZcTT@2`9(Mecptm@{3A_Y(X`w9K0EwtPq~O!16bq{7c0f7#(3wn-^)h zxV&M~iiF!{-6A@>o;$RzQ5A50kxXYj!tcgme=Qjrbje~;5X2xryU;vH|6bE(8z^<7 zQ>BG7_c*JG8~K7Oe68i#0~C$v?-t@~@r3t2inUnLT(c=URpA9kA8uq9PKU(Ps(LVH zqgcqW>Gm?6oV#AldDPKVRcEyQIdTT`Qa1j~vS{<;SwyTdr&3*t?J)y=M7q*CzucZ&B0M=joT zBbj@*SY;o2^_h*>R0e({!QHF0=)0hOj^B^d*m>SnRrwq>MolNSgl^~r8GR#mDWGYEIJA8B<|{{j?-7p zVnV$zancW3&JVDtVpIlI|5djKq0(w$KxEFzEiiL=h5Jw~4Le23@s(mYyXWL9SX6Ot zmb)sZaly_P%BeX_9 zw&{yBef8tFm+%=--m*J|o~+Xg3N+$IH)t)=fqD+|fEk4AAZ&!wcN5=mi~Vvo^i`}> z#_3ahR}Ju)(Px7kev#JGcSwPXJ2id9%Qd2A#Uc@t8~egZ8;iC{e! z%=CGJOD1}j!HW_sgbi_8suYnn4#Ou}%9u)dXd3huFIb!ytlX>Denx@pCS-Nj$`VO&j@(z!kKSP0hE4;YIP#w9ta=3DO$7f*x zc9M4&NK%IrVmZAe=r@skWD`AEWH=g+r|*13Ss$+{c_R!b?>?UaGXlw*8qDmY#xlR= z<0XFbs2t?8i^G~m?b|!Hal^ZjRjt<@a? z%({Gn14b4-a|#uY^=@iiKH+k?~~wTj5K1A&hU z2^9-HTC)7zpoWK|$JXaBL6C z#qSNYtY>65T@Zs&-0cHeu|RX(Pxz6vTITdzJdYippF zC-EB+n4}#lM7`2Ry~SO>FxhKboIAF#Z{1wqxaCb{#yEFhLuX;Rx(Lz%T`Xo1+a2M}7D+@wol2)OJs$TwtRNJ={( zD@#zTUEE}#Fz#&(EoD|SV#bayvr&E0vzmb%H?o~46|FAcx?r4$N z&67W3mdip-T1RIxwSm_&(%U|+WvtGBj*}t69XVd&ebn>KOuL(7Y8cV?THd-(+9>G7*Nt%T zcH;`p={`SOjaf7hNd(=37Lz3-51;58JffzIPgGs_7xIOsB5p2t&@v1mKS$2D$*GQ6 zM(IR*j4{nri7NMK9xlDy-hJW6sW|ZiDRaFiayj%;(%51DN!ZCCCXz+0Vm#};70nOx zJ#yA0P3p^1DED;jGdPbQWo0WATN=&2(QybbVdhd=Vq*liDk`c7iZ?*AKEYC#SY&2g z&Q(Ci)MJ{mEat$ZdSwTjf6h~roanYh2?9j$CF@4hjj_f35kTKuGHvIs9}Re@iKMxS-OI*`0S z6s)fOtz}O$T?PLFVSeOjSO26$@u`e<>k(OSP!&YstH3ANh>)mzmKGNOwOawq-MPXe zy4xbeUAl6tamnx))-`Gi2uV5>9n(73yS)Ukma4*7fI8PaEwa)dWHs6QA6>$}7?(L8 ztN8M}?{Tf!Zu22J5?2@95&rQ|F7=FK-hihT-vDp!5JCcWrVogEnp;CHenAZ)+E+K5 z$Cffk5sNwD_?4+ymgcHR(5xgt20Z8M`2*;MzOM#>yhk{r3x=EyM226wb&!+j`W<%* zSc&|`8!>dn9D@!pYow~(DsY_naSx7(Z4i>cu#hA5=;IuI88}7f%)bRkuY2B;+9Uep zpXcvFWkJ!mQai63BgNXG26$5kyhZ2&*3Q_tk)Ii4M>@p~_~q_cE!|^A;_MHB;7s#9 zKzMzK{lIxotjc};k67^Xsl-gS!^*m*m6kn|sbdun`O?dUkJ{0cmI0-_2y=lTAfn*Y zKg*A-2sJq)CCJgY0LF-VQvl&6HIXZyxo2#!O&6fOhbHXC?%1cMc6y^*dOS{f$=137Ds1m01qs`>iUQ49JijsaQ( zksqV9@&?il$|4Ua%4!O15>Zy&%gBY&wgqB>XA3!EldQ%1CRSM(pp#k~-pkcCg4LAT zXE=puHbgsw)!xtc@P4r~Z}nTF=D2~j(6D%gTBw$(`Fc=OOQ0kiW$_RDd=hcO0t97h zb86S5r=>(@VGy1&#S$Kg_H@7G^;8Ue)X5Y+IWUi`o;mpvoV)`fcVk4FpcT|;EG!;? zHG^zrVVZOm>1KFaHlaogcWj(v!S)O(Aa|Vo?S|P z5|6b{qkH(USa*Z7-y_Uvty_Z1|B{rTS^qmEMLEYUSk03_Fg&!O3BMo{b^*`3SHvl0 zhnLTe^_vVIdcSHe)SQE}r~2dq)VZJ!aSKR?RS<(9lzkYo&dQ?mubnWmgMM37Nudwo z3Vz@R{=m2gENUE3V4NbIzAA$H1z0pagz94-PTJyX{b$yndsdKptmlKQKaaHj@3=ED zc7L?p@%ui|RegVYutK$64q4pe9+5sv34QUpo)u{1ci?)_7gXQd{PL>b0l(LI#rJmN zGuO+%GO`xneFOOr4EU(Wg}_%bhzUf;d@TU+V*2#}!2OLwg~%D;1FAu=Un>OgjPb3S z7l(riiCwgghC=Lm5hWGf5NdGp#01xQ59`HJcLXbUR3&n%P(+W2q$h2Qd z*6+-QXJ*&Kvk9ht0f0*rO_|FMBALen{j7T1l%=Q>gf#kma zQlg#I9+HB+z*5BMxdesMND`_W;q5|FaEURFk|~&{@qY32N$G$2B=&Po{=!)x5b!#n zxLzblkq{yj05#O7(GRuT39(06FJlalyv<#K4m}+vs>9@q-&31@1(QBv82{}Zkns~K ze{eHC_RDX0#^A*JQTwF`a=IkE6Ze@j#-8Q`tTT?k9`^ZhA~3eCZJ-Jr{~7Cx;H4A3 zcZ+Zj{mzFZbVvQ6U~n>$U2ZotGsERZ@}VKrgGh0xM;Jzt29%TX6_&CWzg+YYMozrM z`nutuS)_0dCM8UVaKRj804J4i%z2BA_8A4OJRQ$N(P9Mfn-gF;4#q788C@9XR0O3< zsoS4wIoyt046d+LnSCJOy@B@Uz*#GGd#+Ln1ek5Dv>(ZtD@tgZlPnZZJGBLr^JK+!$$?A_fA3LOrkoDRH&l7 zcMcD$Hsjko3`-{bn)jPL6E9Ds{WskMrivsUu5apD z?grQO@W7i5+%X&E&p|RBaEZ(sGLR@~(y^BI@lDMot^Ll?!`90KT!JXUhYS`ZgX3jnu@Ja^seA*M5R@f`=`ynQV4rc$uT1mvE?@tz)TN<=&H1%Z?5yjxcpO+6y_R z6EPuPKM5uxKpmZfT(WKjRRNHs@ib)F5WAP7QCADvmCSD#hPz$V10wiD&{NXyEwx5S z6NE`3z!IS^$s7m}PCwQutVQ#~w+V z=+~->DI*bR2j0^@dMr9`p>q^Ny~NrAVxrJtX2DUveic5vM%#N*XO|?YAWwNI$Q)_) zvE|L(L1jP@F%gOGtnlXtIv2&1i8q<)Xfz8O3G^Ea~e*HJsQgBxWL(yuLY+jqUK zRE~`-zklrGog(X}$9@ZVUw!8*=l`6mzYLtsg`AvBYz(cxmAhr^j0~(rzXdiOEeu_p zE$sf2(w(BPAvO5DlaN&uQ$4@p-b?fRs}d7&2UQ4Fh?1Hzu*YVjcndqJLw0#q@fR4u zJCJ}>_7-|QbvOfylj+e^_L`5Ep9gqd>XI3-O?Wp z-gt*P29f$Tx(mtS`0d05nHH=gm~Po_^OxxUwV294BDKT>PHVlC5bndncxGR!n(OOm znsNt@Q&N{TLrmsoKFw0&_M9$&+C24`sIXGWgQaz=kY;S{?w`z^Q0JXXBKFLj0w0U6P*+jPKyZHX9F#b0D1$&(- zrm8PJd?+SrVf^JlfTM^qGDK&-p2Kdfg?f>^%>1n8bu&byH(huaocL>l@f%c*QkX2i znl}VZ4R1en4S&Bcqw?$=Zi7ohqB$Jw9x`aM#>pHc0x z0$!q7iFu zZ`tryM70qBI6JWWTF9EjgG@>6SRzsd}3h+4D8d~@CR07P$LJ}MFsYi-*O%XVvD@yT|rJ+Mk zDllJ7$n0V&A!0flbOf)HE6P_afPWZmbhpliqJuw=-h+r;WGk|ntkWN(8tKlYpq5Ow z(@%s>IN8nHRaYb*^d;M(D$zGCv5C|uqmsDjwy4g=Lz>*OhO3z=)VD}C<65;`89Ye} zSCxrv#ILzIpEx1KdLPlM&%Cctf@FqTKvNPXC&`*H9=l=D3r!GLM?UV zOxa(8ZsB`&+76S-_xuj?G#wXBfDY@Z_tMpXJS7^mp z@YX&u0jYw2A+Z+bD#6sgVK5ZgdPSJV3>{K^4~%HV?rn~4D)*2H!67Y>0aOmzup`{D zzDp3c9yEbGCY$U<8biJ_gB*`jluz1ShUd!QUIQJ$*1;MXCMApJ^m*Fiv88RZ zFopLViw}{$Tyhh_{MLGIE2~sZ)t0VvoW%=8qKZ>h=adTe3QM$&$PO2lfqH@brt!9j ziePM8$!CgE9iz6B<6_wyTQj?qYa;eC^{x_0wuwV~W+^fZmFco-o%wsKSnjXFEx02V zF5C2t)T6Gw$Kf^_c;Ei3G~uC8SM-xyycmXyC2hAVi-IfXqhu$$-C=*|X?R0~hu z8`J6TdgflslhrmDZq1f?GXF7*ALeMmOEpRDg(s*H`4>_NAr`2uqF;k;JQ+8>A|_6ZNsNLECC%NNEb1Y1dP zbIEmNpK)#XagtL4R6BC{C5T(+=yA-(Z|Ap}U-AfZM#gwVpus3(gPn}Q$CExObJ5AC z)ff9Yk?wZ}dZ-^)?cbb9Fw#EjqQ8jxF4G3=L?Ra zg_)0QDMV1y^A^>HRI$x?Op@t;oj&H@1xt4SZ9(kifQ zb59B*`M99Td7@aZ3UWvj1rD0sE)d=BsBuW*KwkCds7ay(7*01_+L}b~7)VHI>F_!{ zyxg-&nCO?v#KOUec0{OOKy+sjWA;8rTE|Lv6I9H?CI?H(mUm8VXGwU$49LGpz&{nQp2}dinE1@lZ1iox6{ghN&v^GZv9J${7WaXj)<0S4g_uiJ&JCZ zr8-hsu`U%N;+9N^@&Q0^kVPB3)wY(rr}p7{p0qFHb3NUUHJb672+wRZs`gd1UjKPX z4o6zljKKA+Kkj?H>Ew63o%QjyBk&1!P22;MkD>sM0=z_s-G{mTixJCT9@_|*(p^bz zJ8?ZZ&;pzV+7#6Mn`_U-)k8Pjg?a;|Oe^us^PoPY$Va~yi8|?+&=y$f+lABT<*pZr zP}D{~Pq1Qyni+@|aP;ixO~mbEW9#c0OU#YbDZIaw=_&$K%Ep2f%hO^&P67hApZe`x zv8b`Mz@?M_7-)b!lkQKk)JXXUuT|B8kJlvqRmRpxtQDgvrHMXC1B$M@Y%Me!BSx3P z#2Eawl$HleZhhTS6Txm>lN_+I`>eV$&v9fOg)%zVn3O5mI*lAl>QcHuW6!Kixmq`X zBCZ*Ck6OYtDiK!N47>jxI&O2a9x7M|i^IagRr-fmrmikEQGgw%J7bO|)*$2FW95O4 zeBs>KR)izRG1gRVL;F*sr8A}aRHO0gc$$j&ds8CIO1=Gwq1%_~E)CWNn9pCtBE}+`Jelk4{>S)M)`Ll=!~gnn1yq^EX(+y*ik@3Ou0qU`IgYi3*doM+5&dU!cho$pZ zn%lhKeZkS72P?Cf68<#kll_6OAO26bIbueZx**j6o;I0cS^XiL`y+>{cD}gd%lux} z)3N>MaE24WBZ}s0ApfdM;5J_Ny}rfUyxfkC``Awo2#sgLnGPewK};dORuT?@I6(5~ z?kE)Qh$L&fwJXzK){iYx!l5$Tt|^D~MkGZPA}(o6f7w~O2G6Vvzdo*a;iXzk$B66$ zwF#;wM7A+(;uFG4+UAY(2`*3XXx|V$K8AYu#ECJYSl@S=uZW$ksfC$~qrrbQj4??z-)uz0QL}>k^?fPnJTPw% zGz)~?B4}u0CzOf@l^um}HZzbaIwPmb<)< zi_3@E9lc)Qe2_`*Z^HH;1CXOceL=CHpHS{HySy3T%<^NrWQ}G0i4e1xm_K3(+~oi$ zoHl9wzb?Z4j#90DtURtjtgvi7uw8DzHYmtPb;?%8vb9n@bszT=1qr)V_>R%s!92_` zfnHQPANx z<#hIjIMm#*(v*!OXtF+w8kLu`o?VZ5k7{`vw{Yc^qYclpUGIM_PBN1+c{#Vxv&E*@ zxg=W2W~JuV{IuRYw3>LSI1)a!thID@R=bU+cU@DbR^_SXY`MC7HOsCN z!dO4OKV7(E_Z8T#8MA1H`99?Z!r0)qKW_#|29X3#Jb+5+>qUidbeP1NJ@)(qi2S-X zao|f0_tl(O+$R|Qwd$H{_ig|~I1fbp_$NkI!0E;Y z6JrnU{1Ra6^on{9gUUB0mwzP3S%B#h0fjo>JvV~#+X0P~JV=IG=yHG$O+p5O3NUgG zEQ}z6BTp^Fie)Sg<){Z&I8NwPR(=mO4joTLHkJ>|Tnk23E(Bo`FSbPc05lF2-+)X? z6vV3*m~IBHTy*^E!<0nA(tCOJW2G4DsH7)BxLV8kICn5lu6@U*R`w)o9;Ro$i8=Q^V%uH8n3q=+Yf;SFRZu z!+F&PKcH#8cG?aSK_Tl@K9P#8o+jry@gdexz&d(Q=47<7nw@e@FFfIRNL9^)1i@;A z28+$Z#rjv-wj#heI|<&J_DiJ*s}xd-f!{J8jfqOHE`TiHHZVIA8CjkNQ_u;Ery^^t zl1I75&u^`1_q)crO+JT4rx|z2ToSC>)Or@-D zy3S>jW*sNIZR-EBsfyaJ+Jq4BQE4?SePtD2+jY8*%FsSLZ9MY>+wk?}}}AFAw)vr{ml)8LUG-y9>^t!{~|sgpxYc0Gnkg`&~R z-pilJZjr@y5$>B=VMdZ73svct%##v%wdX~9fz6i3Q-zOKJ9wso+h?VME7}SjL=!NUG{J?M&i!>ma`eoEa@IX`5G>B1(7;%}M*%-# zfhJ(W{y;>MRz!Ic8=S}VaBKqh;~7KdnGEHxcL$kA-6E~=!hrN*zw9N+_=odt<$_H_8dbo;0=42wcAETPCVGUr~v(`Uai zb{=D!Qc!dOEU6v)2eHSZq%5iqK?B(JlCq%T6av$Cb4Rko6onlG&?CqaX7Y_C_cOC3 zYZ;_oI(}=>_07}Oep&Ws7x7-R)cc8zfe!SYxJYP``pi$FDS)4Fvw5HH=FiU6xfVqIM!hJ;Rx8c0cB7~aPtNH(Nmm5Vh{ibAoU#J6 zImRCr?(iyu_4W_6AWo3*vxTPUw@vPwy@E0`(>1Qi=%>5eSIrp^`` zK*Y?fK_6F1W>-7UsB)RPC4>>Ps9)f+^MqM}8AUm@tZ->j%&h1M8s*s!LX5&WxQcAh z8mciQej@RPm?660%>{_D+7er>%zX_{s|$Z+;G7_sfNfBgY(zLB4Ey}J9F>zX#K0f6 z?dVNIeEh?EIShmP6>M+d|0wMM85Sa4diw1hrg|ITJ}JDg@o8y>(rF9mXk5M z2@D|NA)-7>wD&wF;S_$KS=eE84`BGw3g0?6wGxu8ys4rwI?9U=*^VF22t3%mbGeOh z`!O-OpF7#Vceu~F`${bW0nYVU9ecmk31V{tF%iv&5hWofC>I~cqAt@u6|R+|HLMMX zVxuSlMFOK_EQ86#E8&KwxIr8S9tj_goWtLv4f@!&h8;Ov41{J~496vp9vX=(LK#j! zAwi*21RAV-LD>9Cw3bV_9X(X3)Kr0-UaB*7Y>t82EQ%!)(&(XuAYtTsYy-dz+w=$ir)VJpe!_$ z6SGpX^i(af3{o=VlFPC);|J8#(=_8#vdxDe|Cok+ANhYwbE*FO`Su2m1~w+&9<_9~ z-|tTU_ACGN`~CNW5WYYBn^B#SwZ(t4%3aPp z;o)|L6Rk569KGxFLUPx@!6OOa+5OjQLK5w&nAmwxkC5rZ|m&HT8G%GVZxB_@ME z>>{rnXUqyiJrT(8GMj_ap#yN_!9-lO5e8mR3cJiK3NE{_UM&=*vIU`YkiL$1%kf+1 z4=jk@7EEj`u(jy$HnzE33ZVW_J4bj}K;vT?T91YlO(|Y0FU4r+VdbmQ97%(J5 zkK*Bed8+C}FcZ@HIgdCMioV%A<*4pw_n}l*{Cr4}a(lq|injK#O?$tyvyE`S%(1`H z_wwRvk#13ElkZvij2MFGOj`fhy?nC^8`Zyo%yVcUAfEr8x&J#A{|moUBAV_^f$hpaUuyQeY3da^ zS9iRgf87YBwfe}>BO+T&Fl%rfpZh#+AM?Dq-k$Bq`vG6G_b4z%Kbd&v>qFjow*mBl z-OylnqOpLg}or7_VNwRg2za3VBK6FUfFX{|TD z`Wt0Vm2H$vdlRWYQJqDmM?JUbVqL*ZQY|5&sY*?!&%P8qhA~5+Af<{MaGo(dl&C5t zE%t!J0 zh6jqANt4ABdPxSTrVV}fLsRQal*)l&_*rFq(Ez}ClEH6LHv{J#v?+H-BZ2)Wy{K@9 z+ovXHq~DiDvm>O~r$LJo!cOuwL+Oa--6;UFE2q@g3N8Qkw5E>ytz^(&($!O47+i~$ zKM+tkAd-RbmP{s_rh+ugTD;lriL~`Xwkad#;_aM?nQ7L_muEFI}U_4$phjvYgleK~`Fo`;GiC07&Hq1F<%p;9Q;tv5b?*QnR%8DYJH3P>Svmv47Y>*LPZJy8_{9H`g6kQpyZU{oJ`m%&p~D=K#KpfoJ@ zn-3cqmHsdtN!f?~w+(t+I`*7GQA#EQC^lUA9(i6=i1PqSAc|ha91I%X&nXzjYaM{8$s&wEx@aVkQ6M{E2 zfzId#&r(XwUNtPcq4Ngze^+XaJA1EK-%&C9j>^9(secqe{}z>hR5CFNveMsVA)m#S zk)_%SidkY-XmMWlVnQ(mNJ>)ooszQ#vaK;!rPmGKXV7am^_F!Lz>;~{VrIO$;!#30XRhE1QqO_~#+Ux;B_D{Nk=grn z8Y0oR^4RqtcYM)7a%@B(XdbZCOqnX#fD{BQTeLvRHd(irHKq=4*jq34`6@VAQR8WG z^%)@5CXnD_T#f%@-l${>y$tfb>2LPmc{~5A82|16mH)R?&r#KKLs7xpN-D`=&Cm^R zvMA6#Ahr<3X>Q7|-qfTY)}32HkAz$_mibYV!I)u>bmjK`qwBe(>za^0Kt*HnFbSdO z1>+ryKCNxmm^)*$XfiDOF2|{-v3KKB?&!(S_Y=Ht@|ir^hLd978xuI&N{k>?(*f8H z=ClxVJK_%_z1TH0eUwm2J+2To7FK4o+n_na)&#VLn1m;!+CX+~WC+qg1?PA~KdOlC zW)C@pw75_xoe=w7i|r9KGIvQ$+3K?L{7TGHwrQM{dCp=Z*D}3kX7E-@sZnup!BImw z*T#a=+WcTwL78exTgBn|iNE3#EsOorO z*kt)gDzHiPt07fmisA2LWN?AymkdqTgr?=loT7z@d`wnlr6oN}@o|&JX!yPzC*Y8d zu6kWlTzE1)ckyBn+0Y^HMN+GA$wUO_LN6W>mxCo!0?oiQvT`z$jbSEu&{UHRU0E8# z%B^wOc@S!yhMT49Y)ww(Xta^8pmPCe@eI5C*ed96)AX9<>))nKx0(sci8gwob_1}4 z0DIL&vsJ1_s%<@y%U*-eX z5rN&(zef-5G~?@r79oZGW1d!WaTqQn0F6RIOa9tJ=0(kdd{d1{<*tHT#cCvl*i>YY zH+L7jq8xZNcTUBqj(S)ztTU!TM!RQ}In*n&Gn<>(60G7}4%WQL!o>hbJqNDSGwl#H z`4k+twp0cj%PsS+NKaxslAEu9!#U3xT1|_KB6`h=PI0SW`P9GTa7caD1}vKEglV8# zjKZR`pluCW19c2fM&ZG)c3T3Um;ir3y(tSCJ7Agl6|b524dy5El{^EQBG?E61H0XY z`bqg!;zhGhyMFl&(o=JWEJ8n~z)xI}A@C0d2hQGvw7nGv)?POU@(kS1m=%`|+^ika zXl8zjS?xqW$WlO?Ewa;vF~XbybHBor$f<%I&*t$F5fynwZlTGj|IjZtVfGa7l&tK} zW>I<69w(cZLu)QIVG|M2xzW@S+70NinQzk&Y0+3WT*cC)rx~04O-^<{JohU_&HL5XdUKW!uFy|i$FB|EMu0eUyW;gsf`XfIc!Z0V zeK&*hPL}f_cX=@iv>K%S5kL;cl_$v?n(Q9f_cChk8Lq$glT|=e+T*8O4H2n<=NGmn z+2*h+v;kBvF>}&0RDS>)B{1!_*XuE8A$Y=G8w^qGMtfudDBsD5>T5SB;Qo}fSkkiV ze^K^M(UthkwrD!&*tTsu>Dacdj_q`~V%r_twr$(Ct&_dKeeXE?fA&4&yASJWJ*}~- zel=@W)tusynfC_YqH4ll>4Eg`Xjs5F7Tj>tTLz<0N3)X<1px_d2yUY>X~y>>93*$) z5PuNMQLf9Bu?AAGO~a_|J2akO1M*@VYN^VxvP0F$2>;Zb9;d5Yfd8P%oFCCoZE$ z4#N$^J8rxYjUE_6{T%Y>MmWfHgScpuGv59#4u6fpTF%~KB^Ae`t1TD_^Ud#DhL+Dm zbY^VAM#MrAmFj{3-BpVSWph2b_Y6gCnCAombVa|1S@DU)2r9W<> zT5L8BB^er3zxKt1v(y&OYk!^aoQisqU zH(g@_o)D~BufUXcPt!Ydom)e|aW{XiMnes2z&rE?og>7|G+tp7&^;q?Qz5S5^yd$i z8lWr4g5nctBHtigX%0%XzIAB8U|T6&JsC4&^hZBw^*aIcuNO47de?|pGXJ4t}BB`L^d8tD`H`i zqrP8?#J@8T#;{^B!KO6J=@OWKhAerih(phML`(Rg7N1XWf1TN>=Z3Do{l_!d~DND&)O)D>ta20}@Lt77qSnVsA7>)uZAaT9bsB>u&aUQl+7GiY2|dAEg@%Al3i316y;&IhQL^8fw_nwS>f60M_-m+!5)S_6EPM7Y)(Nq^8gL7(3 zOiot`6Wy6%vw~a_H?1hLVzIT^i1;HedHgW9-P#)}Y6vF%C=P70X0Tk^z9Te@kPILI z_(gk!k+0%CG)%!WnBjjw*kAKs_lf#=5HXC00s-}oM-Q1aXYLj)(1d!_a7 z*Gg4Fe6F$*ujVjI|79Z5+Pr`us%zW@ln++2l+0hsngv<{mJ%?OfSo_3HJXOCys{Ug z00*YR-(fv<=&%Q!j%b-_ppA$JsTm^_L4x`$k{VpfLI(FMCap%LFAyq;#ns5bR7V+x zO!o;c5y~DyBPqdVQX)8G^G&jWkBy2|oWTw>)?5u}SAsI$RjT#)lTV&Rf8;>u*qXnb z8F%Xb=7#$m)83z%`E;49)t3fHInhtc#kx4wSLLms!*~Z$V?bTyUGiS&m>1P(952(H zuHdv=;o*{;5#X-uAyon`hP}d#U{uDlV?W?_5UjJvf%11hKwe&(&9_~{W)*y1nR5f_ z!N(R74nNK`y8>B!0Bt_Vr!;nc3W>~RiKtGSBkNlsR#-t^&;$W#)f9tTlZz>n*+Fjz z3zXZ;jf(sTM(oDzJt4FJS*8c&;PLTW(IQDFs_5QPy+7yhi1syPCarvqrHFcf&yTy)^O<1EBx;Ir`5W{TIM>{8w&PB>ro4;YD<5LF^TjTb0!zAP|QijA+1Vg>{Afv^% zmrkc4o6rvBI;Q8rj4*=AZacy*n8B{&G3VJc)so4$XUoie0)vr;qzPZVbb<#Fc=j+8CGBWe$n|3K& z_@%?{l|TzKSlUEO{U{{%Fz_pVDxs7i9H#bnbCw7@4DR=}r_qV!Zo~CvD4ZI*+j3kO zW6_=|S`)(*gM0Z;;}nj`73OigF4p6_NPZQ-Od~e$c_);;4-7sR>+2u$6m$Gf%T{aq zle>e3(*Rt(TPD}03n5)!Ca8Pu!V}m6v0o1;5<1h$*|7z|^(3$Y&;KHKTT}hV056wuF0Xo@mK-52~r=6^SI1NC%c~CC?n>yX6wPTgiWYVz!Sx^atLby9YNn1Rk{g?|pJaxD4|9cUf|V1_I*w zzxK)hRh9%zOl=*$?XUjly5z8?jPMy%vEN)f%T*|WO|bp5NWv@B(K3D6LMl!-6dQg0 zXNE&O>Oyf%K@`ngCvbGPR>HRg5!1IV$_}m@3dWB7x3t&KFyOJn9pxRXCAzFr&%37wXG;z^xaO$ekR=LJG ztIHpY8F5xBP{mtQidqNRoz= z@){+N3(VO5bD+VrmS^YjG@+JO{EOIW)9=F4v_$Ed8rZtHvjpiEp{r^c4F6Ic#ChlC zJX^DtSK+v(YdCW)^EFcs=XP7S>Y!4=xgmv>{S$~@h=xW-G4FF9?I@zYN$e5oF9g$# zb!eVU#J+NjLyX;yb)%SY)xJdvGhsnE*JEkuOVo^k5PyS=o#vq!KD46UTW_%R=Y&0G zFj6bV{`Y6)YoKgqnir2&+sl+i6foAn-**Zd1{_;Zb7Ki=u394C5J{l^H@XN`_6XTKY%X1AgQM6KycJ+= zYO=&t#5oSKB^pYhNdzPgH~aEGW2=ec1O#s-KG z71}LOg@4UEFtp3GY1PBemXpNs6UK-ax*)#$J^pC_me;Z$Je(OqLoh|ZrW*mAMBFn< zHttjwC&fkVfMnQeen8`Rvy^$pNRFVaiEN4Pih*Y3@jo!T0nsClN)pdrr9AYLcZxZ| zJ5Wlj+4q~($hbtuY zVQ7hl>4-+@6g1i`1a)rvtp-;b0>^`Dloy(#{z~ytgv=j4q^Kl}wD>K_Y!l~ zp(_&7sh`vfO(1*MO!B%<6E_bx1)&s+Ae`O)a|X=J9y~XDa@UB`m)`tSG4AUhoM=5& znWoHlA-(z@3n0=l{E)R-p8sB9XkV zZ#D8wietfHL?J5X0%&fGg@MH~(rNS2`GHS4xTo7L$>TPme+Is~!|79=^}QbPF>m%J zFMkGzSndiPO|E~hrhCeo@&Ea{M(ieIgRWMf)E}qeTxT8Q#g-!Lu*x$v8W^M^>?-g= zwMJ$dThI|~M06rG$Sv@C@tWR>_YgaG&!BAbkGggVQa#KdtDB)lMLNVLN|51C@F^y8 zCRvMB^{GO@j=cHfmy}_pCGbP%xb{pNN>? z?7tBz$1^zVaP|uaatYaIN+#xEN4jBzwZ|YI_)p(4CUAz1ZEbDk>J~Y|63SZaak~#0 zoYKruYsWHoOlC1(MhTnsdUOwQfz5p6-D0}4;DO$B;7#M{3lSE^jnTT;ns`>!G%i*F?@pR1JO{QTuD0U+~SlZxcc8~>IB{)@8p`P&+nDxNj`*gh|u?yrv$phpQcW)Us)bi`kT%qLj(fi{dWRZ%Es2!=3mI~UxiW0$-v3vUl?#g{p6eF zMEUAqo5-L0Ar(s{VlR9g=j7+lt!gP!UN2ICMokAZ5(Agd>})#gkA2w|5+<%-CuEP# zqgcM}u@3(QIC^Gx<2dbLj?cFSws_f3e%f4jeR?4M^M3cx1f+Qr6ydQ>n)kz1s##2w zk}UyQc+Z5G-d-1}{WzjkLXgS-2P7auWSJ%pSnD|Uivj5u!xk0 z_^-N9r9o;(rFDt~q1PvE#iJZ_f>J3gcP$)SOqhE~pD2|$=GvpL^d!r z6u=sp-CrMoF7;)}Zd7XO4XihC4ji?>V&(t^?@3Q&t9Mx=qex6C9d%{FE6dvU6%d94 zIE;hJ1J)cCqjv?F``7I*6bc#X)JW2b4f$L^>j{*$R`%5VHFi*+Q$2;nyieduE}qdS{L8y8F08yLs?w}{>8>$3236T-VMh@B zq-nujsb_1aUv_7g#)*rf9h%sFj*^mIcImRV*k~Vmw;%;YH(&ylYpy!&UjUVqqtfG` zox3esju?`unJJA_zKXRJP)rA3nXc$m^{S&-p|v|-0x9LHJm;XIww7C#R$?00l&Yyj z=e}gKUOpsImwW?N)+E(awoF@HyP^EhL+GlNB#k?R<2>95hz!h9sF@U20DHSB3~WMa zk90+858r@-+vWwkawJ)8ougd(i#1m3GLN{iSTylYz$brAsP%=&m$mQQrH$g%3-^VR zE%B`Vi&m8f3T~&myTEK28BDWCVzfWir1I?03;pX))|kY5ClO^+bae z*7E?g=3g7EiisYOrE+lA)2?Ln6q2*HLNpZEWMB|O-JI_oaHZB%CvYB(%=tU= zE*OY%QY58fW#RG5=gm0NR#iMB=EuNF@)%oZJ}nmm=tsJ?eGjia{e{yuU0l3{d^D@)kVDt=1PE)&tf_hHC%0MB znL|CRCPC}SeuVTdf>-QV70`0(EHizc21s^sU>y%hW0t!0&y<7}Wi-wGy>m%(-jsDj zP?mF|>p_K>liZ6ZP(w5(|9Ga%>tLgb$|doDDfkdW>Z z`)>V2XC?NJT26mL^@ zf+IKr27TfM!UbZ@?zRddC7#6ss1sw%CXJ4FWC+t3lHZupzM77m^=9 z&(a?-LxIq}*nvv)y?27lZ{j zifdl9hyJudyP2LpU$-kXctshbJDKS{WfulP5Dk~xU4Le4c#h^(YjJit4#R8_khheS z|8(>2ibaHES4+J|DBM7I#QF5u-*EdN{n=Kt@4Zt?@Tv{JZA{`4 zU#kYOv{#A&gGPwT+$Ud}AXlK3K7hYzo$(fBSFjrP{QQ zeaKg--L&jh$9N}`pu{Bs>?eDFPaWY4|9|foN%}i;3%;@4{dc+iw>m}{3rELqH21G! z`8@;w-zsJ1H(N3%|1B@#ioLOjib)j`EiJqPQVSbPSPVHCj6t5J&(NcWzBrzCiDt{4 zdlPAUKldz%6x5II1H_+jv)(xVL+a;P+-1hv_pM>gMRr%04@k;DTokASSKKhU1Qms| zrWh3a!b(J3n0>-tipg{a?UaKsP7?+|@A+1WPDiQIW1Sf@qDU~M_P65_s}7(gjTn0X zucyEm)o;f8UyshMy&>^SC3I|C6jR*R_GFwGranWZe*I>K+0k}pBuET&M~ z;Odo*ZcT?ZpduHyrf8E%IBFtv;JQ!N_m>!sV6ly$_1D{(&nO~w)G~Y`7sD3#hQk%^ zp}ucDF_$!6DAz*PM8yE(&~;%|=+h(Rn-=1Wykas_-@d&z#=S}rDf`4w(rVlcF&lF! z=1)M3YVz7orwk^BXhslJ8jR);sh^knJW(Qmm(QdSgIAIdlN4Te5KJisifjr?eB{FjAX1a0AB>d?qY4Wx>BZ8&}5K0fA+d{l8 z?^s&l8#j7pR&ijD?0b%;lL9l$P_mi2^*_OL+b}4kuLR$GAf85sOo02?Y#90}CCDiS zZ%rbCw>=H~CBO=C_JVV=xgDe%b4FaEFtuS7Q1##y686r%F6I)s-~2(}PWK|Z8M+Gu zl$y~5@#0Ka%$M<&Cv%L`a8X^@tY&T7<0|(6dNT=EsRe0%kp1Qyq!^43VAKYnr*A5~ zsI%lK1ewqO;0TpLrT9v}!@vJK{QoVa_+N4FYT#h?Y8rS1S&-G+m$FNMP?(8N`MZP zels(*?kK{{^g9DOzkuZXJ2;SrOQsp9T$hwRB1(phw1c7`!Q!by?Q#YsSM#I12RhU{$Q+{xj83axHcftEc$mNJ8_T7A-BQc*k(sZ+~NsO~xAA zxnbb%dam_fZlHvW7fKXrB~F&jS<4FD2FqY?VG?ix*r~MDXCE^WQ|W|WM;gsIA4lQP zJ2hAK@CF*3*VqPr2eeg6GzWFlICi8S>nO>5HvWzyZTE)hlkdC_>pBej*>o0EOHR|) z$?};&I4+_?wvL*g#PJ9)!bc#9BJu1(*RdNEn>#Oxta(VWeM40ola<0aOe2kSS~{^P zDJBd}0L-P#O-CzX*%+$#v;(x%<*SPgAje=F{Zh-@ucd2DA(yC|N_|ocs*|-!H%wEw z@Q!>siv2W;C^^j^59OAX03&}&D*W4EjCvfi(ygcL#~t8XGa#|NPO+*M@Y-)ctFA@I z-p7npT1#5zOLo>7q?aZpCZ=iecn3QYklP;gF0bq@>oyBq94f6C=;Csw3PkZ|5q=(c zfs`aw?II0e(h=|7o&T+hq&m$; zBrE09Twxd9BJ2P+QPN}*OdZ-JZV7%av@OM7v!!NL8R;%WFq*?{9T3{ct@2EKgc8h) zMxoM$SaF#p<`65BwIDfmXG6+OiK0e)`I=!A3E`+K@61f}0e z!2a*FOaDrOe>U`q%K!QN`&=&0C~)CaL3R4VY(NDt{Xz(Xpqru5=r#uQN1L$Je1*dkdqQ*=lofQaN%lO!<5z9ZlHgxt|`THd>2 zsWfU$9=p;yLyJyM^t zS2w9w?Bpto`@H^xJpZDKR1@~^30Il6oFGfk5%g6w*C+VM)+%R@gfIwNprOV5{F^M2 zO?n3DEzpT+EoSV-%OdvZvNF+pDd-ZVZ&d8 zKeIyrrfPN=EcFRCPEDCVflX#3-)Ik_HCkL(ejmY8vzcf-MTA{oHk!R2*36`O68$7J zf}zJC+bbQk--9Xm!u#lgLvx8TXx2J258E5^*IZ(FXMpq$2LUUvhWQPs((z1+2{Op% z?J}9k5^N=z;7ja~zi8a_-exIqWUBJwohe#4QJ`|FF*$C{lM18z^#hX6!5B8KAkLUX ziP=oti-gpV(BsLD{0(3*dw}4JxK23Y7M{BeFPucw!sHpY&l%Ws4pSm`+~V7;bZ%Dx zeI)MK=4vC&5#;2MT7fS?^ch9?2;%<8Jlu-IB&N~gg8t;6S-#C@!NU{`p7M8@2iGc& zg|JPg%@gCoCQ&s6JvDU&`X2S<57f(k8nJ1wvBu{8r?;q3_kpZZ${?|( z+^)UvR33sjSd)aT!UPkA;ylO6{aE3MQa{g%Mcf$1KONcjO@&g5zPHWtzM1rYC{_K> zgQNcs<{&X{OA=cEWw5JGqpr0O>x*Tfak2PE9?FuWtz^DDNI}rwAaT0(bdo-<+SJ6A z&}S%boGMWIS0L}=S>|-#kRX;e^sUsotry(MjE|3_9duvfc|nwF#NHuM-w7ZU!5ei8 z6Mkf>2)WunY2eU@C-Uj-A zG(z0Tz2YoBk>zCz_9-)4a>T46$(~kF+Y{#sA9MWH%5z#zNoz)sdXq7ZR_+`RZ%0(q zC7&GyS_|BGHNFl8Xa%@>iWh%Gr?=J5<(!OEjauj5jyrA-QXBjn0OAhJJ9+v=!LK`` z@g(`^*84Q4jcDL`OA&ZV60djgwG`|bcD*i50O}Q{9_noRg|~?dj%VtKOnyRs$Uzqg z191aWoR^rDX#@iSq0n z?9Sg$WSRPqSeI<}&n1T3!6%Wj@5iw5`*`Btni~G=&;J+4`7g#OQTa>u`{4ZZ(c@s$ zK0y;ySOGD-UTjREKbru{QaS>HjN<2)R%Nn-TZiQ(Twe4p@-saNa3~p{?^V9Nixz@a zykPv~<@lu6-Ng9i$Lrk(xi2Tri3q=RW`BJYOPC;S0Yly%77c727Yj-d1vF!Fuk{Xh z)lMbA69y7*5ufET>P*gXQrxsW+ zz)*MbHZv*eJPEXYE<6g6_M7N%#%mR{#awV3i^PafNv(zyI)&bH?F}2s8_rR(6%!V4SOWlup`TKAb@ee>!9JKPM=&8g#BeYRH9FpFybxBXQI2|g}FGJfJ+ zY-*2hB?o{TVL;Wt_ek;AP5PBqfDR4@Z->_182W z{P@Mc27j6jE*9xG{R$>6_;i=y{qf(c`5w9fa*`rEzX6t!KJ(p1H|>J1pC-2zqWENF zmm=Z5B4u{cY2XYl(PfrInB*~WGWik3@1oRhiMOS|D;acnf-Bs(QCm#wR;@Vf!hOPJ zgjhDCfDj$HcyVLJ=AaTbQ{@vIv14LWWF$=i-BDoC11}V;2V8A`S>_x)vIq44-VB-v z*w-d}$G+Ql?En8j!~ZkCpQ$|cA0|+rrY>tiCeWxkRGPoarxlGU2?7%k#F693RHT24 z-?JsiXlT2PTqZqNb&sSc>$d;O4V@|b6VKSWQb~bUaWn1Cf0+K%`Q&Wc<>mQ>*iEGB zbZ;aYOotBZ{vH3y<0A*L0QVM|#rf*LIsGx(O*-7)r@yyBIzJnBFSKBUSl1e|8lxU* zzFL+YDVVkIuzFWeJ8AbgN&w(4-7zbiaMn{5!JQXu)SELk*CNL+Fro|2v|YO)1l15t zs(0^&EB6DPMyaqvY>=KL>)tEpsn;N5Q#yJj<9}ImL((SqErWN3Q=;tBO~ExTCs9hB z2E$7eN#5wX4<3m^5pdjm#5o>s#eS_Q^P)tm$@SawTqF*1dj_i#)3};JslbLKHXl_N z)Fxzf>FN)EK&Rz&*|6&%Hs-^f{V|+_vL1S;-1K-l$5xiC@}%uDuwHYhmsV?YcOUlk zOYkG5v2+`+UWqpn0aaaqrD3lYdh0*!L`3FAsNKu=Q!vJu?Yc8n|CoYyDo_`r0mPoo z8>XCo$W4>l(==h?2~PoRR*kEe)&IH{1sM41mO#-36`02m#nTX{r*r`Q5rZ2-sE|nA zhnn5T#s#v`52T5|?GNS`%HgS2;R(*|^egNPDzzH_z^W)-Q98~$#YAe)cEZ%vge965AS_am#DK#pjPRr-!^za8>`kksCAUj(Xr*1NW5~e zpypt_eJpD&4_bl_y?G%>^L}=>xAaV>KR6;^aBytqpiHe%!j;&MzI_>Sx7O%F%D*8s zSN}cS^<{iiK)=Ji`FpO#^zY!_|D)qeRNAtgmH)m;qC|mq^j(|hL`7uBz+ULUj37gj zksdbnU+LSVo35riSX_4z{UX=%n&}7s0{WuZYoSfwAP`8aKN9P@%e=~1`~1ASL-z%# zw>DO&ixr}c9%4InGc*_y42bdEk)ZdG7-mTu0bD@_vGAr*NcFoMW;@r?@LUhRI zCUJgHb`O?M3!w)|CPu~ej%fddw20lod?Ufp8Dmt0PbnA0J%KE^2~AIcnKP()025V> zG>noSM3$5Btmc$GZoyP^v1@Poz0FD(6YSTH@aD0}BXva?LphAiSz9f&Y(aDAzBnUh z?d2m``~{z;{}kZJ>a^wYI?ry(V9hIoh;|EFc0*-#*`$T0DRQ1;WsqInG;YPS+I4{g zJGpKk%%Sdc5xBa$Q^_I~(F97eqDO7AN3EN0u)PNBAb+n+ zWBTxQx^;O9o0`=g+Zrt_{lP!sgWZHW?8bLYS$;1a@&7w9rD9|Ge;Gb?sEjFoF9-6v z#!2)t{DMHZ2@0W*fCx;62d#;jouz`R5Y(t{BT=$N4yr^^o$ON8d{PQ=!O zX17^CrdM~7D-;ZrC!||<+FEOxI_WI3CA<35va%4v>gc zEX-@h8esj=a4szW7x{0g$hwoWRQG$yK{@3mqd-jYiVofJE!Wok1* znV7Gm&Ssq#hFuvj1sRyHg(6PFA5U*Q8Rx>-blOs=lb`qa{zFy&n4xY;sd$fE+<3EI z##W$P9M{B3c3Si9gw^jlPU-JqD~Cye;wr=XkV7BSv#6}DrsXWFJ3eUNrc%7{=^sP> zrp)BWKA9<}^R9g!0q7yWlh;gr_TEOD|#BmGq<@IV;ueg+D2}cjpp+dPf&Q(36sFU&K8}hA85U61faW&{ zlB`9HUl-WWCG|<1XANN3JVAkRYvr5U4q6;!G*MTdSUt*Mi=z_y3B1A9j-@aK{lNvx zK%p23>M&=KTCgR!Ee8c?DAO2_R?B zkaqr6^BSP!8dHXxj%N1l+V$_%vzHjqvu7p@%Nl6;>y*S}M!B=pz=aqUV#`;h%M0rU zHfcog>kv3UZAEB*g7Er@t6CF8kHDmKTjO@rejA^ULqn!`LwrEwOVmHx^;g|5PHm#B zZ+jjWgjJ!043F+&#_;D*mz%Q60=L9Ove|$gU&~As5^uz@2-BfQ!bW)Khn}G+Wyjw- z19qI#oB(RSNydn0t~;tAmK!P-d{b-@@E5|cdgOS#!>%#Rj6ynkMvaW@37E>@hJP^8 z2zk8VXx|>#R^JCcWdBCy{0nPmYFOxN55#^-rlqobe0#L6)bi?E?SPymF*a5oDDeSd zO0gx?#KMoOd&G(2O@*W)HgX6y_aa6iMCl^~`{@UR`nMQE`>n_{_aY5nA}vqU8mt8H z`oa=g0SyiLd~BxAj2~l$zRSDHxvDs;I4>+M$W`HbJ|g&P+$!U7-PHX4RAcR0szJ*( ze-417=bO2q{492SWrqDK+L3#ChUHtz*@MP)e^%@>_&#Yk^1|tv@j4%3T)diEX zATx4K*hcO`sY$jk#jN5WD<=C3nvuVsRh||qDHnc~;Kf59zr0;c7VkVSUPD%NnnJC_ zl3F^#f_rDu8l}l8qcAz0FFa)EAt32IUy_JLIhU_J^l~FRH&6-ivSpG2PRqzDdMWft>Zc(c)#tb%wgmWN%>IOPm zZi-noqS!^Ftb81pRcQi`X#UhWK70hy4tGW1mz|+vI8c*h@ zfFGJtW3r>qV>1Z0r|L>7I3un^gcep$AAWfZHRvB|E*kktY$qQP_$YG60C@X~tTQjB3%@`uz!qxtxF+LE!+=nrS^07hn` zEgAp!h|r03h7B!$#OZW#ACD+M;-5J!W+{h|6I;5cNnE(Y863%1(oH}_FTW})8zYb$7czP zg~Szk1+_NTm6SJ0MS_|oSz%e(S~P-&SFp;!k?uFayytV$8HPwuyELSXOs^27XvK-D zOx-Dl!P|28DK6iX>p#Yb%3`A&CG0X2S43FjN%IB}q(!hC$fG}yl1y9W&W&I@KTg6@ zK^kpH8=yFuP+vI^+59|3%Zqnb5lTDAykf z9S#X`3N(X^SpdMyWQGOQRjhiwlj!0W-yD<3aEj^&X%=?`6lCy~?`&WSWt z?U~EKFcCG_RJ(Qp7j=$I%H8t)Z@6VjA#>1f@EYiS8MRHZphp zMA_5`znM=pzUpBPO)pXGYpQ6gkine{6u_o!P@Q+NKJ}k!_X7u|qfpAyIJb$_#3@wJ z<1SE2Edkfk9C!0t%}8Yio09^F`YGzpaJHGk*-ffsn85@)%4@`;Fv^8q(-Wk7r=Q8p zT&hD`5(f?M{gfzGbbwh8(}G#|#fDuk7v1W)5H9wkorE0ZZjL0Q1=NRGY>zwgfm81DdoaVwNH;or{{eSyybt)m<=zXoA^RALYG-2t zouH|L*BLvmm9cdMmn+KGopyR@4*=&0&4g|FLoreZOhRmh=)R0bg~ zT2(8V_q7~42-zvb)+y959OAv!V$u(O3)%Es0M@CRFmG{5sovIq4%8Ahjk#*5w{+)+ zMWQoJI_r$HxL5km1#6(e@{lK3Udc~n0@g`g$s?VrnQJ$!oPnb?IHh-1qA`Rz$)Ai< z6w$-MJW-gKNvOhL+XMbE7&mFt`x1KY>k4(!KbbpZ`>`K@1J<(#vVbjx@Z@(6Q}MF# zMnbr-f55(cTa^q4+#)=s+ThMaV~E`B8V=|W_fZWDwiso8tNMTNse)RNBGi=gVwgg% zbOg8>mbRN%7^Um-7oj4=6`$|(K7!+t^90a{$18Z>}<#!bm%ZEFQ{X(yBZMc>lCz0f1I2w9Sq zuGh<9<=AO&g6BZte6hn>Qmvv;Rt)*cJfTr2=~EnGD8P$v3R|&1RCl&7)b+`=QGapi zPbLg_pxm`+HZurtFZ;wZ=`Vk*do~$wB zxoW&=j0OTbQ=Q%S8XJ%~qoa3Ea|au5o}_(P;=!y-AjFrERh%8la!z6Fn@lR?^E~H12D?8#ht=1F;7@o4$Q8GDj;sSC%Jfn01xgL&%F2 zwG1|5ikb^qHv&9hT8w83+yv&BQXOQyMVJSBL(Ky~p)gU3#%|blG?IR9rP^zUbs7rOA0X52Ao=GRt@C&zlyjNLv-} z9?*x{y(`509qhCV*B47f2hLrGl^<@SuRGR!KwHei?!CM10Tq*YDIoBNyRuO*>3FU? zHjipIE#B~y3FSfOsMfj~F9PNr*H?0oHyYB^G(YyNh{SxcE(Y-`x5jFMKb~HO*m+R% zrq|ic4fzJ#USpTm;X7K+E%xsT_3VHKe?*uc4-FsILUH;kL>_okY(w`VU*8+l>o>Jm ziU#?2^`>arnsl#)*R&nf_%>A+qwl%o{l(u)M?DK1^mf260_oteV3#E_>6Y4!_hhVD zM8AI6MM2V*^_M^sQ0dmHu11fy^kOqXqzpr?K$`}BKWG`=Es(9&S@K@)ZjA{lj3ea7_MBP zk(|hBFRjHVMN!sNUkrB;(cTP)T97M$0Dtc&UXSec<+q?y>5=)}S~{Z@ua;1xt@=T5 zI7{`Z=z_X*no8s>mY;>BvEXK%b`a6(DTS6t&b!vf_z#HM{Uoy_5fiB(zpkF{})ruka$iX*~pq1ZxD?q68dIo zIZSVls9kFGsTwvr4{T_LidcWtt$u{kJlW7moRaH6+A5hW&;;2O#$oKyEN8kx`LmG)Wfq4ykh+q{I3|RfVpkR&QH_x;t41Uw z`P+tft^E2B$domKT@|nNW`EHwyj>&}K;eDpe z1bNOh=fvIfk`&B61+S8ND<(KC%>y&?>opCnY*r5M+!UrWKxv0_QvTlJc>X#AaI^xo zaRXL}t5Ej_Z$y*|w*$6D+A?Lw-CO-$itm^{2Ct82-<0IW)0KMNvJHgBrdsIR0v~=H z?n6^}l{D``Me90`^o|q!olsF?UX3YSq^6Vu>Ijm>>PaZI8G@<^NGw{Cx&%|PwYrfw zR!gX_%AR=L3BFsf8LxI|K^J}deh0ZdV?$3r--FEX`#INxsOG6_=!v)DI>0q|BxT)z z-G6kzA01M?rba+G_mwNMQD1mbVbNTWmBi*{s_v_Ft9m2Avg!^78(QFu&n6mbRJ2bA zv!b;%yo{g*9l2)>tsZJOOp}U~8VUH`}$ z8p_}t*XIOehezolNa-a2x0BS})Y9}&*TPgua{Ewn-=wVrmJUeU39EKx+%w%=ixQWK zDLpwaNJs65#6o7Ln7~~X+p_o2BR1g~VCfxLzxA{HlWAI6^H;`juI=&r1jQrUv_q0Z z1Ja-tjdktrrP>GOC*#p?*xfQU5MqjMsBe!9lh(u8)w$e@Z|>aUHI5o;MGw*|Myiz3 z-f0;pHg~Q#%*Kx8MxH%AluVXjG2C$)WL-K63@Q`#y9_k_+}eR(x4~dp7oV-ek0H>I zgy8p#i4GN{>#v=pFYUQT(g&b$OeTy-X_#FDgNF8XyfGY6R!>inYn8IR2RDa&O!(6< znXs{W!bkP|s_YI*Yx%4stI`=ZO45IK6rBs`g7sP40ic}GZ58s?Mc$&i`kq_tfci>N zIHrC0H+Qpam1bNa=(`SRKjixBTtm&e`j9porEci!zdlg1RI0Jw#b(_Tb@RQK1Zxr_ z%7SUeH6=TrXt3J@js`4iDD0=IoHhK~I7^W8^Rcp~Yaf>2wVe|Hh1bUpX9ATD#moByY57-f2Ef1TP^lBi&p5_s7WGG9|0T}dlfxOx zXvScJO1Cnq`c`~{Dp;{;l<-KkCDE+pmexJkd}zCgE{eF=)K``-qC~IT6GcRog_)!X z?fK^F8UDz$(zFUrwuR$qro5>qqn>+Z%<5>;_*3pZ8QM|yv9CAtrAx;($>4l^_$_-L z*&?(77!-=zvnCVW&kUcZMb6;2!83si518Y%R*A3JZ8Is|kUCMu`!vxDgaWjs7^0j( ziTaS4HhQ)ldR=r)_7vYFUr%THE}cPF{0H45FJ5MQW^+W>P+eEX2kLp3zzFe*-pFVA zdDZRybv?H|>`9f$AKVjFWJ=wegO7hOOIYCtd?Vj{EYLT*^gl35|HQ`R=ti+ADm{jyQE7K@kdjuqJhWVSks>b^ zxha88-h3s;%3_5b1TqFCPTxVjvuB5U>v=HyZ$?JSk+&I%)M7KE*wOg<)1-Iy)8-K! z^XpIt|0ibmk9RtMmlUd7#Ap3Q!q9N4atQy)TmrhrFhfx1DAN`^vq@Q_SRl|V z#lU<~n67$mT)NvHh`%als+G-)x1`Y%4Bp*6Un5Ri9h=_Db zA-AdP!f>f0m@~>7X#uBM?diI@)Egjuz@jXKvm zJo+==juc9_<;CqeRaU9_Mz@;3e=E4=6TK+c`|uu#pIqhSyNm`G(X)&)B`8q0RBv#> z`gGlw(Q=1Xmf55VHj%C#^1lpc>LY8kfA@|rlC1EA<1#`iuyNO z(=;irt{_&K=i4)^x%;U(Xv<)+o=dczC5H3W~+e|f~{*ucxj@{Yi-cw^MqYr3fN zF5D+~!wd$#al?UfMnz(@K#wn`_5na@rRr8XqN@&M&FGEC@`+OEv}sI1hw>Up0qAWf zL#e4~&oM;TVfjRE+10B_gFlLEP9?Q-dARr3xi6nQqnw>k-S;~b z;!0s2VS4}W8b&pGuK=7im+t(`nz@FnT#VD|!)eQNp-W6)@>aA+j~K*H{$G`y2|QHY z|Hmy+CR@#jWY4~)lr1qBJB_RfHJFfP<}pK5(#ZZGSqcpyS&}01LnTWk5fzmXMGHkJ zTP6L^B+uj;lmB_W<~4=${+v0>z31M!-_O@o-O9GyW)j_mjx}!0@br_LE-7SIuPP84 z;5=O(U*g_um0tyG|61N@d9lEuOeiRd+#NY^{nd5;-CVlw&Ap7J?qwM^?E29wvS}2d zbzar4Fz&RSR(-|s!Z6+za&Z zY#D<5q_JUktIzvL0)yq_kLWG6DO{ri=?c!y!f(Dk%G{8)k`Gym%j#!OgXVDD3;$&v@qy#ISJfp=Vm>pls@9-mapVQChAHHd-x+OGx)(*Yr zC1qDUTZ6mM(b_hi!TuFF2k#8uI2;kD70AQ&di$L*4P*Y-@p`jdm%_c3f)XhYD^6M8&#Y$ZpzQMcR|6nsH>b=*R_Von!$BTRj7yGCXokoAQ z&ANvx0-Epw`QIEPgI(^cS2f(Y85yV@ygI{ewyv5Frng)e}KCZF7JbR(&W618_dcEh(#+^zZFY;o<815<5sOHQdeax9_!PyM&;{P zkBa5xymca0#)c#tke@3KNEM8a_mT&1gm;p&&JlMGH(cL(b)BckgMQ^9&vRwj!~3@l zY?L5}=Jzr080OGKb|y`ee(+`flQg|!lo6>=H)X4`$Gz~hLmu2a%kYW_Uu8x09Pa0J zKZ`E$BKJ=2GPj_3l*TEcZ*uYRr<*J^#5pILTT;k_cgto1ZL-%slyc16J~OH-(RgDA z%;EjEnoUkZ&acS{Q8`{i6T5^nywgqQI5bDIymoa7CSZG|WWVk>GM9)zy*bNih|QIm z%0+(Nnc*a_xo;$=!HQYaapLms>J1ToyjtFByY`C2H1wT#178#4+|{H0BBqtCdd$L% z_3Hc60j@{t9~MjM@LBalR&6@>B;9?r<7J~F+WXyYu*y3?px*=8MAK@EA+jRX8{CG?GI-< z54?Dc9CAh>QTAvyOEm0^+x;r2BWX|{3$Y7)L5l*qVE*y0`7J>l2wCmW zL1?|a`pJ-l{fb_N;R(Z9UMiSj6pQjOvQ^%DvhIJF!+Th7jO2~1f1N+(-TyCFYQZYw z4)>7caf^Ki_KJ^Zx2JUb z&$3zJy!*+rCV4%jqwyuNY3j1ZEiltS0xTzd+=itTb;IPYpaf?8Y+RSdVdpacB(bVQ zC(JupLfFp8y43%PMj2}T|VS@%LVp>hv4Y!RPMF?pp8U_$xCJ)S zQx!69>bphNTIb9yn*_yfj{N%bY)t{L1cs8<8|!f$;UQ*}IN=2<6lA;x^(`8t?;+ST zh)z4qeYYgZkIy{$4x28O-pugO&gauRh3;lti9)9Pvw+^)0!h~%m&8Q!AKX%urEMnl z?yEz?g#ODn$UM`+Q#$Q!6|zsq_`dLO5YK-6bJM6ya>}H+vnW^h?o$z;V&wvuM$dR& zeEq;uUUh$XR`TWeC$$c&Jjau2it3#%J-y}Qm>nW*s?En?R&6w@sDXMEr#8~$=b(gk zwDC3)NtAP;M2BW_lL^5ShpK$D%@|BnD{=!Tq)o(5@z3i7Z){} zGr}Exom_qDO{kAVkZ*MbLNHE666Kina#D{&>Jy%~w7yX$oj;cYCd^p9zy z8*+wgSEcj$4{WxKmCF(5o7U4jqwEvO&dm1H#7z}%VXAbW&W24v-tS6N3}qrm1OnE)fUkoE8yMMn9S$?IswS88tQWm4#Oid#ckgr6 zRtHm!mfNl-`d>O*1~d7%;~n+{Rph6BBy^95zqI{K((E!iFQ+h*C3EsbxNo_aRm5gj zKYug($r*Q#W9`p%Bf{bi6;IY0v`pB^^qu)gbg9QHQ7 zWBj(a1YSu)~2RK8Pi#C>{DMlrqFb9e_RehEHyI{n?e3vL_}L>kYJC z_ly$$)zFi*SFyNrnOt(B*7E$??s67EO%DgoZL2XNk8iVx~X_)o++4oaK1M|ou73vA0K^503j@uuVmLcHH4ya-kOIDfM%5%(E z+Xpt~#7y2!KB&)PoyCA+$~DXqxPxxALy!g-O?<9+9KTk4Pgq4AIdUkl`1<1#j^cJg zgU3`0hkHj_jxV>`Y~%LAZl^3o0}`Sm@iw7kwff{M%VwtN)|~!p{AsfA6vB5UolF~d zHWS%*uBDt<9y!9v2Xe|au&1j&iR1HXCdyCjxSgG*L{wmTD4(NQ=mFjpa~xooc6kju z`~+d{j7$h-;HAB04H!Zscu^hZffL#9!p$)9>sRI|Yovm)g@F>ZnosF2EgkU3ln0bR zTA}|+E(tt)!SG)-bEJi_0m{l+(cAz^pi}`9=~n?y&;2eG;d9{M6nj>BHGn(KA2n|O zt}$=FPq!j`p&kQ8>cirSzkU0c08%8{^Qyqi-w2LoO8)^E7;;I1;HQ6B$u0nNaX2CY zSmfi)F`m94zL8>#zu;8|{aBui@RzRKBlP1&mfFxEC@%cjl?NBs`cr^nm){>;$g?rhKr$AO&6qV_Wbn^}5tfFBry^e1`%du2~o zs$~dN;S_#%iwwA_QvmMjh%Qo?0?rR~6liyN5Xmej8(*V9ym*T`xAhHih-v$7U}8=dfXi2i*aAB!xM(Xekg*ix@r|ymDw*{*s0?dlVys2e)z62u1 z+k3esbJE=-P5S$&KdFp+2H7_2e=}OKDrf( z9-207?6$@f4m4B+9E*e((Y89!q?zH|mz_vM>kp*HGXldO0Hg#!EtFhRuOm$u8e~a9 z5(roy7m$Kh+zjW6@zw{&20u?1f2uP&boD}$#Zy)4o&T;vyBoqFiF2t;*g=|1=)PxB z8eM3Mp=l_obbc?I^xyLz?4Y1YDWPa+nm;O<$Cn;@ane616`J9OO2r=rZr{I_Kizyc zP#^^WCdIEp*()rRT+*YZK>V@^Zs=ht32x>Kwe zab)@ZEffz;VM4{XA6e421^h~`ji5r%)B{wZu#hD}f3$y@L0JV9f3g{-RK!A?vBUA}${YF(vO4)@`6f1 z-A|}e#LN{)(eXloDnX4Vs7eH|<@{r#LodP@Nz--$Dg_Par%DCpu2>2jUnqy~|J?eZ zBG4FVsz_A+ibdwv>mLp>P!(t}E>$JGaK$R~;fb{O3($y1ssQQo|5M;^JqC?7qe|hg zu0ZOqeFcp?qVn&Qu7FQJ4hcFi&|nR!*j)MF#b}QO^lN%5)4p*D^H+B){n8%VPUzi! zDihoGcP71a6!ab`l^hK&*dYrVYzJ0)#}xVrp!e;lI!+x+bfCN0KXwUAPU9@#l7@0& QuEJmfE|#`Dqx|px0L@K;Y5)KL literal 0 HcmV?d00001 diff --git a/examples/tv-casting-app/android/App/gradle/wrapper/gradle-wrapper.properties b/examples/tv-casting-app/android/App/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000000000..2e6e5897b5285c --- /dev/null +++ b/examples/tv-casting-app/android/App/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/examples/tv-casting-app/android/App/gradlew b/examples/tv-casting-app/android/App/gradlew new file mode 100755 index 00000000000000..180cdce0308183 --- /dev/null +++ b/examples/tv-casting-app/android/App/gradlew @@ -0,0 +1,184 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or 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 +# +# https://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. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ]; do + ls=$(ls -ld "$PRG") + link=$(expr "$ls" : '.*-> \(.*\)$') + if expr "$link" : '/.*' >/dev/null; then + PRG="$link" + else + PRG=$(dirname "$PRG")"/$link" + fi +done +SAVED="$PWD" +cd "$(dirname "$PRG")" >/dev/null +APP_HOME="$(pwd -P)" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=$(basename "$0") + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn() { + echo "$*" +} + +die() { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$(uname)" in + CYGWIN*) + cygwin=true + ;; + Darwin*) + darwin=true + ;; + MINGW*) + msys=true + ;; + NONSTOP*) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ]; then + if [ -x "$JAVA_HOME/jre/sh/java" ]; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ]; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ]; then + MAX_FD_LIMIT=$(ulimit -H -n) + if [ $? -eq 0 ]; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n "$MAX_FD" + if [ $? -ne 0 ]; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if "$darwin"; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ]; then + APP_HOME=$(cygpath --path --mixed "$APP_HOME") + CLASSPATH=$(cygpath --path --mixed "$CLASSPATH") + + JAVACMD=$(cygpath --unix "$JAVACMD") + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=$(find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null) + SEP="" + for dir in "$ROOTDIRSRAW"; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ]; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@"; do + CHECK=$(echo "$arg" | egrep -c "$OURCYGPATTERN" -) + CHECK2=$(echo "$arg" | egrep -c "^-") ### Determine if an option + + if [ "$CHECK" -ne 0 ] && [ "$CHECK2" -eq 0 ]; then ### Added a condition + eval "$(echo args"$i")=$(cygpath --path --ignore --mixed "$arg")" + else + eval "$(echo args"$i")=\"$arg\"" + fi + i=$(expr "$i" + 1) + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save() { + for i; do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/"; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- "$DEFAULT_JVM_OPTS" "$JAVA_OPTS" "$GRADLE_OPTS" "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/examples/tv-casting-app/android/App/gradlew.bat b/examples/tv-casting-app/android/App/gradlew.bat new file mode 100644 index 00000000000000..ac1b06f93825db --- /dev/null +++ b/examples/tv-casting-app/android/App/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/examples/tv-casting-app/android/App/settings.gradle b/examples/tv-casting-app/android/App/settings.gradle new file mode 100644 index 00000000000000..ebe1b42e960eed --- /dev/null +++ b/examples/tv-casting-app/android/App/settings.gradle @@ -0,0 +1,2 @@ +rootProject.name = "CHIPTVCastingApp" +include ':app' diff --git a/examples/tv-casting-app/android/BUILD.gn b/examples/tv-casting-app/android/BUILD.gn new file mode 100644 index 00000000000000..5cfaccc7577b48 --- /dev/null +++ b/examples/tv-casting-app/android/BUILD.gn @@ -0,0 +1,74 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") + +import("${build_root}/config/android_abi.gni") +import("${chip_root}/build/chip/java/rules.gni") +import("${chip_root}/build/chip/tools.gni") + +shared_library("jni") { + output_name = "libTvCastingApp" + + sources = [ "${chip_root}/examples/tv-casting-app/tv-casting-common/include/CHIPProjectAppConfig.h" ] + + deps = [ + "${chip_root}/examples/tv-casting-app/tv-casting-common", + "${chip_root}/src/app/server/java:jni", + "${chip_root}/src/lib", + "${chip_root}/third_party/inipp", + ] + + cflags = [ "-Wconversion" ] + + output_dir = "${root_out_dir}/lib/jni/${android_abi}" + + ldflags = [ "-Wl,--gc-sections" ] +} + +android_library("java") { + output_name = "TvCastingApp.jar" + + deps = [ + ":android", + "${chip_root}/third_party/android_deps:annotation", + ] + + data_deps = [ + ":jni", + "${chip_root}/build/chip/java:shared_cpplib", + ] + + sources = [ "java/src/com/chip/casting/TvCastingApp.java" ] + + javac_flags = [ "-Xlint:deprecation" ] + + # TODO: add classpath support (we likely need to add something like + # ..../platforms/android-21/android.jar to access BLE items) +} + +java_prebuilt("android") { + jar_path = "${android_sdk_root}/platforms/android-21/android.jar" +} + +group("default") { + deps = [ + ":android", + ":java", + ":jni", + "${chip_root}/src/app/server/java", + "${chip_root}/src/platform/android:java", + ] +} diff --git a/examples/tv-casting-app/android/args.gni b/examples/tv-casting-app/android/args.gni new file mode 100644 index 00000000000000..802f54f8b49484 --- /dev/null +++ b/examples/tv-casting-app/android/args.gni @@ -0,0 +1,31 @@ +# Copyright (c) 2020-2022 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") + +import("${chip_root}/config/standalone/args.gni") + +chip_device_project_config_include = "" +chip_project_config_include = "" +chip_system_project_config_include = "" + +chip_project_config_include_dirs = + [ "${chip_root}/examples/tv-casting-app/tv-casting-common/include" ] +chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] + +chip_build_libshell = true + +chip_enable_additional_data_advertising = true + +chip_enable_rotating_device_id = true diff --git a/examples/tv-casting-app/android/build_overrides b/examples/tv-casting-app/android/build_overrides new file mode 120000 index 00000000000000..e578e73312ebd1 --- /dev/null +++ b/examples/tv-casting-app/android/build_overrides @@ -0,0 +1 @@ +../../build_overrides \ No newline at end of file diff --git a/examples/tv-casting-app/android/java/src/com/chip/casting/TvCastingApp.java b/examples/tv-casting-app/android/java/src/com/chip/casting/TvCastingApp.java new file mode 100644 index 00000000000000..c66868db6cf7e5 --- /dev/null +++ b/examples/tv-casting-app/android/java/src/com/chip/casting/TvCastingApp.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package com.chip.casting; + +public class TvCastingApp { + public TvCastingApp() {} + + static { + System.loadLibrary("TvCastingApp"); + } +} diff --git a/examples/tv-casting-app/android/third_party/connectedhomeip b/examples/tv-casting-app/android/third_party/connectedhomeip new file mode 120000 index 00000000000000..11a54ed360106c --- /dev/null +++ b/examples/tv-casting-app/android/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../ \ No newline at end of file diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 6cb91e05cd2cd2..8d38fbb20f8bf4 100644 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -304,6 +304,8 @@ def AndroidTargets(): yield target.Extend('androidstudio-x64-chip-tool', board=AndroidBoard.AndroidStudio_X64, app=AndroidApp.CHIP_TOOL) yield target.Extend('arm64-chip-tvserver', board=AndroidBoard.ARM64, app=AndroidApp.CHIP_TVServer) yield target.Extend('arm-chip-tvserver', board=AndroidBoard.ARM, app=AndroidApp.CHIP_TVServer) + yield target.Extend('arm64-chip-tv-casting-app', board=AndroidBoard.ARM64, app=AndroidApp.CHIP_TV_CASTING_APP) + yield target.Extend('arm-chip-tv-casting-app', board=AndroidBoard.ARM, app=AndroidApp.CHIP_TV_CASTING_APP) def MbedTargets(): diff --git a/scripts/build/builders/android.py b/scripts/build/builders/android.py index 8619ebaf9a5eab..2e2dbd29dcc027 100644 --- a/scripts/build/builders/android.py +++ b/scripts/build/builders/android.py @@ -66,6 +66,7 @@ class AndroidApp(Enum): CHIP_TOOL = auto() CHIP_TEST = auto() CHIP_TVServer = auto() + CHIP_TV_CASTING_APP = auto() def AppName(self): if self == AndroidApp.CHIP_TOOL: @@ -74,6 +75,8 @@ def AppName(self): return "CHIPTest" elif self == AndroidApp.CHIP_TVServer: return "CHIPTVServer" + elif self == AndroidApp.CHIP_TV_CASTING_APP: + return "CHIPTVCastingApp" else: raise Exception('Unknown app type: %r' % self) @@ -81,11 +84,15 @@ def AppGnArgs(self): gn_args = {} if self == AndroidApp.CHIP_TVServer: gn_args['chip_config_network_layer_ble'] = False + elif self == AndroidApp.CHIP_TV_CASTING_APP: + gn_args['chip_config_network_layer_ble'] = False return gn_args def ExampleName(self): if self == AndroidApp.CHIP_TVServer: return "tv-app" + elif self == AndroidApp.CHIP_TV_CASTING_APP: + return "tv-casting-app" else: return None @@ -175,17 +182,27 @@ def copyToExampleAndroid(self): self._Execute(['mkdir', '-p', jnilibs_dir], title='Prepare Native libs ' + self.identifier) - for libName in ['libSetupPayloadParser.so', 'libc++_shared.so', 'libTvApp.so']: + if self.app.ExampleName() == 'tv-casting-app': + libs = ['libc++_shared.so'] + else: + libs = ['libSetupPayloadParser.so', + 'libc++_shared.so', 'libTvApp.so'] + for libName in libs: self._Execute(['cp', os.path.join(self.output_dir, 'lib', 'jni', self.board.AbiName( ), libName), os.path.join(jnilibs_dir, libName)]) - jars = { - 'SetupPayloadParser.jar': 'third_party/connectedhomeip/src/setup_payload/java/SetupPayloadParser.jar', - 'AndroidPlatform.jar': 'third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar', - 'CHIPAppServer.jar': 'third_party/connectedhomeip/src/app/server/java/CHIPAppServer.jar', - 'TvApp.jar': 'TvApp.jar', - } - + if self.app.ExampleName() == 'tv-casting-app': + jars = { + 'AndroidPlatform.jar': 'third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar', + 'TvCastingApp.jar': 'TvCastingApp.jar', + } + else: + jars = { + 'SetupPayloadParser.jar': 'third_party/connectedhomeip/src/setup_payload/java/SetupPayloadParser.jar', + 'AndroidPlatform.jar': 'third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar', + 'CHIPAppServer.jar': 'third_party/connectedhomeip/src/app/server/java/CHIPAppServer.jar', + 'TvApp.jar': 'TvApp.jar', + } for jarName in jars.keys(): self._Execute(['cp', os.path.join( self.output_dir, 'lib', jars[jarName]), os.path.join(libs_dir, jarName)]) diff --git a/scripts/build/testdata/all_targets_except_host.txt b/scripts/build/testdata/all_targets_except_host.txt index 93bc704496e25c..a698ee4601bb72 100644 --- a/scripts/build/testdata/all_targets_except_host.txt +++ b/scripts/build/testdata/all_targets_except_host.txt @@ -6,9 +6,11 @@ android-androidstudio-arm64-chip-tool android-androidstudio-x64-chip-tool android-androidstudio-x86-chip-tool android-arm-chip-tool +android-arm-chip-tv-casting-app android-arm-chip-tvserver android-arm64-chip-test android-arm64-chip-tool +android-arm64-chip-tv-casting-app android-arm64-chip-tvserver android-x64-chip-tool android-x86-chip-tool diff --git a/scripts/build/testdata/build_all_except_host.txt b/scripts/build/testdata/build_all_except_host.txt index 39a3d2a9eb69e8..4bcb133497c0c9 100644 --- a/scripts/build/testdata/build_all_except_host.txt +++ b/scripts/build/testdata/build_all_except_host.txt @@ -76,6 +76,18 @@ python3 build/chip/java/tests/generate_jars_for_test.py # Setting up Android deps through Gradle python3 third_party/android_deps/set_up_android_deps.py +# Generating android-arm-chip-tv-casting-app +gn gen --check --fail-on-unused-args {out}/android-arm-chip-tv-casting-app '--args=target_os="android" target_cpu="arm" android_ndk_root="TEST_ANDROID_NDK_HOME" android_sdk_root="TEST_ANDROID_HOME" chip_config_network_layer_ble=false ' --root={root}/examples/tv-casting-app/android/ + +# Accepting NDK licenses @ tools +bash -c 'yes | TEST_ANDROID_HOME/tools/bin/sdkmanager --licenses >/dev/null' + +# Generating JARs for Java build rules test +python3 build/chip/java/tests/generate_jars_for_test.py + +# Setting up Android deps through Gradle +python3 third_party/android_deps/set_up_android_deps.py + # Generating android-arm-chip-tvserver gn gen --check --fail-on-unused-args {out}/android-arm-chip-tvserver '--args=target_os="android" target_cpu="arm" android_ndk_root="TEST_ANDROID_NDK_HOME" android_sdk_root="TEST_ANDROID_HOME" chip_config_network_layer_ble=false ' --root={root}/examples/tv-app/android/ @@ -112,6 +124,18 @@ python3 build/chip/java/tests/generate_jars_for_test.py # Setting up Android deps through Gradle python3 third_party/android_deps/set_up_android_deps.py +# Generating android-arm64-chip-tv-casting-app +gn gen --check --fail-on-unused-args {out}/android-arm64-chip-tv-casting-app '--args=target_os="android" target_cpu="arm64" android_ndk_root="TEST_ANDROID_NDK_HOME" android_sdk_root="TEST_ANDROID_HOME" chip_config_network_layer_ble=false ' --root={root}/examples/tv-casting-app/android/ + +# Accepting NDK licenses @ tools +bash -c 'yes | TEST_ANDROID_HOME/tools/bin/sdkmanager --licenses >/dev/null' + +# Generating JARs for Java build rules test +python3 build/chip/java/tests/generate_jars_for_test.py + +# Setting up Android deps through Gradle +python3 third_party/android_deps/set_up_android_deps.py + # Generating android-arm64-chip-tvserver gn gen --check --fail-on-unused-args {out}/android-arm64-chip-tvserver '--args=target_os="android" target_cpu="arm64" android_ndk_root="TEST_ANDROID_NDK_HOME" android_sdk_root="TEST_ANDROID_HOME" chip_config_network_layer_ble=false ' --root={root}/examples/tv-app/android/ @@ -684,6 +708,21 @@ cp {out}/android-arm-chip-tool/lib/src/platform/android/AndroidPlatform.jar {roo # Building APP android-arm-chip-tool {root}/src/android/CHIPTool/gradlew -p {root}/src/android/CHIPTool -PmatterBuildSrcDir={out}/android-arm-chip-tool -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm-chip-tool assembleDebug +# Building JNI android-arm-chip-tv-casting-app +ninja -C {out}/android-arm-chip-tv-casting-app + +# Prepare Native libs android-arm-chip-tv-casting-app +mkdir -p {root}/examples/tv-casting-app/android/App/app/libs/jniLibs/armeabi-v7a + +cp {out}/android-arm-chip-tv-casting-app/lib/jni/armeabi-v7a/libc++_shared.so {root}/examples/tv-casting-app/android/App/app/libs/jniLibs/armeabi-v7a/libc++_shared.so + +cp {out}/android-arm-chip-tv-casting-app/lib/third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar {root}/examples/tv-casting-app/android/App/app/libs/AndroidPlatform.jar + +cp {out}/android-arm-chip-tv-casting-app/lib/TvCastingApp.jar {root}/examples/tv-casting-app/android/App/app/libs/TvCastingApp.jar + +# Building Example android-arm-chip-tv-casting-app +{root}/examples/tv-casting-app/android/App/gradlew -p {root}/examples/tv-casting-app/android/App/ -PmatterBuildSrcDir={out}/android-arm-chip-tv-casting-app -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm-chip-tv-casting-app assembleDebug + # Building JNI android-arm-chip-tvserver ninja -C {out}/android-arm-chip-tvserver @@ -749,6 +788,21 @@ cp {out}/android-arm64-chip-tool/lib/src/platform/android/AndroidPlatform.jar {r # Building APP android-arm64-chip-tool {root}/src/android/CHIPTool/gradlew -p {root}/src/android/CHIPTool -PmatterBuildSrcDir={out}/android-arm64-chip-tool -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm64-chip-tool assembleDebug +# Building JNI android-arm64-chip-tv-casting-app +ninja -C {out}/android-arm64-chip-tv-casting-app + +# Prepare Native libs android-arm64-chip-tv-casting-app +mkdir -p {root}/examples/tv-casting-app/android/App/app/libs/jniLibs/arm64-v8a + +cp {out}/android-arm64-chip-tv-casting-app/lib/jni/arm64-v8a/libc++_shared.so {root}/examples/tv-casting-app/android/App/app/libs/jniLibs/arm64-v8a/libc++_shared.so + +cp {out}/android-arm64-chip-tv-casting-app/lib/third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar {root}/examples/tv-casting-app/android/App/app/libs/AndroidPlatform.jar + +cp {out}/android-arm64-chip-tv-casting-app/lib/TvCastingApp.jar {root}/examples/tv-casting-app/android/App/app/libs/TvCastingApp.jar + +# Building Example android-arm64-chip-tv-casting-app +{root}/examples/tv-casting-app/android/App/gradlew -p {root}/examples/tv-casting-app/android/App/ -PmatterBuildSrcDir={out}/android-arm64-chip-tv-casting-app -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm64-chip-tv-casting-app assembleDebug + # Building JNI android-arm64-chip-tvserver ninja -C {out}/android-arm64-chip-tvserver diff --git a/scripts/build/testdata/glob_star_targets_except_host.txt b/scripts/build/testdata/glob_star_targets_except_host.txt index 72e609ffe3ee2a..df7a629810cefb 100644 --- a/scripts/build/testdata/glob_star_targets_except_host.txt +++ b/scripts/build/testdata/glob_star_targets_except_host.txt @@ -6,9 +6,11 @@ android-androidstudio-arm64-chip-tool android-androidstudio-x64-chip-tool android-androidstudio-x86-chip-tool android-arm-chip-tool +android-arm-chip-tv-casting-app android-arm-chip-tvserver android-arm64-chip-test android-arm64-chip-tool +android-arm64-chip-tv-casting-app android-arm64-chip-tvserver android-x64-chip-tool android-x86-chip-tool From 1c2091bfa21088aee771a541fb4e233efc89b5be Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 17 Jan 2022 15:46:32 -0500 Subject: [PATCH 044/124] Make "reportable" setting consistent in zap file to avoid zap instability. (#13632) * Make tv casting labelList and clusterRevision consistently non-reportable (difference between client and server configs) * More changes regarding reportable consistency on all clusters app.zap * Two more stability updates for reportability * After update, feature map is NOT reportable (which seems correct: it should not change at runtime) --- .../all-clusters-common/all-clusters-app.matter | 2 +- .../all-clusters-common/all-clusters-app.zap | 14 +++++++------- .../tv-casting-common/tv-casting-app.zap | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 4814e7bc04dbdb..17ebc2df2aa9c0 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 @@ -1808,7 +1808,7 @@ server cluster NetworkCommissioning = 49 { attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; attribute(readonly) octet_string lastNetworkID = 6; attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { 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 290c774cd21191..049d03bf2c9140 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 @@ -1973,7 +1973,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2159,7 +2159,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -9948,7 +9948,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -9974,7 +9974,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -9989,7 +9989,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -13654,7 +13654,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -20139,4 +20139,4 @@ "deviceIdentifier": 22 } ] -} \ No newline at end of file +} 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 a8fcda9213be34..4e6db8ab60e459 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 @@ -3448,7 +3448,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -8886,7 +8886,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -8912,7 +8912,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 From d62414f8cd7a020fdf1373ad0d44ad9ae06bb69b Mon Sep 17 00:00:00 2001 From: Michael Spang Date: Mon, 17 Jan 2022 17:34:24 -0500 Subject: [PATCH 045/124] Remove some spam when activating with zsh (#13635) scripts/activate.sh:unset:102: no such hash table element: pw_cleanup scripts/activate.sh:unset:103: no such hash table element: _pw_hello --- scripts/bootstrap.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index a0a8f2e7c615ae..36df1fdd8bade3 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -99,6 +99,4 @@ unset _PW_BANNER_FUNC unset _PW_TEXT unset PW_DOCTOR_SKIP_CIPD_CHECKS -unset -f pw_cleanup -unset -f _pw_hello unset -f _chip_bootstrap_banner From 628d7ba19291a6ccc3bdaed693dabb1af98b0266 Mon Sep 17 00:00:00 2001 From: fesseha-eve <88329315+fessehaeve@users.noreply.github.com> Date: Mon, 17 Jan 2022 23:48:16 +0100 Subject: [PATCH 046/124] Cluster id should always be 4 bytes long (#13571) * Cluster id is 4 bytes long * Use ClusterId Co-authored-by: Boris Zbarsky Co-authored-by: Boris Zbarsky --- src/controller/CHIPCluster.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller/CHIPCluster.h b/src/controller/CHIPCluster.h index 7de009c264513d..1ea0b7bf7ba57c 100644 --- a/src/controller/CHIPCluster.h +++ b/src/controller/CHIPCluster.h @@ -331,7 +331,7 @@ class DLL_EXPORT ClusterBase } protected: - ClusterBase(uint16_t cluster) : mClusterId(cluster) {} + ClusterBase(ClusterId cluster) : mClusterId(cluster) {} const ClusterId mClusterId; DeviceProxy * mDevice; From d611c632352d61c63e4c45b08dfab4af84c80ba7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Tue, 18 Jan 2022 05:01:38 +0100 Subject: [PATCH 047/124] [OTA] Add script for generating OTA image (#13547) Add script for encoding spec-compliant OTA image header and concatenating a set of payload files. --- src/app/ota_image_tool.py | 251 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 251 insertions(+) create mode 100755 src/app/ota_image_tool.py diff --git a/src/app/ota_image_tool.py b/src/app/ota_image_tool.py new file mode 100755 index 00000000000000..45fbe6bac9dddb --- /dev/null +++ b/src/app/ota_image_tool.py @@ -0,0 +1,251 @@ +#!/usr/bin/env python3 + +# +# Copyright (c) 2022 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +""" +Matter OTA (Over-the-air update) image utility. + +Usage examples: + +Creating OTA image file: +./ota_image_tool.py create -v 0xDEAD -p 0xBEEF -vn 1 -vs "1.0" -da sha256 my-firmware.bin my-firmware.ota + +Showing OTA image file info: +./ota_image_tool.py show my-firmware.ota +""" + +import argparse +import hashlib +import os +import struct +import sys +from enum import IntEnum + +sys.path.insert(0, os.path.join( + os.path.dirname(__file__), '../controller/python')) +from chip.tlv import TLVReader, TLVWriter, uint # noqa: E402 + +HEADER_MAGIC = 0x1BEEF11E + +DIGEST_ALGORITHM_ID = dict( + sha256=1, + sha256_128=2, + sha256_120=3, + sha256_96=4, + sha256_64=5, + sha256_32=6, + sha384=7, + sha512=8, + sha3_224=9, + sha3_256=10, + sha3_384=11, + sha3_512=12, +) + +DIGEST_ALL_ALGORITHMS = hashlib.algorithms_available.intersection( + DIGEST_ALGORITHM_ID.keys()) + +PAYLOAD_BUFFER_SIZE = 16 * 1024 + + +class HeaderTag(IntEnum): + VENDOR_ID = 0 + PRODUCT_ID = 1 + VERSION = 2 + VERSION_STRING = 3 + PAYLOAD_SIZE = 4 + MIN_VERSION = 5 + MAX_VERSION = 6 + RELEASE_NOTES_URL = 7 + DIGEST_TYPE = 8 + DIGEST = 9 + + +def generate_payload_summary(args: object): + """ + Calculate total size and hash of all concatenated input payload files + """ + + total_size = 0 + digest = hashlib.new(args.digest_algorithm) + + for path in args.input_files: + with open(path, 'rb') as file: + while True: + chunk = file.read(PAYLOAD_BUFFER_SIZE) + if not chunk: + break + total_size += len(chunk) + digest.update(chunk) + + return total_size, digest.digest() + + +def generate_header_tlv(args: object, payload_size: int, payload_digest: bytes): + """ + Generate anonymous TLV structure with fields describing the OTA image contents + """ + + fields = { + HeaderTag.VENDOR_ID: uint(args.vendor_id), + HeaderTag.PRODUCT_ID: uint(args.product_id), + HeaderTag.VERSION: uint(args.version), + HeaderTag.VERSION_STRING: args.version_str, + HeaderTag.PAYLOAD_SIZE: uint(payload_size), + HeaderTag.DIGEST_TYPE: uint(DIGEST_ALGORITHM_ID[args.digest_algorithm]), + HeaderTag.DIGEST: payload_digest, + } + + if args.min_version: + fields.update({HeaderTag.MIN_VERSION: uint(args.min_version)}) + + if args.max_version: + fields.update({HeaderTag.MAX_VERSION: uint(args.max_version)}) + + if args.release_notes: + fields.append({HeaderTag.RELEASE_NOTES_URL: args.release_notes}) + + writer = TLVWriter() + writer.put(None, fields) + + return writer.encoding + + +def generate_header(header_tlv: bytes, payload_size: int): + """ + Generate OTA image header + """ + + fixed_header_format = ' Date: Tue, 18 Jan 2022 14:25:38 +0100 Subject: [PATCH 048/124] [nrfconnect] Automatically build OTA image (#13640) 1. Add certain software configuration, such as vendor ID, product ID etc, to Kconfig. 2. Use values of the Kconfig variables in existing CHIP project configuration. 3. Add two more Kconfig variables: OTA_IMAGE_BUILD and OTA_IMAGE_EXTRA_ARGS. The first one enables building OTA image file using the ota_image_tool.py script, and the second one allows to pass some extra arguments to that script. --- config/nrfconnect/chip-module/CMakeLists.txt | 13 ++++ config/nrfconnect/chip-module/Kconfig | 5 ++ config/zephyr/Kconfig | 49 ++++++++++++++ config/zephyr/ota-image.cmake | 64 +++++++++++++++++++ .../nrfconnect/CHIPDevicePlatformConfig.h | 16 +++++ 5 files changed, 147 insertions(+) create mode 100644 config/zephyr/ota-image.cmake diff --git a/config/nrfconnect/chip-module/CMakeLists.txt b/config/nrfconnect/chip-module/CMakeLists.txt index 857bf65ed0e21f..791098ba5d518e 100644 --- a/config/nrfconnect/chip-module/CMakeLists.txt +++ b/config/nrfconnect/chip-module/CMakeLists.txt @@ -28,6 +28,7 @@ if (CONFIG_CHIP) include(ExternalProject) +include(../../zephyr/ota-image.cmake) include(../../zephyr/zephyr-util.cmake) # ============================================================================== @@ -267,4 +268,16 @@ target_link_libraries(chip INTERFACE -Wl,--start-group ${CHIP_LIBRARIES} -Wl,--e add_dependencies(chip chip-gn) +# ============================================================================== +# Define 'chip-ota-image' target for building CHIP OTA image +# ============================================================================== + +if (CONFIG_CHIP_OTA_IMAGE_BUILD) + chip_ota_image(chip-ota-image + INPUT_FILES ${PROJECT_BINARY_DIR}/app_update.bin + OUTPUT_FILE ${PROJECT_BINARY_DIR}/matter_ota.bin + ) + add_dependencies(chip-ota-image mcuboot_sign_target) +endif() + endif() # CONFIG_CHIP diff --git a/config/nrfconnect/chip-module/Kconfig b/config/nrfconnect/chip-module/Kconfig index 38dcd3bb3845ac..6aecc3d070be2f 100644 --- a/config/nrfconnect/chip-module/Kconfig +++ b/config/nrfconnect/chip-module/Kconfig @@ -42,3 +42,8 @@ config CHIP_OTA_REQUESTOR_BUFFER_SIZE help Configures size of the buffer used by OTA Requestor when downloading and writing a new firmware image to flash. + +# See config/zephyr/Kconfig for full definition +config CHIP_OTA_IMAGE_BUILD + bool + depends on SIGN_IMAGES diff --git a/config/zephyr/Kconfig b/config/zephyr/Kconfig index e3c7bdfd0a6810..8ace731baac543 100644 --- a/config/zephyr/Kconfig +++ b/config/zephyr/Kconfig @@ -34,6 +34,43 @@ menuconfig CHIP if CHIP +config CHIP_DEVICE_VENDOR_ID + int "Device vendor ID" + default 9050 # 0x235A + range 0 65535 + help + Identifier of the device manufacturer, assigned by Connectivity Standards + Alliance. It is used in various CHIP areas, such as the Basic Information + cluster or OTA (Over-the-air update) image header. + +config CHIP_DEVICE_PRODUCT_ID + int "Device product ID" + default 0 + range 0 65535 + help + Identifier of the product, assigned by the device manufacturer. It is used + in various CHIP areas, such as the Basic Information cluster or OTA + (Over-the-air update) image header. + +config CHIP_DEVICE_SOFTWARE_VERSION + int "Device software version" + default 0 + range 0 4294967295 + help + A number identifying the software version. It is used in various CHIP + areas, such as the Basic Information cluster or OTA (Over-the-air update) + image header. Note that due to the rollback protection a device will only + accept a software update whose version is greater than the current one. + +config CHIP_DEVICE_SOFTWARE_VERSION_STRING + string "Device software version string" + default "prerelease" + help + A string between 1 and 64 characters that provides a user-friendly + description of the numeric software version specified in + CHIP_DEVICE_SOFTWARE_VERSION. It is used in various CHIP areas, such as + the Basic Information cluster or OTA (Over-the-air update) image header. + config CHIP_PROJECT_CONFIG string "Project configuration file for CHIP" help @@ -131,6 +168,18 @@ config APP_LINK_WITH_CHIP Add Connected Home over IP header files to the 'app' include path and link the 'app' with Connected Home over IP libraries. +config CHIP_OTA_IMAGE_BUILD + bool "Generate OTA image" + help + Enable building OTA (Over-the-air update) image. + +config CHIP_OTA_IMAGE_EXTRA_ARGS + string "OTA image creator extra arguments" + depends on CHIP_OTA_IMAGE_BUILD + help + This option allows one to pass optional arguments to the + ota_image_tool.py script, used for building OTA image. + module = MATTER module-str = Matter source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config" diff --git a/config/zephyr/ota-image.cmake b/config/zephyr/ota-image.cmake new file mode 100644 index 00000000000000..e6a86092056a74 --- /dev/null +++ b/config/zephyr/ota-image.cmake @@ -0,0 +1,64 @@ +# +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +find_package(Python3 REQUIRED) + +# +# Create CMake target for building Matter OTA (Over-the-air update) image. +# Required arguments: +# INPUT_FILES file1, [file2...] - binary files which Matter OTA image will be composed of +# OUTPUT_FILE file - where to store newly created Matter OTA image +# +function(chip_ota_image TARGET_NAME) + cmake_parse_arguments(ARG "" "OUTPUT_FILE" "INPUT_FILES" ${ARGN}) + + if (NOT ARG_INPUT_FILES OR NOT ARG_OUTPUT_FILE) + message(FATAL_ERROR "Both INPUT_FILES and OUTPUT_FILE arguments must be specified") + endif() + + # Prepare ota_image_tool.py argument list + set(OTA_ARGS + "--vendor-id" + ${CONFIG_CHIP_DEVICE_VENDOR_ID} + "--product-id" + ${CONFIG_CHIP_DEVICE_PRODUCT_ID} + "--version" + ${CONFIG_CHIP_DEVICE_SOFTWARE_VERSION} + "--version-str" + ${CONFIG_CHIP_DEVICE_SOFTWARE_VERSION_STRING} + "--digest-algorithm" + "sha256" + ) + + separate_arguments(OTA_EXTRA_ARGS NATIVE_COMMAND "${CHIP_OTA_IMAGE_EXTRA_ARGS}") + + list(APPEND OTA_ARGS ${OTA_EXTRA_ARGS}) + list(APPEND OTA_ARGS ${ARG_INPUT_FILES}) + list(APPEND OTA_ARGS ${ARG_OUTPUT_FILE}) + + # Convert the argument list to multi-line string + string(REPLACE ";" "\n" OTA_ARGS "${OTA_ARGS}") + + # Pass the argument list via file to avoid hitting Windows command-line length limit + file(GENERATE + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/args-ota-image.tmp + CONTENT ${OTA_ARGS} + ) + + add_custom_target(${TARGET_NAME} ALL + COMMAND ${Python3_EXECUTABLE} ${CHIP_ROOT}/src/app/ota_image_tool.py create @${CMAKE_CURRENT_BINARY_DIR}/args-ota-image.tmp + ) +endfunction() diff --git a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h index 70e2179206b138..60baa9424f4784 100644 --- a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h +++ b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h @@ -27,6 +27,22 @@ // ==================== Platform Adaptations ==================== +#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_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 + #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 0 #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 0 From faa6043a1b1cc0136148bf4a1cbee493b88d56ab Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 18 Jan 2022 08:33:20 -0500 Subject: [PATCH 049/124] Add an error formatter for StatusIB encapsulated in CHIP_ERROR. (#13568) --- src/app/InteractionModelEngine.cpp | 2 ++ src/app/MessageDef/StatusIB.cpp | 46 ++++++++++++++++++++++++++++++ src/app/MessageDef/StatusIB.h | 5 ++++ src/app/tests/TestStatusIB.cpp | 24 ++++++++++++++++ 4 files changed, 77 insertions(+) diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 53a0e488cb0e6b..8ee3ea7e957aa1 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -48,6 +48,8 @@ CHIP_ERROR InteractionModelEngine::Init(Messaging::ExchangeManager * apExchangeM mMagic++; + StatusIB::RegisterErrorFormatter(); + return CHIP_NO_ERROR; } diff --git a/src/app/MessageDef/StatusIB.cpp b/src/app/MessageDef/StatusIB.cpp index cedf3946bf2d53..d6a7beb987517e 100644 --- a/src/app/MessageDef/StatusIB.cpp +++ b/src/app/MessageDef/StatusIB.cpp @@ -30,6 +30,8 @@ #include #include +#include +#include using namespace chip; using namespace chip::TLV; @@ -183,5 +185,49 @@ void StatusIB::InitFromChipError(CHIP_ERROR aError) mStatus = Status::Failure; } +namespace { +bool FormatStatusIBError(char * buf, uint16_t bufSize, CHIP_ERROR err) +{ + if (!err.IsIMStatus()) + { + return false; + } + + const char * desc = nullptr; +#if !CHIP_CONFIG_SHORT_ERROR_STR + constexpr char generalFormat[] = "General error: 0x%02" PRIx8; + constexpr char clusterFormat[] = "Cluster-specific error: 0x%02" PRIx8; + + // Formatting an 8-bit int will take at most 2 chars, and replace the '%' + // and the format letter(s) for PRIx8, so a buffer big enough to hold our + // format string will also hold our formatted string. + constexpr size_t formattedSize = max(sizeof(generalFormat), sizeof(clusterFormat)); + char formattedString[formattedSize]; + + StatusIB status; + status.InitFromChipError(err); + if (status.mClusterStatus.HasValue()) + { + snprintf(formattedString, formattedSize, clusterFormat, status.mClusterStatus.Value()); + } + else + { + snprintf(formattedString, formattedSize, generalFormat, to_underlying(status.mStatus)); + } + desc = formattedString; +#endif // !CHIP_CONFIG_SHORT_ERROR_STR + FormatError(buf, bufSize, "IM", err, desc); + + return true; +} +} // anonymous namespace + +void StatusIB::RegisterErrorFormatter() +{ + static ErrorFormatter sStatusIBErrorFormatter = { FormatStatusIBError, nullptr }; + + ::RegisterErrorFormatter(&sStatusIBErrorFormatter); +} + }; // namespace app }; // namespace chip diff --git a/src/app/MessageDef/StatusIB.h b/src/app/MessageDef/StatusIB.h index 7df3b0ce5a46f8..0f9a72bc07d1b6 100644 --- a/src/app/MessageDef/StatusIB.h +++ b/src/app/MessageDef/StatusIB.h @@ -110,6 +110,11 @@ struct StatusIB */ void InitFromChipError(CHIP_ERROR aError); + /** + * Register the StatusIB error formatter. + */ + static void RegisterErrorFormatter(); + Protocols::InteractionModel::Status mStatus = Protocols::InteractionModel::Status::Success; Optional mClusterStatus = Optional::Missing(); diff --git a/src/app/tests/TestStatusIB.cpp b/src/app/tests/TestStatusIB.cpp index 3438a34df5e74e..82da6dfd53d14a 100644 --- a/src/app/tests/TestStatusIB.cpp +++ b/src/app/tests/TestStatusIB.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -88,10 +89,30 @@ void TestStatusIBToFromChipError(nlTestSuite * aSuite, void * aContext) } } +#if !CHIP_CONFIG_SHORT_ERROR_STR +void TestStatusIBErrorToString(nlTestSuite * aSuite, void * aContext) +{ + StatusIB status; + status.mStatus = Status::InvalidAction; + CHIP_ERROR err = status.ToChipError(); + const char * str = ErrorStr(err); + NL_TEST_ASSERT(aSuite, strcmp(str, "IM Error 0x00000580: General error: 0x80") == 0); + + status.mStatus = Status::Failure; + status.mClusterStatus = MakeOptional(static_cast(5)); + err = status.ToChipError(); + str = ErrorStr(err); + NL_TEST_ASSERT(aSuite, strcmp(str, "IM Error 0x00000605: Cluster-specific error: 0x05") == 0); +} +#endif // !CHIP_CONFIG_SHORT_ERROR_STR + // clang-format off const nlTest sTests[] = { NL_TEST_DEF("StatusIBToFromChipError", TestStatusIBToFromChipError), +#if !CHIP_CONFIG_SHORT_ERROR_STR + NL_TEST_DEF("StatusIBErrorToString", TestStatusIBErrorToString), +#endif // !CHIP_CONFIG_SHORT_ERROR_STR NL_TEST_SENTINEL() }; // clang-format on @@ -105,6 +126,9 @@ static int TestSetup(void * inContext) CHIP_ERROR error = chip::Platform::MemoryInit(); if (error != CHIP_NO_ERROR) return FAILURE; + // Hand-register the error formatter. Normally it's registered by + // InteractionModelEngine::Init, but we don't want to mess with that here. + StatusIB::RegisterErrorFormatter(); return SUCCESS; } From 07454af3dd1fe451e4c0171e192ca3b468b207a0 Mon Sep 17 00:00:00 2001 From: andersbangGF <88383809+andersbangGF@users.noreply.github.com> Date: Tue, 18 Jan 2022 14:34:28 +0100 Subject: [PATCH 050/124] [pump-examples] Removed SED settings for both pump apps (#13527) * Removed SED settings * Added back defines for security test modes and removes submodule added by accident --- .../pump-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h | 4 ---- .../cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h | 4 ---- 2 files changed, 8 deletions(-) diff --git a/examples/pump-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h b/examples/pump-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h index 1150c0bf654be0..f1284ef5eafc0a 100644 --- a/examples/pump-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h +++ b/examples/pump-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h @@ -114,10 +114,6 @@ */ #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT 1 -#define CHIP_DEVICE_CONFIG_ENABLE_SED 1 -#define CHIP_DEVICE_CONFIG_SED_SLOW_POLLING_INTERVAL 5000_ms32 -#define CHIP_DEVICE_CONFIG_SED_FAST_POLLING_INTERVAL 5000_ms32 - /** * CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE * diff --git a/examples/pump-controller-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h b/examples/pump-controller-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h index 1150c0bf654be0..f1284ef5eafc0a 100644 --- a/examples/pump-controller-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h +++ b/examples/pump-controller-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h @@ -114,10 +114,6 @@ */ #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT 1 -#define CHIP_DEVICE_CONFIG_ENABLE_SED 1 -#define CHIP_DEVICE_CONFIG_SED_SLOW_POLLING_INTERVAL 5000_ms32 -#define CHIP_DEVICE_CONFIG_SED_FAST_POLLING_INTERVAL 5000_ms32 - /** * CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE * From 8d4d7704af3396eb10fb7990a1f61fa2fe02f52d Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 18 Jan 2022 10:06:18 -0500 Subject: [PATCH 051/124] Mark all attributes reportable again. (#13650) Continuing to work around https://github.com/project-chip/zap/issues/318 and https://github.com/project-chip/zap/issues/368 This commit was generated by running: find src/ examples -name "*.zap" -print0 | xargs -0 perl -pi -e 's/"reportable": 0/"reportable": 1/' --- .../all-clusters-app.matter | 100 +- .../all-clusters-common/all-clusters-app.zap | 162 +- .../bridge-common/bridge-app.matter | 52 +- .../bridge-app/bridge-common/bridge-app.zap | 54 +- .../door-lock-common/door-lock-app.matter | 86 +- .../door-lock-common/door-lock-app.zap | 98 +- .../lighting-common/lighting-app.matter | 54 +- .../lighting-common/lighting-app.zap | 62 +- examples/lock-app/lock-common/lock-app.matter | 74 +- examples/lock-app/lock-common/lock-app.zap | 86 +- .../log-source-common/log-source-app.matter | 18 +- .../log-source-common/log-source-app.zap | 236 +- .../ota-provider-app.matter | 36 +- .../ota-provider-common/ota-provider-app.zap | 36 +- .../ota-requestor-app.matter | 36 +- .../ota-requestor-app.zap | 40 +- .../placeholder/linux/apps/app1/config.matter | 18 +- .../placeholder/linux/apps/app1/config.zap | 22 +- .../placeholder/linux/apps/app2/config.matter | 18 +- .../placeholder/linux/apps/app2/config.zap | 22 +- examples/pump-app/pump-common/pump-app.matter | 46 +- examples/pump-app/pump-common/pump-app.zap | 52 +- .../pump-controller-app.matter | 50 +- .../pump-controller-app.zap | 52 +- .../esp32/main/temperature-measurement.matter | 48 +- .../esp32/main/temperature-measurement.zap | 48 +- .../thermostat-common/thermostat.matter | 52 +- .../thermostat-common/thermostat.zap | 52 +- examples/tv-app/tv-common/tv-app.matter | 84 +- examples/tv-app/tv-common/tv-app.zap | 128 +- .../tv-casting-common/tv-casting-app.matter | 82 +- .../tv-casting-common/tv-casting-app.zap | 108 +- examples/window-app/common/window-app.matter | 54 +- examples/window-app/common/window-app.zap | 56 +- .../data_model/controller-clusters.matter | 192 +- .../data_model/controller-clusters.zap | 252 +- .../java/zap-generated/CHIPClusters-JNI.cpp | 1422 +++++- .../chip/devicecontroller/ChipClusters.java | 262 ++ .../python/chip/clusters/CHIPClusters.py | 96 + .../CHIP/zap-generated/CHIPClustersObjc.h | 472 ++ .../CHIP/zap-generated/CHIPClustersObjc.mm | 1735 ++++++- .../zap-generated/cluster/Commands.h | 4164 ++++++++++++++++- 42 files changed, 9248 insertions(+), 1569 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 17ebc2df2aa9c0..15dc1eb58ca4d3 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 @@ -42,7 +42,7 @@ server cluster AccessControl = 31 { attribute(writable, reportable) AccessControlEntry acl[] = 0; attribute(writable, reportable) ExtensionEntry extension[] = 1; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster AccountLogin = 1294 { @@ -62,9 +62,9 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int8u windowStatus = 0; + attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; + attribute(readonly, reportable) int16u adminVendorId = 2; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { @@ -99,7 +99,7 @@ server cluster ApplicationBasic = 1293 { attribute(readonly, reportable) int16u productId = 3; attribute(readonly, reportable) ApplicationStatusEnum applicationStatus = 5; attribute(readonly, reportable) char_string applicationVersion = 6; - attribute(readonly) vendor_id allowedVendorList[] = 7; + attribute(readonly, reportable) vendor_id allowedVendorList[] = 7; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -188,7 +188,7 @@ server cluster Basic = 40 { attribute(readonly, reportable) char_string serialNumber = 15; attribute(writable, reportable) boolean localConfigDisabled = 16; attribute(readonly, reportable) boolean reachable = 17; - attribute(readonly) char_string uniqueID = 18; + attribute(readonly, reportable) char_string uniqueID = 18; attribute(readonly, reportable) int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; @@ -943,29 +943,29 @@ server cluster DoorLock = 257 { attribute(readonly, reportable) DlLockType lockType = 1; attribute(readonly, reportable) boolean actuatorEnabled = 2; attribute(readonly, reportable) DlDoorState doorState = 3; - attribute(writable) int32u doorOpenEvents = 4; - attribute(writable) int32u doorClosedEvents = 5; - attribute(writable) int16u openPeriod = 6; - attribute(readonly) int16u numberOfTotalUsersSupported = 17; - attribute(readonly) int16u numberOfPINUsersSupported = 18; - attribute(readonly) int16u numberOfWeekDaySchedulesSupportedPerUser = 20; - attribute(readonly) int16u numberOfYearDaySchedulesSupportedPerUser = 21; - attribute(readonly) int16u numberOfHolidaySchedulesSupported = 22; - attribute(readonly) int8u maxPINCodeLength = 23; - attribute(readonly) int8u minPINCodeLength = 24; - attribute(readonly) bitmap8 credentialRulesSupport = 27; + attribute(writable, reportable) int32u doorOpenEvents = 4; + attribute(writable, reportable) int32u doorClosedEvents = 5; + attribute(writable, reportable) int16u openPeriod = 6; + attribute(readonly, reportable) int16u numberOfTotalUsersSupported = 17; + attribute(readonly, reportable) int16u numberOfPINUsersSupported = 18; + attribute(readonly, reportable) int16u numberOfWeekDaySchedulesSupportedPerUser = 20; + attribute(readonly, reportable) int16u numberOfYearDaySchedulesSupportedPerUser = 21; + attribute(readonly, reportable) int16u numberOfHolidaySchedulesSupported = 22; + attribute(readonly, reportable) int8u maxPINCodeLength = 23; + attribute(readonly, reportable) int8u minPINCodeLength = 24; + attribute(readonly, reportable) bitmap8 credentialRulesSupport = 27; attribute(writable, reportable) char_string language = 33; attribute(writable, reportable) int32u autoRelockTime = 35; attribute(writable, reportable) int8u soundVolume = 36; attribute(writable, reportable) DlOperatingMode operatingMode = 37; - attribute(readonly) bitmap16 supportedOperatingModes = 38; - attribute(readonly) bitmap16 defaultConfigurationRegister = 39; + attribute(readonly, reportable) bitmap16 supportedOperatingModes = 38; + attribute(readonly, reportable) bitmap16 defaultConfigurationRegister = 39; attribute(writable, reportable) boolean enableOneTouchLocking = 41; - attribute(writable) boolean enableInsideStatusLED = 42; + attribute(writable, reportable) boolean enableInsideStatusLED = 42; attribute(writable, reportable) boolean enablePrivacyModeButton = 43; attribute(writable, reportable) int8u wrongCodeEntryLimit = 48; attribute(writable, reportable) int8u userCodeTemporaryDisableTime = 49; - attribute(writable) boolean requirePINforRemoteOperation = 51; + attribute(writable, reportable) boolean requirePINforRemoteOperation = 51; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ClearCredentialRequest { @@ -1083,15 +1083,15 @@ server cluster EthernetNetworkDiagnostics = 55 { attribute(readonly, reportable) int64u overrunCount = 6; attribute(readonly, reportable) boolean carrierDetect = 7; attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster FlowMeasurement = 1028 { @@ -1122,9 +1122,9 @@ server cluster GeneralCommissioning = 48 { attribute(writable, reportable) int64u breadcrumb = 0; attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) enum8 regulatoryConfig = 2; + attribute(readonly, reportable) enum8 locationCapability = 3; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { @@ -1281,8 +1281,8 @@ server cluster GroupKeyManagement = 63 { attribute(readonly, reportable) GroupKey groupKeyMap[] = 0; attribute(readonly, reportable) GroupInfo groupTable[] = 1; - attribute(readonly) int16u maxGroupsPerFabric = 2; - attribute(readonly) int16u maxGroupKeysPerFabric = 3; + attribute(readonly, reportable) int16u maxGroupsPerFabric = 2; + attribute(readonly, reportable) int16u maxGroupKeysPerFabric = 3; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct KeySetReadRequest { @@ -1608,7 +1608,7 @@ server cluster LevelControl = 8 { attribute(writable, reportable) int16u offTransitionTime = 19; attribute(writable, reportable) int8u defaultMoveRate = 20; attribute(writable, reportable) int8u startUpCurrentLevel = 16384; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct MoveRequest { @@ -1665,8 +1665,8 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute(writable, reportable) char_string activeLocale = 1; + attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; } server cluster LowPower = 1288 { @@ -1800,15 +1800,15 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int8u maxNetworks = 0; + attribute(readonly, reportable) NetworkInfo networks[] = 1; + attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; + attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; + attribute(writable, reportable) boolean interfaceEnabled = 4; + attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly, reportable) octet_string lastNetworkID = 6; + attribute(readonly, reportable) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { @@ -2165,8 +2165,8 @@ server cluster PowerSource = 47 { } server cluster PowerSourceConfiguration = 46 { - attribute(readonly) INT8U sources[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) INT8U sources[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster PressureMeasurement = 1027 { @@ -2397,7 +2397,7 @@ server cluster SoftwareDiagnostics = 52 { attribute(readonly, reportable) int64u currentHeapFree = 1; attribute(readonly, reportable) int64u currentHeapUsed = 2; attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; command ResetWatermarks(): DefaultSuccess = 0; @@ -2454,7 +2454,7 @@ server cluster TargetNavigator = 1285 { } attribute(readonly, reportable) TargetInfo targetNavigatorList[] = 0; - attribute(readonly) int8u currentNavigatorTarget = 1; + attribute(readonly, reportable) int8u currentNavigatorTarget = 1; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -2572,7 +2572,7 @@ server cluster TestCluster = 1295 { attribute(writable, reportable) int8s rangeRestrictedInt8s = 39; attribute(writable, reportable) int16u rangeRestrictedInt16u = 40; attribute(writable, reportable) int16s rangeRestrictedInt16s = 41; - attribute(readonly) LONG_OCTET_STRING listLongOctetString[] = 42; + attribute(readonly, reportable) LONG_OCTET_STRING listLongOctetString[] = 42; attribute(writable, reportable) boolean timedWriteBoolean = 48; attribute(writable, reportable) boolean nullableBoolean = 32768; attribute(writable, reportable) bitmap8 nullableBitmap8 = 32769; @@ -2891,15 +2891,15 @@ server cluster ThreadNetworkDiagnostics = 53 { attribute(readonly, reportable) octet_string channelMask = 60; attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(writable, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster WakeOnLan = 1283 { @@ -2964,7 +2964,7 @@ server cluster WiFiNetworkDiagnostics = 54 { attribute(readonly, reportable) int32u packetUnicastTxCount = 10; attribute(readonly, reportable) int64u currentMaxRate = 11; attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 049d03bf2c9140..94a3240c27969d 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 @@ -998,7 +998,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1329,7 +1329,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -1438,7 +1438,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1453,7 +1453,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1589,7 +1589,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1604,7 +1604,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1655,7 +1655,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1670,7 +1670,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1706,7 +1706,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1721,7 +1721,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1853,7 +1853,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1868,7 +1868,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1883,7 +1883,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "6", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1973,7 +1973,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2024,7 +2024,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2039,7 +2039,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2054,7 +2054,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2069,7 +2069,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2084,7 +2084,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2099,7 +2099,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2114,7 +2114,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2129,7 +2129,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2144,7 +2144,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2159,7 +2159,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2486,7 +2486,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3491,7 +3491,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x000F", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3762,7 +3762,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3973,7 +3973,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4162,7 +4162,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4177,7 +4177,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4192,7 +4192,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4572,7 +4572,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4587,7 +4587,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4638,7 +4638,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4653,7 +4653,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4689,7 +4689,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4704,7 +4704,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8300,7 +8300,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9082,7 +9082,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9097,7 +9097,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9541,7 +9541,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9556,7 +9556,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9571,7 +9571,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9586,7 +9586,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9601,7 +9601,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9616,7 +9616,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9631,7 +9631,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9646,7 +9646,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9661,7 +9661,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9948,7 +9948,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -9974,7 +9974,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -9989,7 +9989,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -10025,7 +10025,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10040,7 +10040,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10445,7 +10445,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10460,7 +10460,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10475,7 +10475,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10490,7 +10490,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "10", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10505,7 +10505,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "10", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10520,7 +10520,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10535,7 +10535,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10550,7 +10550,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10565,7 +10565,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "6", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10580,7 +10580,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "6", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10595,7 +10595,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10670,7 +10670,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0xFFF6", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10685,7 +10685,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10715,7 +10715,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10775,7 +10775,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -13654,7 +13654,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -14283,7 +14283,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -14298,7 +14298,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -14389,7 +14389,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -14404,7 +14404,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -14419,7 +14419,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -14672,7 +14672,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -14687,7 +14687,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -14817,7 +14817,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -14832,7 +14832,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -15400,7 +15400,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -16352,7 +16352,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 53348e5d62f835..4f05dae8e75a4b 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -19,9 +19,9 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int8u windowStatus = 0; + attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; + attribute(readonly, reportable) int16u adminVendorId = 2; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { @@ -137,13 +137,13 @@ server cluster EthernetNetworkDiagnostics = 55 { attribute(readonly, reportable) int64u overrunCount = 6; attribute(readonly, reportable) boolean carrierDetect = 7; attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -166,9 +166,9 @@ server cluster GeneralCommissioning = 48 { attribute(writable, reportable) int64u breadcrumb = 0; attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) enum8 regulatoryConfig = 2; + attribute(readonly, reportable) enum8 locationCapability = 3; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { @@ -318,7 +318,7 @@ server cluster LevelControl = 8 { attribute(writable, reportable) int16u offTransitionTime = 19; attribute(writable, reportable) int8u defaultMoveRate = 20; attribute(writable, reportable) int8u startUpCurrentLevel = 16384; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct MoveRequest { @@ -375,8 +375,8 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute(writable, reportable) char_string activeLocale = 1; + attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -429,15 +429,15 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int8u maxNetworks = 0; + attribute(readonly, reportable) NetworkInfo networks[] = 1; + attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; + attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; + attribute(writable, reportable) boolean interfaceEnabled = 4; + attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly, reportable) octet_string lastNetworkID = 6; + attribute(readonly, reportable) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { @@ -641,7 +641,7 @@ server cluster SoftwareDiagnostics = 52 { attribute(readonly, reportable) int64u currentHeapFree = 1; attribute(readonly, reportable) int64u currentHeapUsed = 2; attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -823,13 +823,13 @@ server cluster ThreadNetworkDiagnostics = 53 { attribute(readonly, reportable) octet_string channelMask = 60; attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(writable, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -889,7 +889,7 @@ server cluster WiFiNetworkDiagnostics = 54 { attribute(readonly, reportable) int32u packetUnicastTxCount = 10; attribute(readonly, reportable) int64u currentMaxRate = 11; attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index f35c00e0335920..074fef3c6e5c3b 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -394,7 +394,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -409,7 +409,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -541,7 +541,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -556,7 +556,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -571,7 +571,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "6", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -712,7 +712,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -727,7 +727,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -742,7 +742,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -757,7 +757,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -772,7 +772,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -787,7 +787,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -802,7 +802,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -817,7 +817,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -832,7 +832,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -847,7 +847,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1174,7 +1174,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2160,7 +2160,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "15", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2422,7 +2422,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2633,7 +2633,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2725,7 +2725,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2740,7 +2740,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2755,7 +2755,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3039,7 +3039,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3054,7 +3054,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3090,7 +3090,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3105,7 +3105,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4007,7 +4007,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 diff --git a/examples/door-lock-app/door-lock-common/door-lock-app.matter b/examples/door-lock-app/door-lock-common/door-lock-app.matter index d137693236d139..bcbbefd30aba3d 100644 --- a/examples/door-lock-app/door-lock-common/door-lock-app.matter +++ b/examples/door-lock-app/door-lock-common/door-lock-app.matter @@ -19,9 +19,9 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int8u windowStatus = 0; + attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; + attribute(readonly, reportable) int16u adminVendorId = 2; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { @@ -354,16 +354,16 @@ server cluster DoorLock = 257 { attribute(readonly, reportable) DlLockType lockType = 1; attribute(readonly, reportable) boolean actuatorEnabled = 2; attribute(readonly, reportable) DlDoorState doorState = 3; - attribute(readonly) int16u numberOfTotalUsersSupported = 17; - attribute(readonly) int16u numberOfPINUsersSupported = 18; - attribute(readonly) int8u maxPINCodeLength = 23; - attribute(readonly) int8u minPINCodeLength = 24; - attribute(readonly) bitmap8 credentialRulesSupport = 27; + attribute(readonly, reportable) int16u numberOfTotalUsersSupported = 17; + attribute(readonly, reportable) int16u numberOfPINUsersSupported = 18; + attribute(readonly, reportable) int8u maxPINCodeLength = 23; + attribute(readonly, reportable) int8u minPINCodeLength = 24; + attribute(readonly, reportable) bitmap8 credentialRulesSupport = 27; attribute(writable, reportable) char_string language = 33; attribute(writable, reportable) int32u autoRelockTime = 35; attribute(writable, reportable) int8u soundVolume = 36; attribute(writable, reportable) DlOperatingMode operatingMode = 37; - attribute(readonly) bitmap16 supportedOperatingModes = 38; + attribute(readonly, reportable) bitmap16 supportedOperatingModes = 38; attribute(writable, reportable) boolean enableOneTouchLocking = 41; attribute(writable, reportable) boolean enablePrivacyModeButton = 43; attribute(writable, reportable) int8u wrongCodeEntryLimit = 48; @@ -470,13 +470,13 @@ server cluster EthernetNetworkDiagnostics = 55 { attribute(readonly, reportable) int64u overrunCount = 6; attribute(readonly, reportable) boolean carrierDetect = 7; attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -499,9 +499,9 @@ server cluster GeneralCommissioning = 48 { attribute(writable, reportable) int64u breadcrumb = 0; attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) enum8 regulatoryConfig = 2; + attribute(readonly, reportable) enum8 locationCapability = 3; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { @@ -627,8 +627,8 @@ server cluster GeneralDiagnostics = 51 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute(writable, reportable) char_string activeLocale = 1; + attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -681,15 +681,15 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int8u maxNetworks = 0; + attribute(readonly, reportable) NetworkInfo networks[] = 1; + attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; + attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; + attribute(writable, reportable) boolean interfaceEnabled = 4; + attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly, reportable) octet_string lastNetworkID = 6; + attribute(readonly, reportable) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { @@ -853,21 +853,21 @@ server cluster OperationalCredentials = 62 { } server cluster PowerSource = 47 { - attribute(readonly) enum8 status = 0; - attribute(readonly) int8u order = 1; - attribute(readonly) char_string description = 2; - attribute(readonly) int32u wiredAssessedCurrent = 6; - attribute(readonly) enum8 batteryChargeLevel = 14; - attribute(readonly) boolean batteryReplacementNeeded = 15; - attribute(readonly) enum8 batteryReplaceability = 16; - attribute(readonly) char_string batteryReplacementDescription = 19; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) enum8 status = 0; + attribute(readonly, reportable) int8u order = 1; + attribute(readonly, reportable) char_string description = 2; + attribute(readonly, reportable) int32u wiredAssessedCurrent = 6; + attribute(readonly, reportable) enum8 batteryChargeLevel = 14; + attribute(readonly, reportable) boolean batteryReplacementNeeded = 15; + attribute(readonly, reportable) enum8 batteryReplaceability = 16; + attribute(readonly, reportable) char_string batteryReplacementDescription = 19; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster PowerSourceConfiguration = 46 { - attribute(readonly) INT8U sources[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) INT8U sources[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster SoftwareDiagnostics = 52 { @@ -887,7 +887,7 @@ server cluster SoftwareDiagnostics = 52 { attribute(readonly, reportable) int64u currentHeapFree = 1; attribute(readonly, reportable) int64u currentHeapUsed = 2; attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -1031,13 +1031,13 @@ server cluster ThreadNetworkDiagnostics = 53 { attribute(readonly, reportable) octet_string channelMask = 60; attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(writable, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -1097,7 +1097,7 @@ server cluster WiFiNetworkDiagnostics = 54 { attribute(readonly, reportable) int32u packetUnicastTxCount = 10; attribute(readonly, reportable) int64u currentMaxRate = 11; attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } diff --git a/examples/door-lock-app/door-lock-common/door-lock-app.zap b/examples/door-lock-app/door-lock-common/door-lock-app.zap index 96599e796750be..e0811fbe202f99 100644 --- a/examples/door-lock-app/door-lock-common/door-lock-app.zap +++ b/examples/door-lock-app/door-lock-common/door-lock-app.zap @@ -1188,7 +1188,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1203,7 +1203,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1239,7 +1239,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1254,7 +1254,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1290,7 +1290,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1305,7 +1305,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1320,7 +1320,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "USB", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1335,7 +1335,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1350,7 +1350,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1365,7 +1365,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1497,7 +1497,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1512,7 +1512,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1527,7 +1527,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "6", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1668,7 +1668,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1683,7 +1683,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1698,7 +1698,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1713,7 +1713,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1728,7 +1728,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1743,7 +1743,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1758,7 +1758,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1773,7 +1773,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1788,7 +1788,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2115,7 +2115,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3127,7 +3127,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x000F", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3389,7 +3389,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3600,7 +3600,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3692,7 +3692,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3707,7 +3707,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3722,7 +3722,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4006,7 +4006,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4021,7 +4021,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4057,7 +4057,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4072,7 +4072,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5493,7 +5493,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5508,7 +5508,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5523,7 +5523,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "Battery", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5538,7 +5538,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5553,7 +5553,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5568,7 +5568,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5583,7 +5583,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5598,7 +5598,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5613,7 +5613,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0A", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5628,7 +5628,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5830,7 +5830,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "10", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5845,7 +5845,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "10", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5860,7 +5860,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "6", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5875,7 +5875,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "6", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5890,7 +5890,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5965,7 +5965,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0xFFF6", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 51fed51a17869b..5f412e83b5df07 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -19,9 +19,9 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int8u windowStatus = 0; + attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; + attribute(readonly, reportable) int16u adminVendorId = 2; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { @@ -75,7 +75,7 @@ server cluster Basic = 40 { attribute(readonly, reportable) char_string serialNumber = 15; attribute(writable, reportable) boolean localConfigDisabled = 16; attribute(readonly, reportable) boolean reachable = 17; - attribute(readonly) char_string uniqueID = 18; + attribute(readonly, reportable) char_string uniqueID = 18; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -384,15 +384,15 @@ server cluster EthernetNetworkDiagnostics = 55 { attribute(readonly, reportable) int64u overrunCount = 6; attribute(readonly, reportable) boolean carrierDetect = 7; attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -415,9 +415,9 @@ server cluster GeneralCommissioning = 48 { attribute(writable, reportable) int64u breadcrumb = 0; attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) enum8 regulatoryConfig = 2; + attribute(readonly, reportable) enum8 locationCapability = 3; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { @@ -612,7 +612,7 @@ server cluster LevelControl = 8 { attribute(writable, reportable) int16u offTransitionTime = 19; attribute(writable, reportable) int8u defaultMoveRate = 20; attribute(writable, reportable) int8u startUpCurrentLevel = 16384; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct MoveRequest { @@ -669,8 +669,8 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute(writable, reportable) char_string activeLocale = 1; + attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -723,15 +723,15 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int8u maxNetworks = 0; + attribute(readonly, reportable) NetworkInfo networks[] = 1; + attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; + attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; + attribute(writable, reportable) boolean interfaceEnabled = 4; + attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly, reportable) octet_string lastNetworkID = 6; + attribute(readonly, reportable) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { @@ -1126,7 +1126,7 @@ server cluster SoftwareDiagnostics = 52 { attribute(readonly, reportable) int64u currentHeapFree = 1; attribute(readonly, reportable) int64u currentHeapUsed = 2; attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; command ResetWatermarks(): DefaultSuccess = 0; @@ -1305,15 +1305,15 @@ server cluster ThreadNetworkDiagnostics = 53 { attribute(readonly, reportable) octet_string channelMask = 60; attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(writable, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -1373,7 +1373,7 @@ server cluster WiFiNetworkDiagnostics = 54 { attribute(readonly, reportable) int32u packetUnicastTxCount = 10; attribute(readonly, reportable) int64u currentMaxRate = 11; attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 50788263665078..5c63eaa227ffbb 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -1244,7 +1244,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -1353,7 +1353,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1368,7 +1368,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1504,7 +1504,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1519,7 +1519,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1570,7 +1570,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1585,7 +1585,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1717,7 +1717,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1732,7 +1732,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1747,7 +1747,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "6", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1888,7 +1888,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1903,7 +1903,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1918,7 +1918,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1933,7 +1933,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1948,7 +1948,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1963,7 +1963,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1978,7 +1978,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1993,7 +1993,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2008,7 +2008,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2335,7 +2335,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3356,7 +3356,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x000F", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3627,7 +3627,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3838,7 +3838,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3950,7 +3950,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3965,7 +3965,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3980,7 +3980,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4264,7 +4264,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4279,7 +4279,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4315,7 +4315,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4330,7 +4330,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5378,7 +5378,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index beb8de0a6679a1..d92d86957f1fe7 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -19,9 +19,9 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int8u windowStatus = 0; + attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; + attribute(readonly, reportable) int16u adminVendorId = 2; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { @@ -137,13 +137,13 @@ server cluster EthernetNetworkDiagnostics = 55 { attribute(readonly, reportable) int64u overrunCount = 6; attribute(readonly, reportable) boolean carrierDetect = 7; attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -166,9 +166,9 @@ server cluster GeneralCommissioning = 48 { attribute(writable, reportable) int64u breadcrumb = 0; attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) enum8 regulatoryConfig = 2; + attribute(readonly, reportable) enum8 locationCapability = 3; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { @@ -294,8 +294,8 @@ server cluster GeneralDiagnostics = 51 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute(writable, reportable) char_string activeLocale = 1; + attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -348,15 +348,15 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int8u maxNetworks = 0; + attribute(readonly, reportable) NetworkInfo networks[] = 1; + attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; + attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; + attribute(writable, reportable) boolean interfaceEnabled = 4; + attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly, reportable) octet_string lastNetworkID = 6; + attribute(readonly, reportable) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { @@ -549,21 +549,21 @@ server cluster OperationalCredentials = 62 { } server cluster PowerSource = 47 { - attribute(readonly) enum8 status = 0; - attribute(readonly) int8u order = 1; - attribute(readonly) char_string description = 2; - attribute(readonly) int32u wiredAssessedCurrent = 6; - attribute(readonly) enum8 batteryChargeLevel = 14; - attribute(readonly) boolean batteryReplacementNeeded = 15; - attribute(readonly) enum8 batteryReplaceability = 16; - attribute(readonly) char_string batteryReplacementDescription = 19; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) enum8 status = 0; + attribute(readonly, reportable) int8u order = 1; + attribute(readonly, reportable) char_string description = 2; + attribute(readonly, reportable) int32u wiredAssessedCurrent = 6; + attribute(readonly, reportable) enum8 batteryChargeLevel = 14; + attribute(readonly, reportable) boolean batteryReplacementNeeded = 15; + attribute(readonly, reportable) enum8 batteryReplaceability = 16; + attribute(readonly, reportable) char_string batteryReplacementDescription = 19; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster PowerSourceConfiguration = 46 { - attribute(readonly) INT8U sources[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) INT8U sources[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster SoftwareDiagnostics = 52 { @@ -583,7 +583,7 @@ server cluster SoftwareDiagnostics = 52 { attribute(readonly, reportable) int64u currentHeapFree = 1; attribute(readonly, reportable) int64u currentHeapUsed = 2; attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -727,13 +727,13 @@ server cluster ThreadNetworkDiagnostics = 53 { attribute(readonly, reportable) octet_string channelMask = 60; attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(writable, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -793,7 +793,7 @@ server cluster WiFiNetworkDiagnostics = 54 { attribute(readonly, reportable) int32u packetUnicastTxCount = 10; attribute(readonly, reportable) int64u currentMaxRate = 11; attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 00007750128abe..0365ec7275c95e 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -1188,7 +1188,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1203,7 +1203,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1239,7 +1239,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1254,7 +1254,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1290,7 +1290,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1305,7 +1305,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1320,7 +1320,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "USB", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1335,7 +1335,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1350,7 +1350,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1365,7 +1365,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1497,7 +1497,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1512,7 +1512,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1527,7 +1527,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "6", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1668,7 +1668,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1683,7 +1683,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1698,7 +1698,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1713,7 +1713,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1728,7 +1728,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1743,7 +1743,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1758,7 +1758,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1773,7 +1773,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1788,7 +1788,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2115,7 +2115,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3127,7 +3127,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x000F", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3389,7 +3389,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3600,7 +3600,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3692,7 +3692,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3707,7 +3707,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3722,7 +3722,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4006,7 +4006,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4021,7 +4021,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4057,7 +4057,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4072,7 +4072,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5493,7 +5493,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5508,7 +5508,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5523,7 +5523,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "Battery", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5538,7 +5538,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5553,7 +5553,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5568,7 +5568,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5583,7 +5583,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5598,7 +5598,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5613,7 +5613,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0A", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5628,7 +5628,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index e3ee6a58863a98..05cc45b02a6e85 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -78,9 +78,9 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable) int64u breadcrumb = 0; - attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) int16u clusterRevision = 65533; + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -160,7 +160,7 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -243,11 +243,11 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly) FabricDescriptor fabricsList[] = 1; - attribute(readonly) int8u supportedFabrics = 2; - attribute(readonly) int8u commissionedFabrics = 3; - attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; diff --git a/examples/log-source-app/log-source-common/log-source-app.zap b/examples/log-source-app/log-source-common/log-source-app.zap index e5c802716f69ce..8d7ac3bd579897 100644 --- a/examples/log-source-app/log-source-common/log-source-app.zap +++ b/examples/log-source-app/log-source-common/log-source-app.zap @@ -72,7 +72,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "2", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -107,7 +107,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -122,7 +122,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "2", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -197,7 +197,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -256,7 +256,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -271,7 +271,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -354,7 +354,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -429,7 +429,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -444,7 +444,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -459,7 +459,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -474,7 +474,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -489,7 +489,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -504,7 +504,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -555,7 +555,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -581,7 +581,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -596,7 +596,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -687,7 +687,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -713,7 +713,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -728,7 +728,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -763,7 +763,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -789,7 +789,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -804,7 +804,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -819,7 +819,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -834,7 +834,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -849,7 +849,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -864,7 +864,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -879,7 +879,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -894,7 +894,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -909,7 +909,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -924,7 +924,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -939,7 +939,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -954,7 +954,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -1005,7 +1005,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -1056,7 +1056,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000000000000000", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -1071,7 +1071,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -1086,7 +1086,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -1161,7 +1161,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -1212,7 +1212,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -1333,7 +1333,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -1392,7 +1392,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -1407,7 +1407,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -1422,7 +1422,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -1437,7 +1437,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -1452,7 +1452,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -1663,7 +1663,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -1704,7 +1704,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -1719,7 +1719,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2094,7 +2094,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2137,7 +2137,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2163,7 +2163,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2178,7 +2178,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2193,7 +2193,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2208,7 +2208,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2223,7 +2223,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2362,7 +2362,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2388,7 +2388,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2403,7 +2403,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2418,7 +2418,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2433,7 +2433,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x616B", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2448,7 +2448,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x607D", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2463,7 +2463,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2478,7 +2478,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2493,7 +2493,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00FA", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2508,7 +2508,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x01", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2523,7 +2523,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2538,7 +2538,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2553,7 +2553,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2568,7 +2568,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2583,7 +2583,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2598,7 +2598,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2613,7 +2613,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2628,7 +2628,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2643,7 +2643,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2658,7 +2658,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2673,7 +2673,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2688,7 +2688,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2703,7 +2703,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2718,7 +2718,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2733,7 +2733,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2748,7 +2748,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2763,7 +2763,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2778,7 +2778,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2793,7 +2793,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2808,7 +2808,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2823,7 +2823,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2838,7 +2838,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2853,7 +2853,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2868,7 +2868,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2883,7 +2883,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2898,7 +2898,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2913,7 +2913,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2928,7 +2928,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2943,7 +2943,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2958,7 +2958,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2973,7 +2973,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2988,7 +2988,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3003,7 +3003,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x01", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3018,7 +3018,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3033,7 +3033,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3048,7 +3048,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0019", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3063,7 +3063,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3078,7 +3078,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3093,7 +3093,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0xFEFF", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3108,7 +3108,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3123,7 +3123,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3138,7 +3138,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3164,7 +3164,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3190,7 +3190,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3205,7 +3205,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x8000", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3220,7 +3220,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x8000", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3235,7 +3235,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3270,7 +3270,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "2", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3313,7 +3313,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3328,7 +3328,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3343,7 +3343,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3358,7 +3358,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3373,7 +3373,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0xff", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3388,7 +3388,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "2", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 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 e09ed393b072f5..82bd914a5a7695 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 @@ -7,8 +7,8 @@ struct LabelStruct { } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -31,9 +31,9 @@ server cluster GeneralCommissioning = 48 { attribute(writable, reportable) int64u breadcrumb = 0; attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) enum8 regulatoryConfig = 2; + attribute(readonly, reportable) enum8 locationCapability = 3; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { @@ -70,8 +70,8 @@ server cluster GeneralCommissioning = 48 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute(writable, reportable) char_string activeLocale = 1; + attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -124,15 +124,15 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int8u maxNetworks = 0; + attribute(readonly, reportable) NetworkInfo networks[] = 1; + attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; + attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; + attribute(writable, reportable) boolean interfaceEnabled = 4; + attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly, reportable) octet_string lastNetworkID = 6; + attribute(readonly, reportable) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { @@ -350,8 +350,8 @@ server cluster OperationalCredentials = 62 { } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(writable, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } 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 d310ffd6d83ba9..f806fa5a73f4f7 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 @@ -1136,7 +1136,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1151,7 +1151,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1283,7 +1283,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1298,7 +1298,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1313,7 +1313,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1454,7 +1454,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1469,7 +1469,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1484,7 +1484,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1499,7 +1499,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1514,7 +1514,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1529,7 +1529,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1544,7 +1544,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1559,7 +1559,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1574,7 +1574,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1842,7 +1842,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1857,7 +1857,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1893,7 +1893,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1908,7 +1908,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 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 0766042f5b83fb..ae1dcc3d4742dc 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 @@ -38,8 +38,8 @@ server cluster Basic = 40 { } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -62,9 +62,9 @@ server cluster GeneralCommissioning = 48 { attribute(writable, reportable) int64u breadcrumb = 0; attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) enum8 regulatoryConfig = 2; + attribute(readonly, reportable) enum8 locationCapability = 3; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { @@ -101,8 +101,8 @@ server cluster GeneralCommissioning = 48 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute(writable, reportable) char_string activeLocale = 1; + attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -155,15 +155,15 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int8u maxNetworks = 0; + attribute(readonly, reportable) NetworkInfo networks[] = 1; + attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; + attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; + attribute(writable, reportable) boolean interfaceEnabled = 4; + attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly, reportable) octet_string lastNetworkID = 6; + attribute(readonly, reportable) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { @@ -461,8 +461,8 @@ server cluster OperationalCredentials = 62 { } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(writable, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } 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 6f4a10492c5798..364b27439619af 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 @@ -1169,7 +1169,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1184,7 +1184,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1235,7 +1235,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1250,7 +1250,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1382,7 +1382,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1397,7 +1397,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1412,7 +1412,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1537,7 +1537,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1552,7 +1552,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1567,7 +1567,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1582,7 +1582,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1597,7 +1597,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1612,7 +1612,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1627,7 +1627,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1642,7 +1642,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1657,7 +1657,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1941,7 +1941,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1956,7 +1956,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1992,7 +1992,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2007,7 +2007,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 2d47e74b46e946..35bc33ef164942 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -34,7 +34,7 @@ server cluster Basic = 40 { attribute(readonly, reportable) char_string serialNumber = 15; attribute(writable, reportable) boolean localConfigDisabled = 16; attribute(readonly, reportable) boolean reachable = 17; - attribute(readonly) char_string uniqueID = 18; + attribute(readonly, reportable) char_string uniqueID = 18; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -399,14 +399,14 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) int8u maxNetworks = 0; + attribute(readonly, reportable) NetworkInfo networks[] = 1; + attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; + attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; + attribute(writable, reportable) boolean interfaceEnabled = 4; + attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly, reportable) octet_string lastNetworkID = 6; + attribute(readonly, reportable) int32u lastConnectErrorValue = 7; attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index 952bb4c3898acd..19ccbc3b128072 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -463,7 +463,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -736,7 +736,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -751,7 +751,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -766,7 +766,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -781,7 +781,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -796,7 +796,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -811,7 +811,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -826,7 +826,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -841,7 +841,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -856,7 +856,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2275,7 +2275,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 2d47e74b46e946..35bc33ef164942 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -34,7 +34,7 @@ server cluster Basic = 40 { attribute(readonly, reportable) char_string serialNumber = 15; attribute(writable, reportable) boolean localConfigDisabled = 16; attribute(readonly, reportable) boolean reachable = 17; - attribute(readonly) char_string uniqueID = 18; + attribute(readonly, reportable) char_string uniqueID = 18; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -399,14 +399,14 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) int8u maxNetworks = 0; + attribute(readonly, reportable) NetworkInfo networks[] = 1; + attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; + attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; + attribute(writable, reportable) boolean interfaceEnabled = 4; + attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly, reportable) octet_string lastNetworkID = 6; + attribute(readonly, reportable) int32u lastConnectErrorValue = 7; attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index 952bb4c3898acd..19ccbc3b128072 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -463,7 +463,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -736,7 +736,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -751,7 +751,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -766,7 +766,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -781,7 +781,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -796,7 +796,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -811,7 +811,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -826,7 +826,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -841,7 +841,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -856,7 +856,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2275,7 +2275,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 36ffee5ef6b96a..3a32a653720797 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -19,9 +19,9 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int8u windowStatus = 0; + attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; + attribute(readonly, reportable) int16u adminVendorId = 2; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { @@ -117,8 +117,8 @@ server cluster DiagnosticLogs = 50 { } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } client cluster FlowMeasurement = 1028 { @@ -155,9 +155,9 @@ server cluster GeneralCommissioning = 48 { attribute(writable, reportable) int64u breadcrumb = 0; attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) enum8 regulatoryConfig = 2; + attribute(readonly, reportable) enum8 locationCapability = 3; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { @@ -350,8 +350,8 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute(writable, reportable) char_string activeLocale = 1; + attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -404,15 +404,15 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int8u maxNetworks = 0; + attribute(readonly, reportable) NetworkInfo networks[] = 1; + attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; + attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; + attribute(writable, reportable) boolean interfaceEnabled = 4; + attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly, reportable) octet_string lastNetworkID = 6; + attribute(readonly, reportable) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { @@ -726,7 +726,7 @@ server cluster SoftwareDiagnostics = 52 { attribute(readonly, reportable) int64u currentHeapFree = 1; attribute(readonly, reportable) int64u currentHeapUsed = 2; attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -884,13 +884,13 @@ server cluster ThreadNetworkDiagnostics = 53 { attribute(readonly, reportable) octet_string channelMask = 60; attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(writable, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } diff --git a/examples/pump-app/pump-common/pump-app.zap b/examples/pump-app/pump-common/pump-app.zap index 5db813dc3dedbc..547b2575f3240a 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -1102,7 +1102,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1117,7 +1117,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1249,7 +1249,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1264,7 +1264,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1279,7 +1279,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "6", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1420,7 +1420,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1435,7 +1435,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1450,7 +1450,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1465,7 +1465,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1480,7 +1480,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1495,7 +1495,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1510,7 +1510,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1525,7 +1525,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1540,7 +1540,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1555,7 +1555,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1882,7 +1882,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2903,7 +2903,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x000F", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3165,7 +3165,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3376,7 +3376,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3468,7 +3468,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3483,7 +3483,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3498,7 +3498,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3782,7 +3782,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3797,7 +3797,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3833,7 +3833,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3848,7 +3848,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 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 4cb2a32f5458f2..b1bcfbc60bee81 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 @@ -19,9 +19,9 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int8u windowStatus = 0; + attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; + attribute(readonly, reportable) int16u adminVendorId = 2; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { @@ -139,13 +139,13 @@ server cluster EthernetNetworkDiagnostics = 55 { attribute(readonly, reportable) int64u overrunCount = 6; attribute(readonly, reportable) boolean carrierDetect = 7; attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } client cluster FlowMeasurement = 1028 { @@ -175,9 +175,9 @@ server cluster GeneralCommissioning = 48 { attribute(writable, reportable) int64u breadcrumb = 0; attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) enum8 regulatoryConfig = 2; + attribute(readonly, reportable) enum8 locationCapability = 3; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { @@ -370,8 +370,8 @@ client cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute(writable, reportable) char_string activeLocale = 1; + attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -424,15 +424,15 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int8u maxNetworks = 0; + attribute(readonly, reportable) NetworkInfo networks[] = 1; + attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; + attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; + attribute(writable, reportable) boolean interfaceEnabled = 4; + attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly, reportable) octet_string lastNetworkID = 6; + attribute(readonly, reportable) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { @@ -721,7 +721,7 @@ server cluster SoftwareDiagnostics = 52 { attribute(readonly, reportable) int64u currentHeapFree = 1; attribute(readonly, reportable) int64u currentHeapUsed = 2; attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -872,13 +872,13 @@ server cluster ThreadNetworkDiagnostics = 53 { attribute(readonly, reportable) octet_string channelMask = 60; attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(writable, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -938,7 +938,7 @@ server cluster WiFiNetworkDiagnostics = 54 { attribute(readonly, reportable) int32u packetUnicastTxCount = 10; attribute(readonly, reportable) int64u currentMaxRate = 11; attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } 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 09e21931e82674..dac6c8c62b9387 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 @@ -1102,7 +1102,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1117,7 +1117,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1249,7 +1249,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1264,7 +1264,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1279,7 +1279,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "6", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1420,7 +1420,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1435,7 +1435,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1450,7 +1450,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1465,7 +1465,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1480,7 +1480,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1495,7 +1495,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1510,7 +1510,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1525,7 +1525,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1540,7 +1540,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1555,7 +1555,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1882,7 +1882,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2903,7 +2903,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x000F", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3165,7 +3165,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3376,7 +3376,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3468,7 +3468,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3483,7 +3483,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3498,7 +3498,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3782,7 +3782,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3797,7 +3797,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3833,7 +3833,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3848,7 +3848,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index 089ceac43d49eb..becf10fd0a5d44 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -19,9 +19,9 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int8u windowStatus = 0; + attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; + attribute(readonly, reportable) int16u adminVendorId = 2; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { @@ -137,13 +137,13 @@ server cluster EthernetNetworkDiagnostics = 55 { attribute(readonly, reportable) int64u overrunCount = 6; attribute(readonly, reportable) boolean carrierDetect = 7; attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -166,9 +166,9 @@ server cluster GeneralCommissioning = 48 { attribute(writable, reportable) int64u breadcrumb = 0; attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) enum8 regulatoryConfig = 2; + attribute(readonly, reportable) enum8 locationCapability = 3; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { @@ -294,8 +294,8 @@ server cluster GeneralDiagnostics = 51 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute(writable, reportable) char_string activeLocale = 1; + attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -348,15 +348,15 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int8u maxNetworks = 0; + attribute(readonly, reportable) NetworkInfo networks[] = 1; + attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; + attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; + attribute(writable, reportable) boolean interfaceEnabled = 4; + attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly, reportable) octet_string lastNetworkID = 6; + attribute(readonly, reportable) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AddOrUpdateWiFiNetworkRequest { @@ -519,7 +519,7 @@ server cluster SoftwareDiagnostics = 52 { } attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -531,8 +531,8 @@ server cluster TemperatureMeasurement = 1026 { } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(writable, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -592,7 +592,7 @@ server cluster WiFiNetworkDiagnostics = 54 { attribute(readonly, reportable) int32u packetUnicastTxCount = 10; attribute(readonly, reportable) int64u currentMaxRate = 11; attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap b/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap index b527b636474ed3..34c598b17e0028 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap @@ -796,7 +796,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -811,7 +811,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -943,7 +943,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -958,7 +958,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -973,7 +973,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "2", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1114,7 +1114,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1129,7 +1129,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1144,7 +1144,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1159,7 +1159,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1174,7 +1174,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1189,7 +1189,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1204,7 +1204,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1219,7 +1219,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1234,7 +1234,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1516,7 +1516,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1778,7 +1778,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1989,7 +1989,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2081,7 +2081,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2096,7 +2096,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2111,7 +2111,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2395,7 +2395,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2410,7 +2410,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2446,7 +2446,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2461,7 +2461,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 3698f8ea617aa3..dac425770d4e19 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -19,9 +19,9 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int8u windowStatus = 0; + attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; + attribute(readonly, reportable) int16u adminVendorId = 2; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { @@ -75,7 +75,7 @@ server cluster Basic = 40 { attribute(readonly, reportable) char_string serialNumber = 15; attribute(writable, reportable) boolean localConfigDisabled = 16; attribute(readonly, reportable) boolean reachable = 17; - attribute(readonly) char_string uniqueID = 18; + attribute(readonly, reportable) char_string uniqueID = 18; attribute(readonly, reportable) int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; @@ -168,13 +168,13 @@ server cluster EthernetNetworkDiagnostics = 55 { attribute(readonly, reportable) int64u overrunCount = 6; attribute(readonly, reportable) boolean carrierDetect = 7; attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -197,9 +197,9 @@ server cluster GeneralCommissioning = 48 { attribute(writable, reportable) int64u breadcrumb = 0; attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) enum8 regulatoryConfig = 2; + attribute(readonly, reportable) enum8 locationCapability = 3; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { @@ -482,8 +482,8 @@ server cluster Identify = 3 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute(writable, reportable) char_string activeLocale = 1; + attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -536,15 +536,15 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int8u maxNetworks = 0; + attribute(readonly, reportable) NetworkInfo networks[] = 1; + attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; + attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; + attribute(writable, reportable) boolean interfaceEnabled = 4; + attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly, reportable) octet_string lastNetworkID = 6; + attribute(readonly, reportable) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { @@ -889,7 +889,7 @@ server cluster SoftwareDiagnostics = 52 { attribute(readonly, reportable) int64u currentHeapFree = 1; attribute(readonly, reportable) int64u currentHeapUsed = 2; attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -1100,13 +1100,13 @@ server cluster ThreadNetworkDiagnostics = 53 { attribute(readonly, reportable) octet_string channelMask = 60; attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(writable, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -1166,7 +1166,7 @@ server cluster WiFiNetworkDiagnostics = 54 { attribute(readonly, reportable) int32u packetUnicastTxCount = 10; attribute(readonly, reportable) int64u currentMaxRate = 11; attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index f4475cf122b75f..c4f33595c982f9 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -1240,7 +1240,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -1385,7 +1385,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1400,7 +1400,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1532,7 +1532,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1547,7 +1547,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1562,7 +1562,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "6", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1703,7 +1703,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1718,7 +1718,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1733,7 +1733,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1748,7 +1748,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1763,7 +1763,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1778,7 +1778,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1793,7 +1793,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1808,7 +1808,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1823,7 +1823,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2150,7 +2150,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3136,7 +3136,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x000F", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3398,7 +3398,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3609,7 +3609,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3798,7 +3798,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3813,7 +3813,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3828,7 +3828,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4194,7 +4194,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4209,7 +4209,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4245,7 +4245,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4260,7 +4260,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index dcd7680a42a88e..2c1edb39744a0f 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -40,9 +40,9 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int8u windowStatus = 0; + attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; + attribute(readonly, reportable) int16u adminVendorId = 2; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { @@ -80,10 +80,10 @@ server cluster ApplicationBasic = 1293 { attribute(readonly, reportable) int16u vendorId = 1; attribute(readonly, reportable) char_string applicationName = 2; attribute(readonly, reportable) int16u productId = 3; - attribute(writable) ApplicationBasicApplication applicationApp = 4; + attribute(writable, reportable) ApplicationBasicApplication applicationApp = 4; attribute(readonly, reportable) ApplicationStatusEnum applicationStatus = 5; attribute(readonly, reportable) char_string applicationVersion = 6; - attribute(readonly) vendor_id allowedVendorList[] = 7; + attribute(readonly, reportable) vendor_id allowedVendorList[] = 7; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -196,7 +196,7 @@ server cluster Basic = 40 { attribute(readonly, reportable) char_string productLabel = 14; attribute(readonly, reportable) char_string serialNumber = 15; attribute(writable, reportable) boolean localConfigDisabled = 16; - attribute(readonly) char_string uniqueID = 18; + attribute(readonly, reportable) char_string uniqueID = 18; attribute(readonly, reportable) int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; @@ -452,13 +452,13 @@ server cluster EthernetNetworkDiagnostics = 55 { attribute(readonly, reportable) int64u overrunCount = 6; attribute(readonly, reportable) boolean carrierDetect = 7; attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } client cluster GeneralCommissioning = 48 { @@ -481,9 +481,9 @@ client cluster GeneralCommissioning = 48 { attribute(writable, reportable) int64u breadcrumb = 0; attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) enum8 regulatoryConfig = 2; + attribute(readonly, reportable) enum8 locationCapability = 3; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { @@ -539,9 +539,9 @@ server cluster GeneralCommissioning = 48 { attribute(writable, reportable) int64u breadcrumb = 0; attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) enum8 regulatoryConfig = 2; + attribute(readonly, reportable) enum8 locationCapability = 3; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { @@ -820,7 +820,7 @@ server cluster LevelControl = 8 { attribute(writable, reportable) int16u offTransitionTime = 19; attribute(writable, reportable) int8u defaultMoveRate = 20; attribute(writable, reportable) int8u startUpCurrentLevel = 16384; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct MoveRequest { @@ -877,8 +877,8 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute(writable, reportable) char_string activeLocale = 1; + attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; } server cluster LowPower = 1288 { @@ -1039,15 +1039,15 @@ client cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int8u maxNetworks = 0; + attribute(readonly, reportable) NetworkInfo networks[] = 1; + attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; + attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; + attribute(writable, reportable) boolean interfaceEnabled = 4; + attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly, reportable) octet_string lastNetworkID = 6; + attribute(readonly, reportable) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { @@ -1158,15 +1158,15 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int8u maxNetworks = 0; + attribute(readonly, reportable) NetworkInfo networks[] = 1; + attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; + attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; + attribute(writable, reportable) boolean interfaceEnabled = 4; + attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly, reportable) octet_string lastNetworkID = 6; + attribute(readonly, reportable) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { @@ -1533,7 +1533,7 @@ server cluster SoftwareDiagnostics = 52 { attribute(readonly, reportable) int64u currentHeapFree = 1; attribute(readonly, reportable) int64u currentHeapUsed = 2; attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -1550,7 +1550,7 @@ server cluster TargetNavigator = 1285 { } attribute(readonly, reportable) TargetInfo targetNavigatorList[] = 0; - attribute(readonly) int8u currentNavigatorTarget = 1; + attribute(readonly, reportable) int8u currentNavigatorTarget = 1; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct NavigateTargetRequestRequest { @@ -1706,13 +1706,13 @@ server cluster ThreadNetworkDiagnostics = 53 { attribute(readonly, reportable) octet_string channelMask = 60; attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(writable, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster WakeOnLan = 1283 { @@ -1777,7 +1777,7 @@ server cluster WiFiNetworkDiagnostics = 54 { attribute(readonly, reportable) int32u packetUnicastTxCount = 10; attribute(readonly, reportable) int64u currentMaxRate = 11; attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index e4953135d3cbc2..819488c416eb25 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -1225,7 +1225,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -1370,7 +1370,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1385,7 +1385,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1517,7 +1517,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1532,7 +1532,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1547,7 +1547,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "6", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1637,7 +1637,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1703,7 +1703,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1718,7 +1718,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1733,7 +1733,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1748,7 +1748,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1763,7 +1763,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1778,7 +1778,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1793,7 +1793,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1808,7 +1808,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1823,7 +1823,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1838,7 +1838,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2165,7 +2165,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3151,7 +3151,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x000F", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3413,7 +3413,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3624,7 +3624,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3813,7 +3813,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3828,7 +3828,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3843,7 +3843,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4209,7 +4209,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4224,7 +4224,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4260,7 +4260,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4275,7 +4275,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7119,7 +7119,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7134,7 +7134,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7234,7 +7234,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7249,7 +7249,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7264,7 +7264,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7394,7 +7394,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7409,7 +7409,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7546,7 +7546,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7561,7 +7561,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7684,7 +7684,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7699,7 +7699,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7830,7 +7830,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7845,7 +7845,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8688,7 +8688,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8914,7 +8914,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8929,7 +8929,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9319,7 +9319,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9334,7 +9334,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9457,7 +9457,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9472,7 +9472,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9599,7 +9599,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9644,7 +9644,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9659,7 +9659,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9674,7 +9674,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9775,7 +9775,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9790,7 +9790,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10033,7 +10033,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10048,7 +10048,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10175,7 +10175,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10220,7 +10220,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10235,7 +10235,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10250,7 +10250,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10497,7 +10497,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10542,7 +10542,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10557,7 +10557,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10572,7 +10572,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 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 0a05c4a5cb976d..a820e79c3a4de8 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 @@ -36,9 +36,9 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int8u windowStatus = 0; + attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; + attribute(readonly, reportable) int16u adminVendorId = 2; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { @@ -189,7 +189,7 @@ server cluster Basic = 40 { attribute(readonly, reportable) char_string serialNumber = 15; attribute(writable, reportable) boolean localConfigDisabled = 16; attribute(readonly, reportable) boolean reachable = 17; - attribute(readonly) char_string uniqueID = 18; + attribute(readonly, reportable) char_string uniqueID = 18; attribute(readonly, reportable) int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; @@ -883,29 +883,29 @@ server cluster DoorLock = 257 { attribute(readonly, reportable) DlLockType lockType = 1; attribute(readonly, reportable) boolean actuatorEnabled = 2; attribute(readonly, reportable) DlDoorState doorState = 3; - attribute(writable) int32u doorOpenEvents = 4; - attribute(writable) int32u doorClosedEvents = 5; - attribute(writable) int16u openPeriod = 6; - attribute(readonly) int16u numberOfTotalUsersSupported = 17; - attribute(readonly) int16u numberOfPINUsersSupported = 18; - attribute(readonly) int16u numberOfWeekDaySchedulesSupportedPerUser = 20; - attribute(readonly) int16u numberOfYearDaySchedulesSupportedPerUser = 21; - attribute(readonly) int16u numberOfHolidaySchedulesSupported = 22; - attribute(readonly) int8u maxPINCodeLength = 23; - attribute(readonly) int8u minPINCodeLength = 24; - attribute(readonly) bitmap8 credentialRulesSupport = 27; + attribute(writable, reportable) int32u doorOpenEvents = 4; + attribute(writable, reportable) int32u doorClosedEvents = 5; + attribute(writable, reportable) int16u openPeriod = 6; + attribute(readonly, reportable) int16u numberOfTotalUsersSupported = 17; + attribute(readonly, reportable) int16u numberOfPINUsersSupported = 18; + attribute(readonly, reportable) int16u numberOfWeekDaySchedulesSupportedPerUser = 20; + attribute(readonly, reportable) int16u numberOfYearDaySchedulesSupportedPerUser = 21; + attribute(readonly, reportable) int16u numberOfHolidaySchedulesSupported = 22; + attribute(readonly, reportable) int8u maxPINCodeLength = 23; + attribute(readonly, reportable) int8u minPINCodeLength = 24; + attribute(readonly, reportable) bitmap8 credentialRulesSupport = 27; attribute(writable, reportable) char_string language = 33; attribute(writable, reportable) int32u autoRelockTime = 35; attribute(writable, reportable) int8u soundVolume = 36; attribute(writable, reportable) DlOperatingMode operatingMode = 37; - attribute(readonly) bitmap16 supportedOperatingModes = 38; - attribute(readonly) bitmap16 defaultConfigurationRegister = 39; + attribute(readonly, reportable) bitmap16 supportedOperatingModes = 38; + attribute(readonly, reportable) bitmap16 defaultConfigurationRegister = 39; attribute(writable, reportable) boolean enableOneTouchLocking = 41; - attribute(writable) boolean enableInsideStatusLED = 42; + attribute(writable, reportable) boolean enableInsideStatusLED = 42; attribute(writable, reportable) boolean enablePrivacyModeButton = 43; attribute(writable, reportable) int8u wrongCodeEntryLimit = 48; attribute(writable, reportable) int8u userCodeTemporaryDisableTime = 49; - attribute(writable) boolean requirePINforRemoteOperation = 51; + attribute(writable, reportable) boolean requirePINforRemoteOperation = 51; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ClearCredentialRequest { @@ -1008,13 +1008,13 @@ server cluster EthernetNetworkDiagnostics = 55 { attribute(readonly, reportable) int64u overrunCount = 6; attribute(readonly, reportable) boolean carrierDetect = 7; attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster FlowMeasurement = 1028 { @@ -1044,9 +1044,9 @@ server cluster GeneralCommissioning = 48 { attribute(writable, reportable) int64u breadcrumb = 0; attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) enum8 regulatoryConfig = 2; + attribute(readonly, reportable) enum8 locationCapability = 3; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { @@ -1529,8 +1529,8 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute(writable, reportable) char_string activeLocale = 1; + attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; } client cluster MediaInput = 1287 { @@ -1668,15 +1668,15 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int8u maxNetworks = 0; + attribute(readonly, reportable) NetworkInfo networks[] = 1; + attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; + attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; + attribute(writable, reportable) boolean interfaceEnabled = 4; + attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly, reportable) octet_string lastNetworkID = 6; + attribute(readonly, reportable) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { @@ -2071,7 +2071,7 @@ server cluster SoftwareDiagnostics = 52 { attribute(readonly, reportable) int64u currentHeapFree = 1; attribute(readonly, reportable) int64u currentHeapUsed = 2; attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -2360,13 +2360,13 @@ server cluster ThreadNetworkDiagnostics = 53 { attribute(readonly, reportable) octet_string channelMask = 60; attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(writable, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster WakeOnLan = 1283 { @@ -2431,7 +2431,7 @@ server cluster WiFiNetworkDiagnostics = 54 { attribute(readonly, reportable) int32u packetUnicastTxCount = 10; attribute(readonly, reportable) int64u currentMaxRate = 11; attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } 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 4e6db8ab60e459..18c2a7b5f589a4 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 @@ -1240,7 +1240,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -1385,7 +1385,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1400,7 +1400,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1532,7 +1532,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1547,7 +1547,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1562,7 +1562,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "6", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1703,7 +1703,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1718,7 +1718,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1733,7 +1733,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1748,7 +1748,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1763,7 +1763,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1778,7 +1778,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1793,7 +1793,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1808,7 +1808,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1823,7 +1823,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2150,7 +2150,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3136,7 +3136,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x000F", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3398,7 +3398,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3448,7 +3448,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -3609,7 +3609,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3798,7 +3798,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3813,7 +3813,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3828,7 +3828,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4194,7 +4194,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4209,7 +4209,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4245,7 +4245,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4260,7 +4260,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8886,7 +8886,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0001", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -8912,7 +8912,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -9129,7 +9129,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9144,7 +9144,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9159,7 +9159,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9174,7 +9174,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "10", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9189,7 +9189,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "10", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9204,7 +9204,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9219,7 +9219,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9234,7 +9234,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9249,7 +9249,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "6", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9264,7 +9264,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "6", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9279,7 +9279,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9354,7 +9354,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0xFFF6", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9369,7 +9369,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9399,7 +9399,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9459,7 +9459,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -12078,7 +12078,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -12199,7 +12199,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -12370,7 +12370,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -12470,7 +12470,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -12561,7 +12561,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -12645,7 +12645,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -12759,7 +12759,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -12866,7 +12866,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -12948,7 +12948,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -13130,7 +13130,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index c24cfbc31c2a4d..629ed1f0805382 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -19,9 +19,9 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int8u windowStatus = 0; + attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; + attribute(readonly, reportable) int16u adminVendorId = 2; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { @@ -75,7 +75,7 @@ server cluster Basic = 40 { attribute(readonly, reportable) char_string serialNumber = 15; attribute(writable, reportable) boolean localConfigDisabled = 16; attribute(readonly, reportable) boolean reachable = 17; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster Descriptor = 29 { @@ -114,13 +114,13 @@ server cluster EthernetNetworkDiagnostics = 55 { attribute(readonly, reportable) int64u overrunCount = 6; attribute(readonly, reportable) boolean carrierDetect = 7; attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -143,9 +143,9 @@ server cluster GeneralCommissioning = 48 { attribute(writable, reportable) int64u breadcrumb = 0; attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) enum8 regulatoryConfig = 2; + attribute(readonly, reportable) enum8 locationCapability = 3; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { @@ -294,7 +294,7 @@ server cluster Identify = 3 { } attribute(writable, reportable) int16u identifyTime = 0; - attribute(readonly) enum8 identifyType = 1; + attribute(readonly, reportable) enum8 identifyType = 1; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct IdentifyRequest { @@ -316,8 +316,8 @@ server cluster Identify = 3 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute(writable, reportable) char_string activeLocale = 1; + attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -370,15 +370,15 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int8u maxNetworks = 0; + attribute(readonly, reportable) NetworkInfo networks[] = 1; + attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; + attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; + attribute(writable, reportable) boolean interfaceEnabled = 4; + attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly, reportable) octet_string lastNetworkID = 6; + attribute(readonly, reportable) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { @@ -572,7 +572,7 @@ server cluster SoftwareDiagnostics = 52 { attribute(readonly, reportable) int64u currentHeapFree = 1; attribute(readonly, reportable) int64u currentHeapUsed = 2; attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -716,13 +716,13 @@ server cluster ThreadNetworkDiagnostics = 53 { attribute(readonly, reportable) octet_string channelMask = 60; attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(writable, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -782,7 +782,7 @@ server cluster WiFiNetworkDiagnostics = 54 { attribute(readonly, reportable) int32u packetUnicastTxCount = 10; attribute(readonly, reportable) int64u currentMaxRate = 11; attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index 7fdbb2ed18cab0..847536871850f5 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -938,7 +938,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -974,7 +974,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -989,7 +989,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1297,7 +1297,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1312,7 +1312,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1327,7 +1327,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "6", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1468,7 +1468,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1483,7 +1483,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1498,7 +1498,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1513,7 +1513,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1528,7 +1528,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1543,7 +1543,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1558,7 +1558,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1573,7 +1573,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1588,7 +1588,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1896,7 +1896,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2908,7 +2908,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x000F", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3170,7 +3170,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3381,7 +3381,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3473,7 +3473,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3488,7 +3488,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3503,7 +3503,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3787,7 +3787,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3802,7 +3802,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3838,7 +3838,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3853,7 +3853,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4144,7 +4144,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5940,7 +5940,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x000F", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 4fed146169f4b1..31573c491a2f60 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -42,12 +42,12 @@ client cluster AccessControl = 31 { attribute(writable, reportable) AccessControlEntry acl[] = 0; attribute(writable, reportable) ExtensionEntry extension[] = 1; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; } client cluster AccountLogin = 1294 { - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct GetSetupPINRequestRequest { @@ -81,10 +81,10 @@ client cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int8u windowStatus = 0; + attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; + attribute(readonly, reportable) int16u adminVendorId = 2; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { @@ -122,11 +122,11 @@ client cluster ApplicationBasic = 1293 { attribute(readonly, reportable) int16u vendorId = 1; attribute(readonly, reportable) char_string applicationName = 2; attribute(readonly, reportable) int16u productId = 3; - attribute(writable) ApplicationBasicApplication applicationApp = 4; + attribute(writable, reportable) ApplicationBasicApplication applicationApp = 4; attribute(readonly, reportable) ApplicationStatusEnum applicationStatus = 5; attribute(readonly, reportable) char_string applicationVersion = 6; - attribute(readonly) vendor_id allowedVendorList[] = 7; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) vendor_id allowedVendorList[] = 7; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -143,7 +143,7 @@ client cluster ApplicationLauncher = 1292 { } attribute(readonly, reportable) INT16U applicationLauncherList[] = 0; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct HideAppRequestRequest { @@ -187,7 +187,7 @@ client cluster AudioOutput = 1291 { attribute(readonly, reportable) OutputInfo audioOutputList[] = 0; attribute(readonly, reportable) int8u currentAudioOutput = 1; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct RenameOutputRequestRequest { @@ -208,7 +208,7 @@ client cluster BarrierControl = 259 { attribute(readonly, reportable) bitmap16 barrierSafetyStatus = 2; attribute(readonly, reportable) bitmap8 barrierCapabilities = 3; attribute(readonly, reportable) int8u barrierPosition = 10; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct BarrierControlGoToPercentRequest { @@ -252,8 +252,8 @@ client cluster Basic = 40 { attribute(readonly, reportable) char_string serialNumber = 15; attribute(writable, reportable) boolean localConfigDisabled = 16; attribute(readonly, reportable) boolean reachable = 17; - attribute(readonly) char_string uniqueID = 18; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) char_string uniqueID = 18; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; @@ -263,12 +263,12 @@ client cluster BinaryInputBasic = 15 { attribute(writable, reportable) boolean outOfService = 81; attribute(writable, reportable) boolean presentValue = 85; attribute(readonly, reportable) bitmap8 statusFlags = 111; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; } client cluster Binding = 30 { - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct BindRequest { @@ -295,7 +295,7 @@ client cluster BooleanState = 69 { } attribute(readonly, reportable) boolean stateValue = 0; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -360,7 +360,7 @@ client cluster BridgedActions = 37 { attribute(readonly, reportable) ActionStruct actionList[] = 0; attribute(readonly, reportable) EndpointListStruct endpointList[] = 1; attribute(readonly, reportable) long_char_string setupUrl = 2; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct DisableActionRequest { @@ -443,7 +443,7 @@ client cluster BridgedActions = 37 { } client cluster BridgedDeviceBasic = 57 { - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -466,7 +466,7 @@ client cluster Channel = 1284 { } attribute(readonly, reportable) ChannelInfo channelList[] = 0; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ChangeChannelByNumberRequestRequest { @@ -591,7 +591,7 @@ client cluster ColorControl = 768 { attribute(readonly, reportable) int16u colorTempPhysicalMax = 16396; attribute(readonly, reportable) int16u coupleColorTempToLevelMinMireds = 16397; attribute(writable, reportable) int16u startUpColorTemperatureMireds = 16400; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ColorLoopSetRequest { @@ -829,7 +829,7 @@ client cluster ContentLauncher = 1290 { attribute(readonly, reportable) CHAR_STRING acceptHeaderList[] = 0; attribute(writable, reportable) bitmap32 supportedStreamingProtocols = 1; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct LaunchContentRequestRequest { @@ -863,7 +863,7 @@ client cluster Descriptor = 29 { attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -887,7 +887,7 @@ client cluster DiagnosticLogs = 50 { kBdx = 1; } - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; request struct RetrieveLogsRequestRequest { LogsIntent intent = 0; @@ -1145,19 +1145,19 @@ client cluster DoorLock = 257 { attribute(readonly, reportable) DlLockType lockType = 1; attribute(readonly, reportable) boolean actuatorEnabled = 2; attribute(readonly, reportable) DlDoorState doorState = 3; - attribute(readonly) int16u numberOfTotalUsersSupported = 17; - attribute(readonly) int16u numberOfPINUsersSupported = 18; - attribute(readonly) int8u maxPINCodeLength = 23; - attribute(readonly) int8u minPINCodeLength = 24; + attribute(readonly, reportable) int16u numberOfTotalUsersSupported = 17; + attribute(readonly, reportable) int16u numberOfPINUsersSupported = 18; + attribute(readonly, reportable) int8u maxPINCodeLength = 23; + attribute(readonly, reportable) int8u minPINCodeLength = 24; attribute(writable, reportable) char_string language = 33; attribute(writable, reportable) int32u autoRelockTime = 35; attribute(writable, reportable) int8u soundVolume = 36; attribute(writable, reportable) DlOperatingMode operatingMode = 37; - attribute(readonly) bitmap16 supportedOperatingModes = 38; + attribute(readonly, reportable) bitmap16 supportedOperatingModes = 38; attribute(writable, reportable) boolean enableOneTouchLocking = 41; attribute(writable, reportable) boolean enablePrivacyModeButton = 43; attribute(writable, reportable) int8u wrongCodeEntryLimit = 48; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ClearCredentialRequest { @@ -1249,7 +1249,7 @@ client cluster ElectricalMeasurement = 2820 { attribute(readonly, reportable) int16s activePower = 1291; attribute(readonly, reportable) int16s activePowerMin = 1292; attribute(readonly, reportable) int16s activePowerMax = 1293; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -1276,8 +1276,8 @@ client cluster EthernetNetworkDiagnostics = 55 { attribute(readonly, reportable) int64u overrunCount = 6; attribute(readonly, reportable) boolean carrierDetect = 7; attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; @@ -1285,7 +1285,7 @@ client cluster EthernetNetworkDiagnostics = 55 { client cluster FixedLabel = 64 { attribute(readonly, reportable) LabelStruct labelList[] = 0; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -1294,7 +1294,7 @@ client cluster FlowMeasurement = 1028 { attribute(readonly, reportable) int16s minMeasuredValue = 1; attribute(readonly, reportable) int16s maxMeasuredValue = 2; attribute(readonly, reportable) int16u tolerance = 3; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -1318,9 +1318,9 @@ client cluster GeneralCommissioning = 48 { attribute(writable, reportable) int64u breadcrumb = 0; attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) enum8 regulatoryConfig = 2; + attribute(readonly, reportable) enum8 locationCapability = 3; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { @@ -1442,7 +1442,7 @@ client cluster GeneralDiagnostics = 51 { attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -1478,9 +1478,9 @@ client cluster GroupKeyManagement = 63 { attribute(readonly, reportable) GroupKey groupKeyMap[] = 0; attribute(readonly, reportable) GroupInfo groupTable[] = 1; - attribute(readonly) int16u maxGroupsPerFabric = 2; - attribute(readonly) int16u maxGroupKeysPerFabric = 3; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u maxGroupsPerFabric = 2; + attribute(readonly, reportable) int16u maxGroupKeysPerFabric = 3; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct KeySetReadRequest { @@ -1515,7 +1515,7 @@ client cluster GroupKeyManagement = 63 { client cluster Groups = 4 { attribute(readonly, reportable) bitmap8 nameSupport = 0; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AddGroupRequest { @@ -1594,7 +1594,7 @@ client cluster Identify = 3 { attribute(writable, reportable) int16u identifyTime = 0; attribute(readonly, reportable) enum8 identifyType = 1; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct IdentifyRequest { @@ -1626,7 +1626,7 @@ client cluster IlluminanceMeasurement = 1024 { attribute(readonly, reportable) int16u maxMeasuredValue = 2; attribute(readonly, reportable) int16u tolerance = 3; attribute(readonly, reportable) enum8 lightSensorType = 4; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -1726,7 +1726,7 @@ client cluster KeypadInput = 1289 { kInvalidKeyInCurrentState = 2; } - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct SendKeyRequestRequest { @@ -1765,8 +1765,8 @@ client cluster LevelControl = 8 { attribute(writable, reportable) int16u offTransitionTime = 19; attribute(writable, reportable) int8u defaultMoveRate = 20; attribute(writable, reportable) int8u startUpCurrentLevel = 16384; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct MoveRequest { @@ -1823,12 +1823,12 @@ client cluster LevelControl = 8 { } client cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute(writable, reportable) char_string activeLocale = 1; + attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; } client cluster LowPower = 1288 { - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; command Sleep(): DefaultSuccess = 0; @@ -1859,7 +1859,7 @@ client cluster MediaInput = 1287 { attribute(readonly, reportable) InputInfo mediaInputList[] = 0; attribute(readonly, reportable) int8u currentMediaInput = 1; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct RenameInputRequestRequest { @@ -1897,10 +1897,10 @@ client cluster MediaPlayback = 1286 { attribute(readonly, reportable) PlaybackStateEnum playbackState = 0; attribute(readonly, reportable) epoch_us startTime = 1; attribute(readonly, reportable) int64u duration = 2; - attribute(readonly) single playbackSpeed = 4; + attribute(readonly, reportable) single playbackSpeed = 4; attribute(readonly, reportable) int64u seekRangeEnd = 5; attribute(readonly, reportable) int64u seekRangeStart = 6; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct SeekRequestRequest { @@ -1944,7 +1944,7 @@ client cluster ModeSelect = 80 { attribute(writable, reportable) int8u onMode = 2; attribute(readonly, reportable) int8u startUpMode = 3; attribute(readonly, reportable) char_string description = 4; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ChangeToModeRequest { @@ -2004,14 +2004,14 @@ client cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) int8u maxNetworks = 0; + attribute(readonly, reportable) NetworkInfo networks[] = 1; + attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; + attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; + attribute(writable, reportable) boolean interfaceEnabled = 4; + attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly, reportable) octet_string lastNetworkID = 6; + attribute(readonly, reportable) int32u lastConnectErrorValue = 7; attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; @@ -2094,7 +2094,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { @@ -2195,7 +2195,7 @@ client cluster OtaSoftwareUpdateRequestor = 42 { attribute(readonly, reportable) boolean updatePossible = 1; attribute(readonly, reportable) OTAUpdateStateEnum updateState = 2; attribute(readonly, reportable) int8u updateStateProgress = 3; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AnnounceOtaProviderRequest { @@ -2213,7 +2213,7 @@ client cluster OccupancySensing = 1030 { attribute(readonly, reportable) bitmap8 occupancy = 0; attribute(readonly, reportable) enum8 occupancySensorType = 1; attribute(readonly, reportable) bitmap8 occupancySensorTypeBitmap = 2; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -2238,7 +2238,7 @@ client cluster OnOff = 6 { attribute(writable, reportable) int16u onTime = 16385; attribute(writable, reportable) int16u offWaitTime = 16386; attribute(writable, reportable) enum8 startUpOnOff = 16387; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; @@ -2264,7 +2264,7 @@ client cluster OnOff = 6 { client cluster OnOffSwitchConfiguration = 7 { attribute(readonly, reportable) enum8 switchType = 0; attribute(writable, reportable) enum8 switchActions = 16; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -2296,7 +2296,7 @@ client cluster OperationalCredentials = 62 { attribute(readonly, reportable) int8u commissionedFabrics = 3; attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AddNOCRequest { @@ -2381,22 +2381,22 @@ client cluster PowerSource = 47 { attribute(readonly, reportable) enum8 batteryChargeLevel = 14; attribute(readonly, reportable) ENUM8 activeBatteryFaults[] = 18; attribute(readonly, reportable) enum8 batteryChargeState = 26; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } client cluster PowerSourceConfiguration = 46 { - attribute(readonly) INT8U sources[] = 0; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + attribute(readonly, reportable) INT8U sources[] = 0; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; } client cluster PressureMeasurement = 1027 { attribute(readonly, reportable) int16s measuredValue = 0; attribute(readonly, reportable) int16s minMeasuredValue = 1; attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -2492,7 +2492,7 @@ client cluster PumpConfigurationAndControl = 512 { attribute(writable, reportable) enum8 operationMode = 32; attribute(writable, reportable) enum8 controlMode = 33; attribute(readonly, reportable) bitmap16 alarmMask = 34; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -2502,7 +2502,7 @@ client cluster RelativeHumidityMeasurement = 1029 { attribute(readonly, reportable) int16u minMeasuredValue = 1; attribute(readonly, reportable) int16u maxMeasuredValue = 2; attribute(readonly, reportable) int16u tolerance = 3; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -2518,7 +2518,7 @@ client cluster Scenes = 5 { attribute(readonly, reportable) int16u currentGroup = 2; attribute(readonly, reportable) boolean sceneValid = 3; attribute(readonly, reportable) bitmap8 nameSupport = 4; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct AddSceneRequest { @@ -2624,8 +2624,8 @@ client cluster SoftwareDiagnostics = 52 { attribute(readonly, reportable) int64u currentHeapFree = 1; attribute(readonly, reportable) int64u currentHeapUsed = 2; attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; command ResetWatermarks(): DefaultSuccess = 0; @@ -2665,7 +2665,7 @@ client cluster Switch = 59 { attribute(readonly, reportable) int8u numberOfPositions = 0; attribute(readonly, reportable) int8u currentPosition = 1; attribute(readonly, reportable) int8u multiPressMax = 2; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -2684,7 +2684,7 @@ client cluster TargetNavigator = 1285 { attribute(readonly, reportable) TargetInfo targetNavigatorList[] = 0; attribute(readonly, reportable) int8u currentNavigatorTarget = 1; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct NavigateTargetRequestRequest { @@ -2705,7 +2705,7 @@ client cluster TemperatureMeasurement = 1026 { attribute(readonly, reportable) int16s minMeasuredValue = 1; attribute(readonly, reportable) int16s maxMeasuredValue = 2; attribute(readonly, reportable) int16u tolerance = 3; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -2815,8 +2815,8 @@ client cluster TestCluster = 1295 { attribute(writable, reportable) int8s rangeRestrictedInt8s = 39; attribute(writable, reportable) int16u rangeRestrictedInt16u = 40; attribute(writable, reportable) int16s rangeRestrictedInt16s = 41; - attribute(readonly) LONG_OCTET_STRING listLongOctetString[] = 42; - attribute(writable) boolean timedWriteBoolean = 48; + attribute(readonly, reportable) LONG_OCTET_STRING listLongOctetString[] = 42; + attribute(writable, reportable) boolean timedWriteBoolean = 48; attribute(writable, reportable) boolean unsupported = 255; attribute(writable, reportable) boolean nullableBoolean = 32768; attribute(writable, reportable) bitmap8 nullableBitmap8 = 32769; @@ -2851,7 +2851,7 @@ client cluster TestCluster = 1295 { attribute(writable, reportable) int8s nullableRangeRestrictedInt8s = 32807; attribute(writable, reportable) int16u nullableRangeRestrictedInt16u = 32808; attribute(writable, reportable) int16s nullableRangeRestrictedInt16s = 32809; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; request struct SimpleStructEchoRequestRequest { @@ -2990,7 +2990,7 @@ client cluster Thermostat = 513 { attribute(readonly, reportable) enum8 startOfWeek = 32; attribute(readonly, reportable) int8u numberOfWeeklyTransitions = 33; attribute(readonly, reportable) int8u numberOfDailyTransitions = 34; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; @@ -3038,7 +3038,7 @@ client cluster ThermostatUserInterfaceConfiguration = 516 { attribute(writable, reportable) enum8 temperatureDisplayMode = 0; attribute(writable, reportable) enum8 keypadLockout = 1; attribute(writable, reportable) enum8 scheduleProgrammingVisibility = 2; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -3182,21 +3182,21 @@ client cluster ThreadNetworkDiagnostics = 53 { attribute(readonly, reportable) octet_string channelMask = 60; attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } client cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute(writable, reportable) LabelStruct labelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; } client cluster WakeOnLan = 1283 { attribute(readonly, reportable) char_string wakeOnLanMacAddress = 0; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) int16u clusterRevision = 65533; } @@ -3257,8 +3257,8 @@ client cluster WiFiNetworkDiagnostics = 54 { attribute(readonly, reportable) int32u packetUnicastTxCount = 10; attribute(readonly, reportable) int64u currentMaxRate = 11; attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; @@ -3283,7 +3283,7 @@ client cluster WindowCovering = 258 { attribute(readonly, reportable) int16u installedClosedLimitTilt = 19; attribute(writable, reportable) bitmap8 mode = 23; attribute(readonly, reportable) bitmap16 safetyStatus = 26; - attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) attrib_id attributeList[] = 65531; attribute(readonly, reportable) bitmap32 featureMap = 65532; attribute(readonly, reportable) int16u clusterRevision = 65533; diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 1d6753cc8be855..482e0223506022 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -145,7 +145,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -309,7 +309,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -557,7 +557,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -748,7 +748,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -860,7 +860,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -966,7 +966,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1217,7 +1217,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1232,7 +1232,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "3", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1344,7 +1344,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1471,7 +1471,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1555,7 +1555,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1596,7 +1596,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1652,7 +1652,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1667,7 +1667,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1861,7 +1861,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2207,7 +2207,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -2222,7 +2222,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2288,7 +2288,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2346,7 +2346,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2396,7 +2396,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2497,7 +2497,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2548,7 +2548,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2563,7 +2563,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2589,7 +2589,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2615,7 +2615,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2630,7 +2630,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2645,7 +2645,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3162,7 +3162,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3243,7 +3243,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3339,7 +3339,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3354,7 +3354,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3369,7 +3369,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3459,7 +3459,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3525,7 +3525,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3540,7 +3540,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3555,7 +3555,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3570,7 +3570,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3585,7 +3585,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3600,7 +3600,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3615,7 +3615,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3630,7 +3630,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3645,7 +3645,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3729,7 +3729,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3901,7 +3901,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3951,7 +3951,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4052,7 +4052,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4067,7 +4067,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4117,7 +4117,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5103,7 +5103,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5118,7 +5118,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x000F", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5389,7 +5389,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5404,7 +5404,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5454,7 +5454,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5630,7 +5630,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5645,7 +5645,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5712,7 +5712,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5824,7 +5824,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5931,7 +5931,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5946,7 +5946,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5961,7 +5961,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5976,7 +5976,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6224,7 +6224,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6371,7 +6371,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6386,7 +6386,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6401,7 +6401,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6483,7 +6483,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6534,7 +6534,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6549,7 +6549,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6616,7 +6616,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6767,7 +6767,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7048,7 +7048,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7063,7 +7063,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7078,7 +7078,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7093,7 +7093,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7108,7 +7108,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7183,7 +7183,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0xFFF6", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7258,7 +7258,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7652,7 +7652,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7811,7 +7811,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8253,7 +8253,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8678,7 +8678,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8805,7 +8805,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9805,7 +9805,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9947,7 +9947,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10074,7 +10074,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10231,7 +10231,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10358,7 +10358,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10485,7 +10485,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10597,7 +10597,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10791,7 +10791,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10847,7 +10847,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10993,7 +10993,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -11043,7 +11043,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -11123,7 +11123,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -11138,7 +11138,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -11268,7 +11268,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -11363,7 +11363,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -11378,7 +11378,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -11423,7 +11423,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -11438,7 +11438,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -11512,7 +11512,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -11583,7 +11583,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -11598,7 +11598,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -11648,7 +11648,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -11689,7 +11689,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -11739,7 +11739,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -11789,7 +11789,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -11847,7 +11847,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -11927,7 +11927,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -11985,7 +11985,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -12056,7 +12056,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -12122,7 +12122,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -12187,7 +12187,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -12202,7 +12202,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -12217,7 +12217,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -12258,7 +12258,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -12359,7 +12359,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -12404,7 +12404,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -12419,7 +12419,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -12485,7 +12485,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -12535,7 +12535,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -12721,7 +12721,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -13457,7 +13457,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -13472,7 +13472,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -13997,7 +13997,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -14229,7 +14229,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index 2f12f407473fb5..35460734475ca5 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -59,6 +59,43 @@ JNI_METHOD(jlong, AccessControlCluster, initWithDevice)(JNIEnv * env, jobject se return reinterpret_cast(cppCluster); } +JNI_METHOD(void, AccessControlCluster, subscribeClusterRevisionAttribute) +(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; + AccessControlCluster * 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::AccessControl::Attributes::ClusterRevision::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(); +} JNI_METHOD(jlong, AccountLoginCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; @@ -387,6 +424,123 @@ JNI_METHOD(void, AdministratorCommissioningCluster, revokeCommissioning) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, AdministratorCommissioningCluster, subscribeWindowStatusAttribute) +(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; + AdministratorCommissioningCluster * 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::AdministratorCommissioning::Attributes::WindowStatus::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, AdministratorCommissioningCluster, subscribeAdminFabricIndexAttribute) +(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; + AdministratorCommissioningCluster * 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::AdministratorCommissioning::Attributes::AdminFabricIndex::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), + CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, AdministratorCommissioningCluster, subscribeAdminVendorIdAttribute) +(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; + AdministratorCommissioningCluster * 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::AdministratorCommissioning::Attributes::AdminVendorId::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(); +} JNI_METHOD(void, AdministratorCommissioningCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -2204,6 +2358,42 @@ JNI_METHOD(void, BasicCluster, subscribeReachableAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, BasicCluster, subscribeUniqueIDAttribute) +(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; + BasicCluster * 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::Basic::Attributes::UniqueID::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), + CHIPCharStringAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, BasicCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -8159,24 +8349,18 @@ JNI_METHOD(void, DoorLockCluster, subscribeDoorStateAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, DoorLockCluster, writeLanguageAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, DoorLockCluster, subscribeNumberOfTotalUsersSupportedAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::Language::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = chip::JniUtfString(env, static_cast(value)).charSpan(); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -8187,31 +8371,27 @@ JNI_METHOD(void, DoorLockCluster, writeLanguageAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + 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)); + 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(); } -JNI_METHOD(void, DoorLockCluster, subscribeLanguageAttribute) +JNI_METHOD(void, DoorLockCluster, subscribeNumberOfPINUsersSupportedAttribute) (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); + 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)); @@ -8228,14 +8408,14 @@ JNI_METHOD(void, DoorLockCluster, subscribeLanguageAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::Language::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::NumberOfPINUsersSupported::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), - CHIPCharStringAttributeCallback::OnSubscriptionEstablished); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -8243,24 +8423,18 @@ JNI_METHOD(void, DoorLockCluster, subscribeLanguageAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, DoorLockCluster, writeAutoRelockTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, DoorLockCluster, subscribeMaxPINCodeLengthAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -8271,31 +8445,27 @@ JNI_METHOD(void, DoorLockCluster, writeAutoRelockTimeAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + 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)); + 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, DoorLockCluster, subscribeAutoRelockTimeAttribute) +JNI_METHOD(void, DoorLockCluster, subscribeMinPINCodeLengthAttribute) (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); + 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)); @@ -8312,7 +8482,175 @@ JNI_METHOD(void, DoorLockCluster, subscribeAutoRelockTimeAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::TypeInfo; + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::MinPINCodeLength::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, DoorLockCluster, writeLanguageAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::Language::TypeInfo; + TypeInfo::Type cppValue; + + cppValue = chip::JniUtfString(env, static_cast(value)).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, subscribeLanguageAttribute) +(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; + DoorLockCluster * 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::DoorLock::Attributes::Language::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), + CHIPCharStringAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to 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; + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::TypeInfo; + TypeInfo::Type cppValue; + + 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, subscribeAutoRelockTimeAttribute) +(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; + DoorLockCluster * 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::DoorLock::Attributes::AutoRelockTime::TypeInfo; auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); @@ -8495,6 +8833,43 @@ JNI_METHOD(void, DoorLockCluster, subscribeOperatingModeAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, DoorLockCluster, subscribeSupportedOperatingModesAttribute) +(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; + DoorLockCluster * 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::DoorLock::Attributes::SupportedOperatingModes::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(); +} JNI_METHOD(void, DoorLockCluster, writeEnableOneTouchLockingAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) @@ -9630,6 +10005,43 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeTimeSinceResetAttri onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeFeatureMapAttribute) +(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; + EthernetNetworkDiagnosticsCluster * 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::EthernetNetworkDiagnostics::Attributes::FeatureMap::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), + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -10156,12 +10568,12 @@ JNI_METHOD(void, GeneralCommissioningCluster, subscribeBreadcrumbAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GeneralCommissioningCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, GeneralCommissioningCluster, subscribeRegulatoryConfigAttribute) (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); + 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)); @@ -10178,14 +10590,14 @@ JNI_METHOD(void, GeneralCommissioningCluster, subscribeClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::GeneralCommissioning::Attributes::RegulatoryConfig::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); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -10193,21 +10605,96 @@ JNI_METHOD(void, GeneralCommissioningCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, GeneralDiagnosticsCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - GeneralDiagnosticsCluster * cppCluster = new GeneralDiagnosticsCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeRebootCountAttribute) +JNI_METHOD(void, GeneralCommissioningCluster, subscribeLocationCapabilityAttribute) (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); + 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; + GeneralCommissioningCluster * 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::GeneralCommissioning::Attributes::LocationCapability::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, GeneralCommissioningCluster, subscribeClusterRevisionAttribute) +(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; + GeneralCommissioningCluster * 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::GeneralCommissioning::Attributes::ClusterRevision::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(); +} +JNI_METHOD(jlong, GeneralDiagnosticsCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + GeneralDiagnosticsCluster * cppCluster = new GeneralDiagnosticsCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeRebootCountAttribute) +(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)); @@ -10592,6 +11079,81 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetWrite) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, GroupKeyManagementCluster, subscribeMaxGroupsPerFabricAttribute) +(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; + GroupKeyManagementCluster * 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::GroupKeyManagement::Attributes::MaxGroupsPerFabric::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(); +} +JNI_METHOD(void, GroupKeyManagementCluster, subscribeMaxGroupKeysPerFabricAttribute) +(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; + GroupKeyManagementCluster * 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::GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::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(); +} JNI_METHOD(void, GroupKeyManagementCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -12930,6 +13492,43 @@ JNI_METHOD(void, LevelControlCluster, subscribeStartUpCurrentLevelAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, LevelControlCluster, subscribeFeatureMapAttribute) +(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; + LevelControlCluster * 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::LevelControl::Attributes::FeatureMap::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), + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, LevelControlCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -13022,6 +13621,44 @@ JNI_METHOD(void, LocalizationConfigurationCluster, writeActiveLocaleAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, LocalizationConfigurationCluster, subscribeActiveLocaleAttribute) +(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; + LocalizationConfigurationCluster * 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::LocalizationConfiguration::Attributes::ActiveLocale::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), + CHIPCharStringAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(jlong, LowPowerCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; @@ -14010,12 +14647,12 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeDurationAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeEndAttribute) +JNI_METHOD(void, MediaPlaybackCluster, subscribePlaybackSpeedAttribute) (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); + 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)); @@ -14032,14 +14669,14 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeEndAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; + using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + CHIPFloatAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -14047,7 +14684,7 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeEndAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeStartAttribute) +JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeEndAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -14069,9 +14706,9 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeStartAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeStart::TypeInfo; + using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -14084,12 +14721,12 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeStartAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeStartAttribute) (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); + 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)); @@ -14106,14 +14743,14 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeStart::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -14121,12 +14758,49 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, ModeSelectCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(void, MediaPlaybackCluster, subscribeClusterRevisionAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - ModeSelectCluster * cppCluster = new ModeSelectCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + 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; + MediaPlaybackCluster * 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::MediaPlayback::Attributes::ClusterRevision::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(); +} +JNI_METHOD(jlong, ModeSelectCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + ModeSelectCluster * cppCluster = new ModeSelectCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } @@ -14709,40 +15383,306 @@ JNI_METHOD(void, NetworkCommissioningCluster, scanNetworks) 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)); - } + 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(); +} +JNI_METHOD(void, NetworkCommissioningCluster, subscribeMaxNetworksAttribute) +(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; + NetworkCommissioningCluster * 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::NetworkCommissioning::Attributes::MaxNetworks::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, NetworkCommissioningCluster, subscribeScanMaxTimeSecondsAttribute) +(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; + NetworkCommissioningCluster * 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::NetworkCommissioning::Attributes::ScanMaxTimeSeconds::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, NetworkCommissioningCluster, subscribeConnectMaxTimeSecondsAttribute) +(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; + NetworkCommissioningCluster * 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::NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::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, NetworkCommissioningCluster, writeInterfaceEnabledAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + TypeInfo::Type cppValue; + + 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, NetworkCommissioningCluster, subscribeInterfaceEnabledAttribute) +(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; + NetworkCommissioningCluster * 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::NetworkCommissioning::Attributes::InterfaceEnabled::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), + CHIPBooleanAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, NetworkCommissioningCluster, subscribeLastNetworkingStatusAttribute) +(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; + NetworkCommissioningCluster * 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::NetworkCommissioning::Attributes::LastNetworkingStatus::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, NetworkCommissioningCluster, subscribeLastNetworkIDAttribute) +(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; + NetworkCommissioningCluster * 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::NetworkCommissioning::Attributes::LastNetworkID::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, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, NetworkCommissioningCluster, writeInterfaceEnabledAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, NetworkCommissioningCluster, subscribeLastConnectErrorValueAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -14753,21 +15693,18 @@ JNI_METHOD(void, NetworkCommissioningCluster, writeInterfaceEnabledAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); @@ -17286,6 +18223,44 @@ JNI_METHOD(jlong, PowerSourceConfigurationCluster, initWithDevice)(JNIEnv * env, return reinterpret_cast(cppCluster); } +JNI_METHOD(void, PowerSourceConfigurationCluster, subscribeClusterRevisionAttribute) +(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; + PowerSourceConfigurationCluster * 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::PowerSourceConfiguration::Attributes::ClusterRevision::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(); +} JNI_METHOD(jlong, PressureMeasurementCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; @@ -19578,6 +20553,43 @@ JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeCurrentHeapHighWatermarkAt onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeFeatureMapAttribute) +(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; + SoftwareDiagnosticsCluster * 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::SoftwareDiagnostics::Attributes::FeatureMap::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), + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -24160,6 +25172,43 @@ JNI_METHOD(void, TestClusterCluster, writeTimedWriteBooleanAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, TestClusterCluster, subscribeTimedWriteBooleanAttribute) +(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; + TestClusterCluster * 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::TestCluster::Attributes::TimedWriteBoolean::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), + CHIPBooleanAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, TestClusterCluster, writeUnsupportedAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) @@ -31104,6 +32153,43 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeChannelMaskAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeFeatureMapAttribute) +(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; + ThreadNetworkDiagnosticsCluster * 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::ThreadNetworkDiagnostics::Attributes::FeatureMap::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), + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -31151,6 +32237,43 @@ JNI_METHOD(jlong, UserLabelCluster, initWithDevice)(JNIEnv * env, jobject self, return reinterpret_cast(cppCluster); } +JNI_METHOD(void, UserLabelCluster, subscribeClusterRevisionAttribute) +(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; + UserLabelCluster * 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::UserLabel::Attributes::ClusterRevision::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(); +} JNI_METHOD(jlong, WakeOnLanCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; @@ -31773,6 +32896,43 @@ JNI_METHOD(void, WiFiNetworkDiagnosticsCluster, subscribeOverrunCountAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, WiFiNetworkDiagnosticsCluster, subscribeFeatureMapAttribute) +(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; + WiFiNetworkDiagnosticsCluster * 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::WiFiNetworkDiagnostics::Attributes::FeatureMap::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), + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, WiFiNetworkDiagnosticsCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 8e6b06cf8870df..5fa206a49e25da 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -216,6 +216,11 @@ public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + private native void readAclAttribute(long chipClusterPtr, AclAttributeCallback callback); private native void readExtensionAttribute( @@ -226,6 +231,9 @@ private native void readAttributeListAttribute( private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeClusterRevisionAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); } public static class AccountLoginCluster extends BaseChipCluster { @@ -429,14 +437,29 @@ public void readWindowStatusAttribute(IntegerAttributeCallback callback) { readWindowStatusAttribute(chipClusterPtr, callback); } + public void subscribeWindowStatusAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeWindowStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readAdminFabricIndexAttribute(AdminFabricIndexAttributeCallback callback) { readAdminFabricIndexAttribute(chipClusterPtr, callback); } + public void subscribeAdminFabricIndexAttribute( + AdminFabricIndexAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAdminFabricIndexAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readAdminVendorIdAttribute(IntegerAttributeCallback callback) { readAdminVendorIdAttribute(chipClusterPtr, callback); } + public void subscribeAdminVendorIdAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAdminVendorIdAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { readAttributeListAttribute(chipClusterPtr, callback); } @@ -453,12 +476,24 @@ public void subscribeClusterRevisionAttribute( private native void readWindowStatusAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void subscribeWindowStatusAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readAdminFabricIndexAttribute( long chipClusterPtr, AdminFabricIndexAttributeCallback callback); + private native void subscribeAdminFabricIndexAttribute( + long chipClusterPtr, + AdminFabricIndexAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readAdminVendorIdAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void subscribeAdminVendorIdAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); @@ -1248,6 +1283,11 @@ public void readUniqueIDAttribute(CharStringAttributeCallback callback) { readUniqueIDAttribute(chipClusterPtr, callback); } + public void subscribeUniqueIDAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + subscribeUniqueIDAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { readAttributeListAttribute(chipClusterPtr, callback); } @@ -1423,6 +1463,12 @@ private native void subscribeReachableAttribute( private native void readUniqueIDAttribute( long chipClusterPtr, CharStringAttributeCallback callback); + private native void subscribeUniqueIDAttribute( + long chipClusterPtr, + CharStringAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); @@ -4837,18 +4883,40 @@ public void readNumberOfTotalUsersSupportedAttribute(IntegerAttributeCallback ca readNumberOfTotalUsersSupportedAttribute(chipClusterPtr, callback); } + public void subscribeNumberOfTotalUsersSupportedAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeNumberOfTotalUsersSupportedAttribute( + chipClusterPtr, callback, minInterval, maxInterval); + } + public void readNumberOfPINUsersSupportedAttribute(IntegerAttributeCallback callback) { readNumberOfPINUsersSupportedAttribute(chipClusterPtr, callback); } + public void subscribeNumberOfPINUsersSupportedAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeNumberOfPINUsersSupportedAttribute( + chipClusterPtr, callback, minInterval, maxInterval); + } + public void readMaxPINCodeLengthAttribute(IntegerAttributeCallback callback) { readMaxPINCodeLengthAttribute(chipClusterPtr, callback); } + public void subscribeMaxPINCodeLengthAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeMaxPINCodeLengthAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readMinPINCodeLengthAttribute(IntegerAttributeCallback callback) { readMinPINCodeLengthAttribute(chipClusterPtr, callback); } + public void subscribeMinPINCodeLengthAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeMinPINCodeLengthAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readLanguageAttribute(CharStringAttributeCallback callback) { readLanguageAttribute(chipClusterPtr, callback); } @@ -4925,6 +4993,11 @@ public void readSupportedOperatingModesAttribute(IntegerAttributeCallback callba readSupportedOperatingModesAttribute(chipClusterPtr, callback); } + public void subscribeSupportedOperatingModesAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeSupportedOperatingModesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readEnableOneTouchLockingAttribute(BooleanAttributeCallback callback) { readEnableOneTouchLockingAttribute(chipClusterPtr, callback); } @@ -5021,15 +5094,27 @@ private native void subscribeDoorStateAttribute( private native void readNumberOfTotalUsersSupportedAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void subscribeNumberOfTotalUsersSupportedAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readNumberOfPINUsersSupportedAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void subscribeNumberOfPINUsersSupportedAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readMaxPINCodeLengthAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void subscribeMaxPINCodeLengthAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readMinPINCodeLengthAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void subscribeMinPINCodeLengthAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readLanguageAttribute( long chipClusterPtr, CharStringAttributeCallback callback); @@ -5084,6 +5169,9 @@ private native void subscribeOperatingModeAttribute( private native void readSupportedOperatingModesAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void subscribeSupportedOperatingModesAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readEnableOneTouchLockingAttribute( long chipClusterPtr, BooleanAttributeCallback callback); @@ -5456,6 +5544,11 @@ public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -5525,6 +5618,9 @@ private native void readAttributeListAttribute( private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); + private native void subscribeFeatureMapAttribute( + long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -5883,10 +5979,20 @@ public void readRegulatoryConfigAttribute(IntegerAttributeCallback callback) { readRegulatoryConfigAttribute(chipClusterPtr, callback); } + public void subscribeRegulatoryConfigAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeRegulatoryConfigAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readLocationCapabilityAttribute(IntegerAttributeCallback callback) { readLocationCapabilityAttribute(chipClusterPtr, callback); } + public void subscribeLocationCapabilityAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeLocationCapabilityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { readAttributeListAttribute(chipClusterPtr, callback); } @@ -5918,9 +6024,15 @@ private native void readBasicCommissioningInfoListAttribute( private native void readRegulatoryConfigAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void subscribeRegulatoryConfigAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readLocationCapabilityAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void subscribeLocationCapabilityAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); @@ -6377,10 +6489,20 @@ public void readMaxGroupsPerFabricAttribute(IntegerAttributeCallback callback) { readMaxGroupsPerFabricAttribute(chipClusterPtr, callback); } + public void subscribeMaxGroupsPerFabricAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeMaxGroupsPerFabricAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readMaxGroupKeysPerFabricAttribute(IntegerAttributeCallback callback) { readMaxGroupKeysPerFabricAttribute(chipClusterPtr, callback); } + public void subscribeMaxGroupKeysPerFabricAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeMaxGroupKeysPerFabricAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { readAttributeListAttribute(chipClusterPtr, callback); } @@ -6403,9 +6525,15 @@ private native void readGroupTableAttribute( private native void readMaxGroupsPerFabricAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void subscribeMaxGroupsPerFabricAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readMaxGroupKeysPerFabricAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void subscribeMaxGroupKeysPerFabricAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); @@ -7430,6 +7558,11 @@ public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -7583,6 +7716,9 @@ private native void readAttributeListAttribute( private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); + private native void subscribeFeatureMapAttribute( + long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -7621,6 +7757,11 @@ public void writeActiveLocaleAttribute( writeActiveLocaleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } + public void subscribeActiveLocaleAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + subscribeActiveLocaleAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readSupportedLocalesAttribute(SupportedLocalesAttributeCallback callback) { readSupportedLocalesAttribute(chipClusterPtr, callback); } @@ -7634,6 +7775,12 @@ private native void writeActiveLocaleAttribute( String value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeActiveLocaleAttribute( + long chipClusterPtr, + CharStringAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readSupportedLocalesAttribute( long chipClusterPtr, SupportedLocalesAttributeCallback callback); } @@ -8068,6 +8215,11 @@ public void readPlaybackSpeedAttribute(FloatAttributeCallback callback) { readPlaybackSpeedAttribute(chipClusterPtr, callback); } + public void subscribePlaybackSpeedAttribute( + FloatAttributeCallback callback, int minInterval, int maxInterval) { + subscribePlaybackSpeedAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readSeekRangeEndAttribute(LongAttributeCallback callback) { readSeekRangeEndAttribute(chipClusterPtr, callback); } @@ -8118,6 +8270,9 @@ private native void subscribeDurationAttribute( private native void readPlaybackSpeedAttribute( long chipClusterPtr, FloatAttributeCallback callback); + private native void subscribePlaybackSpeedAttribute( + long chipClusterPtr, FloatAttributeCallback callback, int minInterval, int maxInterval); + private native void readSeekRangeEndAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -8516,6 +8671,11 @@ public void readMaxNetworksAttribute(IntegerAttributeCallback callback) { readMaxNetworksAttribute(chipClusterPtr, callback); } + public void subscribeMaxNetworksAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeMaxNetworksAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readNetworksAttribute(NetworksAttributeCallback callback) { readNetworksAttribute(chipClusterPtr, callback); } @@ -8524,10 +8684,20 @@ public void readScanMaxTimeSecondsAttribute(IntegerAttributeCallback callback) { readScanMaxTimeSecondsAttribute(chipClusterPtr, callback); } + public void subscribeScanMaxTimeSecondsAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeScanMaxTimeSecondsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readConnectMaxTimeSecondsAttribute(IntegerAttributeCallback callback) { readConnectMaxTimeSecondsAttribute(chipClusterPtr, callback); } + public void subscribeConnectMaxTimeSecondsAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeConnectMaxTimeSecondsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readInterfaceEnabledAttribute(BooleanAttributeCallback callback) { readInterfaceEnabledAttribute(chipClusterPtr, callback); } @@ -8541,18 +8711,38 @@ public void writeInterfaceEnabledAttribute( writeInterfaceEnabledAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } + public void subscribeInterfaceEnabledAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + subscribeInterfaceEnabledAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readLastNetworkingStatusAttribute(IntegerAttributeCallback callback) { readLastNetworkingStatusAttribute(chipClusterPtr, callback); } + public void subscribeLastNetworkingStatusAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeLastNetworkingStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readLastNetworkIDAttribute(OctetStringAttributeCallback callback) { readLastNetworkIDAttribute(chipClusterPtr, callback); } + public void subscribeLastNetworkIDAttribute( + OctetStringAttributeCallback callback, int minInterval, int maxInterval) { + subscribeLastNetworkIDAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readLastConnectErrorValueAttribute(LongAttributeCallback callback) { readLastConnectErrorValueAttribute(chipClusterPtr, callback); } + public void subscribeLastConnectErrorValueAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + subscribeLastConnectErrorValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -8574,15 +8764,24 @@ public void subscribeClusterRevisionAttribute( private native void readMaxNetworksAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void subscribeMaxNetworksAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readNetworksAttribute( long chipClusterPtr, NetworksAttributeCallback callback); private native void readScanMaxTimeSecondsAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void subscribeScanMaxTimeSecondsAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readConnectMaxTimeSecondsAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void subscribeConnectMaxTimeSecondsAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readInterfaceEnabledAttribute( long chipClusterPtr, BooleanAttributeCallback callback); @@ -8592,15 +8791,30 @@ private native void writeInterfaceEnabledAttribute( Boolean value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeInterfaceEnabledAttribute( + long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); + private native void readLastNetworkingStatusAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void subscribeLastNetworkingStatusAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readLastNetworkIDAttribute( long chipClusterPtr, OctetStringAttributeCallback callback); + private native void subscribeLastNetworkIDAttribute( + long chipClusterPtr, + OctetStringAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readLastConnectErrorValueAttribute( long chipClusterPtr, LongAttributeCallback callback); + private native void subscribeLastConnectErrorValueAttribute( + long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -10026,6 +10240,11 @@ public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + private native void readSourcesAttribute( long chipClusterPtr, SourcesAttributeCallback callback); @@ -10034,6 +10253,9 @@ private native void readAttributeListAttribute( private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeClusterRevisionAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); } public static class PressureMeasurementCluster extends BaseChipCluster { @@ -11170,6 +11392,11 @@ public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -11206,6 +11433,9 @@ private native void readAttributeListAttribute( private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); + private native void subscribeFeatureMapAttribute( + long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -13046,6 +13276,11 @@ public void writeTimedWriteBooleanAttribute( writeTimedWriteBooleanAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } + public void subscribeTimedWriteBooleanAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + subscribeTimedWriteBooleanAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readUnsupportedAttribute(BooleanAttributeCallback callback) { readUnsupportedAttribute(chipClusterPtr, callback); } @@ -14155,6 +14390,9 @@ private native void writeTimedWriteBooleanAttribute( Boolean value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeTimedWriteBooleanAttribute( + long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); + private native void readUnsupportedAttribute( long chipClusterPtr, BooleanAttributeCallback callback); @@ -16314,6 +16552,11 @@ public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -16699,6 +16942,9 @@ private native void readAttributeListAttribute( private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); + private native void subscribeFeatureMapAttribute( + long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -16756,11 +17002,19 @@ public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + private native void readLabelListAttribute( long chipClusterPtr, LabelListAttributeCallback callback); private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeClusterRevisionAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); } public static class WakeOnLanCluster extends BaseChipCluster { @@ -16978,6 +17232,11 @@ public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -17073,6 +17332,9 @@ private native void readAttributeListAttribute( private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); + private native void subscribeFeatureMapAttribute( + long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index bfb0bfdf93a3fe..8de36c229c3663 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -53,11 +53,13 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, "type": "int", + "reportable": True, }, }, } @@ -92,6 +94,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -136,21 +139,25 @@ class ChipClusters: "attributeName": "WindowStatus", "attributeId": 0x00000000, "type": "int", + "reportable": True, }, 0x00000001: { "attributeName": "AdminFabricIndex", "attributeId": 0x00000001, "type": "int", + "reportable": True, }, 0x00000002: { "attributeName": "AdminVendorId", "attributeId": 0x00000002, "type": "int", + "reportable": True, }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -194,6 +201,7 @@ class ChipClusters: "attributeName": "ApplicationApp", "attributeId": 0x00000004, "type": "", + "reportable": True, "writable": True, }, 0x00000005: { @@ -212,11 +220,13 @@ class ChipClusters: "attributeName": "AllowedVendorList", "attributeId": 0x00000007, "type": "int", + "reportable": True, }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -267,6 +277,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -313,6 +324,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -369,6 +381,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -505,11 +518,13 @@ class ChipClusters: "attributeName": "UniqueID", "attributeId": 0x00000012, "type": "str", + "reportable": True, }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -549,6 +564,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -588,6 +604,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -613,6 +630,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -751,6 +769,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -770,6 +789,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -817,6 +837,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -1366,6 +1387,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -1421,6 +1443,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -1464,6 +1487,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -1492,6 +1516,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, }, } @@ -1598,21 +1623,25 @@ class ChipClusters: "attributeName": "NumberOfTotalUsersSupported", "attributeId": 0x00000011, "type": "int", + "reportable": True, }, 0x00000012: { "attributeName": "NumberOfPINUsersSupported", "attributeId": 0x00000012, "type": "int", + "reportable": True, }, 0x00000017: { "attributeName": "MaxPINCodeLength", "attributeId": 0x00000017, "type": "int", + "reportable": True, }, 0x00000018: { "attributeName": "MinPINCodeLength", "attributeId": 0x00000018, "type": "int", + "reportable": True, }, 0x00000021: { "attributeName": "Language", @@ -1646,6 +1675,7 @@ class ChipClusters: "attributeName": "SupportedOperatingModes", "attributeId": 0x00000026, "type": "int", + "reportable": True, }, 0x00000029: { "attributeName": "EnableOneTouchLocking", @@ -1672,6 +1702,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -1757,6 +1788,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -1836,11 +1868,13 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFC: { "attributeName": "FeatureMap", "attributeId": 0x0000FFFC, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -1866,6 +1900,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -1909,6 +1944,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -1966,16 +2002,19 @@ class ChipClusters: "attributeName": "RegulatoryConfig", "attributeId": 0x00000002, "type": "int", + "reportable": True, }, 0x00000003: { "attributeName": "LocationCapability", "attributeId": 0x00000003, "type": "int", + "reportable": True, }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -2043,6 +2082,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -2109,16 +2149,19 @@ class ChipClusters: "attributeName": "MaxGroupsPerFabric", "attributeId": 0x00000002, "type": "int", + "reportable": True, }, 0x00000003: { "attributeName": "MaxGroupKeysPerFabric", "attributeId": 0x00000003, "type": "int", + "reportable": True, }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -2187,6 +2230,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -2240,6 +2284,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -2289,6 +2334,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -2315,6 +2361,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -2495,11 +2542,13 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFC: { "attributeName": "FeatureMap", "attributeId": 0x0000FFFC, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -2519,12 +2568,14 @@ class ChipClusters: "attributeName": "ActiveLocale", "attributeId": 0x00000001, "type": "str", + "reportable": True, "writable": True, }, 0x00000002: { "attributeName": "SupportedLocales", "attributeId": 0x00000002, "type": "str", + "reportable": True, }, }, } @@ -2544,6 +2595,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -2602,6 +2654,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -2708,6 +2761,7 @@ class ChipClusters: "attributeName": "PlaybackSpeed", "attributeId": 0x00000004, "type": "", + "reportable": True, }, 0x00000005: { "attributeName": "SeekRangeEnd", @@ -2725,6 +2779,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -2782,6 +2837,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -2851,42 +2907,50 @@ class ChipClusters: "attributeName": "MaxNetworks", "attributeId": 0x00000000, "type": "int", + "reportable": True, }, 0x00000001: { "attributeName": "Networks", "attributeId": 0x00000001, "type": "", + "reportable": True, }, 0x00000002: { "attributeName": "ScanMaxTimeSeconds", "attributeId": 0x00000002, "type": "int", + "reportable": True, }, 0x00000003: { "attributeName": "ConnectMaxTimeSeconds", "attributeId": 0x00000003, "type": "int", + "reportable": True, }, 0x00000004: { "attributeName": "InterfaceEnabled", "attributeId": 0x00000004, "type": "bool", + "reportable": True, "writable": True, }, 0x00000005: { "attributeName": "LastNetworkingStatus", "attributeId": 0x00000005, "type": "int", + "reportable": True, }, 0x00000006: { "attributeName": "LastNetworkID", "attributeId": 0x00000006, "type": "bytes", + "reportable": True, }, 0x00000007: { "attributeName": "LastConnectErrorValue", "attributeId": 0x00000007, "type": "int", + "reportable": True, }, 0x0000FFFC: { "attributeName": "FeatureMap", @@ -2942,6 +3006,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -2997,6 +3062,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -3034,6 +3100,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -3127,6 +3194,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFC: { "attributeName": "FeatureMap", @@ -3165,6 +3233,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -3282,6 +3351,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -3355,6 +3425,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFC: { "attributeName": "FeatureMap", @@ -3380,16 +3451,19 @@ class ChipClusters: "attributeName": "Sources", "attributeId": 0x00000000, "type": "int", + "reportable": True, }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, "type": "int", + "reportable": True, }, }, } @@ -3421,6 +3495,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -3588,6 +3663,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFC: { "attributeName": "FeatureMap", @@ -3637,6 +3713,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -3746,6 +3823,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -3795,11 +3873,13 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFC: { "attributeName": "FeatureMap", "attributeId": 0x0000FFFC, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -3837,6 +3917,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFC: { "attributeName": "FeatureMap", @@ -3882,6 +3963,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -3925,6 +4007,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -4398,11 +4481,13 @@ class ChipClusters: "attributeName": "ListLongOctetString", "attributeId": 0x0000002A, "type": "bytes", + "reportable": True, }, 0x00000030: { "attributeName": "TimedWriteBoolean", "attributeId": 0x00000030, "type": "bool", + "reportable": True, "writable": True, }, 0x000000FF: { @@ -4647,6 +4732,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -4815,6 +4901,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFC: { "attributeName": "FeatureMap", @@ -4861,6 +4948,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -5264,11 +5352,13 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFC: { "attributeName": "FeatureMap", "attributeId": 0x0000FFFC, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -5288,12 +5378,14 @@ class ChipClusters: "attributeName": "LabelList", "attributeId": 0x00000000, "type": "", + "reportable": True, "writable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, "type": "int", + "reportable": True, }, }, } @@ -5313,6 +5405,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -5416,11 +5509,13 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFC: { "attributeName": "FeatureMap", "attributeId": 0x0000FFFC, "type": "int", + "reportable": True, }, 0x0000FFFD: { "attributeName": "ClusterRevision", @@ -5597,6 +5692,7 @@ class ChipClusters: "attributeName": "AttributeList", "attributeId": 0x0000FFFB, "type": "int", + "reportable": True, }, 0x0000FFFC: { "attributeName": "FeatureMap", diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index 09c3c465d97229..cdacb751f2788a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -54,9 +54,19 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; @end @@ -75,6 +85,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -100,15 +115,35 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeWindowStatusWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeWindowStatusWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeAdminFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAdminFabricIndexWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeAdminVendorIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAdminVendorIdWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -173,9 +208,19 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAllowedVendorListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAllowedVendorListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -214,6 +259,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -254,6 +304,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -311,6 +366,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -474,9 +534,18 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeUniqueIDWithCompletionHandler:(void (^)( NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeUniqueIDWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -521,6 +590,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -543,6 +617,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -569,6 +648,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -634,6 +718,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -653,6 +742,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -687,6 +781,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -1165,6 +1264,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -1210,6 +1314,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -1257,6 +1366,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -1280,6 +1394,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; @end @@ -1338,15 +1457,37 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeNumberOfTotalUsersSupportedWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; - (void)readAttributeNumberOfPINUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeNumberOfPINUsersSupportedWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; - (void)readAttributeMaxPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMaxPINCodeLengthWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeMinPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMinPINCodeLengthWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeLanguageWithCompletionHandler:(void (^)( NSString * _Nullable value, NSError * _Nullable error))completionHandler; @@ -1384,6 +1525,12 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeSupportedOperatingModesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeSupportedOperatingModesWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; - (void)readAttributeEnableOneTouchLockingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -1419,6 +1566,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -1523,6 +1675,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -1613,9 +1770,18 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeFeatureMapWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -1642,6 +1808,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -1692,6 +1863,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -1738,12 +1914,27 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeRegulatoryConfigWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRegulatoryConfigWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeLocationCapabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeLocationCapabilityWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -1826,6 +2017,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -1870,12 +2066,28 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeMaxGroupsPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMaxGroupsPerFabricWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeMaxGroupKeysPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -1918,6 +2130,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -1960,6 +2177,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -2018,6 +2240,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -2041,6 +2268,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -2191,9 +2423,18 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeFeatureMapWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -2214,9 +2455,19 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)( NSString * _Nullable value, NSError * _Nullable error))completionHandler; - (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)subscribeAttributeActiveLocaleWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeSupportedLocalesWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; @end @@ -2230,6 +2481,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -2272,6 +2528,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -2339,6 +2600,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributePlaybackSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributePlaybackSpeedWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeSeekRangeEndWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -2358,6 +2624,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -2416,6 +2687,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -2454,28 +2730,68 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeMaxNetworksWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMaxNetworksWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeNetworksWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeNetworksWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeScanMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeScanMaxTimeSecondsWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeConnectMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeConnectMaxTimeSecondsWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeInterfaceEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)subscribeAttributeInterfaceEnabledWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeLastNetworkingStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeLastNetworkingStatusWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeLastNetworkIDWithCompletionHandler:(void (^)( NSData * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeLastNetworkIDWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeLastConnectErrorValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeLastConnectErrorValueWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -2511,6 +2827,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -2567,6 +2888,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -2611,6 +2937,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -2676,6 +3007,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -2718,6 +3054,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -2805,6 +3146,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -2894,6 +3240,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -2919,12 +3270,26 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPPowerSourceConfiguration : CHIPCluster - (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeSourcesWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; @end @@ -2960,6 +3325,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -3170,6 +3540,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -3227,6 +3602,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -3303,6 +3683,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -3357,9 +3742,18 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeFeatureMapWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -3403,6 +3797,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -3451,6 +3850,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -3501,6 +3905,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -3897,10 +4306,21 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeListLongOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeListLongOctetStringWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeTimedWriteBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)subscribeAttributeTimedWriteBooleanWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeUnsupportedWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -4213,6 +4633,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -4407,6 +4832,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -4464,6 +4894,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -4991,9 +5426,18 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeFeatureMapWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -5014,9 +5458,18 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeLabelListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)subscribeAttributeLabelListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; @end @@ -5037,6 +5490,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -5161,9 +5619,18 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeFeatureMapWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -5348,6 +5815,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 354fe085ca2132..1bbb2c9e8732a2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -267,6 +267,24 @@ new CHIPAccessControlAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPAccessControlAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPAccessControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -278,6 +296,24 @@ new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C }); } +- (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + @end @implementation CHIPAccountLogin @@ -352,6 +388,24 @@ new CHIPAccountLoginAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPAccountLoginAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPAccountLoginAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -461,6 +515,23 @@ new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca }); } +- (void)subscribeAttributeWindowStatusWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeAdminFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -472,6 +543,24 @@ new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca }); } +- (void)subscribeAttributeAdminFabricIndexWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeAdminVendorIdWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -483,6 +572,24 @@ new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C }); } +- (void)subscribeAttributeAdminVendorIdWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { @@ -495,6 +602,24 @@ new CHIPAdministratorCommissioningAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -718,6 +843,25 @@ new CHIPApplicationBasicAllowedVendorListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAllowedVendorListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { @@ -730,6 +874,24 @@ new CHIPApplicationBasicAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -864,6 +1026,24 @@ new CHIPApplicationLauncherAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -1013,6 +1193,24 @@ new CHIPAudioOutputAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPAudioOutputAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPAudioOutputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -1217,6 +1415,24 @@ new CHIPBarrierControlAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPBarrierControlAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPBarrierControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -1852,6 +2068,23 @@ new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, }); } +- (void)subscribeAttributeUniqueIDWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::UniqueID::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { @@ -1864,6 +2097,23 @@ new CHIPBasicAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPBasicAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -2034,6 +2284,24 @@ new CHIPBinaryInputBasicAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -2126,6 +2394,24 @@ new CHIPBindingAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPBindingAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPBindingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -2204,16 +2490,34 @@ new CHIPBooleanStateAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} + new CHIPBooleanStateAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPBooleanStateAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval @@ -2623,6 +2927,24 @@ new CHIPBridgedActionsAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPBridgedActionsAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedActions::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPBridgedActionsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -2673,6 +2995,24 @@ new CHIPBridgedDeviceBasicAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -2807,6 +3147,24 @@ new CHIPChannelAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPChannelAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPChannelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -5014,6 +5372,24 @@ new CHIPColorControlAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPColorControlAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPColorControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -5285,6 +5661,24 @@ new CHIPContentLauncherAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPContentLauncherAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPContentLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -5455,6 +5849,24 @@ new CHIPDescriptorAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPDescriptorAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPDescriptorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -5524,6 +5936,24 @@ new CHIPDiagnosticLogsAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + @end @implementation CHIPDoorLock @@ -5843,6 +6273,25 @@ new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C }); } +- (void)subscribeAttributeNumberOfTotalUsersSupportedWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeNumberOfPINUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -5854,6 +6303,25 @@ new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C }); } +- (void)subscribeAttributeNumberOfPINUsersSupportedWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeMaxPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -5865,6 +6333,24 @@ new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca }); } +- (void)subscribeAttributeMaxPINCodeLengthWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeMinPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -5876,6 +6362,24 @@ new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca }); } +- (void)subscribeAttributeMinPINCodeLengthWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeLanguageWithCompletionHandler:(void (^)( NSString * _Nullable value, NSError * _Nullable error))completionHandler { @@ -6075,6 +6579,25 @@ new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C }); } +- (void)subscribeAttributeSupportedOperatingModesWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeEnableOneTouchLockingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -6233,6 +6756,24 @@ new CHIPDoorLockAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPDoorLockAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPDoorLockAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -6599,6 +7140,24 @@ new CHIPElectricalMeasurementAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -6922,6 +7481,24 @@ new CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -6933,8 +7510,25 @@ new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; @@ -7013,6 +7607,24 @@ new CHIPFixedLabelAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPFixedLabelAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPFixedLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -7178,6 +7790,24 @@ new CHIPFlowMeasurementAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -7360,6 +7990,24 @@ new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca }); } +- (void)subscribeAttributeRegulatoryConfigWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeLocationCapabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -7371,6 +8019,24 @@ new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca }); } +- (void)subscribeAttributeLocationCapabilityWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { @@ -7383,6 +8049,24 @@ new CHIPGeneralCommissioningAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -7672,6 +8356,24 @@ new CHIPGeneralDiagnosticsAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -7881,6 +8583,24 @@ new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C }); } +- (void)subscribeAttributeMaxGroupsPerFabricWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeMaxGroupKeysPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -7892,6 +8612,25 @@ new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C }); } +- (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { @@ -7904,6 +8643,24 @@ new CHIPGroupKeyManagementAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -8105,6 +8862,24 @@ new CHIPGroupsAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPGroupsAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPGroupsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -8283,6 +9058,24 @@ new CHIPIdentifyAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPIdentifyAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPIdentifyAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -8481,6 +9274,24 @@ new CHIPIlluminanceMeasurementAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -8547,6 +9358,24 @@ new CHIPKeypadInputAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPKeypadInputAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPKeypadInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -9314,6 +10143,24 @@ new CHIPLevelControlAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPLevelControlAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPLevelControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -9325,6 +10172,23 @@ new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C }); } +- (void)subscribeAttributeFeatureMapWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -9392,6 +10256,23 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)subscribeAttributeActiveLocaleWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { @@ -9404,6 +10285,25 @@ new CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge( }); } +- (void)subscribeAttributeSupportedLocalesWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + @end @implementation CHIPLowPower @@ -9442,6 +10342,24 @@ new CHIPLowPowerAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPLowPowerAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPLowPowerAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -9625,6 +10543,24 @@ new CHIPMediaInputAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPMediaInputAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPMediaInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -9921,6 +10857,24 @@ new CHIPFloatAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca }); } +- (void)subscribeAttributePlaybackSpeedWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPFloatAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeSeekRangeEndWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -9990,6 +10944,24 @@ new CHIPMediaPlaybackAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -10219,6 +11191,24 @@ new CHIPModeSelectAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPModeSelectAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPModeSelectAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -10372,6 +11362,23 @@ new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca }); } +- (void)subscribeAttributeMaxNetworksWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeNetworksWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPNetworkCommissioningNetworksListAttributeCallbackBridge( @@ -10383,6 +11390,24 @@ new CHIPNetworkCommissioningNetworksListAttributeCallbackBridge( }); } +- (void)subscribeAttributeNetworksWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeScanMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -10394,6 +11419,24 @@ new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca }); } +- (void)subscribeAttributeScanMaxTimeSecondsWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeConnectMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -10405,6 +11448,25 @@ new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca }); } +- (void)subscribeAttributeConnectMaxTimeSecondsWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeInterfaceEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -10434,6 +11496,24 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)subscribeAttributeInterfaceEnabledWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeLastNetworkingStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -10447,6 +11527,28 @@ new CHIPNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBr }); } +- (void)subscribeAttributeLastNetworkingStatusWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeLastNetworkIDWithCompletionHandler:(void (^)( NSData * _Nullable value, NSError * _Nullable error))completionHandler { @@ -10459,6 +11561,23 @@ new CHIPOctetStringAttributeCallbackBridge( }); } +- (void)subscribeAttributeLastNetworkIDWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOctetStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeLastConnectErrorValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -10470,6 +11589,25 @@ new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C }); } +- (void)subscribeAttributeLastConnectErrorValueWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -10642,6 +11780,24 @@ new CHIPOtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPOtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -10886,6 +12042,24 @@ new CHIPOtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPOtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -11024,6 +12198,24 @@ new CHIPOccupancySensingAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOccupancySensingAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPOccupancySensingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -11377,6 +12569,23 @@ new CHIPOnOffAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOnOffAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPOnOffAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -11530,6 +12739,24 @@ new CHIPOnOffSwitchConfigurationAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPOnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -11894,6 +13121,24 @@ new CHIPOperationalCredentialsAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPOperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -12205,6 +13450,24 @@ new CHIPPowerSourceAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPowerSourceAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPPowerSourceAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -12282,6 +13545,24 @@ new CHIPPowerSourceConfigurationSourcesListAttributeCallbackBridge( }); } +- (void)subscribeAttributeSourcesWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { @@ -12294,6 +13575,24 @@ new CHIPPowerSourceConfigurationAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -12305,6 +13604,24 @@ new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C }); } +- (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + @end @implementation CHIPPressureMeasurement @@ -12413,6 +13730,24 @@ new CHIPPressureMeasurementAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -13233,6 +14568,24 @@ new CHIPPumpConfigurationAndControlAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -13426,6 +14779,24 @@ new CHIPRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -13762,6 +15133,24 @@ new CHIPScenesAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPScenesAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPScenesAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -13947,6 +15336,24 @@ new CHIPSoftwareDiagnosticsAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -13958,6 +15365,23 @@ new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C }); } +- (void)subscribeAttributeFeatureMapWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -14095,6 +15519,24 @@ new CHIPSwitchAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPSwitchAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPSwitchAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -14252,6 +15694,24 @@ new CHIPTargetNavigatorAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -14417,6 +15877,24 @@ new CHIPTemperatureMeasurementAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -17262,6 +18740,26 @@ new CHIPTestClusterListLongOctetStringListAttributeCallbackBridge( }); } +- (void)subscribeAttributeListLongOctetStringWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeTimedWriteBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -17292,6 +18790,24 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)subscribeAttributeTimedWriteBooleanWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeUnsupportedWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -19058,6 +20574,24 @@ new CHIPTestClusterAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPTestClusterAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPTestClusterAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -19893,6 +21427,24 @@ new CHIPThermostatAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPThermostatAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPThermostatAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -20117,6 +21669,26 @@ new CHIPThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBr }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -22024,6 +23596,24 @@ new CHIPThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -22035,6 +23625,23 @@ new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C }); } +- (void)subscribeAttributeFeatureMapWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -22125,6 +23732,23 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)subscribeAttributeLabelListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPUserLabelLabelListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPUserLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -22136,6 +23760,24 @@ new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C }); } +- (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + @end @implementation CHIPWakeOnLan @@ -22187,6 +23829,24 @@ new CHIPWakeOnLanAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -22629,6 +24289,24 @@ new CHIPWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -22640,6 +24318,23 @@ new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C }); } +- (void)subscribeAttributeFeatureMapWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -23373,6 +25068,24 @@ new CHIPWindowCoveringAttributeListListAttributeCallbackBridge( }); } +- (void)subscribeAttributeAttributeListWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 2dcb480bf0b253..693545450dfaea 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -4704,6 +4704,48 @@ class ReadAccessControlAttributeList : public ModelCommand } }; +class ReportAccessControlAttributeList : public ModelCommand +{ +public: + ReportAccessControlAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportAccessControlAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x001F) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::AccessControlCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("AccessControl.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -4734,6 +4776,45 @@ class ReadAccessControlClusterRevision : public ModelCommand } }; +class ReportAccessControlClusterRevision : public ModelCommand +{ +public: + ReportAccessControlClusterRevision() : ModelCommand("report") + { + AddArgument("attr-name", "cluster-revision"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportAccessControlClusterRevision() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x001F) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::AccessControlCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint16_t value) { LogValue("AccessControl.ClusterRevision report", 0, value); } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /*----------------------------------------------------------------------------*\ | Cluster AccountLogin | 0x050E | |------------------------------------------------------------------------------| @@ -4848,6 +4929,48 @@ class ReadAccountLoginAttributeList : public ModelCommand } }; +class ReportAccountLoginAttributeList : public ModelCommand +{ +public: + ReportAccountLoginAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportAccountLoginAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050E) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::AccountLoginCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("AccountLogin.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -5038,6 +5161,48 @@ class ReadAdministratorCommissioningWindowStatus : public ModelCommand } }; +class ReportAdministratorCommissioningWindowStatus : public ModelCommand +{ +public: + ReportAdministratorCommissioningWindowStatus() : ModelCommand("report") + { + AddArgument("attr-name", "window-status"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportAdministratorCommissioningWindowStatus() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x003C) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::AdministratorCommissioningCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint8_t value) + { + LogValue("AdministratorCommissioning.WindowStatus report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute AdminFabricIndex */ @@ -5068,6 +5233,48 @@ class ReadAdministratorCommissioningAdminFabricIndex : public ModelCommand } }; +class ReportAdministratorCommissioningAdminFabricIndex : public ModelCommand +{ +public: + ReportAdministratorCommissioningAdminFabricIndex() : ModelCommand("report") + { + AddArgument("attr-name", "admin-fabric-index"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportAdministratorCommissioningAdminFabricIndex() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x003C) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::AdministratorCommissioningCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, chip::FabricIndex value) + { + LogValue("AdministratorCommissioning.AdminFabricIndex report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute AdminVendorId */ @@ -5098,6 +5305,48 @@ class ReadAdministratorCommissioningAdminVendorId : public ModelCommand } }; +class ReportAdministratorCommissioningAdminVendorId : public ModelCommand +{ +public: + ReportAdministratorCommissioningAdminVendorId() : ModelCommand("report") + { + AddArgument("attr-name", "admin-vendor-id"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportAdministratorCommissioningAdminVendorId() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x003C) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::AdministratorCommissioningCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint16_t value) + { + LogValue("AdministratorCommissioning.AdminVendorId report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute AttributeList */ @@ -5128,6 +5377,48 @@ class ReadAdministratorCommissioningAttributeList : public ModelCommand } }; +class ReportAdministratorCommissioningAttributeList : public ModelCommand +{ +public: + ReportAdministratorCommissioningAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportAdministratorCommissioningAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x003C) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::AdministratorCommissioningCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("AdministratorCommissioning.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -5673,6 +5964,48 @@ class ReadApplicationBasicAllowedVendorList : public ModelCommand } }; +class ReportApplicationBasicAllowedVendorList : public ModelCommand +{ +public: + ReportApplicationBasicAllowedVendorList() : ModelCommand("report") + { + AddArgument("attr-name", "allowed-vendor-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportApplicationBasicAllowedVendorList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050D) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::ApplicationBasicCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("ApplicationBasic.AllowedVendorList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute AttributeList */ @@ -5703,6 +6036,48 @@ class ReadApplicationBasicAttributeList : public ModelCommand } }; +class ReportApplicationBasicAttributeList : public ModelCommand +{ +public: + ReportApplicationBasicAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportApplicationBasicAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050D) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::ApplicationBasicCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("ApplicationBasic.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -5963,6 +6338,48 @@ class ReadApplicationLauncherAttributeList : public ModelCommand } }; +class ReportApplicationLauncherAttributeList : public ModelCommand +{ +public: + ReportApplicationLauncherAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportApplicationLauncherAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050C) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::ApplicationLauncherCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("ApplicationLauncher.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -6272,6 +6689,48 @@ class ReadAudioOutputAttributeList : public ModelCommand } }; +class ReportAudioOutputAttributeList : public ModelCommand +{ +public: + ReportAudioOutputAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportAudioOutputAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050B) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::AudioOutputCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("AudioOutput.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -6709,6 +7168,48 @@ class ReadBarrierControlAttributeList : public ModelCommand } }; +class ReportBarrierControlAttributeList : public ModelCommand +{ +public: + ReportBarrierControlAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportBarrierControlAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0103) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::BarrierControlCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("BarrierControl.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -8468,6 +8969,45 @@ class ReadBasicUniqueID : public ModelCommand } }; +class ReportBasicUniqueID : public ModelCommand +{ +public: + ReportBasicUniqueID() : ModelCommand("report") + { + AddArgument("attr-name", "unique-id"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportBasicUniqueID() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0028) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::BasicCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, chip::CharSpan value) { LogValue("Basic.UniqueID report", 0, value); } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute AttributeList */ @@ -8498,6 +9038,48 @@ class ReadBasicAttributeList : public ModelCommand } }; +class ReportBasicAttributeList : public ModelCommand +{ +public: + ReportBasicAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportBasicAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0028) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::BasicCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("Basic.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -8871,6 +9453,48 @@ class ReadBinaryInputBasicAttributeList : public ModelCommand } }; +class ReportBinaryInputBasicAttributeList : public ModelCommand +{ +public: + ReportBinaryInputBasicAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportBinaryInputBasicAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x000F) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::BinaryInputBasicCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("BinaryInputBasic.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -9038,6 +9662,48 @@ class ReadBindingAttributeList : public ModelCommand } }; +class ReportBindingAttributeList : public ModelCommand +{ +public: + ReportBindingAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportBindingAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x001E) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::BindingCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("Binding.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -9292,6 +9958,48 @@ class ReadBooleanStateAttributeList : public ModelCommand } }; +class ReportBooleanStateAttributeList : public ModelCommand +{ +public: + ReportBooleanStateAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportBooleanStateAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0045) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::BooleanStateCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("BooleanState.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -10093,6 +10801,48 @@ class ReadBridgedActionsAttributeList : public ModelCommand } }; +class ReportBridgedActionsAttributeList : public ModelCommand +{ +public: + ReportBridgedActionsAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportBridgedActionsAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0025) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("BridgedActions.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -10204,6 +10954,48 @@ class ReadBridgedDeviceBasicAttributeList : public ModelCommand } }; +class ReportBridgedDeviceBasicAttributeList : public ModelCommand +{ +public: + ReportBridgedDeviceBasicAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportBridgedDeviceBasicAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0039) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("BridgedDeviceBasic.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -10468,6 +11260,48 @@ class ReadChannelAttributeList : public ModelCommand } }; +class ReportChannelAttributeList : public ModelCommand +{ +public: + ReportChannelAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportChannelAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0504) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::ChannelCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("Channel.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -15130,6 +15964,48 @@ class ReadColorControlAttributeList : public ModelCommand } }; +class ReportColorControlAttributeList : public ModelCommand +{ +public: + ReportColorControlAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportColorControlAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0300) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("ColorControl.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -15467,6 +16343,48 @@ class ReadContentLauncherAttributeList : public ModelCommand } }; +class ReportContentLauncherAttributeList : public ModelCommand +{ +public: + ReportContentLauncherAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportContentLauncherAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050A) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::ContentLauncherCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("ContentLauncher.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -15874,6 +16792,48 @@ class ReadDescriptorAttributeList : public ModelCommand } }; +class ReportDescriptorAttributeList : public ModelCommand +{ +public: + ReportDescriptorAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportDescriptorAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x001D) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::DescriptorCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("Descriptor.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -16013,6 +16973,48 @@ class ReadDiagnosticLogsAttributeList : public ModelCommand } }; +class ReportDiagnosticLogsAttributeList : public ModelCommand +{ +public: + ReportDiagnosticLogsAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportDiagnosticLogsAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0032) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::DiagnosticLogsCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("DiagnosticLogs.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /*----------------------------------------------------------------------------*\ | Cluster DoorLock | 0x0101 | |------------------------------------------------------------------------------| @@ -16937,6 +17939,45 @@ class ReadDoorLockNumberOfTotalUsersSupported : public ModelCommand } }; +class ReportDoorLockNumberOfTotalUsersSupported : public ModelCommand +{ +public: + ReportDoorLockNumberOfTotalUsersSupported() : ModelCommand("report") + { + AddArgument("attr-name", "number-of-total-users-supported"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportDoorLockNumberOfTotalUsersSupported() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0101) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::DoorLockCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint16_t value) { LogValue("DoorLock.NumberOfTotalUsersSupported report", 0, value); } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute NumberOfPINUsersSupported */ @@ -16967,6 +18008,45 @@ class ReadDoorLockNumberOfPINUsersSupported : public ModelCommand } }; +class ReportDoorLockNumberOfPINUsersSupported : public ModelCommand +{ +public: + ReportDoorLockNumberOfPINUsersSupported() : ModelCommand("report") + { + AddArgument("attr-name", "number-of-pinusers-supported"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportDoorLockNumberOfPINUsersSupported() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0101) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::DoorLockCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint16_t value) { LogValue("DoorLock.NumberOfPINUsersSupported report", 0, value); } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute MaxPINCodeLength */ @@ -16997,6 +18077,45 @@ class ReadDoorLockMaxPINCodeLength : public ModelCommand } }; +class ReportDoorLockMaxPINCodeLength : public ModelCommand +{ +public: + ReportDoorLockMaxPINCodeLength() : ModelCommand("report") + { + AddArgument("attr-name", "max-pincode-length"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportDoorLockMaxPINCodeLength() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0101) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::DoorLockCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint8_t value) { LogValue("DoorLock.MaxPINCodeLength report", 0, value); } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute MinPINCodeLength */ @@ -17027,6 +18146,45 @@ class ReadDoorLockMinPINCodeLength : public ModelCommand } }; +class ReportDoorLockMinPINCodeLength : public ModelCommand +{ +public: + ReportDoorLockMinPINCodeLength() : ModelCommand("report") + { + AddArgument("attr-name", "min-pincode-length"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportDoorLockMinPINCodeLength() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0101) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::DoorLockCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint8_t value) { LogValue("DoorLock.MinPINCodeLength report", 0, value); } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute Language */ @@ -17440,6 +18598,45 @@ class ReadDoorLockSupportedOperatingModes : public ModelCommand } }; +class ReportDoorLockSupportedOperatingModes : public ModelCommand +{ +public: + ReportDoorLockSupportedOperatingModes() : ModelCommand("report") + { + AddArgument("attr-name", "supported-operating-modes"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportDoorLockSupportedOperatingModes() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0101) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::DoorLockCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint16_t value) { LogValue("DoorLock.SupportedOperatingModes report", 0, value); } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute EnableOneTouchLocking */ @@ -17755,6 +18952,48 @@ class ReadDoorLockAttributeList : public ModelCommand } }; +class ReportDoorLockAttributeList : public ModelCommand +{ +public: + ReportDoorLockAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportDoorLockAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0101) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::DoorLockCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("DoorLock.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -18642,6 +19881,48 @@ class ReadElectricalMeasurementAttributeList : public ModelCommand } }; +class ReportElectricalMeasurementAttributeList : public ModelCommand +{ +public: + ReportElectricalMeasurementAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportElectricalMeasurementAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0B04) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("ElectricalMeasurement.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -19426,6 +20707,48 @@ class ReadEthernetNetworkDiagnosticsAttributeList : public ModelCommand } }; +class ReportEthernetNetworkDiagnosticsAttributeList : public ModelCommand +{ +public: + ReportEthernetNetworkDiagnosticsAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportEthernetNetworkDiagnosticsAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0037) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("EthernetNetworkDiagnostics.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute FeatureMap */ @@ -19456,6 +20779,48 @@ class ReadEthernetNetworkDiagnosticsFeatureMap : public ModelCommand } }; +class ReportEthernetNetworkDiagnosticsFeatureMap : public ModelCommand +{ +public: + ReportEthernetNetworkDiagnosticsFeatureMap() : ModelCommand("report") + { + AddArgument("attr-name", "feature-map"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportEthernetNetworkDiagnosticsFeatureMap() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0037) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint32_t value) + { + LogValue("EthernetNetworkDiagnostics.FeatureMap report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -19647,6 +21012,48 @@ class ReadFixedLabelAttributeList : public ModelCommand } }; +class ReportFixedLabelAttributeList : public ModelCommand +{ +public: + ReportFixedLabelAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportFixedLabelAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0040) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::FixedLabelCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("FixedLabel.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -20038,6 +21445,48 @@ class ReadFlowMeasurementAttributeList : public ModelCommand } }; +class ReportFlowMeasurementAttributeList : public ModelCommand +{ +public: + ReportFlowMeasurementAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportFlowMeasurementAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0404) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::FlowMeasurementCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("FlowMeasurement.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -20404,6 +21853,45 @@ class ReadGeneralCommissioningRegulatoryConfig : public ModelCommand } }; +class ReportGeneralCommissioningRegulatoryConfig : public ModelCommand +{ +public: + ReportGeneralCommissioningRegulatoryConfig() : ModelCommand("report") + { + AddArgument("attr-name", "regulatory-config"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportGeneralCommissioningRegulatoryConfig() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0030) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::GeneralCommissioningCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint8_t value) { LogValue("GeneralCommissioning.RegulatoryConfig report", 0, value); } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute LocationCapability */ @@ -20434,6 +21922,48 @@ class ReadGeneralCommissioningLocationCapability : public ModelCommand } }; +class ReportGeneralCommissioningLocationCapability : public ModelCommand +{ +public: + ReportGeneralCommissioningLocationCapability() : ModelCommand("report") + { + AddArgument("attr-name", "location-capability"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportGeneralCommissioningLocationCapability() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0030) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::GeneralCommissioningCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint8_t value) + { + LogValue("GeneralCommissioning.LocationCapability report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute AttributeList */ @@ -20464,6 +21994,48 @@ class ReadGeneralCommissioningAttributeList : public ModelCommand } }; +class ReportGeneralCommissioningAttributeList : public ModelCommand +{ +public: + ReportGeneralCommissioningAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportGeneralCommissioningAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0030) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::GeneralCommissioningCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("GeneralCommissioning.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -21450,6 +23022,48 @@ class ReadGeneralDiagnosticsAttributeList : public ModelCommand } }; +class ReportGeneralDiagnosticsAttributeList : public ModelCommand +{ +public: + ReportGeneralDiagnosticsAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportGeneralDiagnosticsAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0033) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::GeneralDiagnosticsCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("GeneralDiagnostics.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -21821,6 +23435,48 @@ class ReadGroupKeyManagementMaxGroupsPerFabric : public ModelCommand } }; +class ReportGroupKeyManagementMaxGroupsPerFabric : public ModelCommand +{ +public: + ReportGroupKeyManagementMaxGroupsPerFabric() : ModelCommand("report") + { + AddArgument("attr-name", "max-groups-per-fabric"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportGroupKeyManagementMaxGroupsPerFabric() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x003F) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::GroupKeyManagementCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint16_t value) + { + LogValue("GroupKeyManagement.MaxGroupsPerFabric report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute MaxGroupKeysPerFabric */ @@ -21851,6 +23507,48 @@ class ReadGroupKeyManagementMaxGroupKeysPerFabric : public ModelCommand } }; +class ReportGroupKeyManagementMaxGroupKeysPerFabric : public ModelCommand +{ +public: + ReportGroupKeyManagementMaxGroupKeysPerFabric() : ModelCommand("report") + { + AddArgument("attr-name", "max-group-keys-per-fabric"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportGroupKeyManagementMaxGroupKeysPerFabric() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x003F) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::GroupKeyManagementCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint16_t value) + { + LogValue("GroupKeyManagement.MaxGroupKeysPerFabric report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute AttributeList */ @@ -21881,6 +23579,48 @@ class ReadGroupKeyManagementAttributeList : public ModelCommand } }; +class ReportGroupKeyManagementAttributeList : public ModelCommand +{ +public: + ReportGroupKeyManagementAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportGroupKeyManagementAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x003F) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::GroupKeyManagementCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("GroupKeyManagement.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -22210,6 +23950,48 @@ class ReadGroupsAttributeList : public ModelCommand } }; +class ReportGroupsAttributeList : public ModelCommand +{ +public: + ReportGroupsAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportGroupsAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0004) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::GroupsCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("Groups.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -22561,6 +24343,48 @@ class ReadIdentifyAttributeList : public ModelCommand } }; +class ReportIdentifyAttributeList : public ModelCommand +{ +public: + ReportIdentifyAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportIdentifyAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0003) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::IdentifyCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("Identify.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -23034,6 +24858,48 @@ class ReadIlluminanceMeasurementAttributeList : public ModelCommand } }; +class ReportIlluminanceMeasurementAttributeList : public ModelCommand +{ +public: + ReportIlluminanceMeasurementAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportIlluminanceMeasurementAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0400) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::IlluminanceMeasurementCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("IlluminanceMeasurement.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -23174,6 +25040,48 @@ class ReadKeypadInputAttributeList : public ModelCommand } }; +class ReportKeypadInputAttributeList : public ModelCommand +{ +public: + ReportKeypadInputAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportKeypadInputAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0509) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::KeypadInputCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("KeypadInput.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -24678,6 +26586,48 @@ class ReadLevelControlAttributeList : public ModelCommand } }; +class ReportLevelControlAttributeList : public ModelCommand +{ +public: + ReportLevelControlAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportLevelControlAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("LevelControl.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute FeatureMap */ @@ -24708,6 +26658,45 @@ class ReadLevelControlFeatureMap : public ModelCommand } }; +class ReportLevelControlFeatureMap : public ModelCommand +{ +public: + ReportLevelControlFeatureMap() : ModelCommand("report") + { + AddArgument("attr-name", "feature-map"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportLevelControlFeatureMap() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint32_t value) { LogValue("LevelControl.FeatureMap report", 0, value); } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -24845,6 +26834,48 @@ class WriteLocalizationConfigurationActiveLocale : public ModelCommand chip::CharSpan mValue; }; +class ReportLocalizationConfigurationActiveLocale : public ModelCommand +{ +public: + ReportLocalizationConfigurationActiveLocale() : ModelCommand("report") + { + AddArgument("attr-name", "active-locale"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportLocalizationConfigurationActiveLocale() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x002B) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::LocalizationConfigurationCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, chip::CharSpan value) + { + LogValue("LocalizationConfiguration.ActiveLocale report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute SupportedLocales */ @@ -24875,6 +26906,48 @@ class ReadLocalizationConfigurationSupportedLocales : public ModelCommand } }; +class ReportLocalizationConfigurationSupportedLocales : public ModelCommand +{ +public: + ReportLocalizationConfigurationSupportedLocales() : ModelCommand("report") + { + AddArgument("attr-name", "supported-locales"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportLocalizationConfigurationSupportedLocales() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x002B) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::LocalizationConfigurationCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("LocalizationConfiguration.SupportedLocales report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /*----------------------------------------------------------------------------*\ | Cluster LowPower | 0x0508 | |------------------------------------------------------------------------------| @@ -24938,6 +27011,48 @@ class ReadLowPowerAttributeList : public ModelCommand } }; +class ReportLowPowerAttributeList : public ModelCommand +{ +public: + ReportLowPowerAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportLowPowerAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0508) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::LowPowerCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("LowPower.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -25289,6 +27404,48 @@ class ReadMediaInputAttributeList : public ModelCommand } }; +class ReportMediaInputAttributeList : public ModelCommand +{ +public: + ReportMediaInputAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportMediaInputAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0507) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::MediaInputCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("MediaInput.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -25859,6 +28016,45 @@ class ReadMediaPlaybackPlaybackSpeed : public ModelCommand } }; +class ReportMediaPlaybackPlaybackSpeed : public ModelCommand +{ +public: + ReportMediaPlaybackPlaybackSpeed() : ModelCommand("report") + { + AddArgument("attr-name", "playback-speed"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportMediaPlaybackPlaybackSpeed() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0506) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, float value) { LogValue("MediaPlayback.PlaybackSpeed report", 0, value); } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute SeekRangeEnd */ @@ -26027,6 +28223,48 @@ class ReadMediaPlaybackAttributeList : public ModelCommand } }; +class ReportMediaPlaybackAttributeList : public ModelCommand +{ +public: + ReportMediaPlaybackAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportMediaPlaybackAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0506) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("MediaPlayback.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -26548,6 +28786,48 @@ class ReadModeSelectAttributeList : public ModelCommand } }; +class ReportModeSelectAttributeList : public ModelCommand +{ +public: + ReportModeSelectAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportModeSelectAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0050) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::ModeSelectCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("ModeSelect.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -26825,6 +29105,45 @@ class ReadNetworkCommissioningMaxNetworks : public ModelCommand } }; +class ReportNetworkCommissioningMaxNetworks : public ModelCommand +{ +public: + ReportNetworkCommissioningMaxNetworks() : ModelCommand("report") + { + AddArgument("attr-name", "max-networks"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportNetworkCommissioningMaxNetworks() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0031) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::NetworkCommissioningCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint8_t value) { LogValue("NetworkCommissioning.MaxNetworks report", 0, value); } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute Networks */ @@ -26858,6 +29177,51 @@ class ReadNetworkCommissioningNetworks : public ModelCommand } }; +class ReportNetworkCommissioningNetworks : public ModelCommand +{ +public: + ReportNetworkCommissioningNetworks() : ModelCommand("report") + { + AddArgument("attr-name", "networks"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportNetworkCommissioningNetworks() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0031) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::NetworkCommissioningCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport( + void * context, + const chip::app::DataModel::DecodableList & + value) + { + LogValue("NetworkCommissioning.Networks report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ScanMaxTimeSeconds */ @@ -26888,6 +29252,48 @@ class ReadNetworkCommissioningScanMaxTimeSeconds : public ModelCommand } }; +class ReportNetworkCommissioningScanMaxTimeSeconds : public ModelCommand +{ +public: + ReportNetworkCommissioningScanMaxTimeSeconds() : ModelCommand("report") + { + AddArgument("attr-name", "scan-max-time-seconds"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportNetworkCommissioningScanMaxTimeSeconds() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0031) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::NetworkCommissioningCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint8_t value) + { + LogValue("NetworkCommissioning.ScanMaxTimeSeconds report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ConnectMaxTimeSeconds */ @@ -26918,6 +29324,48 @@ class ReadNetworkCommissioningConnectMaxTimeSeconds : public ModelCommand } }; +class ReportNetworkCommissioningConnectMaxTimeSeconds : public ModelCommand +{ +public: + ReportNetworkCommissioningConnectMaxTimeSeconds() : ModelCommand("report") + { + AddArgument("attr-name", "connect-max-time-seconds"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportNetworkCommissioningConnectMaxTimeSeconds() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0031) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::NetworkCommissioningCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint8_t value) + { + LogValue("NetworkCommissioning.ConnectMaxTimeSeconds report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute InterfaceEnabled */ @@ -26974,6 +29422,45 @@ class WriteNetworkCommissioningInterfaceEnabled : public ModelCommand bool mValue; }; +class ReportNetworkCommissioningInterfaceEnabled : public ModelCommand +{ +public: + ReportNetworkCommissioningInterfaceEnabled() : ModelCommand("report") + { + AddArgument("attr-name", "interface-enabled"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportNetworkCommissioningInterfaceEnabled() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0031) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::NetworkCommissioningCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, bool value) { LogValue("NetworkCommissioning.InterfaceEnabled report", 0, value); } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute LastNetworkingStatus */ @@ -27004,6 +29491,48 @@ class ReadNetworkCommissioningLastNetworkingStatus : public ModelCommand } }; +class ReportNetworkCommissioningLastNetworkingStatus : public ModelCommand +{ +public: + ReportNetworkCommissioningLastNetworkingStatus() : ModelCommand("report") + { + AddArgument("attr-name", "last-networking-status"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportNetworkCommissioningLastNetworkingStatus() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0031) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::NetworkCommissioningCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, chip::app::Clusters::NetworkCommissioning::NetworkCommissioningStatus value) + { + LogValue("NetworkCommissioning.LastNetworkingStatus report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute LastNetworkID */ @@ -27034,6 +29563,48 @@ class ReadNetworkCommissioningLastNetworkID : public ModelCommand } }; +class ReportNetworkCommissioningLastNetworkID : public ModelCommand +{ +public: + ReportNetworkCommissioningLastNetworkID() : ModelCommand("report") + { + AddArgument("attr-name", "last-network-id"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportNetworkCommissioningLastNetworkID() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0031) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::NetworkCommissioningCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, chip::ByteSpan value) + { + LogValue("NetworkCommissioning.LastNetworkID report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute LastConnectErrorValue */ @@ -27064,6 +29635,48 @@ class ReadNetworkCommissioningLastConnectErrorValue : public ModelCommand } }; +class ReportNetworkCommissioningLastConnectErrorValue : public ModelCommand +{ +public: + ReportNetworkCommissioningLastConnectErrorValue() : ModelCommand("report") + { + AddArgument("attr-name", "last-connect-error-value"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportNetworkCommissioningLastConnectErrorValue() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0031) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::NetworkCommissioningCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint32_t value) + { + LogValue("NetworkCommissioning.LastConnectErrorValue report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute FeatureMap */ @@ -27328,6 +29941,48 @@ class ReadOtaSoftwareUpdateProviderAttributeList : public ModelCommand } }; +class ReportOtaSoftwareUpdateProviderAttributeList : public ModelCommand +{ +public: + ReportOtaSoftwareUpdateProviderAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportOtaSoftwareUpdateProviderAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0029) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::OtaSoftwareUpdateProviderCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("OtaSoftwareUpdateProvider.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -27996,6 +30651,48 @@ class ReadOtaSoftwareUpdateRequestorAttributeList : public ModelCommand } }; +class ReportOtaSoftwareUpdateRequestorAttributeList : public ModelCommand +{ +public: + ReportOtaSoftwareUpdateRequestorAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportOtaSoftwareUpdateRequestorAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x002A) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::OtaSoftwareUpdateRequestorCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("OtaSoftwareUpdateRequestor.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -28323,6 +31020,48 @@ class ReadOccupancySensingAttributeList : public ModelCommand } }; +class ReportOccupancySensingAttributeList : public ModelCommand +{ +public: + ReportOccupancySensingAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportOccupancySensingAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0406) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::OccupancySensingCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("OccupancySensing.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -29003,6 +31742,48 @@ class ReadOnOffAttributeList : public ModelCommand } }; +class ReportOnOffAttributeList : public ModelCommand +{ +public: + ReportOnOffAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportOnOffAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0006) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::OnOffCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("OnOff.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute FeatureMap */ @@ -29352,6 +32133,48 @@ class ReadOnOffSwitchConfigurationAttributeList : public ModelCommand } }; +class ReportOnOffSwitchConfigurationAttributeList : public ModelCommand +{ +public: + ReportOnOffSwitchConfigurationAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportOnOffSwitchConfigurationAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0007) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::OnOffSwitchConfigurationCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("OnOffSwitchConfiguration.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -30067,6 +32890,48 @@ class ReadOperationalCredentialsAttributeList : public ModelCommand } }; +class ReportOperationalCredentialsAttributeList : public ModelCommand +{ +public: + ReportOperationalCredentialsAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportOperationalCredentialsAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x003E) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::OperationalCredentialsCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("OperationalCredentials.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -30815,6 +33680,48 @@ class ReadPowerSourceAttributeList : public ModelCommand } }; +class ReportPowerSourceAttributeList : public ModelCommand +{ +public: + ReportPowerSourceAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportPowerSourceAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x002F) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("PowerSource.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute FeatureMap */ @@ -30996,6 +33903,48 @@ class ReadPowerSourceConfigurationSources : public ModelCommand } }; +class ReportPowerSourceConfigurationSources : public ModelCommand +{ +public: + ReportPowerSourceConfigurationSources() : ModelCommand("report") + { + AddArgument("attr-name", "sources"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportPowerSourceConfigurationSources() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x002E) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::PowerSourceConfigurationCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("PowerSourceConfiguration.Sources report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute AttributeList */ @@ -31026,6 +33975,48 @@ class ReadPowerSourceConfigurationAttributeList : public ModelCommand } }; +class ReportPowerSourceConfigurationAttributeList : public ModelCommand +{ +public: + ReportPowerSourceConfigurationAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportPowerSourceConfigurationAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x002E) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::PowerSourceConfigurationCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("PowerSourceConfiguration.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -31056,6 +34047,48 @@ class ReadPowerSourceConfigurationClusterRevision : public ModelCommand } }; +class ReportPowerSourceConfigurationClusterRevision : public ModelCommand +{ +public: + ReportPowerSourceConfigurationClusterRevision() : ModelCommand("report") + { + AddArgument("attr-name", "cluster-revision"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportPowerSourceConfigurationClusterRevision() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x002E) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::PowerSourceConfigurationCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint16_t value) + { + LogValue("PowerSourceConfiguration.ClusterRevision report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /*----------------------------------------------------------------------------*\ | Cluster PressureMeasurement | 0x0403 | |------------------------------------------------------------------------------| @@ -31308,6 +34341,48 @@ class ReadPressureMeasurementAttributeList : public ModelCommand } }; +class ReportPressureMeasurementAttributeList : public ModelCommand +{ +public: + ReportPressureMeasurementAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportPressureMeasurementAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0403) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::PressureMeasurementCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("PressureMeasurement.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -34540,6 +37615,48 @@ class ReadPumpConfigurationAndControlAttributeList : public ModelCommand } }; +class ReportPumpConfigurationAndControlAttributeList : public ModelCommand +{ +public: + ReportPumpConfigurationAndControlAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportPumpConfigurationAndControlAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0200) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("PumpConfigurationAndControl.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute FeatureMap */ @@ -35018,6 +38135,48 @@ class ReadRelativeHumidityMeasurementAttributeList : public ModelCommand } }; +class ReportRelativeHumidityMeasurementAttributeList : public ModelCommand +{ +public: + ReportRelativeHumidityMeasurementAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportRelativeHumidityMeasurementAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0405) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::RelativeHumidityMeasurementCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("RelativeHumidityMeasurement.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -35666,6 +38825,48 @@ class ReadScenesAttributeList : public ModelCommand } }; +class ReportScenesAttributeList : public ModelCommand +{ +public: + ReportScenesAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportScenesAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0005) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::ScenesCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("Scenes.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -36165,6 +39366,48 @@ class ReadSoftwareDiagnosticsAttributeList : public ModelCommand } }; +class ReportSoftwareDiagnosticsAttributeList : public ModelCommand +{ +public: + ReportSoftwareDiagnosticsAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportSoftwareDiagnosticsAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0034) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::SoftwareDiagnosticsCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("SoftwareDiagnostics.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute FeatureMap */ @@ -36195,6 +39438,45 @@ class ReadSoftwareDiagnosticsFeatureMap : public ModelCommand } }; +class ReportSoftwareDiagnosticsFeatureMap : public ModelCommand +{ +public: + ReportSoftwareDiagnosticsFeatureMap() : ModelCommand("report") + { + AddArgument("attr-name", "feature-map"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportSoftwareDiagnosticsFeatureMap() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0034) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::SoftwareDiagnosticsCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint32_t value) { LogValue("SoftwareDiagnostics.FeatureMap report", 0, value); } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -37022,6 +40304,48 @@ class ReadSwitchAttributeList : public ModelCommand } }; +class ReportSwitchAttributeList : public ModelCommand +{ +public: + ReportSwitchAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportSwitchAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x003B) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::SwitchCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("Switch.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute FeatureMap */ @@ -37378,6 +40702,48 @@ class ReadTargetNavigatorAttributeList : public ModelCommand } }; +class ReportTargetNavigatorAttributeList : public ModelCommand +{ +public: + ReportTargetNavigatorAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportTargetNavigatorAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0505) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::TargetNavigatorCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("TargetNavigator.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -37775,6 +41141,48 @@ class ReadTemperatureMeasurementAttributeList : public ModelCommand } }; +class ReportTemperatureMeasurementAttributeList : public ModelCommand +{ +public: + ReportTemperatureMeasurementAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportTemperatureMeasurementAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0402) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::TemperatureMeasurementCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("TemperatureMeasurement.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -42291,6 +45699,48 @@ class ReadTestClusterListLongOctetString : public ModelCommand } }; +class ReportTestClusterListLongOctetString : public ModelCommand +{ +public: + ReportTestClusterListLongOctetString() : ModelCommand("report") + { + AddArgument("attr-name", "list-long-octet-string"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportTestClusterListLongOctetString() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("TestCluster.ListLongOctetString report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute TimedWriteBoolean */ @@ -42347,6 +45797,45 @@ class WriteTestClusterTimedWriteBoolean : public ModelCommand bool mValue; }; +class ReportTestClusterTimedWriteBoolean : public ModelCommand +{ +public: + ReportTestClusterTimedWriteBoolean() : ModelCommand("report") + { + AddArgument("attr-name", "timed-write-boolean"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportTestClusterTimedWriteBoolean() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, bool value) { LogValue("TestCluster.TimedWriteBoolean report", 0, value); } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute Unsupported */ @@ -45610,6 +49099,48 @@ class ReadTestClusterAttributeList : public ModelCommand } }; +class ReportTestClusterAttributeList : public ModelCommand +{ +public: + ReportTestClusterAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportTestClusterAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("TestCluster.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -47275,6 +50806,48 @@ class ReadThermostatAttributeList : public ModelCommand } }; +class ReportThermostatAttributeList : public ModelCommand +{ +public: + ReportThermostatAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportThermostatAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0201) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("Thermostat.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute FeatureMap */ @@ -47763,6 +51336,49 @@ class ReadThermostatUserInterfaceConfigurationAttributeList : public ModelComman } }; +class ReportThermostatUserInterfaceConfigurationAttributeList : public ModelCommand +{ +public: + ReportThermostatUserInterfaceConfigurationAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportThermostatUserInterfaceConfigurationAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0204) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster + .SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("ThermostatUserInterfaceConfiguration.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -52591,6 +56207,48 @@ class ReadThreadNetworkDiagnosticsAttributeList : public ModelCommand } }; +class ReportThreadNetworkDiagnosticsAttributeList : public ModelCommand +{ +public: + ReportThreadNetworkDiagnosticsAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportThreadNetworkDiagnosticsAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0035) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("ThreadNetworkDiagnostics.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute FeatureMap */ @@ -52621,6 +56279,45 @@ class ReadThreadNetworkDiagnosticsFeatureMap : public ModelCommand } }; +class ReportThreadNetworkDiagnosticsFeatureMap : public ModelCommand +{ +public: + ReportThreadNetworkDiagnosticsFeatureMap() : ModelCommand("report") + { + AddArgument("attr-name", "feature-map"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportThreadNetworkDiagnosticsFeatureMap() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0035) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint32_t value) { LogValue("ThreadNetworkDiagnostics.FeatureMap report", 0, value); } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -52737,6 +56434,50 @@ class ReadUserLabelLabelList : public ModelCommand } }; +class ReportUserLabelLabelList : public ModelCommand +{ +public: + ReportUserLabelLabelList() : ModelCommand("report") + { + AddArgument("attr-name", "label-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportUserLabelLabelList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0041) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::UserLabelCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport( + void * context, + const chip::app::DataModel::DecodableList & value) + { + LogValue("UserLabel.LabelList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -52767,6 +56508,45 @@ class ReadUserLabelClusterRevision : public ModelCommand } }; +class ReportUserLabelClusterRevision : public ModelCommand +{ +public: + ReportUserLabelClusterRevision() : ModelCommand("report") + { + AddArgument("attr-name", "cluster-revision"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportUserLabelClusterRevision() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0041) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::UserLabelCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint16_t value) { LogValue("UserLabel.ClusterRevision report", 0, value); } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /*----------------------------------------------------------------------------*\ | Cluster WakeOnLan | 0x0503 | |------------------------------------------------------------------------------| @@ -52879,6 +56659,48 @@ class ReadWakeOnLanAttributeList : public ModelCommand } }; +class ReportWakeOnLanAttributeList : public ModelCommand +{ +public: + ReportWakeOnLanAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportWakeOnLanAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0503) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::WakeOnLanCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("WakeOnLan.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -54165,6 +57987,48 @@ class ReadWiFiNetworkDiagnosticsAttributeList : public ModelCommand } }; +class ReportWiFiNetworkDiagnosticsAttributeList : public ModelCommand +{ +public: + ReportWiFiNetworkDiagnosticsAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportWiFiNetworkDiagnosticsAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0036) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("WiFiNetworkDiagnostics.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute FeatureMap */ @@ -54195,6 +58059,45 @@ class ReadWiFiNetworkDiagnosticsFeatureMap : public ModelCommand } }; +class ReportWiFiNetworkDiagnosticsFeatureMap : public ModelCommand +{ +public: + ReportWiFiNetworkDiagnosticsFeatureMap() : ModelCommand("report") + { + AddArgument("attr-name", "feature-map"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportWiFiNetworkDiagnosticsFeatureMap() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0036) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, uint32_t value) { LogValue("WiFiNetworkDiagnostics.FeatureMap report", 0, value); } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute ClusterRevision */ @@ -55801,6 +59704,48 @@ class ReadWindowCoveringAttributeList : public ModelCommand } }; +class ReportWindowCoveringAttributeList : public ModelCommand +{ +public: + ReportWindowCoveringAttributeList() : ModelCommand("report") + { + AddArgument("attr-name", "attribute-list"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportWindowCoveringAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0102) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, const chip::app::DataModel::DecodableList & value) + { + LogValue("WindowCovering.AttributeList report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute FeatureMap */ @@ -55947,10 +59892,11 @@ void registerClusterAccessControl(Commands & commands) const char * clusterName = "AccessControl"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -55979,8 +59925,11 @@ void registerClusterAdministratorCommissioning(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -56114,6 +60063,7 @@ void registerClusterBasic(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -56437,61 +60387,66 @@ void registerClusterDoorLock(Commands & commands) const char * clusterName = "DoorLock"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -56556,6 +60511,7 @@ void registerClusterEthernetNetworkDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -56608,7 +60564,9 @@ void registerClusterGeneralCommissioning(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -56653,17 +60611,19 @@ void registerClusterGroupKeyManagement(Commands & commands) const char * clusterName = "GroupKeyManagement"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -56793,6 +60753,7 @@ void registerClusterLevelControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -56806,6 +60767,7 @@ void registerClusterLocalizationConfiguration(Commands & commands) commands_list clusterCommands = { make_unique(), // make_unique(), // + make_unique(), // make_unique(), // }; @@ -56866,6 +60828,7 @@ void registerClusterMediaPlayback(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -56905,25 +60868,32 @@ void registerClusterNetworkCommissioning(Commands & commands) const char * clusterName = "NetworkCommissioning"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -57102,9 +61072,10 @@ void registerClusterPowerSourceConfiguration(Commands & commands) const char * clusterName = "PowerSourceConfiguration"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -57291,6 +61262,7 @@ void registerClusterSoftwareDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -57510,6 +61482,7 @@ void registerClusterTestCluster(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -57830,6 +61803,7 @@ void registerClusterThreadNetworkDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -57843,8 +61817,9 @@ void registerClusterUserLabel(Commands & commands) const char * clusterName = "UserLabel"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -57897,6 +61872,7 @@ void registerClusterWiFiNetworkDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // From be806bb3084e1656fd5905f4145b22b389c1a52b Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 18 Jan 2022 10:19:17 -0500 Subject: [PATCH 052/124] Be explicit between server clusters and client (binding) clusters on endpoints (#13649) * Be explicit between server clusters and client (binding) clusters on endpoints * ZAP regen * Fix up the spacing a bit without comment hacks --- .../all-clusters-app.matter | 150 +++++++++--------- .../bridge-common/bridge-app.matter | 40 ++--- .../door-lock-common/door-lock-app.matter | 40 ++--- .../lighting-common/lighting-app.matter | 52 +++--- examples/lock-app/lock-common/lock-app.matter | 40 ++--- .../log-source-common/log-source-app.matter | 10 +- .../ota-provider-app.matter | 14 +- .../ota-requestor-app.matter | 18 +-- .../placeholder/linux/apps/app1/config.matter | 28 ++-- .../placeholder/linux/apps/app2/config.matter | 28 ++-- examples/pump-app/pump-common/pump-app.matter | 46 +++--- .../pump-controller-app.matter | 44 ++--- .../esp32/main/temperature-measurement.matter | 32 ++-- .../thermostat-common/thermostat.matter | 50 +++--- examples/tv-app/tv-common/tv-app.matter | 94 +++++------ .../tv-casting-common/tv-casting-app.matter | 110 ++++++------- examples/window-app/common/window-app.matter | 40 ++--- .../templates/app/MatterIDL.zapt | 3 +- .../data_model/controller-clusters.matter | 122 +++++++------- 19 files changed, 481 insertions(+), 480 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 15dc1eb58ca4d3..1bb82371970df7 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 @@ -2999,86 +2999,86 @@ server cluster WindowCovering = 258 { endpoint 0 { - instantiate cluster AccessControl; - instantiate cluster AdministratorCommissioning; - instantiate cluster Basic; - instantiate cluster Binding; - instantiate cluster Descriptor; - instantiate cluster DiagnosticLogs; - instantiate cluster EthernetNetworkDiagnostics; - instantiate cluster FixedLabel; - instantiate cluster GeneralCommissioning; - instantiate cluster GeneralDiagnostics; - instantiate cluster GroupKeyManagement; - instantiate cluster Groups; - instantiate cluster Identify; - instantiate cluster LocalizationConfiguration; - instantiate cluster NetworkCommissioning; - instantiate cluster OtaSoftwareUpdateProvider; - instantiate cluster OtaSoftwareUpdateRequestor; - instantiate cluster OperationalCredentials; - instantiate cluster PowerSourceConfiguration; - instantiate cluster RelativeHumidityMeasurement; - instantiate cluster SoftwareDiagnostics; - instantiate cluster ThreadNetworkDiagnostics; - instantiate cluster UserLabel; - instantiate cluster WiFiNetworkDiagnostics; + server cluster AccessControl; + server cluster AdministratorCommissioning; + server cluster Basic; + server cluster Binding; + server cluster Descriptor; + server cluster DiagnosticLogs; + server cluster EthernetNetworkDiagnostics; + server cluster FixedLabel; + server cluster GeneralCommissioning; + server cluster GeneralDiagnostics; + server cluster GroupKeyManagement; + server cluster Groups; + server cluster Identify; + server cluster LocalizationConfiguration; + server cluster NetworkCommissioning; + binding cluster OtaSoftwareUpdateProvider; + server cluster OtaSoftwareUpdateRequestor; + server cluster OperationalCredentials; + server cluster PowerSourceConfiguration; + server cluster RelativeHumidityMeasurement; + server cluster SoftwareDiagnostics; + server cluster ThreadNetworkDiagnostics; + server cluster UserLabel; + server cluster WiFiNetworkDiagnostics; } endpoint 1 { - instantiate cluster AccountLogin; - instantiate cluster ApplicationBasic; - instantiate cluster ApplicationLauncher; - instantiate cluster AudioOutput; - instantiate cluster BarrierControl; - instantiate cluster BinaryInputBasic; - instantiate cluster Binding; - instantiate cluster BooleanState; - instantiate cluster BridgedActions; - instantiate cluster BridgedDeviceBasic; - instantiate cluster Channel; - instantiate cluster ColorControl; - instantiate cluster ContentLauncher; - instantiate cluster Descriptor; - instantiate cluster DoorLock; - instantiate cluster ElectricalMeasurement; - instantiate cluster FixedLabel; - instantiate cluster FlowMeasurement; - instantiate cluster Groups; - instantiate cluster IasZone; - instantiate cluster Identify; - instantiate cluster IlluminanceMeasurement; - instantiate cluster KeypadInput; - instantiate cluster LevelControl; - instantiate cluster LocalizationConfiguration; - instantiate cluster LowPower; - instantiate cluster MediaInput; - instantiate cluster MediaPlayback; - instantiate cluster ModeSelect; - instantiate cluster NetworkCommissioning; - instantiate cluster OccupancySensing; - instantiate cluster OnOff; - instantiate cluster OnOffSwitchConfiguration; - instantiate cluster PowerSource; - instantiate cluster PressureMeasurement; - instantiate cluster PumpConfigurationAndControl; - instantiate cluster RelativeHumidityMeasurement; - instantiate cluster Scenes; - instantiate cluster Switch; - instantiate cluster TargetNavigator; - instantiate cluster TemperatureMeasurement; - instantiate cluster TestCluster; - instantiate cluster Thermostat; - instantiate cluster ThermostatUserInterfaceConfiguration; - instantiate cluster UserLabel; - instantiate cluster WakeOnLan; - instantiate cluster WindowCovering; + server cluster AccountLogin; + server cluster ApplicationBasic; + server cluster ApplicationLauncher; + server cluster AudioOutput; + server cluster BarrierControl; + server cluster BinaryInputBasic; + server cluster Binding; + server cluster BooleanState; + server cluster BridgedActions; + server cluster BridgedDeviceBasic; + server cluster Channel; + server cluster ColorControl; + server cluster ContentLauncher; + server cluster Descriptor; + server cluster DoorLock; + server cluster ElectricalMeasurement; + server cluster FixedLabel; + server cluster FlowMeasurement; + server cluster Groups; + server cluster IasZone; + server cluster Identify; + server cluster IlluminanceMeasurement; + server cluster KeypadInput; + server cluster LevelControl; + server cluster LocalizationConfiguration; + server cluster LowPower; + server cluster MediaInput; + server cluster MediaPlayback; + server cluster ModeSelect; + server cluster NetworkCommissioning; + server cluster OccupancySensing; + server cluster OnOff; + server cluster OnOffSwitchConfiguration; + server cluster PowerSource; + server cluster PressureMeasurement; + server cluster PumpConfigurationAndControl; + server cluster RelativeHumidityMeasurement; + server cluster Scenes; + server cluster Switch; + server cluster TargetNavigator; + server cluster TemperatureMeasurement; + server cluster TestCluster; + server cluster Thermostat; + server cluster ThermostatUserInterfaceConfiguration; + server cluster UserLabel; + server cluster WakeOnLan; + server cluster WindowCovering; } endpoint 2 { - instantiate cluster Descriptor; - instantiate cluster Groups; - instantiate cluster OccupancySensing; - instantiate cluster OnOff; + server cluster Descriptor; + server cluster Groups; + server cluster OccupancySensing; + server cluster OnOff; } diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 4f05dae8e75a4b..ed8d4ed2abed62 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -895,28 +895,28 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { - instantiate cluster AdministratorCommissioning; - instantiate cluster Basic; - instantiate cluster Descriptor; - instantiate cluster DiagnosticLogs; - instantiate cluster EthernetNetworkDiagnostics; - instantiate cluster FixedLabel; - instantiate cluster GeneralCommissioning; - instantiate cluster GeneralDiagnostics; - instantiate cluster LocalizationConfiguration; - instantiate cluster NetworkCommissioning; - instantiate cluster OperationalCredentials; - instantiate cluster SoftwareDiagnostics; - instantiate cluster ThreadNetworkDiagnostics; - instantiate cluster UserLabel; - instantiate cluster WiFiNetworkDiagnostics; + server cluster AdministratorCommissioning; + server cluster Basic; + server cluster Descriptor; + server cluster DiagnosticLogs; + server cluster EthernetNetworkDiagnostics; + server cluster FixedLabel; + server cluster GeneralCommissioning; + server cluster GeneralDiagnostics; + server cluster LocalizationConfiguration; + server cluster NetworkCommissioning; + server cluster OperationalCredentials; + server cluster SoftwareDiagnostics; + server cluster ThreadNetworkDiagnostics; + server cluster UserLabel; + server cluster WiFiNetworkDiagnostics; } endpoint 1 { - instantiate cluster Descriptor; - instantiate cluster FixedLabel; - instantiate cluster LevelControl; - instantiate cluster OnOff; - instantiate cluster Switch; + server cluster Descriptor; + server cluster FixedLabel; + server cluster LevelControl; + server cluster OnOff; + server cluster Switch; } diff --git a/examples/door-lock-app/door-lock-common/door-lock-app.matter b/examples/door-lock-app/door-lock-common/door-lock-app.matter index bcbbefd30aba3d..dc8dc6fc8c4c2a 100644 --- a/examples/door-lock-app/door-lock-common/door-lock-app.matter +++ b/examples/door-lock-app/door-lock-common/door-lock-app.matter @@ -1103,28 +1103,28 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { - instantiate cluster AdministratorCommissioning; - instantiate cluster Basic; - instantiate cluster Descriptor; - instantiate cluster DiagnosticLogs; - instantiate cluster EthernetNetworkDiagnostics; - instantiate cluster FixedLabel; - instantiate cluster GeneralCommissioning; - instantiate cluster GeneralDiagnostics; - instantiate cluster LocalizationConfiguration; - instantiate cluster NetworkCommissioning; - instantiate cluster OperationalCredentials; - instantiate cluster PowerSource; - instantiate cluster PowerSourceConfiguration; - instantiate cluster SoftwareDiagnostics; - instantiate cluster ThreadNetworkDiagnostics; - instantiate cluster UserLabel; - instantiate cluster WiFiNetworkDiagnostics; + server cluster AdministratorCommissioning; + server cluster Basic; + server cluster Descriptor; + server cluster DiagnosticLogs; + server cluster EthernetNetworkDiagnostics; + server cluster FixedLabel; + server cluster GeneralCommissioning; + server cluster GeneralDiagnostics; + server cluster LocalizationConfiguration; + server cluster NetworkCommissioning; + server cluster OperationalCredentials; + server cluster PowerSource; + server cluster PowerSourceConfiguration; + server cluster SoftwareDiagnostics; + server cluster ThreadNetworkDiagnostics; + server cluster UserLabel; + server cluster WiFiNetworkDiagnostics; } endpoint 1 { - instantiate cluster Descriptor; - instantiate cluster DoorLock; - instantiate cluster PowerSource; + server cluster Descriptor; + server cluster DoorLock; + server cluster PowerSource; } diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 5f412e83b5df07..33f5a3abd88192 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1381,37 +1381,37 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { - instantiate cluster AdministratorCommissioning; - instantiate cluster Basic; - instantiate cluster Descriptor; - instantiate cluster DiagnosticLogs; - instantiate cluster EthernetNetworkDiagnostics; - instantiate cluster FixedLabel; - instantiate cluster GeneralCommissioning; - instantiate cluster GeneralDiagnostics; - instantiate cluster LocalizationConfiguration; - instantiate cluster NetworkCommissioning; - instantiate cluster OtaSoftwareUpdateProvider; - instantiate cluster OtaSoftwareUpdateRequestor; - instantiate cluster OperationalCredentials; - instantiate cluster SoftwareDiagnostics; - instantiate cluster Switch; - instantiate cluster ThreadNetworkDiagnostics; - instantiate cluster UserLabel; - instantiate cluster WiFiNetworkDiagnostics; + server cluster AdministratorCommissioning; + server cluster Basic; + server cluster Descriptor; + server cluster DiagnosticLogs; + server cluster EthernetNetworkDiagnostics; + server cluster FixedLabel; + server cluster GeneralCommissioning; + server cluster GeneralDiagnostics; + server cluster LocalizationConfiguration; + server cluster NetworkCommissioning; + binding cluster OtaSoftwareUpdateProvider; + server cluster OtaSoftwareUpdateRequestor; + server cluster OperationalCredentials; + server cluster SoftwareDiagnostics; + server cluster Switch; + server cluster ThreadNetworkDiagnostics; + server cluster UserLabel; + server cluster WiFiNetworkDiagnostics; } endpoint 1 { - instantiate cluster ColorControl; - instantiate cluster Descriptor; - instantiate cluster Identify; - instantiate cluster LevelControl; - instantiate cluster OccupancySensing; - instantiate cluster OnOff; + server cluster ColorControl; + server cluster Descriptor; + server cluster Identify; + server cluster LevelControl; + server cluster OccupancySensing; + server cluster OnOff; } endpoint 2 { - instantiate cluster OnOff; - instantiate cluster OnOffSwitchConfiguration; + binding cluster OnOff; + server cluster OnOffSwitchConfiguration; } diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index d92d86957f1fe7..eb969ba4c25e09 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -799,28 +799,28 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { - instantiate cluster AdministratorCommissioning; - instantiate cluster Basic; - instantiate cluster Descriptor; - instantiate cluster DiagnosticLogs; - instantiate cluster EthernetNetworkDiagnostics; - instantiate cluster FixedLabel; - instantiate cluster GeneralCommissioning; - instantiate cluster GeneralDiagnostics; - instantiate cluster LocalizationConfiguration; - instantiate cluster NetworkCommissioning; - instantiate cluster OperationalCredentials; - instantiate cluster PowerSource; - instantiate cluster PowerSourceConfiguration; - instantiate cluster SoftwareDiagnostics; - instantiate cluster ThreadNetworkDiagnostics; - instantiate cluster UserLabel; - instantiate cluster WiFiNetworkDiagnostics; + server cluster AdministratorCommissioning; + server cluster Basic; + server cluster Descriptor; + server cluster DiagnosticLogs; + server cluster EthernetNetworkDiagnostics; + server cluster FixedLabel; + server cluster GeneralCommissioning; + server cluster GeneralDiagnostics; + server cluster LocalizationConfiguration; + server cluster NetworkCommissioning; + server cluster OperationalCredentials; + server cluster PowerSource; + server cluster PowerSourceConfiguration; + server cluster SoftwareDiagnostics; + server cluster ThreadNetworkDiagnostics; + server cluster UserLabel; + server cluster WiFiNetworkDiagnostics; } endpoint 1 { - instantiate cluster Descriptor; - instantiate cluster OnOff; - instantiate cluster PowerSource; + server cluster Descriptor; + server cluster OnOff; + server cluster PowerSource; } diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index 05cc45b02a6e85..ce9793213b65be 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -312,10 +312,10 @@ server cluster OperationalCredentials = 62 { endpoint 0 { - instantiate cluster DiagnosticLogs; - instantiate cluster DiagnosticLogs; - instantiate cluster GeneralCommissioning; - instantiate cluster NetworkCommissioning; - instantiate cluster OperationalCredentials; + binding cluster DiagnosticLogs; + server cluster DiagnosticLogs; + server cluster GeneralCommissioning; + server cluster NetworkCommissioning; + server cluster OperationalCredentials; } 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 82bd914a5a7695..b64cb874bd3611 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 @@ -356,12 +356,12 @@ server cluster UserLabel = 65 { endpoint 0 { - instantiate cluster FixedLabel; - instantiate cluster GeneralCommissioning; - instantiate cluster LocalizationConfiguration; - instantiate cluster NetworkCommissioning; - instantiate cluster OtaSoftwareUpdateProvider; - instantiate cluster OperationalCredentials; - instantiate cluster UserLabel; + server cluster FixedLabel; + server cluster GeneralCommissioning; + server cluster LocalizationConfiguration; + server cluster NetworkCommissioning; + server cluster OtaSoftwareUpdateProvider; + server cluster OperationalCredentials; + server cluster UserLabel; } 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 ae1dcc3d4742dc..0b5547614e50af 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 @@ -467,14 +467,14 @@ server cluster UserLabel = 65 { endpoint 0 { - instantiate cluster Basic; - instantiate cluster FixedLabel; - instantiate cluster GeneralCommissioning; - instantiate cluster LocalizationConfiguration; - instantiate cluster NetworkCommissioning; - instantiate cluster OtaSoftwareUpdateProvider; - instantiate cluster OtaSoftwareUpdateRequestor; - instantiate cluster OperationalCredentials; - instantiate cluster UserLabel; + server cluster Basic; + server cluster FixedLabel; + server cluster GeneralCommissioning; + server cluster LocalizationConfiguration; + server cluster NetworkCommissioning; + binding cluster OtaSoftwareUpdateProvider; + server cluster OtaSoftwareUpdateRequestor; + server cluster OperationalCredentials; + server cluster UserLabel; } diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 35bc33ef164942..df6b3eb1b8442e 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -710,22 +710,22 @@ server cluster TemperatureMeasurement = 1026 { endpoint 0 { - instantiate cluster Basic; - instantiate cluster Descriptor; - instantiate cluster GeneralCommissioning; - instantiate cluster NetworkCommissioning; - instantiate cluster OperationalCredentials; - instantiate cluster TemperatureMeasurement; - instantiate cluster TemperatureMeasurement; + server cluster Basic; + server cluster Descriptor; + server cluster GeneralCommissioning; + server cluster NetworkCommissioning; + server cluster OperationalCredentials; + binding cluster TemperatureMeasurement; + server cluster TemperatureMeasurement; } endpoint 1 { - instantiate cluster Basic; - instantiate cluster ColorControl; - instantiate cluster Groups; - instantiate cluster Identify; - instantiate cluster LevelControl; - instantiate cluster OnOff; - instantiate cluster Scenes; + server cluster Basic; + server cluster ColorControl; + server cluster Groups; + server cluster Identify; + server cluster LevelControl; + server cluster OnOff; + server cluster Scenes; } diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 35bc33ef164942..df6b3eb1b8442e 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -710,22 +710,22 @@ server cluster TemperatureMeasurement = 1026 { endpoint 0 { - instantiate cluster Basic; - instantiate cluster Descriptor; - instantiate cluster GeneralCommissioning; - instantiate cluster NetworkCommissioning; - instantiate cluster OperationalCredentials; - instantiate cluster TemperatureMeasurement; - instantiate cluster TemperatureMeasurement; + server cluster Basic; + server cluster Descriptor; + server cluster GeneralCommissioning; + server cluster NetworkCommissioning; + server cluster OperationalCredentials; + binding cluster TemperatureMeasurement; + server cluster TemperatureMeasurement; } endpoint 1 { - instantiate cluster Basic; - instantiate cluster ColorControl; - instantiate cluster Groups; - instantiate cluster Identify; - instantiate cluster LevelControl; - instantiate cluster OnOff; - instantiate cluster Scenes; + server cluster Basic; + server cluster ColorControl; + server cluster Groups; + server cluster Identify; + server cluster LevelControl; + server cluster OnOff; + server cluster Scenes; } diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 3a32a653720797..a18736d4c2c9ef 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -895,31 +895,31 @@ server cluster UserLabel = 65 { endpoint 0 { - instantiate cluster AdministratorCommissioning; - instantiate cluster Basic; - instantiate cluster Descriptor; - instantiate cluster DiagnosticLogs; - instantiate cluster FixedLabel; - instantiate cluster GeneralCommissioning; - instantiate cluster GeneralDiagnostics; - instantiate cluster LocalizationConfiguration; - instantiate cluster NetworkCommissioning; - instantiate cluster OperationalCredentials; - instantiate cluster SoftwareDiagnostics; - instantiate cluster ThreadNetworkDiagnostics; - instantiate cluster UserLabel; + server cluster AdministratorCommissioning; + server cluster Basic; + server cluster Descriptor; + server cluster DiagnosticLogs; + server cluster FixedLabel; + server cluster GeneralCommissioning; + server cluster GeneralDiagnostics; + server cluster LocalizationConfiguration; + server cluster NetworkCommissioning; + server cluster OperationalCredentials; + server cluster SoftwareDiagnostics; + server cluster ThreadNetworkDiagnostics; + server cluster UserLabel; } endpoint 1 { - instantiate cluster Descriptor; - instantiate cluster FlowMeasurement; - instantiate cluster FlowMeasurement; - instantiate cluster LevelControl; - instantiate cluster OnOff; - instantiate cluster PressureMeasurement; - instantiate cluster PressureMeasurement; - instantiate cluster PumpConfigurationAndControl; - instantiate cluster TemperatureMeasurement; - instantiate cluster TemperatureMeasurement; + server cluster Descriptor; + binding cluster FlowMeasurement; + server cluster FlowMeasurement; + server cluster LevelControl; + server cluster OnOff; + binding cluster PressureMeasurement; + server cluster PressureMeasurement; + server cluster PumpConfigurationAndControl; + binding cluster TemperatureMeasurement; + server cluster TemperatureMeasurement; } 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 b1bcfbc60bee81..2e2303bfd2ec0e 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 @@ -944,30 +944,30 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { - instantiate cluster AdministratorCommissioning; - instantiate cluster Basic; - instantiate cluster Descriptor; - instantiate cluster DiagnosticLogs; - instantiate cluster EthernetNetworkDiagnostics; - instantiate cluster FixedLabel; - instantiate cluster GeneralCommissioning; - instantiate cluster GeneralDiagnostics; - instantiate cluster LevelControl; - instantiate cluster LocalizationConfiguration; - instantiate cluster NetworkCommissioning; - instantiate cluster OperationalCredentials; - instantiate cluster SoftwareDiagnostics; - instantiate cluster ThreadNetworkDiagnostics; - instantiate cluster UserLabel; - instantiate cluster WiFiNetworkDiagnostics; + server cluster AdministratorCommissioning; + server cluster Basic; + server cluster Descriptor; + server cluster DiagnosticLogs; + server cluster EthernetNetworkDiagnostics; + server cluster FixedLabel; + server cluster GeneralCommissioning; + server cluster GeneralDiagnostics; + binding cluster LevelControl; + server cluster LocalizationConfiguration; + server cluster NetworkCommissioning; + server cluster OperationalCredentials; + server cluster SoftwareDiagnostics; + server cluster ThreadNetworkDiagnostics; + server cluster UserLabel; + server cluster WiFiNetworkDiagnostics; } endpoint 1 { - instantiate cluster Descriptor; - instantiate cluster FlowMeasurement; - instantiate cluster OnOff; - instantiate cluster PressureMeasurement; - instantiate cluster PumpConfigurationAndControl; - instantiate cluster TemperatureMeasurement; + server cluster Descriptor; + binding cluster FlowMeasurement; + binding cluster OnOff; + binding cluster PressureMeasurement; + binding cluster PumpConfigurationAndControl; + binding cluster TemperatureMeasurement; } diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index becf10fd0a5d44..12fbfc1c2337a5 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -598,24 +598,24 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { - instantiate cluster AdministratorCommissioning; - instantiate cluster Basic; - instantiate cluster Descriptor; - instantiate cluster DiagnosticLogs; - instantiate cluster EthernetNetworkDiagnostics; - instantiate cluster FixedLabel; - instantiate cluster GeneralCommissioning; - instantiate cluster GeneralDiagnostics; - instantiate cluster LocalizationConfiguration; - instantiate cluster NetworkCommissioning; - instantiate cluster OperationalCredentials; - instantiate cluster SoftwareDiagnostics; - instantiate cluster UserLabel; - instantiate cluster WiFiNetworkDiagnostics; + server cluster AdministratorCommissioning; + server cluster Basic; + server cluster Descriptor; + server cluster DiagnosticLogs; + server cluster EthernetNetworkDiagnostics; + server cluster FixedLabel; + server cluster GeneralCommissioning; + server cluster GeneralDiagnostics; + server cluster LocalizationConfiguration; + server cluster NetworkCommissioning; + server cluster OperationalCredentials; + server cluster SoftwareDiagnostics; + server cluster UserLabel; + server cluster WiFiNetworkDiagnostics; } endpoint 1 { - instantiate cluster Descriptor; - instantiate cluster TemperatureMeasurement; + server cluster Descriptor; + server cluster TemperatureMeasurement; } diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index dac425770d4e19..ca99688932e6ea 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -1172,33 +1172,33 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { - instantiate cluster AdministratorCommissioning; - instantiate cluster Basic; - instantiate cluster Binding; - instantiate cluster Descriptor; - instantiate cluster DiagnosticLogs; - instantiate cluster EthernetNetworkDiagnostics; - instantiate cluster FixedLabel; - instantiate cluster GeneralCommissioning; - instantiate cluster GeneralDiagnostics; - instantiate cluster GroupKeyManagement; - instantiate cluster Identify; - instantiate cluster LocalizationConfiguration; - instantiate cluster NetworkCommissioning; - instantiate cluster OtaSoftwareUpdateProvider; - instantiate cluster OperationalCredentials; - instantiate cluster SoftwareDiagnostics; - instantiate cluster ThreadNetworkDiagnostics; - instantiate cluster UserLabel; - instantiate cluster WiFiNetworkDiagnostics; + server cluster AdministratorCommissioning; + server cluster Basic; + server cluster Binding; + server cluster Descriptor; + server cluster DiagnosticLogs; + server cluster EthernetNetworkDiagnostics; + server cluster FixedLabel; + server cluster GeneralCommissioning; + server cluster GeneralDiagnostics; + server cluster GroupKeyManagement; + server cluster Identify; + server cluster LocalizationConfiguration; + server cluster NetworkCommissioning; + server cluster OtaSoftwareUpdateProvider; + server cluster OperationalCredentials; + server cluster SoftwareDiagnostics; + server cluster ThreadNetworkDiagnostics; + server cluster UserLabel; + server cluster WiFiNetworkDiagnostics; } endpoint 1 { - instantiate cluster Basic; - instantiate cluster Groups; - instantiate cluster Identify; - instantiate cluster Identify; - instantiate cluster Scenes; - instantiate cluster Thermostat; + server cluster Basic; + server cluster Groups; + binding cluster Identify; + server cluster Identify; + server cluster Scenes; + server cluster Thermostat; } diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 2c1edb39744a0f..33413202a9d4b4 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -1783,67 +1783,67 @@ server cluster WiFiNetworkDiagnostics = 54 { endpoint 0 { - instantiate cluster AdministratorCommissioning; - instantiate cluster Basic; - instantiate cluster Binding; - instantiate cluster Binding; - instantiate cluster Descriptor; - instantiate cluster DiagnosticLogs; - instantiate cluster EthernetNetworkDiagnostics; - instantiate cluster FixedLabel; - instantiate cluster GeneralCommissioning; - instantiate cluster GeneralCommissioning; - instantiate cluster GeneralDiagnostics; - instantiate cluster GroupKeyManagement; - instantiate cluster LocalizationConfiguration; - instantiate cluster NetworkCommissioning; - instantiate cluster NetworkCommissioning; - instantiate cluster OtaSoftwareUpdateProvider; - instantiate cluster OperationalCredentials; - instantiate cluster OperationalCredentials; - instantiate cluster RelativeHumidityMeasurement; - instantiate cluster SoftwareDiagnostics; - instantiate cluster ThreadNetworkDiagnostics; - instantiate cluster UserLabel; - instantiate cluster WiFiNetworkDiagnostics; + server cluster AdministratorCommissioning; + server cluster Basic; + binding cluster Binding; + server cluster Binding; + server cluster Descriptor; + server cluster DiagnosticLogs; + server cluster EthernetNetworkDiagnostics; + server cluster FixedLabel; + binding cluster GeneralCommissioning; + server cluster GeneralCommissioning; + server cluster GeneralDiagnostics; + server cluster GroupKeyManagement; + server cluster LocalizationConfiguration; + binding cluster NetworkCommissioning; + server cluster NetworkCommissioning; + server cluster OtaSoftwareUpdateProvider; + binding cluster OperationalCredentials; + server cluster OperationalCredentials; + server cluster RelativeHumidityMeasurement; + server cluster SoftwareDiagnostics; + server cluster ThreadNetworkDiagnostics; + server cluster UserLabel; + server cluster WiFiNetworkDiagnostics; } endpoint 1 { - instantiate cluster ApplicationLauncher; - instantiate cluster Channel; - instantiate cluster ContentLauncher; - instantiate cluster Descriptor; - instantiate cluster KeypadInput; - instantiate cluster LowPower; - instantiate cluster MediaInput; - instantiate cluster OnOff; - instantiate cluster TargetNavigator; - instantiate cluster WakeOnLan; + server cluster ApplicationLauncher; + server cluster Channel; + server cluster ContentLauncher; + server cluster Descriptor; + server cluster KeypadInput; + server cluster LowPower; + server cluster MediaInput; + server cluster OnOff; + server cluster TargetNavigator; + server cluster WakeOnLan; } endpoint 2 { - instantiate cluster AudioOutput; - instantiate cluster Descriptor; - instantiate cluster LevelControl; - instantiate cluster OnOff; + server cluster AudioOutput; + server cluster Descriptor; + server cluster LevelControl; + server cluster OnOff; } endpoint 3 { - instantiate cluster AccountLogin; - instantiate cluster ApplicationBasic; - instantiate cluster ContentLauncher; - instantiate cluster Descriptor; - instantiate cluster MediaPlayback; + server cluster AccountLogin; + server cluster ApplicationBasic; + server cluster ContentLauncher; + server cluster Descriptor; + server cluster MediaPlayback; } endpoint 4 { - instantiate cluster ApplicationBasic; - instantiate cluster ContentLauncher; - instantiate cluster Descriptor; + server cluster ApplicationBasic; + server cluster ContentLauncher; + server cluster Descriptor; } endpoint 5 { - instantiate cluster ApplicationBasic; - instantiate cluster Descriptor; + server cluster ApplicationBasic; + server cluster Descriptor; } 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 a820e79c3a4de8..665e20470def72 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 @@ -2459,66 +2459,66 @@ server cluster WindowCovering = 258 { endpoint 0 { - instantiate cluster AdministratorCommissioning; - instantiate cluster Basic; - instantiate cluster Binding; - instantiate cluster Descriptor; - instantiate cluster DiagnosticLogs; - instantiate cluster EthernetNetworkDiagnostics; - instantiate cluster FixedLabel; - instantiate cluster GeneralCommissioning; - instantiate cluster GeneralDiagnostics; - instantiate cluster GroupKeyManagement; - instantiate cluster LocalizationConfiguration; - instantiate cluster NetworkCommissioning; - instantiate cluster OtaSoftwareUpdateProvider; - instantiate cluster OperationalCredentials; - instantiate cluster RelativeHumidityMeasurement; - instantiate cluster SoftwareDiagnostics; - instantiate cluster ThreadNetworkDiagnostics; - instantiate cluster UserLabel; - instantiate cluster WiFiNetworkDiagnostics; + server cluster AdministratorCommissioning; + server cluster Basic; + server cluster Binding; + server cluster Descriptor; + server cluster DiagnosticLogs; + server cluster EthernetNetworkDiagnostics; + server cluster FixedLabel; + server cluster GeneralCommissioning; + server cluster GeneralDiagnostics; + server cluster GroupKeyManagement; + server cluster LocalizationConfiguration; + server cluster NetworkCommissioning; + server cluster OtaSoftwareUpdateProvider; + server cluster OperationalCredentials; + server cluster RelativeHumidityMeasurement; + server cluster SoftwareDiagnostics; + server cluster ThreadNetworkDiagnostics; + server cluster UserLabel; + server cluster WiFiNetworkDiagnostics; } endpoint 1 { - instantiate cluster AccountLogin; - instantiate cluster ApplicationBasic; - instantiate cluster ApplicationLauncher; - instantiate cluster AudioOutput; - instantiate cluster BarrierControl; - instantiate cluster BinaryInputBasic; - instantiate cluster Binding; - instantiate cluster BridgedDeviceBasic; - instantiate cluster Channel; - instantiate cluster ColorControl; - instantiate cluster ContentLauncher; - instantiate cluster Descriptor; - instantiate cluster DoorLock; - instantiate cluster FixedLabel; - instantiate cluster FlowMeasurement; - instantiate cluster Groups; - instantiate cluster IasZone; - instantiate cluster Identify; - instantiate cluster KeypadInput; - instantiate cluster LevelControl; - instantiate cluster MediaInput; - instantiate cluster MediaPlayback; - instantiate cluster OnOff; - instantiate cluster PressureMeasurement; - instantiate cluster RelativeHumidityMeasurement; - instantiate cluster Scenes; - instantiate cluster Switch; - instantiate cluster TargetNavigator; - instantiate cluster TemperatureMeasurement; - instantiate cluster TestCluster; - instantiate cluster Thermostat; - instantiate cluster WakeOnLan; - instantiate cluster WindowCovering; + binding cluster AccountLogin; + binding cluster ApplicationBasic; + binding cluster ApplicationLauncher; + binding cluster AudioOutput; + server cluster BarrierControl; + server cluster BinaryInputBasic; + server cluster Binding; + server cluster BridgedDeviceBasic; + binding cluster Channel; + server cluster ColorControl; + binding cluster ContentLauncher; + server cluster Descriptor; + server cluster DoorLock; + server cluster FixedLabel; + server cluster FlowMeasurement; + server cluster Groups; + server cluster IasZone; + server cluster Identify; + binding cluster KeypadInput; + server cluster LevelControl; + binding cluster MediaInput; + binding cluster MediaPlayback; + server cluster OnOff; + server cluster PressureMeasurement; + server cluster RelativeHumidityMeasurement; + server cluster Scenes; + server cluster Switch; + binding cluster TargetNavigator; + server cluster TemperatureMeasurement; + server cluster TestCluster; + server cluster Thermostat; + server cluster WakeOnLan; + server cluster WindowCovering; } endpoint 2 { - instantiate cluster Descriptor; - instantiate cluster OccupancySensing; - instantiate cluster OnOff; + server cluster Descriptor; + server cluster OccupancySensing; + server cluster OnOff; } diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 629ed1f0805382..761b83c3792474 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -837,31 +837,31 @@ server cluster WindowCovering = 258 { endpoint 0 { - instantiate cluster AdministratorCommissioning; - instantiate cluster Basic; - instantiate cluster Descriptor; - instantiate cluster EthernetNetworkDiagnostics; - instantiate cluster FixedLabel; - instantiate cluster GeneralCommissioning; - instantiate cluster GeneralDiagnostics; - instantiate cluster LocalizationConfiguration; - instantiate cluster NetworkCommissioning; - instantiate cluster OperationalCredentials; - instantiate cluster PowerSource; - instantiate cluster SoftwareDiagnostics; - instantiate cluster ThreadNetworkDiagnostics; - instantiate cluster UserLabel; - instantiate cluster WiFiNetworkDiagnostics; + server cluster AdministratorCommissioning; + server cluster Basic; + server cluster Descriptor; + server cluster EthernetNetworkDiagnostics; + server cluster FixedLabel; + server cluster GeneralCommissioning; + server cluster GeneralDiagnostics; + server cluster LocalizationConfiguration; + server cluster NetworkCommissioning; + server cluster OperationalCredentials; + server cluster PowerSource; + server cluster SoftwareDiagnostics; + server cluster ThreadNetworkDiagnostics; + server cluster UserLabel; + server cluster WiFiNetworkDiagnostics; } endpoint 1 { - instantiate cluster Descriptor; - instantiate cluster Identify; - instantiate cluster WindowCovering; + server cluster Descriptor; + server cluster Identify; + server cluster WindowCovering; } endpoint 2 { - instantiate cluster Descriptor; - instantiate cluster WindowCovering; + server cluster Descriptor; + server cluster WindowCovering; } diff --git a/src/app/zap-templates/templates/app/MatterIDL.zapt b/src/app/zap-templates/templates/app/MatterIDL.zapt index 1407583f775b14..44906fc5e8ac5a 100644 --- a/src/app/zap-templates/templates/app/MatterIDL.zapt +++ b/src/app/zap-templates/templates/app/MatterIDL.zapt @@ -82,7 +82,8 @@ {{#chip_endpoints}} endpoint {{endpointId}} { {{#chip_endpoint_clusters}} - instantiate cluster {{asUpperCamelCase name}}; + {{#if (isServer side)~}} server {{else~}} binding {{/if~}} + cluster {{asUpperCamelCase name}}; {{/chip_endpoint_clusters}} } diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 31573c491a2f60..60efc6717c3eab 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3316,66 +3316,66 @@ client cluster WindowCovering = 258 { endpoint 1 { - instantiate cluster AccessControl; - instantiate cluster AccountLogin; - instantiate cluster AdministratorCommissioning; - instantiate cluster ApplicationBasic; - instantiate cluster ApplicationLauncher; - instantiate cluster AudioOutput; - instantiate cluster BarrierControl; - instantiate cluster Basic; - instantiate cluster BinaryInputBasic; - instantiate cluster Binding; - instantiate cluster BooleanState; - instantiate cluster BridgedActions; - instantiate cluster BridgedDeviceBasic; - instantiate cluster Channel; - instantiate cluster ColorControl; - instantiate cluster ContentLauncher; - instantiate cluster Descriptor; - instantiate cluster DiagnosticLogs; - instantiate cluster DoorLock; - instantiate cluster ElectricalMeasurement; - instantiate cluster EthernetNetworkDiagnostics; - instantiate cluster FixedLabel; - instantiate cluster FlowMeasurement; - instantiate cluster GeneralCommissioning; - instantiate cluster GeneralDiagnostics; - instantiate cluster GroupKeyManagement; - instantiate cluster Groups; - instantiate cluster Identify; - instantiate cluster IlluminanceMeasurement; - instantiate cluster KeypadInput; - instantiate cluster LevelControl; - instantiate cluster LocalizationConfiguration; - instantiate cluster LowPower; - instantiate cluster MediaInput; - instantiate cluster MediaPlayback; - instantiate cluster ModeSelect; - instantiate cluster NetworkCommissioning; - instantiate cluster OtaSoftwareUpdateProvider; - instantiate cluster OtaSoftwareUpdateRequestor; - instantiate cluster OccupancySensing; - instantiate cluster OnOff; - instantiate cluster OnOffSwitchConfiguration; - instantiate cluster OperationalCredentials; - instantiate cluster PowerSource; - instantiate cluster PowerSourceConfiguration; - instantiate cluster PressureMeasurement; - instantiate cluster PumpConfigurationAndControl; - instantiate cluster RelativeHumidityMeasurement; - instantiate cluster Scenes; - instantiate cluster SoftwareDiagnostics; - instantiate cluster Switch; - instantiate cluster TargetNavigator; - instantiate cluster TemperatureMeasurement; - instantiate cluster TestCluster; - instantiate cluster Thermostat; - instantiate cluster ThermostatUserInterfaceConfiguration; - instantiate cluster ThreadNetworkDiagnostics; - instantiate cluster UserLabel; - instantiate cluster WakeOnLan; - instantiate cluster WiFiNetworkDiagnostics; - instantiate cluster WindowCovering; + binding cluster AccessControl; + binding cluster AccountLogin; + binding cluster AdministratorCommissioning; + binding cluster ApplicationBasic; + binding cluster ApplicationLauncher; + binding cluster AudioOutput; + binding cluster BarrierControl; + binding cluster Basic; + binding cluster BinaryInputBasic; + binding cluster Binding; + binding cluster BooleanState; + binding cluster BridgedActions; + binding cluster BridgedDeviceBasic; + binding cluster Channel; + binding cluster ColorControl; + binding cluster ContentLauncher; + binding cluster Descriptor; + binding cluster DiagnosticLogs; + binding cluster DoorLock; + binding cluster ElectricalMeasurement; + binding cluster EthernetNetworkDiagnostics; + binding cluster FixedLabel; + binding cluster FlowMeasurement; + binding cluster GeneralCommissioning; + binding cluster GeneralDiagnostics; + binding cluster GroupKeyManagement; + binding cluster Groups; + binding cluster Identify; + binding cluster IlluminanceMeasurement; + binding cluster KeypadInput; + binding cluster LevelControl; + binding cluster LocalizationConfiguration; + binding cluster LowPower; + binding cluster MediaInput; + binding cluster MediaPlayback; + binding cluster ModeSelect; + binding cluster NetworkCommissioning; + binding cluster OtaSoftwareUpdateProvider; + binding cluster OtaSoftwareUpdateRequestor; + binding cluster OccupancySensing; + binding cluster OnOff; + binding cluster OnOffSwitchConfiguration; + binding cluster OperationalCredentials; + binding cluster PowerSource; + binding cluster PowerSourceConfiguration; + binding cluster PressureMeasurement; + binding cluster PumpConfigurationAndControl; + binding cluster RelativeHumidityMeasurement; + binding cluster Scenes; + binding cluster SoftwareDiagnostics; + binding cluster Switch; + binding cluster TargetNavigator; + binding cluster TemperatureMeasurement; + binding cluster TestCluster; + binding cluster Thermostat; + binding cluster ThermostatUserInterfaceConfiguration; + binding cluster ThreadNetworkDiagnostics; + binding cluster UserLabel; + binding cluster WakeOnLan; + binding cluster WiFiNetworkDiagnostics; + binding cluster WindowCovering; } From b3068248e53838db4738936409a4e0f640dd7fa3 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 18 Jan 2022 13:06:23 -0500 Subject: [PATCH 053/124] Make nonsubscribable as a special case in IDL generation. (#13656) --- .../all-clusters-app.matter | 1132 +++++++-------- .../bridge-common/bridge-app.matter | 356 ++--- .../door-lock-common/door-lock-app.matter | 372 ++--- .../lighting-common/lighting-app.matter | 462 +++---- examples/lock-app/lock-common/lock-app.matter | 348 ++--- .../log-source-common/log-source-app.matter | 18 +- .../ota-provider-app.matter | 58 +- .../ota-requestor-app.matter | 92 +- .../placeholder/linux/apps/app1/config.matter | 146 +- .../placeholder/linux/apps/app2/config.matter | 146 +- examples/pump-app/pump-common/pump-app.matter | 366 ++--- .../pump-controller-app.matter | 358 ++--- .../esp32/main/temperature-measurement.matter | 182 +-- .../thermostat-common/thermostat.matter | 402 +++--- examples/tv-app/tv-common/tv-app.matter | 506 +++---- .../tv-casting-common/tv-casting-app.matter | 818 +++++------ examples/window-app/common/window-app.matter | 392 +++--- .../templates/app/MatterIDL.zapt | 6 +- .../data_model/controller-clusters.matter | 1216 ++++++++--------- 19 files changed, 3688 insertions(+), 3688 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 1bb82371970df7..f6e3cf50fcb031 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 @@ -40,13 +40,13 @@ server cluster AccessControl = 31 { OCTET_STRING data = 1; } - attribute(writable, reportable) AccessControlEntry acl[] = 0; - attribute(writable, reportable) ExtensionEntry extension[] = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) AccessControlEntry acl[] = 0; + attribute(writable) ExtensionEntry extension[] = 1; + attribute(readonly) int16u clusterRevision = 65533; } server cluster AccountLogin = 1294 { - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; } server cluster AdministratorCommissioning = 60 { @@ -62,10 +62,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly, reportable) int8u windowStatus = 0; - attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; - attribute(readonly, reportable) int16u adminVendorId = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -93,14 +93,14 @@ server cluster ApplicationBasic = 1293 { kActiveVisibleNotFocus = 3; } - attribute(readonly, reportable) char_string vendorName = 0; - attribute(readonly, reportable) int16u vendorId = 1; - attribute(readonly, reportable) char_string applicationName = 2; - attribute(readonly, reportable) int16u productId = 3; - attribute(readonly, reportable) ApplicationStatusEnum applicationStatus = 5; - attribute(readonly, reportable) char_string applicationVersion = 6; - attribute(readonly, reportable) vendor_id allowedVendorList[] = 7; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) char_string vendorName = 0; + attribute(readonly) int16u vendorId = 1; + attribute(readonly) char_string applicationName = 2; + attribute(readonly) int16u productId = 3; + attribute(readonly) ApplicationStatusEnum applicationStatus = 5; + attribute(readonly) char_string applicationVersion = 6; + attribute(readonly) vendor_id allowedVendorList[] = 7; + attribute(readonly) int16u clusterRevision = 65533; } server cluster ApplicationLauncher = 1292 { @@ -115,8 +115,8 @@ server cluster ApplicationLauncher = 1292 { CHAR_STRING applicationId = 2; } - attribute(readonly, reportable) INT16U applicationLauncherList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) INT16U applicationLauncherList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster AudioOutput = 1291 { @@ -135,17 +135,17 @@ server cluster AudioOutput = 1291 { CHAR_STRING name = 3; } - attribute(readonly, reportable) OutputInfo audioOutputList[] = 0; - attribute(readonly, reportable) int8u currentAudioOutput = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) OutputInfo audioOutputList[] = 0; + attribute(readonly) int8u currentAudioOutput = 1; + attribute(readonly) int16u clusterRevision = 65533; } server cluster BarrierControl = 259 { - attribute(readonly, reportable) enum8 barrierMovingState = 1; - attribute(readonly, reportable) bitmap16 barrierSafetyStatus = 2; - attribute(readonly, reportable) bitmap8 barrierCapabilities = 3; - attribute(readonly, reportable) int8u barrierPosition = 10; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 barrierMovingState = 1; + attribute(readonly) bitmap16 barrierSafetyStatus = 2; + attribute(readonly) bitmap8 barrierCapabilities = 3; + attribute(readonly) int8u barrierPosition = 10; + attribute(readonly) int16u clusterRevision = 65533; request struct BarrierControlGoToPercentRequest { INT8U percentOpen = 0; @@ -170,39 +170,39 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly, reportable) int16u interactionModelVersion = 0; - attribute(readonly, reportable) char_string vendorName = 1; - attribute(readonly, reportable) vendor_id vendorID = 2; - attribute(readonly, reportable) char_string productName = 3; - attribute(readonly, reportable) int16u productID = 4; - attribute(writable, reportable) char_string nodeLabel = 5; - attribute(writable, reportable) char_string location = 6; - attribute(readonly, reportable) int16u hardwareVersion = 7; - attribute(readonly, reportable) char_string hardwareVersionString = 8; - attribute(readonly, reportable) int32u softwareVersion = 9; - attribute(readonly, reportable) char_string softwareVersionString = 10; - attribute(readonly, reportable) char_string manufacturingDate = 11; - attribute(readonly, reportable) char_string partNumber = 12; - attribute(readonly, reportable) long_char_string productURL = 13; - attribute(readonly, reportable) char_string productLabel = 14; - attribute(readonly, reportable) char_string serialNumber = 15; - attribute(writable, reportable) boolean localConfigDisabled = 16; - attribute(readonly, reportable) boolean reachable = 17; - attribute(readonly, reportable) char_string uniqueID = 18; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u interactionModelVersion = 0; + attribute(readonly) char_string vendorName = 1; + attribute(readonly) vendor_id vendorID = 2; + attribute(readonly) char_string productName = 3; + attribute(readonly) int16u productID = 4; + attribute(writable) char_string nodeLabel = 5; + attribute(writable) char_string location = 6; + attribute(readonly) int16u hardwareVersion = 7; + attribute(readonly) char_string hardwareVersionString = 8; + attribute(readonly) int32u softwareVersion = 9; + attribute(readonly) char_string softwareVersionString = 10; + attribute(readonly) char_string manufacturingDate = 11; + attribute(readonly) char_string partNumber = 12; + attribute(readonly) long_char_string productURL = 13; + attribute(readonly) char_string productLabel = 14; + attribute(readonly) char_string serialNumber = 15; + attribute(writable) boolean localConfigDisabled = 16; + attribute(readonly) boolean reachable = 17; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly) int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } server cluster BinaryInputBasic = 15 { - attribute(writable, reportable) boolean outOfService = 81; - attribute(writable, reportable) boolean presentValue = 85; - attribute(readonly, reportable) bitmap8 statusFlags = 111; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) boolean outOfService = 81; + attribute(writable) boolean presentValue = 85; + attribute(readonly) bitmap8 statusFlags = 111; + attribute(readonly) int16u clusterRevision = 65533; } server cluster Binding = 30 { - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; request struct BindRequest { NODE_ID nodeId = 0; @@ -227,8 +227,8 @@ server cluster BooleanState = 69 { boolean stateValue = 0; } - attribute(readonly, reportable) boolean stateValue = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) boolean stateValue = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster BridgedActions = 37 { @@ -289,14 +289,14 @@ server cluster BridgedActions = 37 { ActionErrorEnum error = 3; } - attribute(readonly, reportable) ActionStruct actionList[] = 0; - attribute(readonly, reportable) EndpointListStruct endpointList[] = 1; - attribute(readonly, reportable) long_char_string setupUrl = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) ActionStruct actionList[] = 0; + attribute(readonly) EndpointListStruct endpointList[] = 1; + attribute(readonly) long_char_string setupUrl = 2; + attribute(readonly) int16u clusterRevision = 65533; } server cluster BridgedDeviceBasic = 57 { - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; } server cluster Channel = 1284 { @@ -317,8 +317,8 @@ server cluster Channel = 1284 { CHAR_STRING affiliateCallSign = 5; } - attribute(readonly, reportable) ChannelInfo channelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) ChannelInfo channelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster ColorControl = 768 { @@ -368,59 +368,59 @@ server cluster ColorControl = 768 { kDown = 3; } - attribute(readonly, reportable) int8u currentHue = 0; - attribute(readonly, reportable) int8u currentSaturation = 1; - attribute(readonly, reportable) int16u remainingTime = 2; - attribute(readonly, reportable) int16u currentX = 3; - attribute(readonly, reportable) int16u currentY = 4; - attribute(readonly, reportable) enum8 driftCompensation = 5; - attribute(readonly, reportable) char_string compensationText = 6; - attribute(readonly, reportable) int16u colorTemperature = 7; - attribute(readonly, reportable) enum8 colorMode = 8; - attribute(writable, reportable) bitmap8 colorControlOptions = 15; - attribute(readonly, reportable) int8u numberOfPrimaries = 16; - attribute(readonly, reportable) int16u primary1X = 17; - attribute(readonly, reportable) int16u primary1Y = 18; - attribute(readonly, reportable) int8u primary1Intensity = 19; - attribute(readonly, reportable) int16u primary2X = 21; - attribute(readonly, reportable) int16u primary2Y = 22; - attribute(readonly, reportable) int8u primary2Intensity = 23; - attribute(readonly, reportable) int16u primary3X = 25; - attribute(readonly, reportable) int16u primary3Y = 26; - attribute(readonly, reportable) int8u primary3Intensity = 27; - attribute(readonly, reportable) int16u primary4X = 32; - attribute(readonly, reportable) int16u primary4Y = 33; - attribute(readonly, reportable) int8u primary4Intensity = 34; - attribute(readonly, reportable) int16u primary5X = 36; - attribute(readonly, reportable) int16u primary5Y = 37; - attribute(readonly, reportable) int8u primary5Intensity = 38; - attribute(readonly, reportable) int16u primary6X = 40; - attribute(readonly, reportable) int16u primary6Y = 41; - attribute(readonly, reportable) int8u primary6Intensity = 42; - attribute(writable, reportable) int16u whitePointX = 48; - attribute(writable, reportable) int16u whitePointY = 49; - attribute(writable, reportable) int16u colorPointRX = 50; - attribute(writable, reportable) int16u colorPointRY = 51; - attribute(writable, reportable) int8u colorPointRIntensity = 52; - attribute(writable, reportable) int16u colorPointGX = 54; - attribute(writable, reportable) int16u colorPointGY = 55; - attribute(writable, reportable) int8u colorPointGIntensity = 56; - attribute(writable, reportable) int16u colorPointBX = 58; - attribute(writable, reportable) int16u colorPointBY = 59; - attribute(writable, reportable) int8u colorPointBIntensity = 60; - attribute(readonly, reportable) int16u enhancedCurrentHue = 16384; - attribute(readonly, reportable) enum8 enhancedColorMode = 16385; - attribute(readonly, reportable) int8u colorLoopActive = 16386; - attribute(readonly, reportable) int8u colorLoopDirection = 16387; - attribute(readonly, reportable) int16u colorLoopTime = 16388; - attribute(readonly, reportable) int16u colorLoopStartEnhancedHue = 16389; - attribute(readonly, reportable) int16u colorLoopStoredEnhancedHue = 16390; - attribute(readonly, reportable) bitmap16 colorCapabilities = 16394; - attribute(readonly, reportable) int16u colorTempPhysicalMin = 16395; - attribute(readonly, reportable) int16u colorTempPhysicalMax = 16396; - attribute(readonly, reportable) int16u coupleColorTempToLevelMinMireds = 16397; - attribute(writable, reportable) int16u startUpColorTemperatureMireds = 16400; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u currentHue = 0; + attribute(readonly) int8u currentSaturation = 1; + attribute(readonly) int16u remainingTime = 2; + attribute(readonly) int16u currentX = 3; + attribute(readonly) int16u currentY = 4; + attribute(readonly) enum8 driftCompensation = 5; + attribute(readonly) char_string compensationText = 6; + attribute(readonly) int16u colorTemperature = 7; + attribute(readonly) enum8 colorMode = 8; + attribute(writable) bitmap8 colorControlOptions = 15; + attribute(readonly) int8u numberOfPrimaries = 16; + attribute(readonly) int16u primary1X = 17; + attribute(readonly) int16u primary1Y = 18; + attribute(readonly) int8u primary1Intensity = 19; + attribute(readonly) int16u primary2X = 21; + attribute(readonly) int16u primary2Y = 22; + attribute(readonly) int8u primary2Intensity = 23; + attribute(readonly) int16u primary3X = 25; + attribute(readonly) int16u primary3Y = 26; + attribute(readonly) int8u primary3Intensity = 27; + attribute(readonly) int16u primary4X = 32; + attribute(readonly) int16u primary4Y = 33; + attribute(readonly) int8u primary4Intensity = 34; + attribute(readonly) int16u primary5X = 36; + attribute(readonly) int16u primary5Y = 37; + attribute(readonly) int8u primary5Intensity = 38; + attribute(readonly) int16u primary6X = 40; + attribute(readonly) int16u primary6Y = 41; + attribute(readonly) int8u primary6Intensity = 42; + attribute(writable) int16u whitePointX = 48; + attribute(writable) int16u whitePointY = 49; + attribute(writable) int16u colorPointRX = 50; + attribute(writable) int16u colorPointRY = 51; + attribute(writable) int8u colorPointRIntensity = 52; + attribute(writable) int16u colorPointGX = 54; + attribute(writable) int16u colorPointGY = 55; + attribute(writable) int8u colorPointGIntensity = 56; + attribute(writable) int16u colorPointBX = 58; + attribute(writable) int16u colorPointBY = 59; + attribute(writable) int8u colorPointBIntensity = 60; + attribute(readonly) int16u enhancedCurrentHue = 16384; + attribute(readonly) enum8 enhancedColorMode = 16385; + attribute(readonly) int8u colorLoopActive = 16386; + attribute(readonly) int8u colorLoopDirection = 16387; + attribute(readonly) int16u colorLoopTime = 16388; + attribute(readonly) int16u colorLoopStartEnhancedHue = 16389; + attribute(readonly) int16u colorLoopStoredEnhancedHue = 16390; + attribute(readonly) bitmap16 colorCapabilities = 16394; + attribute(readonly) int16u colorTempPhysicalMin = 16395; + attribute(readonly) int16u colorTempPhysicalMax = 16396; + attribute(readonly) int16u coupleColorTempToLevelMinMireds = 16397; + attribute(writable) int16u startUpColorTemperatureMireds = 16400; + attribute(readonly) int16u clusterRevision = 65533; request struct ColorLoopSetRequest { ColorLoopUpdateFlags updateFlags = 0; @@ -655,9 +655,9 @@ server cluster ContentLauncher = 1290 { MetricTypeEnum metric = 3; } - attribute(readonly, reportable) CHAR_STRING acceptHeaderList[] = 0; - attribute(writable, reportable) bitmap32 supportedStreamingProtocols = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) CHAR_STRING acceptHeaderList[] = 0; + attribute(writable) bitmap32 supportedStreamingProtocols = 1; + attribute(readonly) int16u clusterRevision = 65533; } server cluster Descriptor = 29 { @@ -666,11 +666,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly, reportable) DeviceType deviceList[] = 0; - attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; - attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; - attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) DeviceType deviceList[] = 0; + attribute(readonly) CLUSTER_ID serverList[] = 1; + attribute(readonly) CLUSTER_ID clientList[] = 2; + attribute(readonly) ENDPOINT_NO partsList[] = 3; + attribute(readonly) int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -939,34 +939,34 @@ server cluster DoorLock = 257 { nullable INT16U dataIndex = 6; } - attribute(readonly, reportable) DlLockState lockState = 0; - attribute(readonly, reportable) DlLockType lockType = 1; - attribute(readonly, reportable) boolean actuatorEnabled = 2; - attribute(readonly, reportable) DlDoorState doorState = 3; - attribute(writable, reportable) int32u doorOpenEvents = 4; - attribute(writable, reportable) int32u doorClosedEvents = 5; - attribute(writable, reportable) int16u openPeriod = 6; - attribute(readonly, reportable) int16u numberOfTotalUsersSupported = 17; - attribute(readonly, reportable) int16u numberOfPINUsersSupported = 18; - attribute(readonly, reportable) int16u numberOfWeekDaySchedulesSupportedPerUser = 20; - attribute(readonly, reportable) int16u numberOfYearDaySchedulesSupportedPerUser = 21; - attribute(readonly, reportable) int16u numberOfHolidaySchedulesSupported = 22; - attribute(readonly, reportable) int8u maxPINCodeLength = 23; - attribute(readonly, reportable) int8u minPINCodeLength = 24; - attribute(readonly, reportable) bitmap8 credentialRulesSupport = 27; - attribute(writable, reportable) char_string language = 33; - attribute(writable, reportable) int32u autoRelockTime = 35; - attribute(writable, reportable) int8u soundVolume = 36; - attribute(writable, reportable) DlOperatingMode operatingMode = 37; - attribute(readonly, reportable) bitmap16 supportedOperatingModes = 38; - attribute(readonly, reportable) bitmap16 defaultConfigurationRegister = 39; - attribute(writable, reportable) boolean enableOneTouchLocking = 41; - attribute(writable, reportable) boolean enableInsideStatusLED = 42; - attribute(writable, reportable) boolean enablePrivacyModeButton = 43; - attribute(writable, reportable) int8u wrongCodeEntryLimit = 48; - attribute(writable, reportable) int8u userCodeTemporaryDisableTime = 49; - attribute(writable, reportable) boolean requirePINforRemoteOperation = 51; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) DlLockState lockState = 0; + attribute(readonly) DlLockType lockType = 1; + attribute(readonly) boolean actuatorEnabled = 2; + attribute(readonly) DlDoorState doorState = 3; + attribute(writable) int32u doorOpenEvents = 4; + attribute(writable) int32u doorClosedEvents = 5; + attribute(writable) int16u openPeriod = 6; + attribute(readonly) int16u numberOfTotalUsersSupported = 17; + attribute(readonly) int16u numberOfPINUsersSupported = 18; + attribute(readonly) int16u numberOfWeekDaySchedulesSupportedPerUser = 20; + attribute(readonly) int16u numberOfYearDaySchedulesSupportedPerUser = 21; + attribute(readonly) int16u numberOfHolidaySchedulesSupported = 22; + attribute(readonly) int8u maxPINCodeLength = 23; + attribute(readonly) int8u minPINCodeLength = 24; + attribute(readonly) bitmap8 credentialRulesSupport = 27; + attribute(writable) char_string language = 33; + attribute(writable) int32u autoRelockTime = 35; + attribute(writable) int8u soundVolume = 36; + attribute(writable) DlOperatingMode operatingMode = 37; + attribute(readonly) bitmap16 supportedOperatingModes = 38; + attribute(readonly) bitmap16 defaultConfigurationRegister = 39; + attribute(writable) boolean enableOneTouchLocking = 41; + attribute(writable) boolean enableInsideStatusLED = 42; + attribute(writable) boolean enablePrivacyModeButton = 43; + attribute(writable) int8u wrongCodeEntryLimit = 48; + attribute(writable) int8u userCodeTemporaryDisableTime = 49; + attribute(writable) boolean requirePINforRemoteOperation = 51; + attribute(readonly) int16u clusterRevision = 65533; request struct ClearCredentialRequest { DlCredential credential = 0; @@ -1046,18 +1046,18 @@ server cluster DoorLock = 257 { } server cluster ElectricalMeasurement = 2820 { - attribute(readonly, reportable) bitmap32 measurementType = 0; - attribute(readonly, reportable) int32s totalActivePower = 772; - attribute(readonly, reportable) int16u rmsVoltage = 1285; - attribute(readonly, reportable) int16u rmsVoltageMin = 1286; - attribute(readonly, reportable) int16u rmsVoltageMax = 1287; - attribute(readonly, reportable) int16u rmsCurrent = 1288; - attribute(readonly, reportable) int16u rmsCurrentMin = 1289; - attribute(readonly, reportable) int16u rmsCurrentMax = 1290; - attribute(readonly, reportable) int16s activePower = 1291; - attribute(readonly, reportable) int16s activePowerMin = 1292; - attribute(readonly, reportable) int16s activePowerMax = 1293; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) bitmap32 measurementType = 0; + attribute(readonly) int32s totalActivePower = 772; + attribute(readonly) int16u rmsVoltage = 1285; + attribute(readonly) int16u rmsVoltageMin = 1286; + attribute(readonly) int16u rmsVoltageMax = 1287; + attribute(readonly) int16u rmsCurrent = 1288; + attribute(readonly) int16u rmsCurrentMin = 1289; + attribute(readonly) int16u rmsCurrentMax = 1290; + attribute(readonly) int16s activePower = 1291; + attribute(readonly) int16s activePowerMin = 1292; + attribute(readonly) int16s activePowerMax = 1293; + attribute(readonly) int16u clusterRevision = 65533; } server cluster EthernetNetworkDiagnostics = 55 { @@ -1074,32 +1074,32 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly, reportable) enum8 PHYRate = 0; - attribute(readonly, reportable) boolean fullDuplex = 1; - attribute(readonly, reportable) int64u packetRxCount = 2; - attribute(readonly, reportable) int64u packetTxCount = 3; - attribute(readonly, reportable) int64u txErrCount = 4; - attribute(readonly, reportable) int64u collisionCount = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) boolean carrierDetect = 7; - attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 PHYRate = 0; + attribute(readonly) boolean fullDuplex = 1; + attribute(readonly) int64u packetRxCount = 2; + attribute(readonly) int64u packetTxCount = 3; + attribute(readonly) int64u txErrCount = 4; + attribute(readonly) int64u collisionCount = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) boolean carrierDetect = 7; + attribute(readonly) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } server cluster FixedLabel = 64 { - attribute(readonly, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster FlowMeasurement = 1028 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u tolerance = 3; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u tolerance = 3; + attribute(readonly) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -1120,12 +1120,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable, reportable) int64u breadcrumb = 0; - attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly, reportable) enum8 regulatoryConfig = 2; - attribute(readonly, reportable) enum8 locationCapability = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int64u breadcrumb = 0; + attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -1238,15 +1238,15 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly, reportable) int16u rebootCount = 1; - attribute(readonly, reportable) int64u upTime = 2; - attribute(readonly, reportable) int32u totalOperationalHours = 3; - attribute(readonly, reportable) enum8 bootReasons = 4; - attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; - attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly) int16u rebootCount = 1; + attribute(readonly) int64u upTime = 2; + attribute(readonly) int32u totalOperationalHours = 3; + attribute(readonly) enum8 bootReasons = 4; + attribute(readonly) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly) ENUM8 activeRadioFaults[] = 6; + attribute(readonly) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly) int16u clusterRevision = 65533; } server cluster GroupKeyManagement = 63 { @@ -1279,11 +1279,11 @@ server cluster GroupKeyManagement = 63 { INT64U epochStartTime2 = 7; } - attribute(readonly, reportable) GroupKey groupKeyMap[] = 0; - attribute(readonly, reportable) GroupInfo groupTable[] = 1; - attribute(readonly, reportable) int16u maxGroupsPerFabric = 2; - attribute(readonly, reportable) int16u maxGroupKeysPerFabric = 3; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) GroupKey groupKeyMap[] = 0; + attribute(readonly) GroupInfo groupTable[] = 1; + attribute(readonly) int16u maxGroupsPerFabric = 2; + attribute(readonly) int16u maxGroupKeysPerFabric = 3; + attribute(readonly) int16u clusterRevision = 65533; request struct KeySetReadRequest { INT16U groupKeySetID = 0; @@ -1316,8 +1316,8 @@ server cluster GroupKeyManagement = 63 { } server cluster Groups = 4 { - attribute(readonly, reportable) bitmap8 nameSupport = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) bitmap8 nameSupport = 0; + attribute(readonly) int16u clusterRevision = 65533; request struct AddGroupRequest { INT16U groupId = 0; @@ -1397,12 +1397,12 @@ server cluster IasZone = 1280 { kInvalidZoneType = 65535; } - attribute(readonly, reportable) enum8 zoneState = 0; - attribute(readonly, reportable) enum16 zoneType = 1; - attribute(readonly, reportable) bitmap16 zoneStatus = 2; - attribute(writable, reportable) node_id iasCieAddress = 16; - attribute(readonly, reportable) int8u zoneId = 17; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 zoneState = 0; + attribute(readonly) enum16 zoneType = 1; + attribute(readonly) bitmap16 zoneStatus = 2; + attribute(writable) node_id iasCieAddress = 16; + attribute(readonly) int8u zoneId = 17; + attribute(readonly) int16u clusterRevision = 65533; request struct ZoneEnrollRequestRequest { IasZoneType zoneType = 0; @@ -1448,9 +1448,9 @@ server cluster Identify = 3 { kActuator = 5; } - attribute(writable, reportable) int16u identifyTime = 0; - attribute(readonly, reportable) enum8 identifyType = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int16u identifyTime = 0; + attribute(readonly) enum8 identifyType = 1; + attribute(readonly) int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -1476,12 +1476,12 @@ server cluster IlluminanceMeasurement = 1024 { kCmos = 1; } - attribute(readonly, reportable) int16u measuredValue = 0; - attribute(readonly, reportable) int16u minMeasuredValue = 1; - attribute(readonly, reportable) int16u maxMeasuredValue = 2; - attribute(readonly, reportable) int16u tolerance = 3; - attribute(readonly, reportable) enum8 lightSensorType = 4; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u measuredValue = 0; + attribute(readonly) int16u minMeasuredValue = 1; + attribute(readonly) int16u maxMeasuredValue = 2; + attribute(readonly) int16u tolerance = 3; + attribute(readonly) enum8 lightSensorType = 4; + attribute(readonly) int16u clusterRevision = 65533; } server cluster KeypadInput = 1289 { @@ -1580,7 +1580,7 @@ server cluster KeypadInput = 1289 { kInvalidKeyInCurrentState = 2; } - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; } server cluster LevelControl = 8 { @@ -1594,22 +1594,22 @@ server cluster LevelControl = 8 { kDown = 1; } - attribute(readonly, reportable) int8u currentLevel = 0; - attribute(readonly, reportable) int16u remainingTime = 1; - attribute(readonly, reportable) int8u minLevel = 2; - attribute(readonly, reportable) int8u maxLevel = 3; - attribute(readonly, reportable) int16u currentFrequency = 4; - attribute(readonly, reportable) int16u minFrequency = 5; - attribute(readonly, reportable) int16u maxFrequency = 6; - attribute(writable, reportable) bitmap8 options = 15; - attribute(writable, reportable) int16u onOffTransitionTime = 16; - attribute(writable, reportable) int8u onLevel = 17; - attribute(writable, reportable) int16u onTransitionTime = 18; - attribute(writable, reportable) int16u offTransitionTime = 19; - attribute(writable, reportable) int8u defaultMoveRate = 20; - attribute(writable, reportable) int8u startUpCurrentLevel = 16384; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u currentLevel = 0; + attribute(readonly) int16u remainingTime = 1; + attribute(readonly) int8u minLevel = 2; + attribute(readonly) int8u maxLevel = 3; + attribute(readonly) int16u currentFrequency = 4; + attribute(readonly) int16u minFrequency = 5; + attribute(readonly) int16u maxFrequency = 6; + attribute(writable) bitmap8 options = 15; + attribute(writable) int16u onOffTransitionTime = 16; + attribute(writable) int8u onLevel = 17; + attribute(writable) int16u onTransitionTime = 18; + attribute(writable) int16u offTransitionTime = 19; + attribute(writable) int8u defaultMoveRate = 20; + attribute(writable) int8u startUpCurrentLevel = 16384; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -1665,12 +1665,12 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute(writable, reportable) char_string activeLocale = 1; - attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; } server cluster LowPower = 1288 { - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; command Sleep(): DefaultSuccess = 0; } @@ -1698,9 +1698,9 @@ server cluster MediaInput = 1287 { CHAR_STRING description = 4; } - attribute(readonly, reportable) InputInfo mediaInputList[] = 0; - attribute(readonly, reportable) int8u currentMediaInput = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) InputInfo mediaInputList[] = 0; + attribute(readonly) int8u currentMediaInput = 1; + attribute(readonly) int16u clusterRevision = 65533; } server cluster MediaPlayback = 1286 { @@ -1720,13 +1720,13 @@ server cluster MediaPlayback = 1286 { kSeekOutOfRange = 5; } - attribute(readonly, reportable) PlaybackStateEnum playbackState = 0; - attribute(readonly, reportable) epoch_us startTime = 1; - attribute(readonly, reportable) int64u duration = 2; - attribute(readonly, reportable) single playbackSpeed = 4; - attribute(readonly, reportable) int64u seekRangeEnd = 5; - attribute(readonly, reportable) int64u seekRangeStart = 6; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) PlaybackStateEnum playbackState = 0; + attribute(readonly) epoch_us startTime = 1; + attribute(readonly) int64u duration = 2; + attribute(readonly) single playbackSpeed = 4; + attribute(readonly) int64u seekRangeEnd = 5; + attribute(readonly) int64u seekRangeStart = 6; + attribute(readonly) int16u clusterRevision = 65533; } server cluster ModeSelect = 80 { @@ -1736,12 +1736,12 @@ server cluster ModeSelect = 80 { INT32U semanticTag = 3; } - attribute(readonly, reportable) int8u currentMode = 0; - attribute(readonly, reportable) ModeOptionStruct supportedModes[] = 1; - attribute(writable, reportable) int8u onMode = 2; - attribute(readonly, reportable) int8u startUpMode = 3; - attribute(readonly, reportable) char_string description = 4; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u currentMode = 0; + attribute(readonly) ModeOptionStruct supportedModes[] = 1; + attribute(writable) int8u onMode = 2; + attribute(readonly) int8u startUpMode = 3; + attribute(readonly) char_string description = 4; + attribute(readonly) int16u clusterRevision = 65533; request struct ChangeToModeRequest { INT8U newMode = 0; @@ -1800,16 +1800,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly, reportable) int8u maxNetworks = 0; - attribute(readonly, reportable) NetworkInfo networks[] = 1; - attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; - attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; - attribute(writable, reportable) boolean interfaceEnabled = 4; - attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly, reportable) octet_string lastNetworkID = 6; - attribute(readonly, reportable) int32u lastConnectErrorValue = 7; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -1890,7 +1890,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -1975,11 +1975,11 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute(writable, reportable) ProviderLocation defaultOtaProviders[] = 0; - attribute(readonly, reportable) boolean updatePossible = 1; - attribute(readonly, reportable) OTAUpdateStateEnum updateState = 2; - attribute(readonly, reportable) int8u updateStateProgress = 3; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) ProviderLocation defaultOtaProviders[] = 0; + attribute(readonly) boolean updatePossible = 1; + attribute(readonly) OTAUpdateStateEnum updateState = 2; + attribute(readonly) int8u updateStateProgress = 3; + attribute(readonly) int16u clusterRevision = 65533; request struct AnnounceOtaProviderRequest { node_id providerNodeId = 0; @@ -1993,10 +1993,10 @@ server cluster OtaSoftwareUpdateRequestor = 42 { } server cluster OccupancySensing = 1030 { - attribute(readonly, reportable) bitmap8 occupancy = 0; - attribute(readonly, reportable) enum8 occupancySensorType = 1; - attribute(readonly, reportable) bitmap8 occupancySensorTypeBitmap = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) bitmap8 occupancy = 0; + attribute(readonly) enum8 occupancySensorType = 1; + attribute(readonly) bitmap8 occupancySensorTypeBitmap = 2; + attribute(readonly) int16u clusterRevision = 65533; } server cluster OnOff = 6 { @@ -2015,13 +2015,13 @@ server cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly, reportable) boolean onOff = 0; - attribute(readonly, reportable) boolean globalSceneControl = 16384; - attribute(writable, reportable) int16u onTime = 16385; - attribute(writable, reportable) int16u offWaitTime = 16386; - attribute(writable, reportable) enum8 startUpOnOff = 16387; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) boolean onOff = 0; + attribute(readonly) boolean globalSceneControl = 16384; + attribute(writable) int16u onTime = 16385; + attribute(writable) int16u offWaitTime = 16386; + attribute(writable) enum8 startUpOnOff = 16387; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct OffWithEffectRequest { OnOffEffectIdentifier effectId = 0; @@ -2043,9 +2043,9 @@ server cluster OnOff = 6 { } server cluster OnOffSwitchConfiguration = 7 { - attribute(readonly, reportable) enum8 switchType = 0; - attribute(writable, reportable) enum8 switchActions = 16; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 switchType = 0; + attribute(writable) enum8 switchActions = 16; + attribute(readonly) int16u clusterRevision = 65533; } server cluster OperationalCredentials = 62 { @@ -2071,12 +2071,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; - attribute(readonly, reportable) int8u supportedFabrics = 2; - attribute(readonly, reportable) int8u commissionedFabrics = 3; - attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) FabricDescriptor fabricsList[] = 1; + attribute(readonly) int8u supportedFabrics = 2; + attribute(readonly) int8u commissionedFabrics = 3; + attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly) fabric_idx currentFabricIndex = 5; + attribute(readonly) int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -2151,29 +2151,29 @@ server cluster OperationalCredentials = 62 { } server cluster PowerSource = 47 { - attribute(readonly, reportable) enum8 status = 0; - attribute(readonly, reportable) int8u order = 1; - attribute(readonly, reportable) char_string description = 2; - attribute(readonly, reportable) int32u batteryVoltage = 11; - attribute(readonly, reportable) int8u batteryPercentRemaining = 12; - attribute(readonly, reportable) int32u batteryTimeRemaining = 13; - attribute(readonly, reportable) enum8 batteryChargeLevel = 14; - attribute(readonly, reportable) ENUM8 activeBatteryFaults[] = 18; - attribute(readonly, reportable) enum8 batteryChargeState = 26; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 status = 0; + attribute(readonly) int8u order = 1; + attribute(readonly) char_string description = 2; + attribute(readonly) int32u batteryVoltage = 11; + attribute(readonly) int8u batteryPercentRemaining = 12; + attribute(readonly) int32u batteryTimeRemaining = 13; + attribute(readonly) enum8 batteryChargeLevel = 14; + attribute(readonly) ENUM8 activeBatteryFaults[] = 18; + attribute(readonly) enum8 batteryChargeState = 26; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster PowerSourceConfiguration = 46 { - attribute(readonly, reportable) INT8U sources[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) INT8U sources[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster PressureMeasurement = 1027 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u clusterRevision = 65533; } server cluster PumpConfigurationAndControl = 512 { @@ -2244,40 +2244,40 @@ server cluster PumpConfigurationAndControl = 512 { info event TurbineOperation = 16 { } - attribute(readonly, reportable) int16s maxPressure = 0; - attribute(readonly, reportable) int16u maxSpeed = 1; - attribute(readonly, reportable) int16u maxFlow = 2; - attribute(readonly, reportable) int16s minConstPressure = 3; - attribute(readonly, reportable) int16s maxConstPressure = 4; - attribute(readonly, reportable) int16s minCompPressure = 5; - attribute(readonly, reportable) int16s maxCompPressure = 6; - attribute(readonly, reportable) int16u minConstSpeed = 7; - attribute(readonly, reportable) int16u maxConstSpeed = 8; - attribute(readonly, reportable) int16u minConstFlow = 9; - attribute(readonly, reportable) int16u maxConstFlow = 10; - attribute(readonly, reportable) int16s minConstTemp = 11; - attribute(readonly, reportable) int16s maxConstTemp = 12; - attribute(readonly, reportable) bitmap16 pumpStatus = 16; - attribute(readonly, reportable) enum8 effectiveOperationMode = 17; - attribute(readonly, reportable) enum8 effectiveControlMode = 18; - attribute(readonly, reportable) int16s capacity = 19; - attribute(readonly, reportable) int16u speed = 20; - attribute(writable, reportable) int24u lifetimeRunningHours = 21; - attribute(readonly, reportable) int24u power = 22; - attribute(writable, reportable) int32u lifetimeEnergyConsumed = 23; - attribute(writable, reportable) enum8 operationMode = 32; - attribute(writable, reportable) enum8 controlMode = 33; - attribute(readonly, reportable) bitmap16 alarmMask = 34; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s maxPressure = 0; + attribute(readonly) int16u maxSpeed = 1; + attribute(readonly) int16u maxFlow = 2; + attribute(readonly) int16s minConstPressure = 3; + attribute(readonly) int16s maxConstPressure = 4; + attribute(readonly) int16s minCompPressure = 5; + attribute(readonly) int16s maxCompPressure = 6; + attribute(readonly) int16u minConstSpeed = 7; + attribute(readonly) int16u maxConstSpeed = 8; + attribute(readonly) int16u minConstFlow = 9; + attribute(readonly) int16u maxConstFlow = 10; + attribute(readonly) int16s minConstTemp = 11; + attribute(readonly) int16s maxConstTemp = 12; + attribute(readonly) bitmap16 pumpStatus = 16; + attribute(readonly) enum8 effectiveOperationMode = 17; + attribute(readonly) enum8 effectiveControlMode = 18; + attribute(readonly) int16s capacity = 19; + attribute(readonly) int16u speed = 20; + attribute(writable) int24u lifetimeRunningHours = 21; + attribute(readonly) int24u power = 22; + attribute(writable) int32u lifetimeEnergyConsumed = 23; + attribute(writable) enum8 operationMode = 32; + attribute(writable) enum8 controlMode = 33; + attribute(readonly) bitmap16 alarmMask = 34; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster RelativeHumidityMeasurement = 1029 { - attribute(readonly, reportable) int16u measuredValue = 0; - attribute(readonly, reportable) int16u minMeasuredValue = 1; - attribute(readonly, reportable) int16u maxMeasuredValue = 2; - attribute(readonly, reportable) int16u tolerance = 3; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u measuredValue = 0; + attribute(readonly) int16u minMeasuredValue = 1; + attribute(readonly) int16u maxMeasuredValue = 2; + attribute(readonly) int16u tolerance = 3; + attribute(readonly) int16u clusterRevision = 65533; } server cluster Scenes = 5 { @@ -2287,12 +2287,12 @@ server cluster Scenes = 5 { INT8U value = 3; } - attribute(readonly, reportable) int8u sceneCount = 0; - attribute(readonly, reportable) int8u currentScene = 1; - attribute(readonly, reportable) int16u currentGroup = 2; - attribute(readonly, reportable) boolean sceneValid = 3; - attribute(readonly, reportable) bitmap8 nameSupport = 4; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u sceneCount = 0; + attribute(readonly) int8u currentScene = 1; + attribute(readonly) int16u currentGroup = 2; + attribute(readonly) boolean sceneValid = 3; + attribute(readonly) bitmap8 nameSupport = 4; + attribute(readonly) int16u clusterRevision = 65533; request struct AddSceneRequest { INT16U groupId = 0; @@ -2393,12 +2393,12 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; - attribute(readonly, reportable) int64u currentHeapFree = 1; - attribute(readonly, reportable) int64u currentHeapUsed = 2; - attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) ThreadMetrics threadMetrics[] = 0; + attribute(readonly) int64u currentHeapFree = 1; + attribute(readonly) int64u currentHeapUsed = 2; + attribute(readonly) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; command ResetWatermarks(): DefaultSuccess = 0; } @@ -2434,11 +2434,11 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } - attribute(readonly, reportable) int8u numberOfPositions = 0; - attribute(readonly, reportable) int8u currentPosition = 1; - attribute(readonly, reportable) int8u multiPressMax = 2; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u numberOfPositions = 0; + attribute(readonly) int8u currentPosition = 1; + attribute(readonly) int8u multiPressMax = 2; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster TargetNavigator = 1285 { @@ -2453,17 +2453,17 @@ server cluster TargetNavigator = 1285 { CHAR_STRING name = 2; } - attribute(readonly, reportable) TargetInfo targetNavigatorList[] = 0; - attribute(readonly, reportable) int8u currentNavigatorTarget = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) TargetInfo targetNavigatorList[] = 0; + attribute(readonly) int8u currentNavigatorTarget = 1; + attribute(readonly) int16u clusterRevision = 65533; } server cluster TemperatureMeasurement = 1026 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u tolerance = 3; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u tolerance = 3; + attribute(readonly) int16u clusterRevision = 65533; } server cluster TestCluster = 1295 { @@ -2530,84 +2530,84 @@ server cluster TestCluster = 1295 { SimpleEnum arg6[] = 6; } - attribute(writable, reportable) boolean boolean = 0; - attribute(writable, reportable) bitmap8 bitmap8 = 1; - attribute(writable, reportable) bitmap16 bitmap16 = 2; - attribute(writable, reportable) bitmap32 bitmap32 = 3; - attribute(writable, reportable) bitmap64 bitmap64 = 4; - attribute(writable, reportable) int8u int8u = 5; - attribute(writable, reportable) int16u int16u = 6; - attribute(writable, reportable) int24u int24u = 7; - attribute(writable, reportable) int32u int32u = 8; - attribute(writable, reportable) int40u int40u = 9; - attribute(writable, reportable) int48u int48u = 10; - attribute(writable, reportable) int56u int56u = 11; - attribute(writable, reportable) int64u int64u = 12; - attribute(writable, reportable) int8s int8s = 13; - attribute(writable, reportable) int16s int16s = 14; - attribute(writable, reportable) int24s int24s = 15; - attribute(writable, reportable) int32s int32s = 16; - attribute(writable, reportable) int40s int40s = 17; - attribute(writable, reportable) int48s int48s = 18; - attribute(writable, reportable) int56s int56s = 19; - attribute(writable, reportable) int64s int64s = 20; - attribute(writable, reportable) enum8 enum8 = 21; - attribute(writable, reportable) enum16 enum16 = 22; - attribute(writable, reportable) single floatSingle = 23; - attribute(writable, reportable) double floatDouble = 24; - attribute(writable, reportable) octet_string octetString = 25; - attribute(writable, reportable) INT8U listInt8u[] = 26; - attribute(writable, reportable) OCTET_STRING listOctetString[] = 27; - attribute(writable, reportable) TestListStructOctet listStructOctetString[] = 28; - attribute(writable, reportable) long_octet_string longOctetString = 29; - attribute(writable, reportable) char_string charString = 30; - attribute(writable, reportable) long_char_string longCharString = 31; - attribute(writable, reportable) epoch_us epochUs = 32; - attribute(writable, reportable) epoch_s epochS = 33; - attribute(writable, reportable) vendor_id vendorId = 34; - attribute(writable, reportable) NullablesAndOptionalsStruct listNullablesAndOptionalsStruct[] = 35; - attribute(writable, reportable) SimpleEnum enumAttr = 36; - attribute(writable, reportable) SimpleStruct structAttr = 37; - attribute(writable, reportable) int8u rangeRestrictedInt8u = 38; - attribute(writable, reportable) int8s rangeRestrictedInt8s = 39; - attribute(writable, reportable) int16u rangeRestrictedInt16u = 40; - attribute(writable, reportable) int16s rangeRestrictedInt16s = 41; - attribute(readonly, reportable) LONG_OCTET_STRING listLongOctetString[] = 42; - attribute(writable, reportable) boolean timedWriteBoolean = 48; - attribute(writable, reportable) boolean nullableBoolean = 32768; - attribute(writable, reportable) bitmap8 nullableBitmap8 = 32769; - attribute(writable, reportable) bitmap16 nullableBitmap16 = 32770; - attribute(writable, reportable) bitmap32 nullableBitmap32 = 32771; - attribute(writable, reportable) bitmap64 nullableBitmap64 = 32772; - attribute(writable, reportable) int8u nullableInt8u = 32773; - attribute(writable, reportable) int16u nullableInt16u = 32774; - attribute(writable, reportable) int24u nullableInt24u = 32775; - attribute(writable, reportable) int32u nullableInt32u = 32776; - attribute(writable, reportable) int40u nullableInt40u = 32777; - attribute(writable, reportable) int48u nullableInt48u = 32778; - attribute(writable, reportable) int56u nullableInt56u = 32779; - attribute(writable, reportable) int64u nullableInt64u = 32780; - attribute(writable, reportable) int8s nullableInt8s = 32781; - attribute(writable, reportable) int16s nullableInt16s = 32782; - attribute(writable, reportable) int24s nullableInt24s = 32783; - attribute(writable, reportable) int32s nullableInt32s = 32784; - attribute(writable, reportable) int40s nullableInt40s = 32785; - attribute(writable, reportable) int48s nullableInt48s = 32786; - attribute(writable, reportable) int56s nullableInt56s = 32787; - attribute(writable, reportable) int64s nullableInt64s = 32788; - attribute(writable, reportable) enum8 nullableEnum8 = 32789; - attribute(writable, reportable) enum16 nullableEnum16 = 32790; - attribute(writable, reportable) single nullableFloatSingle = 32791; - attribute(writable, reportable) double nullableFloatDouble = 32792; - attribute(writable, reportable) octet_string nullableOctetString = 32793; - attribute(writable, reportable) char_string nullableCharString = 32798; - attribute(writable, reportable) SimpleEnum nullableEnumAttr = 32804; - attribute(writable, reportable) SimpleStruct nullableStruct = 32805; - attribute(writable, reportable) int8u nullableRangeRestrictedInt8u = 32806; - attribute(writable, reportable) int8s nullableRangeRestrictedInt8s = 32807; - attribute(writable, reportable) int16u nullableRangeRestrictedInt16u = 32808; - attribute(writable, reportable) int16s nullableRangeRestrictedInt16s = 32809; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) boolean boolean = 0; + attribute(writable) bitmap8 bitmap8 = 1; + attribute(writable) bitmap16 bitmap16 = 2; + attribute(writable) bitmap32 bitmap32 = 3; + attribute(writable) bitmap64 bitmap64 = 4; + attribute(writable) int8u int8u = 5; + attribute(writable) int16u int16u = 6; + attribute(writable) int24u int24u = 7; + attribute(writable) int32u int32u = 8; + attribute(writable) int40u int40u = 9; + attribute(writable) int48u int48u = 10; + attribute(writable) int56u int56u = 11; + attribute(writable) int64u int64u = 12; + attribute(writable) int8s int8s = 13; + attribute(writable) int16s int16s = 14; + attribute(writable) int24s int24s = 15; + attribute(writable) int32s int32s = 16; + attribute(writable) int40s int40s = 17; + attribute(writable) int48s int48s = 18; + attribute(writable) int56s int56s = 19; + attribute(writable) int64s int64s = 20; + attribute(writable) enum8 enum8 = 21; + attribute(writable) enum16 enum16 = 22; + attribute(writable) single floatSingle = 23; + attribute(writable) double floatDouble = 24; + attribute(writable) octet_string octetString = 25; + attribute(writable) INT8U listInt8u[] = 26; + attribute(writable) OCTET_STRING listOctetString[] = 27; + attribute(writable) TestListStructOctet listStructOctetString[] = 28; + attribute(writable) long_octet_string longOctetString = 29; + attribute(writable) char_string charString = 30; + attribute(writable) long_char_string longCharString = 31; + attribute(writable) epoch_us epochUs = 32; + attribute(writable) epoch_s epochS = 33; + attribute(writable) vendor_id vendorId = 34; + attribute(writable) NullablesAndOptionalsStruct listNullablesAndOptionalsStruct[] = 35; + attribute(writable) SimpleEnum enumAttr = 36; + attribute(writable) SimpleStruct structAttr = 37; + attribute(writable) int8u rangeRestrictedInt8u = 38; + attribute(writable) int8s rangeRestrictedInt8s = 39; + attribute(writable) int16u rangeRestrictedInt16u = 40; + attribute(writable) int16s rangeRestrictedInt16s = 41; + attribute(readonly) LONG_OCTET_STRING listLongOctetString[] = 42; + attribute(writable) boolean timedWriteBoolean = 48; + attribute(writable) boolean nullableBoolean = 32768; + attribute(writable) bitmap8 nullableBitmap8 = 32769; + attribute(writable) bitmap16 nullableBitmap16 = 32770; + attribute(writable) bitmap32 nullableBitmap32 = 32771; + attribute(writable) bitmap64 nullableBitmap64 = 32772; + attribute(writable) int8u nullableInt8u = 32773; + attribute(writable) int16u nullableInt16u = 32774; + attribute(writable) int24u nullableInt24u = 32775; + attribute(writable) int32u nullableInt32u = 32776; + attribute(writable) int40u nullableInt40u = 32777; + attribute(writable) int48u nullableInt48u = 32778; + attribute(writable) int56u nullableInt56u = 32779; + attribute(writable) int64u nullableInt64u = 32780; + attribute(writable) int8s nullableInt8s = 32781; + attribute(writable) int16s nullableInt16s = 32782; + attribute(writable) int24s nullableInt24s = 32783; + attribute(writable) int32s nullableInt32s = 32784; + attribute(writable) int40s nullableInt40s = 32785; + attribute(writable) int48s nullableInt48s = 32786; + attribute(writable) int56s nullableInt56s = 32787; + attribute(writable) int64s nullableInt64s = 32788; + attribute(writable) enum8 nullableEnum8 = 32789; + attribute(writable) enum16 nullableEnum16 = 32790; + attribute(writable) single nullableFloatSingle = 32791; + attribute(writable) double nullableFloatDouble = 32792; + attribute(writable) octet_string nullableOctetString = 32793; + attribute(writable) char_string nullableCharString = 32798; + attribute(writable) SimpleEnum nullableEnumAttr = 32804; + attribute(writable) SimpleStruct nullableStruct = 32805; + attribute(writable) int8u nullableRangeRestrictedInt8u = 32806; + attribute(writable) int8s nullableRangeRestrictedInt8s = 32807; + attribute(writable) int16u nullableRangeRestrictedInt16u = 32808; + attribute(writable) int16s nullableRangeRestrictedInt16s = 32809; + attribute(readonly) int16u clusterRevision = 65533; request struct SimpleStructEchoRequestRequest { SimpleStruct arg1 = 0; @@ -2723,32 +2723,32 @@ server cluster Thermostat = 513 { kHeatAndCoolSetpoints = 2; } - attribute(readonly, reportable) int16s localTemperature = 0; - attribute(readonly, reportable) int16s absMinHeatSetpointLimit = 3; - attribute(readonly, reportable) int16s absMaxHeatSetpointLimit = 4; - attribute(readonly, reportable) int16s absMinCoolSetpointLimit = 5; - attribute(readonly, reportable) int16s absMaxCoolSetpointLimit = 6; - attribute(writable, reportable) int16s occupiedCoolingSetpoint = 17; - attribute(writable, reportable) int16s occupiedHeatingSetpoint = 18; - attribute(writable, reportable) int16s minHeatSetpointLimit = 21; - attribute(writable, reportable) int16s maxHeatSetpointLimit = 22; - attribute(writable, reportable) int16s minCoolSetpointLimit = 23; - attribute(writable, reportable) int16s maxCoolSetpointLimit = 24; - attribute(writable, reportable) int8s minSetpointDeadBand = 25; - attribute(writable, reportable) enum8 controlSequenceOfOperation = 27; - attribute(writable, reportable) enum8 systemMode = 28; - attribute(readonly, reportable) enum8 startOfWeek = 32; - attribute(readonly, reportable) int8u numberOfWeeklyTransitions = 33; - attribute(readonly, reportable) int8u numberOfDailyTransitions = 34; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s localTemperature = 0; + attribute(readonly) int16s absMinHeatSetpointLimit = 3; + attribute(readonly) int16s absMaxHeatSetpointLimit = 4; + attribute(readonly) int16s absMinCoolSetpointLimit = 5; + attribute(readonly) int16s absMaxCoolSetpointLimit = 6; + attribute(writable) int16s occupiedCoolingSetpoint = 17; + attribute(writable) int16s occupiedHeatingSetpoint = 18; + attribute(writable) int16s minHeatSetpointLimit = 21; + attribute(writable) int16s maxHeatSetpointLimit = 22; + attribute(writable) int16s minCoolSetpointLimit = 23; + attribute(writable) int16s maxCoolSetpointLimit = 24; + attribute(writable) int8s minSetpointDeadBand = 25; + attribute(writable) enum8 controlSequenceOfOperation = 27; + attribute(writable) enum8 systemMode = 28; + attribute(readonly) enum8 startOfWeek = 32; + attribute(readonly) int8u numberOfWeeklyTransitions = 33; + attribute(readonly) int8u numberOfDailyTransitions = 34; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster ThermostatUserInterfaceConfiguration = 516 { - attribute(writable, reportable) enum8 temperatureDisplayMode = 0; - attribute(writable, reportable) enum8 keypadLockout = 1; - attribute(writable, reportable) enum8 scheduleProgrammingVisibility = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) enum8 temperatureDisplayMode = 0; + attribute(writable) enum8 keypadLockout = 1; + attribute(writable) enum8 scheduleProgrammingVisibility = 2; + attribute(readonly) int16u clusterRevision = 65533; } server cluster ThreadNetworkDiagnostics = 53 { @@ -2828,83 +2828,83 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) int16u channel = 0; - attribute(readonly, reportable) enum8 routingRole = 1; - attribute(readonly, reportable) octet_string networkName = 2; - attribute(readonly, reportable) int16u panId = 3; - attribute(readonly, reportable) int64u extendedPanId = 4; - attribute(readonly, reportable) octet_string meshLocalPrefix = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; - attribute(readonly, reportable) RouteTable routeTableList[] = 8; - attribute(readonly, reportable) int32u partitionId = 9; - attribute(readonly, reportable) int8u weighting = 10; - attribute(readonly, reportable) int8u dataVersion = 11; - attribute(readonly, reportable) int8u stableDataVersion = 12; - attribute(readonly, reportable) int8u leaderRouterId = 13; - attribute(readonly, reportable) int16u detachedRoleCount = 14; - attribute(readonly, reportable) int16u childRoleCount = 15; - attribute(readonly, reportable) int16u routerRoleCount = 16; - attribute(readonly, reportable) int16u leaderRoleCount = 17; - attribute(readonly, reportable) int16u attachAttemptCount = 18; - attribute(readonly, reportable) int16u partitionIdChangeCount = 19; - attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly, reportable) int16u parentChangeCount = 21; - attribute(readonly, reportable) int32u txTotalCount = 22; - attribute(readonly, reportable) int32u txUnicastCount = 23; - attribute(readonly, reportable) int32u txBroadcastCount = 24; - attribute(readonly, reportable) int32u txAckRequestedCount = 25; - attribute(readonly, reportable) int32u txAckedCount = 26; - attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; - attribute(readonly, reportable) int32u txDataCount = 28; - attribute(readonly, reportable) int32u txDataPollCount = 29; - attribute(readonly, reportable) int32u txBeaconCount = 30; - attribute(readonly, reportable) int32u txBeaconRequestCount = 31; - attribute(readonly, reportable) int32u txOtherCount = 32; - attribute(readonly, reportable) int32u txRetryCount = 33; - attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly, reportable) int32u txErrCcaCount = 36; - attribute(readonly, reportable) int32u txErrAbortCount = 37; - attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; - attribute(readonly, reportable) int32u rxTotalCount = 39; - attribute(readonly, reportable) int32u rxUnicastCount = 40; - attribute(readonly, reportable) int32u rxBroadcastCount = 41; - attribute(readonly, reportable) int32u rxDataCount = 42; - attribute(readonly, reportable) int32u rxDataPollCount = 43; - attribute(readonly, reportable) int32u rxBeaconCount = 44; - attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; - attribute(readonly, reportable) int32u rxOtherCount = 46; - attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; - attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; - attribute(readonly, reportable) int32u rxDuplicatedCount = 49; - attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; - attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly, reportable) int32u rxErrSecCount = 53; - attribute(readonly, reportable) int32u rxErrFcsCount = 54; - attribute(readonly, reportable) int32u rxErrOtherCount = 55; - attribute(readonly, reportable) int64u activeTimestamp = 56; - attribute(readonly, reportable) int64u pendingTimestamp = 57; - attribute(readonly, reportable) int32u delay = 58; - attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; - attribute(readonly, reportable) octet_string channelMask = 60; - attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u channel = 0; + attribute(readonly) enum8 routingRole = 1; + attribute(readonly) octet_string networkName = 2; + attribute(readonly) int16u panId = 3; + attribute(readonly) int64u extendedPanId = 4; + attribute(readonly) octet_string meshLocalPrefix = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) NeighborTable neighborTableList[] = 7; + attribute(readonly) RouteTable routeTableList[] = 8; + attribute(readonly) int32u partitionId = 9; + attribute(readonly) int8u weighting = 10; + attribute(readonly) int8u dataVersion = 11; + attribute(readonly) int8u stableDataVersion = 12; + attribute(readonly) int8u leaderRouterId = 13; + attribute(readonly) int16u detachedRoleCount = 14; + attribute(readonly) int16u childRoleCount = 15; + attribute(readonly) int16u routerRoleCount = 16; + attribute(readonly) int16u leaderRoleCount = 17; + attribute(readonly) int16u attachAttemptCount = 18; + attribute(readonly) int16u partitionIdChangeCount = 19; + attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly) int16u parentChangeCount = 21; + attribute(readonly) int32u txTotalCount = 22; + attribute(readonly) int32u txUnicastCount = 23; + attribute(readonly) int32u txBroadcastCount = 24; + attribute(readonly) int32u txAckRequestedCount = 25; + attribute(readonly) int32u txAckedCount = 26; + attribute(readonly) int32u txNoAckRequestedCount = 27; + attribute(readonly) int32u txDataCount = 28; + attribute(readonly) int32u txDataPollCount = 29; + attribute(readonly) int32u txBeaconCount = 30; + attribute(readonly) int32u txBeaconRequestCount = 31; + attribute(readonly) int32u txOtherCount = 32; + attribute(readonly) int32u txRetryCount = 33; + attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly) int32u txErrCcaCount = 36; + attribute(readonly) int32u txErrAbortCount = 37; + attribute(readonly) int32u txErrBusyChannelCount = 38; + attribute(readonly) int32u rxTotalCount = 39; + attribute(readonly) int32u rxUnicastCount = 40; + attribute(readonly) int32u rxBroadcastCount = 41; + attribute(readonly) int32u rxDataCount = 42; + attribute(readonly) int32u rxDataPollCount = 43; + attribute(readonly) int32u rxBeaconCount = 44; + attribute(readonly) int32u rxBeaconRequestCount = 45; + attribute(readonly) int32u rxOtherCount = 46; + attribute(readonly) int32u rxAddressFilteredCount = 47; + attribute(readonly) int32u rxDestAddrFilteredCount = 48; + attribute(readonly) int32u rxDuplicatedCount = 49; + attribute(readonly) int32u rxErrNoFrameCount = 50; + attribute(readonly) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly) int32u rxErrSecCount = 53; + attribute(readonly) int32u rxErrFcsCount = 54; + attribute(readonly) int32u rxErrOtherCount = 55; + attribute(readonly) int64u activeTimestamp = 56; + attribute(readonly) int64u pendingTimestamp = 57; + attribute(readonly) int32u delay = 58; + attribute(readonly) SecurityPolicy securityPolicy[] = 59; + attribute(readonly) octet_string channelMask = 60; + attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } server cluster UserLabel = 65 { - attribute(writable, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster WakeOnLan = 1283 { - attribute(readonly, reportable) char_string wakeOnLanMacAddress = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) char_string wakeOnLanMacAddress = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -2951,46 +2951,46 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) octet_string bssid = 0; - attribute(readonly, reportable) enum8 securityType = 1; - attribute(readonly, reportable) enum8 wiFiVersion = 2; - attribute(readonly, reportable) int16u channelNumber = 3; - attribute(readonly, reportable) int8s rssi = 4; - attribute(readonly, reportable) int32u beaconLostCount = 5; - attribute(readonly, reportable) int32u beaconRxCount = 6; - attribute(readonly, reportable) int32u packetMulticastRxCount = 7; - attribute(readonly, reportable) int32u packetMulticastTxCount = 8; - attribute(readonly, reportable) int32u packetUnicastRxCount = 9; - attribute(readonly, reportable) int32u packetUnicastTxCount = 10; - attribute(readonly, reportable) int64u currentMaxRate = 11; - attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) octet_string bssid = 0; + attribute(readonly) enum8 securityType = 1; + attribute(readonly) enum8 wiFiVersion = 2; + attribute(readonly) int16u channelNumber = 3; + attribute(readonly) int8s rssi = 4; + attribute(readonly) int32u beaconLostCount = 5; + attribute(readonly) int32u beaconRxCount = 6; + attribute(readonly) int32u packetMulticastRxCount = 7; + attribute(readonly) int32u packetMulticastTxCount = 8; + attribute(readonly) int32u packetUnicastRxCount = 9; + attribute(readonly) int32u packetUnicastTxCount = 10; + attribute(readonly) int64u currentMaxRate = 11; + attribute(readonly) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } server cluster WindowCovering = 258 { - attribute(readonly, reportable) enum8 type = 0; - attribute(readonly, reportable) int16u currentPositionLift = 3; - attribute(readonly, reportable) int16u currentPositionTilt = 4; - attribute(readonly, reportable) bitmap8 configStatus = 7; - attribute(readonly, reportable) Percent currentPositionLiftPercentage = 8; - attribute(readonly, reportable) Percent currentPositionTiltPercentage = 9; - attribute(readonly, reportable) bitmap8 operationalStatus = 10; - attribute(readonly, reportable) Percent100ths targetPositionLiftPercent100ths = 11; - attribute(readonly, reportable) Percent100ths targetPositionTiltPercent100ths = 12; - attribute(readonly, reportable) enum8 endProductType = 13; - attribute(readonly, reportable) Percent100ths currentPositionLiftPercent100ths = 14; - attribute(readonly, reportable) Percent100ths currentPositionTiltPercent100ths = 15; - attribute(readonly, reportable) int16u installedOpenLimitLift = 16; - attribute(readonly, reportable) int16u installedClosedLimitLift = 17; - attribute(readonly, reportable) int16u installedOpenLimitTilt = 18; - attribute(readonly, reportable) int16u installedClosedLimitTilt = 19; - attribute(writable, reportable) bitmap8 mode = 23; - attribute(readonly, reportable) bitmap16 safetyStatus = 26; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 type = 0; + attribute(readonly) int16u currentPositionLift = 3; + attribute(readonly) int16u currentPositionTilt = 4; + attribute(readonly) bitmap8 configStatus = 7; + attribute(readonly) Percent currentPositionLiftPercentage = 8; + attribute(readonly) Percent currentPositionTiltPercentage = 9; + attribute(readonly) bitmap8 operationalStatus = 10; + attribute(readonly) Percent100ths targetPositionLiftPercent100ths = 11; + attribute(readonly) Percent100ths targetPositionTiltPercent100ths = 12; + attribute(readonly) enum8 endProductType = 13; + attribute(readonly) Percent100ths currentPositionLiftPercent100ths = 14; + attribute(readonly) Percent100ths currentPositionTiltPercent100ths = 15; + attribute(readonly) int16u installedOpenLimitLift = 16; + attribute(readonly) int16u installedClosedLimitLift = 17; + attribute(readonly) int16u installedOpenLimitTilt = 18; + attribute(readonly) int16u installedClosedLimitTilt = 19; + attribute(writable) bitmap8 mode = 23; + attribute(readonly) bitmap16 safetyStatus = 26; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; command DownOrClose(): DefaultSuccess = 1; command StopMotion(): DefaultSuccess = 2; diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index ed8d4ed2abed62..5b96c72fc46520 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -19,10 +19,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly, reportable) int8u windowStatus = 0; - attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; - attribute(readonly, reportable) int16u adminVendorId = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -57,18 +57,18 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly, reportable) int16u interactionModelVersion = 0; - attribute(readonly, reportable) char_string vendorName = 1; - attribute(readonly, reportable) vendor_id vendorID = 2; - attribute(readonly, reportable) char_string productName = 3; - attribute(readonly, reportable) int16u productID = 4; - attribute(writable, reportable) char_string nodeLabel = 5; - attribute(writable, reportable) char_string location = 6; - attribute(readonly, reportable) int16u hardwareVersion = 7; - attribute(readonly, reportable) char_string hardwareVersionString = 8; - attribute(readonly, reportable) int32u softwareVersion = 9; - attribute(readonly, reportable) char_string softwareVersionString = 10; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u interactionModelVersion = 0; + attribute(readonly) char_string vendorName = 1; + attribute(readonly) vendor_id vendorID = 2; + attribute(readonly) char_string productName = 3; + attribute(readonly) int16u productID = 4; + attribute(writable) char_string nodeLabel = 5; + attribute(writable) char_string location = 6; + attribute(readonly) int16u hardwareVersion = 7; + attribute(readonly) char_string hardwareVersionString = 8; + attribute(readonly) int32u softwareVersion = 9; + attribute(readonly) char_string softwareVersionString = 10; + attribute(readonly) int16u clusterRevision = 65533; } server cluster Descriptor = 29 { @@ -77,11 +77,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly, reportable) DeviceType deviceList[] = 0; - attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; - attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; - attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) DeviceType deviceList[] = 0; + attribute(readonly) CLUSTER_ID serverList[] = 1; + attribute(readonly) CLUSTER_ID clientList[] = 2; + attribute(readonly) ENDPOINT_NO partsList[] = 3; + attribute(readonly) int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -128,22 +128,22 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly, reportable) enum8 PHYRate = 0; - attribute(readonly, reportable) boolean fullDuplex = 1; - attribute(readonly, reportable) int64u packetRxCount = 2; - attribute(readonly, reportable) int64u packetTxCount = 3; - attribute(readonly, reportable) int64u txErrCount = 4; - attribute(readonly, reportable) int64u collisionCount = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) boolean carrierDetect = 7; - attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 PHYRate = 0; + attribute(readonly) boolean fullDuplex = 1; + attribute(readonly) int64u packetRxCount = 2; + attribute(readonly) int64u packetTxCount = 3; + attribute(readonly) int64u txErrCount = 4; + attribute(readonly) int64u collisionCount = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) boolean carrierDetect = 7; + attribute(readonly) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -164,12 +164,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable, reportable) int64u breadcrumb = 0; - attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly, reportable) enum8 regulatoryConfig = 2; - attribute(readonly, reportable) enum8 locationCapability = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int64u breadcrumb = 0; + attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -282,15 +282,15 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly, reportable) int16u rebootCount = 1; - attribute(readonly, reportable) int64u upTime = 2; - attribute(readonly, reportable) int32u totalOperationalHours = 3; - attribute(readonly, reportable) enum8 bootReasons = 4; - attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; - attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly) int16u rebootCount = 1; + attribute(readonly) int64u upTime = 2; + attribute(readonly) int32u totalOperationalHours = 3; + attribute(readonly) enum8 bootReasons = 4; + attribute(readonly) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly) ENUM8 activeRadioFaults[] = 6; + attribute(readonly) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly) int16u clusterRevision = 65533; } server cluster LevelControl = 8 { @@ -304,22 +304,22 @@ server cluster LevelControl = 8 { kDown = 1; } - attribute(readonly, reportable) int8u currentLevel = 0; - attribute(readonly, reportable) int16u remainingTime = 1; - attribute(readonly, reportable) int8u minLevel = 2; - attribute(readonly, reportable) int8u maxLevel = 3; - attribute(readonly, reportable) int16u currentFrequency = 4; - attribute(readonly, reportable) int16u minFrequency = 5; - attribute(readonly, reportable) int16u maxFrequency = 6; - attribute(writable, reportable) bitmap8 options = 15; - attribute(writable, reportable) int16u onOffTransitionTime = 16; - attribute(writable, reportable) int8u onLevel = 17; - attribute(writable, reportable) int16u onTransitionTime = 18; - attribute(writable, reportable) int16u offTransitionTime = 19; - attribute(writable, reportable) int8u defaultMoveRate = 20; - attribute(writable, reportable) int8u startUpCurrentLevel = 16384; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u currentLevel = 0; + attribute(readonly) int16u remainingTime = 1; + attribute(readonly) int8u minLevel = 2; + attribute(readonly) int8u maxLevel = 3; + attribute(readonly) int16u currentFrequency = 4; + attribute(readonly) int16u minFrequency = 5; + attribute(readonly) int16u maxFrequency = 6; + attribute(writable) bitmap8 options = 15; + attribute(writable) int16u onOffTransitionTime = 16; + attribute(writable) int8u onLevel = 17; + attribute(writable) int16u onTransitionTime = 18; + attribute(writable) int16u offTransitionTime = 19; + attribute(writable) int8u defaultMoveRate = 20; + attribute(writable) int8u startUpCurrentLevel = 16384; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -375,8 +375,8 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute(writable, reportable) char_string activeLocale = 1; - attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -429,16 +429,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly, reportable) int8u maxNetworks = 0; - attribute(readonly, reportable) NetworkInfo networks[] = 1; - attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; - attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; - attribute(writable, reportable) boolean interfaceEnabled = 4; - attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly, reportable) octet_string lastNetworkID = 6; - attribute(readonly, reportable) int32u lastConnectErrorValue = 7; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -514,8 +514,8 @@ server cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly, reportable) boolean onOff = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) boolean onOff = 0; + attribute(readonly) int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -545,12 +545,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; - attribute(readonly, reportable) int8u supportedFabrics = 2; - attribute(readonly, reportable) int8u commissionedFabrics = 3; - attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) FabricDescriptor fabricsList[] = 1; + attribute(readonly) int8u supportedFabrics = 2; + attribute(readonly) int8u commissionedFabrics = 3; + attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly) fabric_idx currentFabricIndex = 5; + attribute(readonly) int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -637,12 +637,12 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; - attribute(readonly, reportable) int64u currentHeapFree = 1; - attribute(readonly, reportable) int64u currentHeapUsed = 2; - attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) ThreadMetrics threadMetrics[] = 0; + attribute(readonly) int64u currentHeapFree = 1; + attribute(readonly) int64u currentHeapUsed = 2; + attribute(readonly) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster Switch = 59 { @@ -676,11 +676,11 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } - attribute(readonly, reportable) int8u numberOfPositions = 0; - attribute(readonly, reportable) int8u currentPosition = 1; - attribute(readonly, reportable) int8u multiPressMax = 2; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u numberOfPositions = 0; + attribute(readonly) int8u currentPosition = 1; + attribute(readonly) int8u multiPressMax = 2; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster ThreadNetworkDiagnostics = 53 { @@ -760,76 +760,76 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) int16u channel = 0; - attribute(readonly, reportable) enum8 routingRole = 1; - attribute(readonly, reportable) octet_string networkName = 2; - attribute(readonly, reportable) int16u panId = 3; - attribute(readonly, reportable) int64u extendedPanId = 4; - attribute(readonly, reportable) octet_string meshLocalPrefix = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; - attribute(readonly, reportable) RouteTable routeTableList[] = 8; - attribute(readonly, reportable) int32u partitionId = 9; - attribute(readonly, reportable) int8u weighting = 10; - attribute(readonly, reportable) int8u dataVersion = 11; - attribute(readonly, reportable) int8u stableDataVersion = 12; - attribute(readonly, reportable) int8u leaderRouterId = 13; - attribute(readonly, reportable) int16u detachedRoleCount = 14; - attribute(readonly, reportable) int16u childRoleCount = 15; - attribute(readonly, reportable) int16u routerRoleCount = 16; - attribute(readonly, reportable) int16u leaderRoleCount = 17; - attribute(readonly, reportable) int16u attachAttemptCount = 18; - attribute(readonly, reportable) int16u partitionIdChangeCount = 19; - attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly, reportable) int16u parentChangeCount = 21; - attribute(readonly, reportable) int32u txTotalCount = 22; - attribute(readonly, reportable) int32u txUnicastCount = 23; - attribute(readonly, reportable) int32u txBroadcastCount = 24; - attribute(readonly, reportable) int32u txAckRequestedCount = 25; - attribute(readonly, reportable) int32u txAckedCount = 26; - attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; - attribute(readonly, reportable) int32u txDataCount = 28; - attribute(readonly, reportable) int32u txDataPollCount = 29; - attribute(readonly, reportable) int32u txBeaconCount = 30; - attribute(readonly, reportable) int32u txBeaconRequestCount = 31; - attribute(readonly, reportable) int32u txOtherCount = 32; - attribute(readonly, reportable) int32u txRetryCount = 33; - attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly, reportable) int32u txErrCcaCount = 36; - attribute(readonly, reportable) int32u txErrAbortCount = 37; - attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; - attribute(readonly, reportable) int32u rxTotalCount = 39; - attribute(readonly, reportable) int32u rxUnicastCount = 40; - attribute(readonly, reportable) int32u rxBroadcastCount = 41; - attribute(readonly, reportable) int32u rxDataCount = 42; - attribute(readonly, reportable) int32u rxDataPollCount = 43; - attribute(readonly, reportable) int32u rxBeaconCount = 44; - attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; - attribute(readonly, reportable) int32u rxOtherCount = 46; - attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; - attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; - attribute(readonly, reportable) int32u rxDuplicatedCount = 49; - attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; - attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly, reportable) int32u rxErrSecCount = 53; - attribute(readonly, reportable) int32u rxErrFcsCount = 54; - attribute(readonly, reportable) int32u rxErrOtherCount = 55; - attribute(readonly, reportable) int64u activeTimestamp = 56; - attribute(readonly, reportable) int64u pendingTimestamp = 57; - attribute(readonly, reportable) int32u delay = 58; - attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; - attribute(readonly, reportable) octet_string channelMask = 60; - attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u channel = 0; + attribute(readonly) enum8 routingRole = 1; + attribute(readonly) octet_string networkName = 2; + attribute(readonly) int16u panId = 3; + attribute(readonly) int64u extendedPanId = 4; + attribute(readonly) octet_string meshLocalPrefix = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) NeighborTable neighborTableList[] = 7; + attribute(readonly) RouteTable routeTableList[] = 8; + attribute(readonly) int32u partitionId = 9; + attribute(readonly) int8u weighting = 10; + attribute(readonly) int8u dataVersion = 11; + attribute(readonly) int8u stableDataVersion = 12; + attribute(readonly) int8u leaderRouterId = 13; + attribute(readonly) int16u detachedRoleCount = 14; + attribute(readonly) int16u childRoleCount = 15; + attribute(readonly) int16u routerRoleCount = 16; + attribute(readonly) int16u leaderRoleCount = 17; + attribute(readonly) int16u attachAttemptCount = 18; + attribute(readonly) int16u partitionIdChangeCount = 19; + attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly) int16u parentChangeCount = 21; + attribute(readonly) int32u txTotalCount = 22; + attribute(readonly) int32u txUnicastCount = 23; + attribute(readonly) int32u txBroadcastCount = 24; + attribute(readonly) int32u txAckRequestedCount = 25; + attribute(readonly) int32u txAckedCount = 26; + attribute(readonly) int32u txNoAckRequestedCount = 27; + attribute(readonly) int32u txDataCount = 28; + attribute(readonly) int32u txDataPollCount = 29; + attribute(readonly) int32u txBeaconCount = 30; + attribute(readonly) int32u txBeaconRequestCount = 31; + attribute(readonly) int32u txOtherCount = 32; + attribute(readonly) int32u txRetryCount = 33; + attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly) int32u txErrCcaCount = 36; + attribute(readonly) int32u txErrAbortCount = 37; + attribute(readonly) int32u txErrBusyChannelCount = 38; + attribute(readonly) int32u rxTotalCount = 39; + attribute(readonly) int32u rxUnicastCount = 40; + attribute(readonly) int32u rxBroadcastCount = 41; + attribute(readonly) int32u rxDataCount = 42; + attribute(readonly) int32u rxDataPollCount = 43; + attribute(readonly) int32u rxBeaconCount = 44; + attribute(readonly) int32u rxBeaconRequestCount = 45; + attribute(readonly) int32u rxOtherCount = 46; + attribute(readonly) int32u rxAddressFilteredCount = 47; + attribute(readonly) int32u rxDestAddrFilteredCount = 48; + attribute(readonly) int32u rxDuplicatedCount = 49; + attribute(readonly) int32u rxErrNoFrameCount = 50; + attribute(readonly) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly) int32u rxErrSecCount = 53; + attribute(readonly) int32u rxErrFcsCount = 54; + attribute(readonly) int32u rxErrOtherCount = 55; + attribute(readonly) int64u activeTimestamp = 56; + attribute(readonly) int64u pendingTimestamp = 57; + attribute(readonly) int32u delay = 58; + attribute(readonly) SecurityPolicy securityPolicy[] = 59; + attribute(readonly) octet_string channelMask = 60; + attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -876,21 +876,21 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) octet_string bssid = 0; - attribute(readonly, reportable) enum8 securityType = 1; - attribute(readonly, reportable) enum8 wiFiVersion = 2; - attribute(readonly, reportable) int16u channelNumber = 3; - attribute(readonly, reportable) int8s rssi = 4; - attribute(readonly, reportable) int32u beaconLostCount = 5; - attribute(readonly, reportable) int32u beaconRxCount = 6; - attribute(readonly, reportable) int32u packetMulticastRxCount = 7; - attribute(readonly, reportable) int32u packetMulticastTxCount = 8; - attribute(readonly, reportable) int32u packetUnicastRxCount = 9; - attribute(readonly, reportable) int32u packetUnicastTxCount = 10; - attribute(readonly, reportable) int64u currentMaxRate = 11; - attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) octet_string bssid = 0; + attribute(readonly) enum8 securityType = 1; + attribute(readonly) enum8 wiFiVersion = 2; + attribute(readonly) int16u channelNumber = 3; + attribute(readonly) int8s rssi = 4; + attribute(readonly) int32u beaconLostCount = 5; + attribute(readonly) int32u beaconRxCount = 6; + attribute(readonly) int32u packetMulticastRxCount = 7; + attribute(readonly) int32u packetMulticastTxCount = 8; + attribute(readonly) int32u packetUnicastRxCount = 9; + attribute(readonly) int32u packetUnicastTxCount = 10; + attribute(readonly) int64u currentMaxRate = 11; + attribute(readonly) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } diff --git a/examples/door-lock-app/door-lock-common/door-lock-app.matter b/examples/door-lock-app/door-lock-common/door-lock-app.matter index dc8dc6fc8c4c2a..16b9b8c2c6ae9c 100644 --- a/examples/door-lock-app/door-lock-common/door-lock-app.matter +++ b/examples/door-lock-app/door-lock-common/door-lock-app.matter @@ -19,10 +19,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly, reportable) int8u windowStatus = 0; - attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; - attribute(readonly, reportable) int16u adminVendorId = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -57,18 +57,18 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly, reportable) int16u interactionModelVersion = 0; - attribute(readonly, reportable) char_string vendorName = 1; - attribute(readonly, reportable) vendor_id vendorID = 2; - attribute(readonly, reportable) char_string productName = 3; - attribute(readonly, reportable) int16u productID = 4; - attribute(writable, reportable) char_string nodeLabel = 5; - attribute(writable, reportable) char_string location = 6; - attribute(readonly, reportable) int16u hardwareVersion = 7; - attribute(readonly, reportable) char_string hardwareVersionString = 8; - attribute(readonly, reportable) int32u softwareVersion = 9; - attribute(readonly, reportable) char_string softwareVersionString = 10; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u interactionModelVersion = 0; + attribute(readonly) char_string vendorName = 1; + attribute(readonly) vendor_id vendorID = 2; + attribute(readonly) char_string productName = 3; + attribute(readonly) int16u productID = 4; + attribute(writable) char_string nodeLabel = 5; + attribute(writable) char_string location = 6; + attribute(readonly) int16u hardwareVersion = 7; + attribute(readonly) char_string hardwareVersionString = 8; + attribute(readonly) int32u softwareVersion = 9; + attribute(readonly) char_string softwareVersionString = 10; + attribute(readonly) int16u clusterRevision = 65533; } server cluster Descriptor = 29 { @@ -77,11 +77,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly, reportable) DeviceType deviceList[] = 0; - attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; - attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; - attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) DeviceType deviceList[] = 0; + attribute(readonly) CLUSTER_ID serverList[] = 1; + attribute(readonly) CLUSTER_ID clientList[] = 2; + attribute(readonly) ENDPOINT_NO partsList[] = 3; + attribute(readonly) int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -350,25 +350,25 @@ server cluster DoorLock = 257 { nullable INT16U dataIndex = 6; } - attribute(readonly, reportable) DlLockState lockState = 0; - attribute(readonly, reportable) DlLockType lockType = 1; - attribute(readonly, reportable) boolean actuatorEnabled = 2; - attribute(readonly, reportable) DlDoorState doorState = 3; - attribute(readonly, reportable) int16u numberOfTotalUsersSupported = 17; - attribute(readonly, reportable) int16u numberOfPINUsersSupported = 18; - attribute(readonly, reportable) int8u maxPINCodeLength = 23; - attribute(readonly, reportable) int8u minPINCodeLength = 24; - attribute(readonly, reportable) bitmap8 credentialRulesSupport = 27; - attribute(writable, reportable) char_string language = 33; - attribute(writable, reportable) int32u autoRelockTime = 35; - attribute(writable, reportable) int8u soundVolume = 36; - attribute(writable, reportable) DlOperatingMode operatingMode = 37; - attribute(readonly, reportable) bitmap16 supportedOperatingModes = 38; - attribute(writable, reportable) boolean enableOneTouchLocking = 41; - attribute(writable, reportable) boolean enablePrivacyModeButton = 43; - attribute(writable, reportable) int8u wrongCodeEntryLimit = 48; - attribute(writable, reportable) int8u userCodeTemporaryDisableTime = 49; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) DlLockState lockState = 0; + attribute(readonly) DlLockType lockType = 1; + attribute(readonly) boolean actuatorEnabled = 2; + attribute(readonly) DlDoorState doorState = 3; + attribute(readonly) int16u numberOfTotalUsersSupported = 17; + attribute(readonly) int16u numberOfPINUsersSupported = 18; + attribute(readonly) int8u maxPINCodeLength = 23; + attribute(readonly) int8u minPINCodeLength = 24; + attribute(readonly) bitmap8 credentialRulesSupport = 27; + attribute(writable) char_string language = 33; + attribute(writable) int32u autoRelockTime = 35; + attribute(writable) int8u soundVolume = 36; + attribute(writable) DlOperatingMode operatingMode = 37; + attribute(readonly) bitmap16 supportedOperatingModes = 38; + attribute(writable) boolean enableOneTouchLocking = 41; + attribute(writable) boolean enablePrivacyModeButton = 43; + attribute(writable) int8u wrongCodeEntryLimit = 48; + attribute(writable) int8u userCodeTemporaryDisableTime = 49; + attribute(readonly) int16u clusterRevision = 65533; request struct ClearCredentialRequest { DlCredential credential = 0; @@ -461,22 +461,22 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly, reportable) enum8 PHYRate = 0; - attribute(readonly, reportable) boolean fullDuplex = 1; - attribute(readonly, reportable) int64u packetRxCount = 2; - attribute(readonly, reportable) int64u packetTxCount = 3; - attribute(readonly, reportable) int64u txErrCount = 4; - attribute(readonly, reportable) int64u collisionCount = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) boolean carrierDetect = 7; - attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 PHYRate = 0; + attribute(readonly) boolean fullDuplex = 1; + attribute(readonly) int64u packetRxCount = 2; + attribute(readonly) int64u packetTxCount = 3; + attribute(readonly) int64u txErrCount = 4; + attribute(readonly) int64u collisionCount = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) boolean carrierDetect = 7; + attribute(readonly) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -497,12 +497,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable, reportable) int64u breadcrumb = 0; - attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly, reportable) enum8 regulatoryConfig = 2; - attribute(readonly, reportable) enum8 locationCapability = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int64u breadcrumb = 0; + attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -615,20 +615,20 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly, reportable) int16u rebootCount = 1; - attribute(readonly, reportable) int64u upTime = 2; - attribute(readonly, reportable) int32u totalOperationalHours = 3; - attribute(readonly, reportable) enum8 bootReasons = 4; - attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; - attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly) int16u rebootCount = 1; + attribute(readonly) int64u upTime = 2; + attribute(readonly) int32u totalOperationalHours = 3; + attribute(readonly) enum8 bootReasons = 4; + attribute(readonly) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly) ENUM8 activeRadioFaults[] = 6; + attribute(readonly) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly) int16u clusterRevision = 65533; } server cluster LocalizationConfiguration = 43 { - attribute(writable, reportable) char_string activeLocale = 1; - attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -681,16 +681,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly, reportable) int8u maxNetworks = 0; - attribute(readonly, reportable) NetworkInfo networks[] = 1; - attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; - attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; - attribute(writable, reportable) boolean interfaceEnabled = 4; - attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly, reportable) octet_string lastNetworkID = 6; - attribute(readonly, reportable) int32u lastConnectErrorValue = 7; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -773,12 +773,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; - attribute(readonly, reportable) int8u supportedFabrics = 2; - attribute(readonly, reportable) int8u commissionedFabrics = 3; - attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) FabricDescriptor fabricsList[] = 1; + attribute(readonly) int8u supportedFabrics = 2; + attribute(readonly) int8u commissionedFabrics = 3; + attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly) fabric_idx currentFabricIndex = 5; + attribute(readonly) int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -853,21 +853,21 @@ server cluster OperationalCredentials = 62 { } server cluster PowerSource = 47 { - attribute(readonly, reportable) enum8 status = 0; - attribute(readonly, reportable) int8u order = 1; - attribute(readonly, reportable) char_string description = 2; - attribute(readonly, reportable) int32u wiredAssessedCurrent = 6; - attribute(readonly, reportable) enum8 batteryChargeLevel = 14; - attribute(readonly, reportable) boolean batteryReplacementNeeded = 15; - attribute(readonly, reportable) enum8 batteryReplaceability = 16; - attribute(readonly, reportable) char_string batteryReplacementDescription = 19; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 status = 0; + attribute(readonly) int8u order = 1; + attribute(readonly) char_string description = 2; + attribute(readonly) int32u wiredAssessedCurrent = 6; + attribute(readonly) enum8 batteryChargeLevel = 14; + attribute(readonly) boolean batteryReplacementNeeded = 15; + attribute(readonly) enum8 batteryReplaceability = 16; + attribute(readonly) char_string batteryReplacementDescription = 19; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster PowerSourceConfiguration = 46 { - attribute(readonly, reportable) INT8U sources[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) INT8U sources[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster SoftwareDiagnostics = 52 { @@ -883,12 +883,12 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; - attribute(readonly, reportable) int64u currentHeapFree = 1; - attribute(readonly, reportable) int64u currentHeapUsed = 2; - attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) ThreadMetrics threadMetrics[] = 0; + attribute(readonly) int64u currentHeapFree = 1; + attribute(readonly) int64u currentHeapUsed = 2; + attribute(readonly) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster ThreadNetworkDiagnostics = 53 { @@ -968,76 +968,76 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) int16u channel = 0; - attribute(readonly, reportable) enum8 routingRole = 1; - attribute(readonly, reportable) octet_string networkName = 2; - attribute(readonly, reportable) int16u panId = 3; - attribute(readonly, reportable) int64u extendedPanId = 4; - attribute(readonly, reportable) octet_string meshLocalPrefix = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; - attribute(readonly, reportable) RouteTable routeTableList[] = 8; - attribute(readonly, reportable) int32u partitionId = 9; - attribute(readonly, reportable) int8u weighting = 10; - attribute(readonly, reportable) int8u dataVersion = 11; - attribute(readonly, reportable) int8u stableDataVersion = 12; - attribute(readonly, reportable) int8u leaderRouterId = 13; - attribute(readonly, reportable) int16u detachedRoleCount = 14; - attribute(readonly, reportable) int16u childRoleCount = 15; - attribute(readonly, reportable) int16u routerRoleCount = 16; - attribute(readonly, reportable) int16u leaderRoleCount = 17; - attribute(readonly, reportable) int16u attachAttemptCount = 18; - attribute(readonly, reportable) int16u partitionIdChangeCount = 19; - attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly, reportable) int16u parentChangeCount = 21; - attribute(readonly, reportable) int32u txTotalCount = 22; - attribute(readonly, reportable) int32u txUnicastCount = 23; - attribute(readonly, reportable) int32u txBroadcastCount = 24; - attribute(readonly, reportable) int32u txAckRequestedCount = 25; - attribute(readonly, reportable) int32u txAckedCount = 26; - attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; - attribute(readonly, reportable) int32u txDataCount = 28; - attribute(readonly, reportable) int32u txDataPollCount = 29; - attribute(readonly, reportable) int32u txBeaconCount = 30; - attribute(readonly, reportable) int32u txBeaconRequestCount = 31; - attribute(readonly, reportable) int32u txOtherCount = 32; - attribute(readonly, reportable) int32u txRetryCount = 33; - attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly, reportable) int32u txErrCcaCount = 36; - attribute(readonly, reportable) int32u txErrAbortCount = 37; - attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; - attribute(readonly, reportable) int32u rxTotalCount = 39; - attribute(readonly, reportable) int32u rxUnicastCount = 40; - attribute(readonly, reportable) int32u rxBroadcastCount = 41; - attribute(readonly, reportable) int32u rxDataCount = 42; - attribute(readonly, reportable) int32u rxDataPollCount = 43; - attribute(readonly, reportable) int32u rxBeaconCount = 44; - attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; - attribute(readonly, reportable) int32u rxOtherCount = 46; - attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; - attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; - attribute(readonly, reportable) int32u rxDuplicatedCount = 49; - attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; - attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly, reportable) int32u rxErrSecCount = 53; - attribute(readonly, reportable) int32u rxErrFcsCount = 54; - attribute(readonly, reportable) int32u rxErrOtherCount = 55; - attribute(readonly, reportable) int64u activeTimestamp = 56; - attribute(readonly, reportable) int64u pendingTimestamp = 57; - attribute(readonly, reportable) int32u delay = 58; - attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; - attribute(readonly, reportable) octet_string channelMask = 60; - attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u channel = 0; + attribute(readonly) enum8 routingRole = 1; + attribute(readonly) octet_string networkName = 2; + attribute(readonly) int16u panId = 3; + attribute(readonly) int64u extendedPanId = 4; + attribute(readonly) octet_string meshLocalPrefix = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) NeighborTable neighborTableList[] = 7; + attribute(readonly) RouteTable routeTableList[] = 8; + attribute(readonly) int32u partitionId = 9; + attribute(readonly) int8u weighting = 10; + attribute(readonly) int8u dataVersion = 11; + attribute(readonly) int8u stableDataVersion = 12; + attribute(readonly) int8u leaderRouterId = 13; + attribute(readonly) int16u detachedRoleCount = 14; + attribute(readonly) int16u childRoleCount = 15; + attribute(readonly) int16u routerRoleCount = 16; + attribute(readonly) int16u leaderRoleCount = 17; + attribute(readonly) int16u attachAttemptCount = 18; + attribute(readonly) int16u partitionIdChangeCount = 19; + attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly) int16u parentChangeCount = 21; + attribute(readonly) int32u txTotalCount = 22; + attribute(readonly) int32u txUnicastCount = 23; + attribute(readonly) int32u txBroadcastCount = 24; + attribute(readonly) int32u txAckRequestedCount = 25; + attribute(readonly) int32u txAckedCount = 26; + attribute(readonly) int32u txNoAckRequestedCount = 27; + attribute(readonly) int32u txDataCount = 28; + attribute(readonly) int32u txDataPollCount = 29; + attribute(readonly) int32u txBeaconCount = 30; + attribute(readonly) int32u txBeaconRequestCount = 31; + attribute(readonly) int32u txOtherCount = 32; + attribute(readonly) int32u txRetryCount = 33; + attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly) int32u txErrCcaCount = 36; + attribute(readonly) int32u txErrAbortCount = 37; + attribute(readonly) int32u txErrBusyChannelCount = 38; + attribute(readonly) int32u rxTotalCount = 39; + attribute(readonly) int32u rxUnicastCount = 40; + attribute(readonly) int32u rxBroadcastCount = 41; + attribute(readonly) int32u rxDataCount = 42; + attribute(readonly) int32u rxDataPollCount = 43; + attribute(readonly) int32u rxBeaconCount = 44; + attribute(readonly) int32u rxBeaconRequestCount = 45; + attribute(readonly) int32u rxOtherCount = 46; + attribute(readonly) int32u rxAddressFilteredCount = 47; + attribute(readonly) int32u rxDestAddrFilteredCount = 48; + attribute(readonly) int32u rxDuplicatedCount = 49; + attribute(readonly) int32u rxErrNoFrameCount = 50; + attribute(readonly) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly) int32u rxErrSecCount = 53; + attribute(readonly) int32u rxErrFcsCount = 54; + attribute(readonly) int32u rxErrOtherCount = 55; + attribute(readonly) int64u activeTimestamp = 56; + attribute(readonly) int64u pendingTimestamp = 57; + attribute(readonly) int32u delay = 58; + attribute(readonly) SecurityPolicy securityPolicy[] = 59; + attribute(readonly) octet_string channelMask = 60; + attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -1084,21 +1084,21 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) octet_string bssid = 0; - attribute(readonly, reportable) enum8 securityType = 1; - attribute(readonly, reportable) enum8 wiFiVersion = 2; - attribute(readonly, reportable) int16u channelNumber = 3; - attribute(readonly, reportable) int8s rssi = 4; - attribute(readonly, reportable) int32u beaconLostCount = 5; - attribute(readonly, reportable) int32u beaconRxCount = 6; - attribute(readonly, reportable) int32u packetMulticastRxCount = 7; - attribute(readonly, reportable) int32u packetMulticastTxCount = 8; - attribute(readonly, reportable) int32u packetUnicastRxCount = 9; - attribute(readonly, reportable) int32u packetUnicastTxCount = 10; - attribute(readonly, reportable) int64u currentMaxRate = 11; - attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) octet_string bssid = 0; + attribute(readonly) enum8 securityType = 1; + attribute(readonly) enum8 wiFiVersion = 2; + attribute(readonly) int16u channelNumber = 3; + attribute(readonly) int8s rssi = 4; + attribute(readonly) int32u beaconLostCount = 5; + attribute(readonly) int32u beaconRxCount = 6; + attribute(readonly) int32u packetMulticastRxCount = 7; + attribute(readonly) int32u packetMulticastTxCount = 8; + attribute(readonly) int32u packetUnicastRxCount = 9; + attribute(readonly) int32u packetUnicastTxCount = 10; + attribute(readonly) int64u currentMaxRate = 11; + attribute(readonly) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 33f5a3abd88192..256b639135c43c 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -19,10 +19,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly, reportable) int8u windowStatus = 0; - attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; - attribute(readonly, reportable) int16u adminVendorId = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -57,26 +57,26 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly, reportable) int16u interactionModelVersion = 0; - attribute(readonly, reportable) char_string vendorName = 1; - attribute(readonly, reportable) vendor_id vendorID = 2; - attribute(readonly, reportable) char_string productName = 3; - attribute(readonly, reportable) int16u productID = 4; - attribute(writable, reportable) char_string nodeLabel = 5; - attribute(writable, reportable) char_string location = 6; - attribute(readonly, reportable) int16u hardwareVersion = 7; - attribute(readonly, reportable) char_string hardwareVersionString = 8; - attribute(readonly, reportable) int32u softwareVersion = 9; - attribute(readonly, reportable) char_string softwareVersionString = 10; - attribute(readonly, reportable) char_string manufacturingDate = 11; - attribute(readonly, reportable) char_string partNumber = 12; - attribute(readonly, reportable) long_char_string productURL = 13; - attribute(readonly, reportable) char_string productLabel = 14; - attribute(readonly, reportable) char_string serialNumber = 15; - attribute(writable, reportable) boolean localConfigDisabled = 16; - attribute(readonly, reportable) boolean reachable = 17; - attribute(readonly, reportable) char_string uniqueID = 18; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u interactionModelVersion = 0; + attribute(readonly) char_string vendorName = 1; + attribute(readonly) vendor_id vendorID = 2; + attribute(readonly) char_string productName = 3; + attribute(readonly) int16u productID = 4; + attribute(writable) char_string nodeLabel = 5; + attribute(writable) char_string location = 6; + attribute(readonly) int16u hardwareVersion = 7; + attribute(readonly) char_string hardwareVersionString = 8; + attribute(readonly) int32u softwareVersion = 9; + attribute(readonly) char_string softwareVersionString = 10; + attribute(readonly) char_string manufacturingDate = 11; + attribute(readonly) char_string partNumber = 12; + attribute(readonly) long_char_string productURL = 13; + attribute(readonly) char_string productLabel = 14; + attribute(readonly) char_string serialNumber = 15; + attribute(writable) boolean localConfigDisabled = 16; + attribute(readonly) boolean reachable = 17; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly) int16u clusterRevision = 65533; } server cluster ColorControl = 768 { @@ -126,28 +126,28 @@ server cluster ColorControl = 768 { kDown = 3; } - attribute(readonly, reportable) int8u currentHue = 0; - attribute(readonly, reportable) int8u currentSaturation = 1; - attribute(readonly, reportable) int16u remainingTime = 2; - attribute(readonly, reportable) int16u currentX = 3; - attribute(readonly, reportable) int16u currentY = 4; - attribute(readonly, reportable) int16u colorTemperature = 7; - attribute(readonly, reportable) enum8 colorMode = 8; - attribute(writable, reportable) bitmap8 colorControlOptions = 15; - attribute(readonly, reportable) int8u numberOfPrimaries = 16; - attribute(readonly, reportable) int16u enhancedCurrentHue = 16384; - attribute(readonly, reportable) enum8 enhancedColorMode = 16385; - attribute(readonly, reportable) int8u colorLoopActive = 16386; - attribute(readonly, reportable) int8u colorLoopDirection = 16387; - attribute(readonly, reportable) int16u colorLoopTime = 16388; - attribute(readonly, reportable) int16u colorLoopStartEnhancedHue = 16389; - attribute(readonly, reportable) int16u colorLoopStoredEnhancedHue = 16390; - attribute(readonly, reportable) bitmap16 colorCapabilities = 16394; - attribute(readonly, reportable) int16u colorTempPhysicalMin = 16395; - attribute(readonly, reportable) int16u colorTempPhysicalMax = 16396; - attribute(readonly, reportable) int16u coupleColorTempToLevelMinMireds = 16397; - attribute(writable, reportable) int16u startUpColorTemperatureMireds = 16400; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u currentHue = 0; + attribute(readonly) int8u currentSaturation = 1; + attribute(readonly) int16u remainingTime = 2; + attribute(readonly) int16u currentX = 3; + attribute(readonly) int16u currentY = 4; + attribute(readonly) int16u colorTemperature = 7; + attribute(readonly) enum8 colorMode = 8; + attribute(writable) bitmap8 colorControlOptions = 15; + attribute(readonly) int8u numberOfPrimaries = 16; + attribute(readonly) int16u enhancedCurrentHue = 16384; + attribute(readonly) enum8 enhancedColorMode = 16385; + attribute(readonly) int8u colorLoopActive = 16386; + attribute(readonly) int8u colorLoopDirection = 16387; + attribute(readonly) int16u colorLoopTime = 16388; + attribute(readonly) int16u colorLoopStartEnhancedHue = 16389; + attribute(readonly) int16u colorLoopStoredEnhancedHue = 16390; + attribute(readonly) bitmap16 colorCapabilities = 16394; + attribute(readonly) int16u colorTempPhysicalMin = 16395; + attribute(readonly) int16u colorTempPhysicalMax = 16396; + attribute(readonly) int16u coupleColorTempToLevelMinMireds = 16397; + attribute(writable) int16u startUpColorTemperatureMireds = 16400; + attribute(readonly) int16u clusterRevision = 65533; request struct ColorLoopSetRequest { ColorLoopUpdateFlags updateFlags = 0; @@ -324,11 +324,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly, reportable) DeviceType deviceList[] = 0; - attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; - attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; - attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) DeviceType deviceList[] = 0; + attribute(readonly) CLUSTER_ID serverList[] = 1; + attribute(readonly) CLUSTER_ID clientList[] = 2; + attribute(readonly) ENDPOINT_NO partsList[] = 3; + attribute(readonly) int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -375,24 +375,24 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly, reportable) enum8 PHYRate = 0; - attribute(readonly, reportable) boolean fullDuplex = 1; - attribute(readonly, reportable) int64u packetRxCount = 2; - attribute(readonly, reportable) int64u packetTxCount = 3; - attribute(readonly, reportable) int64u txErrCount = 4; - attribute(readonly, reportable) int64u collisionCount = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) boolean carrierDetect = 7; - attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 PHYRate = 0; + attribute(readonly) boolean fullDuplex = 1; + attribute(readonly) int64u packetRxCount = 2; + attribute(readonly) int64u packetTxCount = 3; + attribute(readonly) int64u txErrCount = 4; + attribute(readonly) int64u collisionCount = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) boolean carrierDetect = 7; + attribute(readonly) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } server cluster FixedLabel = 64 { - attribute(readonly, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -413,12 +413,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable, reportable) int64u breadcrumb = 0; - attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly, reportable) enum8 regulatoryConfig = 2; - attribute(readonly, reportable) enum8 locationCapability = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int64u breadcrumb = 0; + attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -531,15 +531,15 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly, reportable) int16u rebootCount = 1; - attribute(readonly, reportable) int64u upTime = 2; - attribute(readonly, reportable) int32u totalOperationalHours = 3; - attribute(readonly, reportable) enum8 bootReasons = 4; - attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; - attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly) int16u rebootCount = 1; + attribute(readonly) int64u upTime = 2; + attribute(readonly) int32u totalOperationalHours = 3; + attribute(readonly) enum8 bootReasons = 4; + attribute(readonly) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly) ENUM8 activeRadioFaults[] = 6; + attribute(readonly) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly) int16u clusterRevision = 65533; } server cluster Identify = 3 { @@ -565,9 +565,9 @@ server cluster Identify = 3 { kActuator = 5; } - attribute(writable, reportable) int16u identifyTime = 0; - attribute(readonly, reportable) enum8 identifyType = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int16u identifyTime = 0; + attribute(readonly) enum8 identifyType = 1; + attribute(readonly) int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -598,22 +598,22 @@ server cluster LevelControl = 8 { kDown = 1; } - attribute(readonly, reportable) int8u currentLevel = 0; - attribute(readonly, reportable) int16u remainingTime = 1; - attribute(readonly, reportable) int8u minLevel = 2; - attribute(readonly, reportable) int8u maxLevel = 3; - attribute(readonly, reportable) int16u currentFrequency = 4; - attribute(readonly, reportable) int16u minFrequency = 5; - attribute(readonly, reportable) int16u maxFrequency = 6; - attribute(writable, reportable) bitmap8 options = 15; - attribute(writable, reportable) int16u onOffTransitionTime = 16; - attribute(writable, reportable) int8u onLevel = 17; - attribute(writable, reportable) int16u onTransitionTime = 18; - attribute(writable, reportable) int16u offTransitionTime = 19; - attribute(writable, reportable) int8u defaultMoveRate = 20; - attribute(writable, reportable) int8u startUpCurrentLevel = 16384; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u currentLevel = 0; + attribute(readonly) int16u remainingTime = 1; + attribute(readonly) int8u minLevel = 2; + attribute(readonly) int8u maxLevel = 3; + attribute(readonly) int16u currentFrequency = 4; + attribute(readonly) int16u minFrequency = 5; + attribute(readonly) int16u maxFrequency = 6; + attribute(writable) bitmap8 options = 15; + attribute(writable) int16u onOffTransitionTime = 16; + attribute(writable) int8u onLevel = 17; + attribute(writable) int16u onTransitionTime = 18; + attribute(writable) int16u offTransitionTime = 19; + attribute(writable) int8u defaultMoveRate = 20; + attribute(writable) int8u startUpCurrentLevel = 16384; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -669,8 +669,8 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute(writable, reportable) char_string activeLocale = 1; - attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -723,16 +723,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly, reportable) int8u maxNetworks = 0; - attribute(readonly, reportable) NetworkInfo networks[] = 1; - attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; - attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; - attribute(writable, reportable) boolean interfaceEnabled = 4; - attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly, reportable) octet_string lastNetworkID = 6; - attribute(readonly, reportable) int32u lastConnectErrorValue = 7; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -813,7 +813,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -909,11 +909,11 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute(writable, reportable) ProviderLocation defaultOtaProviders[] = 0; - attribute(readonly, reportable) boolean updatePossible = 1; - attribute(readonly, reportable) OTAUpdateStateEnum updateState = 2; - attribute(readonly, reportable) int8u updateStateProgress = 3; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) ProviderLocation defaultOtaProviders[] = 0; + attribute(readonly) boolean updatePossible = 1; + attribute(readonly) OTAUpdateStateEnum updateState = 2; + attribute(readonly) int8u updateStateProgress = 3; + attribute(readonly) int16u clusterRevision = 65533; request struct AnnounceOtaProviderRequest { node_id providerNodeId = 0; @@ -927,10 +927,10 @@ server cluster OtaSoftwareUpdateRequestor = 42 { } server cluster OccupancySensing = 1030 { - attribute(readonly, reportable) bitmap8 occupancy = 0; - attribute(readonly, reportable) enum8 occupancySensorType = 1; - attribute(readonly, reportable) bitmap8 occupancySensorTypeBitmap = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) bitmap8 occupancy = 0; + attribute(readonly) enum8 occupancySensorType = 1; + attribute(readonly) bitmap8 occupancySensorTypeBitmap = 2; + attribute(readonly) int16u clusterRevision = 65533; } client cluster OnOff = 6 { @@ -949,13 +949,13 @@ client cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly, reportable) boolean onOff = 0; - attribute(readonly, reportable) boolean globalSceneControl = 16384; - attribute(writable, reportable) int16u onTime = 16385; - attribute(writable, reportable) int16u offWaitTime = 16386; - attribute(writable, reportable) enum8 startUpOnOff = 16387; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) boolean onOff = 0; + attribute(readonly) boolean globalSceneControl = 16384; + attribute(writable) int16u onTime = 16385; + attribute(writable) int16u offWaitTime = 16386; + attribute(writable) enum8 startUpOnOff = 16387; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster OnOff = 6 { @@ -974,13 +974,13 @@ server cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly, reportable) boolean onOff = 0; - attribute(readonly, reportable) boolean globalSceneControl = 16384; - attribute(writable, reportable) int16u onTime = 16385; - attribute(writable, reportable) int16u offWaitTime = 16386; - attribute(writable, reportable) enum8 startUpOnOff = 16387; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) boolean onOff = 0; + attribute(readonly) boolean globalSceneControl = 16384; + attribute(writable) int16u onTime = 16385; + attribute(writable) int16u offWaitTime = 16386; + attribute(writable) enum8 startUpOnOff = 16387; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct OffWithEffectRequest { OnOffEffectIdentifier effectId = 0; @@ -1002,9 +1002,9 @@ server cluster OnOff = 6 { } server cluster OnOffSwitchConfiguration = 7 { - attribute(readonly, reportable) enum8 switchType = 0; - attribute(writable, reportable) enum8 switchActions = 16; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 switchType = 0; + attribute(writable) enum8 switchActions = 16; + attribute(readonly) int16u clusterRevision = 65533; } server cluster OperationalCredentials = 62 { @@ -1030,12 +1030,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; - attribute(readonly, reportable) int8u supportedFabrics = 2; - attribute(readonly, reportable) int8u commissionedFabrics = 3; - attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) FabricDescriptor fabricsList[] = 1; + attribute(readonly) int8u supportedFabrics = 2; + attribute(readonly) int8u commissionedFabrics = 3; + attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly) fabric_idx currentFabricIndex = 5; + attribute(readonly) int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -1122,12 +1122,12 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; - attribute(readonly, reportable) int64u currentHeapFree = 1; - attribute(readonly, reportable) int64u currentHeapUsed = 2; - attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) ThreadMetrics threadMetrics[] = 0; + attribute(readonly) int64u currentHeapFree = 1; + attribute(readonly) int64u currentHeapUsed = 2; + attribute(readonly) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; command ResetWatermarks(): DefaultSuccess = 0; } @@ -1242,78 +1242,78 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) int16u channel = 0; - attribute(readonly, reportable) enum8 routingRole = 1; - attribute(readonly, reportable) octet_string networkName = 2; - attribute(readonly, reportable) int16u panId = 3; - attribute(readonly, reportable) int64u extendedPanId = 4; - attribute(readonly, reportable) octet_string meshLocalPrefix = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; - attribute(readonly, reportable) RouteTable routeTableList[] = 8; - attribute(readonly, reportable) int32u partitionId = 9; - attribute(readonly, reportable) int8u weighting = 10; - attribute(readonly, reportable) int8u dataVersion = 11; - attribute(readonly, reportable) int8u stableDataVersion = 12; - attribute(readonly, reportable) int8u leaderRouterId = 13; - attribute(readonly, reportable) int16u detachedRoleCount = 14; - attribute(readonly, reportable) int16u childRoleCount = 15; - attribute(readonly, reportable) int16u routerRoleCount = 16; - attribute(readonly, reportable) int16u leaderRoleCount = 17; - attribute(readonly, reportable) int16u attachAttemptCount = 18; - attribute(readonly, reportable) int16u partitionIdChangeCount = 19; - attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly, reportable) int16u parentChangeCount = 21; - attribute(readonly, reportable) int32u txTotalCount = 22; - attribute(readonly, reportable) int32u txUnicastCount = 23; - attribute(readonly, reportable) int32u txBroadcastCount = 24; - attribute(readonly, reportable) int32u txAckRequestedCount = 25; - attribute(readonly, reportable) int32u txAckedCount = 26; - attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; - attribute(readonly, reportable) int32u txDataCount = 28; - attribute(readonly, reportable) int32u txDataPollCount = 29; - attribute(readonly, reportable) int32u txBeaconCount = 30; - attribute(readonly, reportable) int32u txBeaconRequestCount = 31; - attribute(readonly, reportable) int32u txOtherCount = 32; - attribute(readonly, reportable) int32u txRetryCount = 33; - attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly, reportable) int32u txErrCcaCount = 36; - attribute(readonly, reportable) int32u txErrAbortCount = 37; - attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; - attribute(readonly, reportable) int32u rxTotalCount = 39; - attribute(readonly, reportable) int32u rxUnicastCount = 40; - attribute(readonly, reportable) int32u rxBroadcastCount = 41; - attribute(readonly, reportable) int32u rxDataCount = 42; - attribute(readonly, reportable) int32u rxDataPollCount = 43; - attribute(readonly, reportable) int32u rxBeaconCount = 44; - attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; - attribute(readonly, reportable) int32u rxOtherCount = 46; - attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; - attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; - attribute(readonly, reportable) int32u rxDuplicatedCount = 49; - attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; - attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly, reportable) int32u rxErrSecCount = 53; - attribute(readonly, reportable) int32u rxErrFcsCount = 54; - attribute(readonly, reportable) int32u rxErrOtherCount = 55; - attribute(readonly, reportable) int64u activeTimestamp = 56; - attribute(readonly, reportable) int64u pendingTimestamp = 57; - attribute(readonly, reportable) int32u delay = 58; - attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; - attribute(readonly, reportable) octet_string channelMask = 60; - attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u channel = 0; + attribute(readonly) enum8 routingRole = 1; + attribute(readonly) octet_string networkName = 2; + attribute(readonly) int16u panId = 3; + attribute(readonly) int64u extendedPanId = 4; + attribute(readonly) octet_string meshLocalPrefix = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) NeighborTable neighborTableList[] = 7; + attribute(readonly) RouteTable routeTableList[] = 8; + attribute(readonly) int32u partitionId = 9; + attribute(readonly) int8u weighting = 10; + attribute(readonly) int8u dataVersion = 11; + attribute(readonly) int8u stableDataVersion = 12; + attribute(readonly) int8u leaderRouterId = 13; + attribute(readonly) int16u detachedRoleCount = 14; + attribute(readonly) int16u childRoleCount = 15; + attribute(readonly) int16u routerRoleCount = 16; + attribute(readonly) int16u leaderRoleCount = 17; + attribute(readonly) int16u attachAttemptCount = 18; + attribute(readonly) int16u partitionIdChangeCount = 19; + attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly) int16u parentChangeCount = 21; + attribute(readonly) int32u txTotalCount = 22; + attribute(readonly) int32u txUnicastCount = 23; + attribute(readonly) int32u txBroadcastCount = 24; + attribute(readonly) int32u txAckRequestedCount = 25; + attribute(readonly) int32u txAckedCount = 26; + attribute(readonly) int32u txNoAckRequestedCount = 27; + attribute(readonly) int32u txDataCount = 28; + attribute(readonly) int32u txDataPollCount = 29; + attribute(readonly) int32u txBeaconCount = 30; + attribute(readonly) int32u txBeaconRequestCount = 31; + attribute(readonly) int32u txOtherCount = 32; + attribute(readonly) int32u txRetryCount = 33; + attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly) int32u txErrCcaCount = 36; + attribute(readonly) int32u txErrAbortCount = 37; + attribute(readonly) int32u txErrBusyChannelCount = 38; + attribute(readonly) int32u rxTotalCount = 39; + attribute(readonly) int32u rxUnicastCount = 40; + attribute(readonly) int32u rxBroadcastCount = 41; + attribute(readonly) int32u rxDataCount = 42; + attribute(readonly) int32u rxDataPollCount = 43; + attribute(readonly) int32u rxBeaconCount = 44; + attribute(readonly) int32u rxBeaconRequestCount = 45; + attribute(readonly) int32u rxOtherCount = 46; + attribute(readonly) int32u rxAddressFilteredCount = 47; + attribute(readonly) int32u rxDestAddrFilteredCount = 48; + attribute(readonly) int32u rxDuplicatedCount = 49; + attribute(readonly) int32u rxErrNoFrameCount = 50; + attribute(readonly) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly) int32u rxErrSecCount = 53; + attribute(readonly) int32u rxErrFcsCount = 54; + attribute(readonly) int32u rxErrOtherCount = 55; + attribute(readonly) int64u activeTimestamp = 56; + attribute(readonly) int64u pendingTimestamp = 57; + attribute(readonly) int32u delay = 58; + attribute(readonly) SecurityPolicy securityPolicy[] = 59; + attribute(readonly) octet_string channelMask = 60; + attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } server cluster UserLabel = 65 { - attribute(writable, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -1360,21 +1360,21 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) octet_string bssid = 0; - attribute(readonly, reportable) enum8 securityType = 1; - attribute(readonly, reportable) enum8 wiFiVersion = 2; - attribute(readonly, reportable) int16u channelNumber = 3; - attribute(readonly, reportable) int8s rssi = 4; - attribute(readonly, reportable) int32u beaconLostCount = 5; - attribute(readonly, reportable) int32u beaconRxCount = 6; - attribute(readonly, reportable) int32u packetMulticastRxCount = 7; - attribute(readonly, reportable) int32u packetMulticastTxCount = 8; - attribute(readonly, reportable) int32u packetUnicastRxCount = 9; - attribute(readonly, reportable) int32u packetUnicastTxCount = 10; - attribute(readonly, reportable) int64u currentMaxRate = 11; - attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) octet_string bssid = 0; + attribute(readonly) enum8 securityType = 1; + attribute(readonly) enum8 wiFiVersion = 2; + attribute(readonly) int16u channelNumber = 3; + attribute(readonly) int8s rssi = 4; + attribute(readonly) int32u beaconLostCount = 5; + attribute(readonly) int32u beaconRxCount = 6; + attribute(readonly) int32u packetMulticastRxCount = 7; + attribute(readonly) int32u packetMulticastTxCount = 8; + attribute(readonly) int32u packetUnicastRxCount = 9; + attribute(readonly) int32u packetUnicastTxCount = 10; + attribute(readonly) int64u currentMaxRate = 11; + attribute(readonly) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index eb969ba4c25e09..f1a12df7a4f63c 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -19,10 +19,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly, reportable) int8u windowStatus = 0; - attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; - attribute(readonly, reportable) int16u adminVendorId = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -57,18 +57,18 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly, reportable) int16u interactionModelVersion = 0; - attribute(readonly, reportable) char_string vendorName = 1; - attribute(readonly, reportable) vendor_id vendorID = 2; - attribute(readonly, reportable) char_string productName = 3; - attribute(readonly, reportable) int16u productID = 4; - attribute(writable, reportable) char_string nodeLabel = 5; - attribute(writable, reportable) char_string location = 6; - attribute(readonly, reportable) int16u hardwareVersion = 7; - attribute(readonly, reportable) char_string hardwareVersionString = 8; - attribute(readonly, reportable) int32u softwareVersion = 9; - attribute(readonly, reportable) char_string softwareVersionString = 10; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u interactionModelVersion = 0; + attribute(readonly) char_string vendorName = 1; + attribute(readonly) vendor_id vendorID = 2; + attribute(readonly) char_string productName = 3; + attribute(readonly) int16u productID = 4; + attribute(writable) char_string nodeLabel = 5; + attribute(writable) char_string location = 6; + attribute(readonly) int16u hardwareVersion = 7; + attribute(readonly) char_string hardwareVersionString = 8; + attribute(readonly) int32u softwareVersion = 9; + attribute(readonly) char_string softwareVersionString = 10; + attribute(readonly) int16u clusterRevision = 65533; } server cluster Descriptor = 29 { @@ -77,11 +77,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly, reportable) DeviceType deviceList[] = 0; - attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; - attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; - attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) DeviceType deviceList[] = 0; + attribute(readonly) CLUSTER_ID serverList[] = 1; + attribute(readonly) CLUSTER_ID clientList[] = 2; + attribute(readonly) ENDPOINT_NO partsList[] = 3; + attribute(readonly) int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -128,22 +128,22 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly, reportable) enum8 PHYRate = 0; - attribute(readonly, reportable) boolean fullDuplex = 1; - attribute(readonly, reportable) int64u packetRxCount = 2; - attribute(readonly, reportable) int64u packetTxCount = 3; - attribute(readonly, reportable) int64u txErrCount = 4; - attribute(readonly, reportable) int64u collisionCount = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) boolean carrierDetect = 7; - attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 PHYRate = 0; + attribute(readonly) boolean fullDuplex = 1; + attribute(readonly) int64u packetRxCount = 2; + attribute(readonly) int64u packetTxCount = 3; + attribute(readonly) int64u txErrCount = 4; + attribute(readonly) int64u collisionCount = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) boolean carrierDetect = 7; + attribute(readonly) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -164,12 +164,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable, reportable) int64u breadcrumb = 0; - attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly, reportable) enum8 regulatoryConfig = 2; - attribute(readonly, reportable) enum8 locationCapability = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int64u breadcrumb = 0; + attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -282,20 +282,20 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly, reportable) int16u rebootCount = 1; - attribute(readonly, reportable) int64u upTime = 2; - attribute(readonly, reportable) int32u totalOperationalHours = 3; - attribute(readonly, reportable) enum8 bootReasons = 4; - attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; - attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly) int16u rebootCount = 1; + attribute(readonly) int64u upTime = 2; + attribute(readonly) int32u totalOperationalHours = 3; + attribute(readonly) enum8 bootReasons = 4; + attribute(readonly) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly) ENUM8 activeRadioFaults[] = 6; + attribute(readonly) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly) int16u clusterRevision = 65533; } server cluster LocalizationConfiguration = 43 { - attribute(writable, reportable) char_string activeLocale = 1; - attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -348,16 +348,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly, reportable) int8u maxNetworks = 0; - attribute(readonly, reportable) NetworkInfo networks[] = 1; - attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; - attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; - attribute(writable, reportable) boolean interfaceEnabled = 4; - attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly, reportable) octet_string lastNetworkID = 6; - attribute(readonly, reportable) int32u lastConnectErrorValue = 7; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -433,13 +433,13 @@ server cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly, reportable) boolean onOff = 0; - attribute(readonly, reportable) boolean globalSceneControl = 16384; - attribute(writable, reportable) int16u onTime = 16385; - attribute(writable, reportable) int16u offWaitTime = 16386; - attribute(writable, reportable) enum8 startUpOnOff = 16387; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) boolean onOff = 0; + attribute(readonly) boolean globalSceneControl = 16384; + attribute(writable) int16u onTime = 16385; + attribute(writable) int16u offWaitTime = 16386; + attribute(writable) enum8 startUpOnOff = 16387; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -469,12 +469,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; - attribute(readonly, reportable) int8u supportedFabrics = 2; - attribute(readonly, reportable) int8u commissionedFabrics = 3; - attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) FabricDescriptor fabricsList[] = 1; + attribute(readonly) int8u supportedFabrics = 2; + attribute(readonly) int8u commissionedFabrics = 3; + attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly) fabric_idx currentFabricIndex = 5; + attribute(readonly) int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -549,21 +549,21 @@ server cluster OperationalCredentials = 62 { } server cluster PowerSource = 47 { - attribute(readonly, reportable) enum8 status = 0; - attribute(readonly, reportable) int8u order = 1; - attribute(readonly, reportable) char_string description = 2; - attribute(readonly, reportable) int32u wiredAssessedCurrent = 6; - attribute(readonly, reportable) enum8 batteryChargeLevel = 14; - attribute(readonly, reportable) boolean batteryReplacementNeeded = 15; - attribute(readonly, reportable) enum8 batteryReplaceability = 16; - attribute(readonly, reportable) char_string batteryReplacementDescription = 19; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 status = 0; + attribute(readonly) int8u order = 1; + attribute(readonly) char_string description = 2; + attribute(readonly) int32u wiredAssessedCurrent = 6; + attribute(readonly) enum8 batteryChargeLevel = 14; + attribute(readonly) boolean batteryReplacementNeeded = 15; + attribute(readonly) enum8 batteryReplaceability = 16; + attribute(readonly) char_string batteryReplacementDescription = 19; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster PowerSourceConfiguration = 46 { - attribute(readonly, reportable) INT8U sources[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) INT8U sources[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster SoftwareDiagnostics = 52 { @@ -579,12 +579,12 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; - attribute(readonly, reportable) int64u currentHeapFree = 1; - attribute(readonly, reportable) int64u currentHeapUsed = 2; - attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) ThreadMetrics threadMetrics[] = 0; + attribute(readonly) int64u currentHeapFree = 1; + attribute(readonly) int64u currentHeapUsed = 2; + attribute(readonly) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster ThreadNetworkDiagnostics = 53 { @@ -664,76 +664,76 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) int16u channel = 0; - attribute(readonly, reportable) enum8 routingRole = 1; - attribute(readonly, reportable) octet_string networkName = 2; - attribute(readonly, reportable) int16u panId = 3; - attribute(readonly, reportable) int64u extendedPanId = 4; - attribute(readonly, reportable) octet_string meshLocalPrefix = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; - attribute(readonly, reportable) RouteTable routeTableList[] = 8; - attribute(readonly, reportable) int32u partitionId = 9; - attribute(readonly, reportable) int8u weighting = 10; - attribute(readonly, reportable) int8u dataVersion = 11; - attribute(readonly, reportable) int8u stableDataVersion = 12; - attribute(readonly, reportable) int8u leaderRouterId = 13; - attribute(readonly, reportable) int16u detachedRoleCount = 14; - attribute(readonly, reportable) int16u childRoleCount = 15; - attribute(readonly, reportable) int16u routerRoleCount = 16; - attribute(readonly, reportable) int16u leaderRoleCount = 17; - attribute(readonly, reportable) int16u attachAttemptCount = 18; - attribute(readonly, reportable) int16u partitionIdChangeCount = 19; - attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly, reportable) int16u parentChangeCount = 21; - attribute(readonly, reportable) int32u txTotalCount = 22; - attribute(readonly, reportable) int32u txUnicastCount = 23; - attribute(readonly, reportable) int32u txBroadcastCount = 24; - attribute(readonly, reportable) int32u txAckRequestedCount = 25; - attribute(readonly, reportable) int32u txAckedCount = 26; - attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; - attribute(readonly, reportable) int32u txDataCount = 28; - attribute(readonly, reportable) int32u txDataPollCount = 29; - attribute(readonly, reportable) int32u txBeaconCount = 30; - attribute(readonly, reportable) int32u txBeaconRequestCount = 31; - attribute(readonly, reportable) int32u txOtherCount = 32; - attribute(readonly, reportable) int32u txRetryCount = 33; - attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly, reportable) int32u txErrCcaCount = 36; - attribute(readonly, reportable) int32u txErrAbortCount = 37; - attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; - attribute(readonly, reportable) int32u rxTotalCount = 39; - attribute(readonly, reportable) int32u rxUnicastCount = 40; - attribute(readonly, reportable) int32u rxBroadcastCount = 41; - attribute(readonly, reportable) int32u rxDataCount = 42; - attribute(readonly, reportable) int32u rxDataPollCount = 43; - attribute(readonly, reportable) int32u rxBeaconCount = 44; - attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; - attribute(readonly, reportable) int32u rxOtherCount = 46; - attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; - attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; - attribute(readonly, reportable) int32u rxDuplicatedCount = 49; - attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; - attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly, reportable) int32u rxErrSecCount = 53; - attribute(readonly, reportable) int32u rxErrFcsCount = 54; - attribute(readonly, reportable) int32u rxErrOtherCount = 55; - attribute(readonly, reportable) int64u activeTimestamp = 56; - attribute(readonly, reportable) int64u pendingTimestamp = 57; - attribute(readonly, reportable) int32u delay = 58; - attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; - attribute(readonly, reportable) octet_string channelMask = 60; - attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u channel = 0; + attribute(readonly) enum8 routingRole = 1; + attribute(readonly) octet_string networkName = 2; + attribute(readonly) int16u panId = 3; + attribute(readonly) int64u extendedPanId = 4; + attribute(readonly) octet_string meshLocalPrefix = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) NeighborTable neighborTableList[] = 7; + attribute(readonly) RouteTable routeTableList[] = 8; + attribute(readonly) int32u partitionId = 9; + attribute(readonly) int8u weighting = 10; + attribute(readonly) int8u dataVersion = 11; + attribute(readonly) int8u stableDataVersion = 12; + attribute(readonly) int8u leaderRouterId = 13; + attribute(readonly) int16u detachedRoleCount = 14; + attribute(readonly) int16u childRoleCount = 15; + attribute(readonly) int16u routerRoleCount = 16; + attribute(readonly) int16u leaderRoleCount = 17; + attribute(readonly) int16u attachAttemptCount = 18; + attribute(readonly) int16u partitionIdChangeCount = 19; + attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly) int16u parentChangeCount = 21; + attribute(readonly) int32u txTotalCount = 22; + attribute(readonly) int32u txUnicastCount = 23; + attribute(readonly) int32u txBroadcastCount = 24; + attribute(readonly) int32u txAckRequestedCount = 25; + attribute(readonly) int32u txAckedCount = 26; + attribute(readonly) int32u txNoAckRequestedCount = 27; + attribute(readonly) int32u txDataCount = 28; + attribute(readonly) int32u txDataPollCount = 29; + attribute(readonly) int32u txBeaconCount = 30; + attribute(readonly) int32u txBeaconRequestCount = 31; + attribute(readonly) int32u txOtherCount = 32; + attribute(readonly) int32u txRetryCount = 33; + attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly) int32u txErrCcaCount = 36; + attribute(readonly) int32u txErrAbortCount = 37; + attribute(readonly) int32u txErrBusyChannelCount = 38; + attribute(readonly) int32u rxTotalCount = 39; + attribute(readonly) int32u rxUnicastCount = 40; + attribute(readonly) int32u rxBroadcastCount = 41; + attribute(readonly) int32u rxDataCount = 42; + attribute(readonly) int32u rxDataPollCount = 43; + attribute(readonly) int32u rxBeaconCount = 44; + attribute(readonly) int32u rxBeaconRequestCount = 45; + attribute(readonly) int32u rxOtherCount = 46; + attribute(readonly) int32u rxAddressFilteredCount = 47; + attribute(readonly) int32u rxDestAddrFilteredCount = 48; + attribute(readonly) int32u rxDuplicatedCount = 49; + attribute(readonly) int32u rxErrNoFrameCount = 50; + attribute(readonly) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly) int32u rxErrSecCount = 53; + attribute(readonly) int32u rxErrFcsCount = 54; + attribute(readonly) int32u rxErrOtherCount = 55; + attribute(readonly) int64u activeTimestamp = 56; + attribute(readonly) int64u pendingTimestamp = 57; + attribute(readonly) int32u delay = 58; + attribute(readonly) SecurityPolicy securityPolicy[] = 59; + attribute(readonly) octet_string channelMask = 60; + attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -780,21 +780,21 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) octet_string bssid = 0; - attribute(readonly, reportable) enum8 securityType = 1; - attribute(readonly, reportable) enum8 wiFiVersion = 2; - attribute(readonly, reportable) int16u channelNumber = 3; - attribute(readonly, reportable) int8s rssi = 4; - attribute(readonly, reportable) int32u beaconLostCount = 5; - attribute(readonly, reportable) int32u beaconRxCount = 6; - attribute(readonly, reportable) int32u packetMulticastRxCount = 7; - attribute(readonly, reportable) int32u packetMulticastTxCount = 8; - attribute(readonly, reportable) int32u packetUnicastRxCount = 9; - attribute(readonly, reportable) int32u packetUnicastTxCount = 10; - attribute(readonly, reportable) int64u currentMaxRate = 11; - attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) octet_string bssid = 0; + attribute(readonly) enum8 securityType = 1; + attribute(readonly) enum8 wiFiVersion = 2; + attribute(readonly) int16u channelNumber = 3; + attribute(readonly) int8s rssi = 4; + attribute(readonly) int32u beaconLostCount = 5; + attribute(readonly) int32u beaconRxCount = 6; + attribute(readonly) int32u packetMulticastRxCount = 7; + attribute(readonly) int32u packetMulticastTxCount = 8; + attribute(readonly) int32u packetUnicastRxCount = 9; + attribute(readonly) int32u packetUnicastTxCount = 10; + attribute(readonly) int64u currentMaxRate = 11; + attribute(readonly) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index ce9793213b65be..3f3fd8dbb038a9 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -78,9 +78,9 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable, reportable) int64u breadcrumb = 0; - attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int64u breadcrumb = 0; + attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -160,7 +160,7 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -243,11 +243,11 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; - attribute(readonly, reportable) int8u supportedFabrics = 2; - attribute(readonly, reportable) int8u commissionedFabrics = 3; - attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) FabricDescriptor fabricsList[] = 1; + attribute(readonly) int8u supportedFabrics = 2; + attribute(readonly) int8u commissionedFabrics = 3; + attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly) int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; 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 b64cb874bd3611..163b3d30469b86 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 @@ -7,8 +7,8 @@ struct LabelStruct { } server cluster FixedLabel = 64 { - attribute(readonly, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -29,12 +29,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable, reportable) int64u breadcrumb = 0; - attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly, reportable) enum8 regulatoryConfig = 2; - attribute(readonly, reportable) enum8 locationCapability = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int64u breadcrumb = 0; + attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -70,8 +70,8 @@ server cluster GeneralCommissioning = 48 { } server cluster LocalizationConfiguration = 43 { - attribute(writable, reportable) char_string activeLocale = 1; - attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -124,16 +124,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly, reportable) int8u maxNetworks = 0; - attribute(readonly, reportable) NetworkInfo networks[] = 1; - attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; - attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; - attribute(writable, reportable) boolean interfaceEnabled = 4; - attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly, reportable) octet_string lastNetworkID = 6; - attribute(readonly, reportable) int32u lastConnectErrorValue = 7; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -214,7 +214,7 @@ server cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -281,12 +281,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; - attribute(readonly, reportable) int8u supportedFabrics = 2; - attribute(readonly, reportable) int8u commissionedFabrics = 3; - attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) FabricDescriptor fabricsList[] = 1; + attribute(readonly) int8u supportedFabrics = 2; + attribute(readonly) int8u commissionedFabrics = 3; + attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly) fabric_idx currentFabricIndex = 5; + attribute(readonly) int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -350,8 +350,8 @@ server cluster OperationalCredentials = 62 { } server cluster UserLabel = 65 { - attribute(writable, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } 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 0b5547614e50af..b7e711ba8ba50c 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 @@ -21,25 +21,25 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly, reportable) int16u interactionModelVersion = 0; - attribute(readonly, reportable) char_string vendorName = 1; - attribute(readonly, reportable) vendor_id vendorID = 2; - attribute(readonly, reportable) char_string productName = 3; - attribute(readonly, reportable) int16u productID = 4; - attribute(writable, reportable) char_string nodeLabel = 5; - attribute(writable, reportable) char_string location = 6; - attribute(readonly, reportable) int16u hardwareVersion = 7; - attribute(readonly, reportable) char_string hardwareVersionString = 8; - attribute(readonly, reportable) int32u softwareVersion = 9; - attribute(readonly, reportable) char_string softwareVersionString = 10; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u interactionModelVersion = 0; + attribute(readonly) char_string vendorName = 1; + attribute(readonly) vendor_id vendorID = 2; + attribute(readonly) char_string productName = 3; + attribute(readonly) int16u productID = 4; + attribute(writable) char_string nodeLabel = 5; + attribute(writable) char_string location = 6; + attribute(readonly) int16u hardwareVersion = 7; + attribute(readonly) char_string hardwareVersionString = 8; + attribute(readonly) int32u softwareVersion = 9; + attribute(readonly) char_string softwareVersionString = 10; + attribute(readonly) int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } server cluster FixedLabel = 64 { - attribute(readonly, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -60,12 +60,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable, reportable) int64u breadcrumb = 0; - attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly, reportable) enum8 regulatoryConfig = 2; - attribute(readonly, reportable) enum8 locationCapability = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int64u breadcrumb = 0; + attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -101,8 +101,8 @@ server cluster GeneralCommissioning = 48 { } server cluster LocalizationConfiguration = 43 { - attribute(writable, reportable) char_string activeLocale = 1; - attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -155,16 +155,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly, reportable) int8u maxNetworks = 0; - attribute(readonly, reportable) NetworkInfo networks[] = 1; - attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; - attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; - attribute(writable, reportable) boolean interfaceEnabled = 4; - attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly, reportable) octet_string lastNetworkID = 6; - attribute(readonly, reportable) int32u lastConnectErrorValue = 7; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -245,7 +245,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -341,11 +341,11 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute(writable, reportable) ProviderLocation defaultOtaProviders[] = 0; - attribute(readonly, reportable) boolean updatePossible = 1; - attribute(readonly, reportable) OTAUpdateStateEnum updateState = 2; - attribute(readonly, reportable) int8u updateStateProgress = 3; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) ProviderLocation defaultOtaProviders[] = 0; + attribute(readonly) boolean updatePossible = 1; + attribute(readonly) OTAUpdateStateEnum updateState = 2; + attribute(readonly) int8u updateStateProgress = 3; + attribute(readonly) int16u clusterRevision = 65533; request struct AnnounceOtaProviderRequest { node_id providerNodeId = 0; @@ -381,12 +381,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; - attribute(readonly, reportable) int8u supportedFabrics = 2; - attribute(readonly, reportable) int8u commissionedFabrics = 3; - attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) FabricDescriptor fabricsList[] = 1; + attribute(readonly) int8u supportedFabrics = 2; + attribute(readonly) int8u commissionedFabrics = 3; + attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly) fabric_idx currentFabricIndex = 5; + attribute(readonly) int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -461,8 +461,8 @@ server cluster OperationalCredentials = 62 { } server cluster UserLabel = 65 { - attribute(writable, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index df6b3eb1b8442e..4be14a2d022122 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -16,26 +16,26 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly, reportable) int16u interactionModelVersion = 0; - attribute(readonly, reportable) char_string vendorName = 1; - attribute(readonly, reportable) vendor_id vendorID = 2; - attribute(readonly, reportable) char_string productName = 3; - attribute(readonly, reportable) int16u productID = 4; - attribute(writable, reportable) char_string nodeLabel = 5; - attribute(writable, reportable) char_string location = 6; - attribute(readonly, reportable) int16u hardwareVersion = 7; - attribute(readonly, reportable) char_string hardwareVersionString = 8; - attribute(readonly, reportable) int32u softwareVersion = 9; - attribute(readonly, reportable) char_string softwareVersionString = 10; - attribute(readonly, reportable) char_string manufacturingDate = 11; - attribute(readonly, reportable) char_string partNumber = 12; - attribute(readonly, reportable) long_char_string productURL = 13; - attribute(readonly, reportable) char_string productLabel = 14; - attribute(readonly, reportable) char_string serialNumber = 15; - attribute(writable, reportable) boolean localConfigDisabled = 16; - attribute(readonly, reportable) boolean reachable = 17; - attribute(readonly, reportable) char_string uniqueID = 18; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u interactionModelVersion = 0; + attribute(readonly) char_string vendorName = 1; + attribute(readonly) vendor_id vendorID = 2; + attribute(readonly) char_string productName = 3; + attribute(readonly) int16u productID = 4; + attribute(writable) char_string nodeLabel = 5; + attribute(writable) char_string location = 6; + attribute(readonly) int16u hardwareVersion = 7; + attribute(readonly) char_string hardwareVersionString = 8; + attribute(readonly) int32u softwareVersion = 9; + attribute(readonly) char_string softwareVersionString = 10; + attribute(readonly) char_string manufacturingDate = 11; + attribute(readonly) char_string partNumber = 12; + attribute(readonly) long_char_string productURL = 13; + attribute(readonly) char_string productLabel = 14; + attribute(readonly) char_string serialNumber = 15; + attribute(writable) boolean localConfigDisabled = 16; + attribute(readonly) boolean reachable = 17; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly) int16u clusterRevision = 65533; } server cluster ColorControl = 768 { @@ -85,12 +85,12 @@ server cluster ColorControl = 768 { kDown = 3; } - attribute(readonly, reportable) int16u currentX = 3; - attribute(readonly, reportable) int16u currentY = 4; - attribute(writable, reportable) bitmap8 colorControlOptions = 15; - attribute(readonly, reportable) int16u coupleColorTempToLevelMinMireds = 16397; - attribute(writable, reportable) int16u startUpColorTemperatureMireds = 16400; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u currentX = 3; + attribute(readonly) int16u currentY = 4; + attribute(writable) bitmap8 colorControlOptions = 15; + attribute(readonly) int16u coupleColorTempToLevelMinMireds = 16397; + attribute(writable) int16u startUpColorTemperatureMireds = 16400; + attribute(readonly) int16u clusterRevision = 65533; request struct MoveColorRequest { INT16S rateX = 0; @@ -126,11 +126,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly, reportable) DeviceType deviceList[] = 0; - attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; - attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; - attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) DeviceType deviceList[] = 0; + attribute(readonly) CLUSTER_ID serverList[] = 1; + attribute(readonly) CLUSTER_ID clientList[] = 2; + attribute(readonly) ENDPOINT_NO partsList[] = 3; + attribute(readonly) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -151,9 +151,9 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable, reportable) int64u breadcrumb = 0; - attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int64u breadcrumb = 0; + attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -189,8 +189,8 @@ server cluster GeneralCommissioning = 48 { } server cluster Groups = 4 { - attribute(readonly, reportable) bitmap8 nameSupport = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) bitmap8 nameSupport = 0; + attribute(readonly) int16u clusterRevision = 65533; request struct AddGroupRequest { INT16U groupId = 0; @@ -266,9 +266,9 @@ server cluster Identify = 3 { kActuator = 5; } - attribute(writable, reportable) int16u identifyTime = 0; - attribute(readonly, reportable) enum8 identifyType = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int16u identifyTime = 0; + attribute(readonly) enum8 identifyType = 1; + attribute(readonly) int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -293,8 +293,8 @@ server cluster LevelControl = 8 { kDown = 1; } - attribute(readonly, reportable) int8u currentLevel = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u currentLevel = 0; + attribute(readonly) int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -399,16 +399,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly, reportable) int8u maxNetworks = 0; - attribute(readonly, reportable) NetworkInfo networks[] = 1; - attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; - attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; - attribute(writable, reportable) boolean interfaceEnabled = 4; - attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly, reportable) octet_string lastNetworkID = 6; - attribute(readonly, reportable) int32u lastConnectErrorValue = 7; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -484,8 +484,8 @@ server cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly, reportable) boolean onOff = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) boolean onOff = 0; + attribute(readonly) int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -515,12 +515,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; - attribute(readonly, reportable) int8u supportedFabrics = 2; - attribute(readonly, reportable) int8u commissionedFabrics = 3; - attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) FabricDescriptor fabricsList[] = 1; + attribute(readonly) int8u supportedFabrics = 2; + attribute(readonly) int8u commissionedFabrics = 3; + attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly) fabric_idx currentFabricIndex = 5; + attribute(readonly) int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -601,12 +601,12 @@ server cluster Scenes = 5 { INT8U value = 3; } - attribute(readonly, reportable) int8u sceneCount = 0; - attribute(readonly, reportable) int8u currentScene = 1; - attribute(readonly, reportable) int16u currentGroup = 2; - attribute(readonly, reportable) boolean sceneValid = 3; - attribute(readonly, reportable) bitmap8 nameSupport = 4; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u sceneCount = 0; + attribute(readonly) int8u currentScene = 1; + attribute(readonly) int16u currentGroup = 2; + attribute(readonly) boolean sceneValid = 3; + attribute(readonly) bitmap8 nameSupport = 4; + attribute(readonly) int16u clusterRevision = 65533; request struct AddSceneRequest { INT16U groupId = 0; @@ -695,17 +695,17 @@ server cluster Scenes = 5 { } client cluster TemperatureMeasurement = 1026 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u clusterRevision = 65533; } server cluster TemperatureMeasurement = 1026 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u clusterRevision = 65533; } diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index df6b3eb1b8442e..4be14a2d022122 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -16,26 +16,26 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly, reportable) int16u interactionModelVersion = 0; - attribute(readonly, reportable) char_string vendorName = 1; - attribute(readonly, reportable) vendor_id vendorID = 2; - attribute(readonly, reportable) char_string productName = 3; - attribute(readonly, reportable) int16u productID = 4; - attribute(writable, reportable) char_string nodeLabel = 5; - attribute(writable, reportable) char_string location = 6; - attribute(readonly, reportable) int16u hardwareVersion = 7; - attribute(readonly, reportable) char_string hardwareVersionString = 8; - attribute(readonly, reportable) int32u softwareVersion = 9; - attribute(readonly, reportable) char_string softwareVersionString = 10; - attribute(readonly, reportable) char_string manufacturingDate = 11; - attribute(readonly, reportable) char_string partNumber = 12; - attribute(readonly, reportable) long_char_string productURL = 13; - attribute(readonly, reportable) char_string productLabel = 14; - attribute(readonly, reportable) char_string serialNumber = 15; - attribute(writable, reportable) boolean localConfigDisabled = 16; - attribute(readonly, reportable) boolean reachable = 17; - attribute(readonly, reportable) char_string uniqueID = 18; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u interactionModelVersion = 0; + attribute(readonly) char_string vendorName = 1; + attribute(readonly) vendor_id vendorID = 2; + attribute(readonly) char_string productName = 3; + attribute(readonly) int16u productID = 4; + attribute(writable) char_string nodeLabel = 5; + attribute(writable) char_string location = 6; + attribute(readonly) int16u hardwareVersion = 7; + attribute(readonly) char_string hardwareVersionString = 8; + attribute(readonly) int32u softwareVersion = 9; + attribute(readonly) char_string softwareVersionString = 10; + attribute(readonly) char_string manufacturingDate = 11; + attribute(readonly) char_string partNumber = 12; + attribute(readonly) long_char_string productURL = 13; + attribute(readonly) char_string productLabel = 14; + attribute(readonly) char_string serialNumber = 15; + attribute(writable) boolean localConfigDisabled = 16; + attribute(readonly) boolean reachable = 17; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly) int16u clusterRevision = 65533; } server cluster ColorControl = 768 { @@ -85,12 +85,12 @@ server cluster ColorControl = 768 { kDown = 3; } - attribute(readonly, reportable) int16u currentX = 3; - attribute(readonly, reportable) int16u currentY = 4; - attribute(writable, reportable) bitmap8 colorControlOptions = 15; - attribute(readonly, reportable) int16u coupleColorTempToLevelMinMireds = 16397; - attribute(writable, reportable) int16u startUpColorTemperatureMireds = 16400; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u currentX = 3; + attribute(readonly) int16u currentY = 4; + attribute(writable) bitmap8 colorControlOptions = 15; + attribute(readonly) int16u coupleColorTempToLevelMinMireds = 16397; + attribute(writable) int16u startUpColorTemperatureMireds = 16400; + attribute(readonly) int16u clusterRevision = 65533; request struct MoveColorRequest { INT16S rateX = 0; @@ -126,11 +126,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly, reportable) DeviceType deviceList[] = 0; - attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; - attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; - attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) DeviceType deviceList[] = 0; + attribute(readonly) CLUSTER_ID serverList[] = 1; + attribute(readonly) CLUSTER_ID clientList[] = 2; + attribute(readonly) ENDPOINT_NO partsList[] = 3; + attribute(readonly) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -151,9 +151,9 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable, reportable) int64u breadcrumb = 0; - attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int64u breadcrumb = 0; + attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -189,8 +189,8 @@ server cluster GeneralCommissioning = 48 { } server cluster Groups = 4 { - attribute(readonly, reportable) bitmap8 nameSupport = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) bitmap8 nameSupport = 0; + attribute(readonly) int16u clusterRevision = 65533; request struct AddGroupRequest { INT16U groupId = 0; @@ -266,9 +266,9 @@ server cluster Identify = 3 { kActuator = 5; } - attribute(writable, reportable) int16u identifyTime = 0; - attribute(readonly, reportable) enum8 identifyType = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int16u identifyTime = 0; + attribute(readonly) enum8 identifyType = 1; + attribute(readonly) int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -293,8 +293,8 @@ server cluster LevelControl = 8 { kDown = 1; } - attribute(readonly, reportable) int8u currentLevel = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u currentLevel = 0; + attribute(readonly) int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -399,16 +399,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly, reportable) int8u maxNetworks = 0; - attribute(readonly, reportable) NetworkInfo networks[] = 1; - attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; - attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; - attribute(writable, reportable) boolean interfaceEnabled = 4; - attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly, reportable) octet_string lastNetworkID = 6; - attribute(readonly, reportable) int32u lastConnectErrorValue = 7; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -484,8 +484,8 @@ server cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly, reportable) boolean onOff = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) boolean onOff = 0; + attribute(readonly) int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -515,12 +515,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; - attribute(readonly, reportable) int8u supportedFabrics = 2; - attribute(readonly, reportable) int8u commissionedFabrics = 3; - attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) FabricDescriptor fabricsList[] = 1; + attribute(readonly) int8u supportedFabrics = 2; + attribute(readonly) int8u commissionedFabrics = 3; + attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly) fabric_idx currentFabricIndex = 5; + attribute(readonly) int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -601,12 +601,12 @@ server cluster Scenes = 5 { INT8U value = 3; } - attribute(readonly, reportable) int8u sceneCount = 0; - attribute(readonly, reportable) int8u currentScene = 1; - attribute(readonly, reportable) int16u currentGroup = 2; - attribute(readonly, reportable) boolean sceneValid = 3; - attribute(readonly, reportable) bitmap8 nameSupport = 4; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u sceneCount = 0; + attribute(readonly) int8u currentScene = 1; + attribute(readonly) int16u currentGroup = 2; + attribute(readonly) boolean sceneValid = 3; + attribute(readonly) bitmap8 nameSupport = 4; + attribute(readonly) int16u clusterRevision = 65533; request struct AddSceneRequest { INT16U groupId = 0; @@ -695,17 +695,17 @@ server cluster Scenes = 5 { } client cluster TemperatureMeasurement = 1026 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u clusterRevision = 65533; } server cluster TemperatureMeasurement = 1026 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u clusterRevision = 65533; } diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index a18736d4c2c9ef..ff9570cb327ba0 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -19,10 +19,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly, reportable) int8u windowStatus = 0; - attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; - attribute(readonly, reportable) int16u adminVendorId = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -57,18 +57,18 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly, reportable) int16u interactionModelVersion = 0; - attribute(readonly, reportable) char_string vendorName = 1; - attribute(readonly, reportable) vendor_id vendorID = 2; - attribute(readonly, reportable) char_string productName = 3; - attribute(readonly, reportable) int16u productID = 4; - attribute(writable, reportable) char_string nodeLabel = 5; - attribute(writable, reportable) char_string location = 6; - attribute(readonly, reportable) int16u hardwareVersion = 7; - attribute(readonly, reportable) char_string hardwareVersionString = 8; - attribute(readonly, reportable) int32u softwareVersion = 9; - attribute(readonly, reportable) char_string softwareVersionString = 10; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u interactionModelVersion = 0; + attribute(readonly) char_string vendorName = 1; + attribute(readonly) vendor_id vendorID = 2; + attribute(readonly) char_string productName = 3; + attribute(readonly) int16u productID = 4; + attribute(writable) char_string nodeLabel = 5; + attribute(writable) char_string location = 6; + attribute(readonly) int16u hardwareVersion = 7; + attribute(readonly) char_string hardwareVersionString = 8; + attribute(readonly) int32u softwareVersion = 9; + attribute(readonly) char_string softwareVersionString = 10; + attribute(readonly) int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } @@ -79,11 +79,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly, reportable) DeviceType deviceList[] = 0; - attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; - attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; - attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) DeviceType deviceList[] = 0; + attribute(readonly) CLUSTER_ID serverList[] = 1; + attribute(readonly) CLUSTER_ID clientList[] = 2; + attribute(readonly) ENDPOINT_NO partsList[] = 3; + attribute(readonly) int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -117,22 +117,22 @@ server cluster DiagnosticLogs = 50 { } server cluster FixedLabel = 64 { - attribute(readonly, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } client cluster FlowMeasurement = 1028 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u clusterRevision = 65533; } server cluster FlowMeasurement = 1028 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -153,12 +153,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable, reportable) int64u breadcrumb = 0; - attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly, reportable) enum8 regulatoryConfig = 2; - attribute(readonly, reportable) enum8 locationCapability = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int64u breadcrumb = 0; + attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -271,15 +271,15 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly, reportable) int16u rebootCount = 1; - attribute(readonly, reportable) int64u upTime = 2; - attribute(readonly, reportable) int32u totalOperationalHours = 3; - attribute(readonly, reportable) enum8 bootReasons = 4; - attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; - attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly) int16u rebootCount = 1; + attribute(readonly) int64u upTime = 2; + attribute(readonly) int32u totalOperationalHours = 3; + attribute(readonly) enum8 bootReasons = 4; + attribute(readonly) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly) ENUM8 activeRadioFaults[] = 6; + attribute(readonly) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly) int16u clusterRevision = 65533; } server cluster LevelControl = 8 { @@ -293,8 +293,8 @@ server cluster LevelControl = 8 { kDown = 1; } - attribute(readonly, reportable) int8u currentLevel = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u currentLevel = 0; + attribute(readonly) int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -350,8 +350,8 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute(writable, reportable) char_string activeLocale = 1; - attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -404,16 +404,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly, reportable) int8u maxNetworks = 0; - attribute(readonly, reportable) NetworkInfo networks[] = 1; - attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; - attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; - attribute(writable, reportable) boolean interfaceEnabled = 4; - attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly, reportable) octet_string lastNetworkID = 6; - attribute(readonly, reportable) int32u lastConnectErrorValue = 7; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -489,8 +489,8 @@ server cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly, reportable) boolean onOff = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) boolean onOff = 0; + attribute(readonly) int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -520,12 +520,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; - attribute(readonly, reportable) int8u supportedFabrics = 2; - attribute(readonly, reportable) int8u commissionedFabrics = 3; - attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) FabricDescriptor fabricsList[] = 1; + attribute(readonly) int8u supportedFabrics = 2; + attribute(readonly) int8u commissionedFabrics = 3; + attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly) fabric_idx currentFabricIndex = 5; + attribute(readonly) int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -600,17 +600,17 @@ server cluster OperationalCredentials = 62 { } client cluster PressureMeasurement = 1027 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u clusterRevision = 65533; } server cluster PressureMeasurement = 1027 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u clusterRevision = 65533; } server cluster PumpConfigurationAndControl = 512 { @@ -681,32 +681,32 @@ server cluster PumpConfigurationAndControl = 512 { info event TurbineOperation = 16 { } - attribute(readonly, reportable) int16s maxPressure = 0; - attribute(readonly, reportable) int16u maxSpeed = 1; - attribute(readonly, reportable) int16u maxFlow = 2; - attribute(readonly, reportable) int16s minConstPressure = 3; - attribute(readonly, reportable) int16s maxConstPressure = 4; - attribute(readonly, reportable) int16s minCompPressure = 5; - attribute(readonly, reportable) int16s maxCompPressure = 6; - attribute(readonly, reportable) int16u minConstSpeed = 7; - attribute(readonly, reportable) int16u maxConstSpeed = 8; - attribute(readonly, reportable) int16u minConstFlow = 9; - attribute(readonly, reportable) int16u maxConstFlow = 10; - attribute(readonly, reportable) int16s minConstTemp = 11; - attribute(readonly, reportable) int16s maxConstTemp = 12; - attribute(readonly, reportable) bitmap16 pumpStatus = 16; - attribute(readonly, reportable) enum8 effectiveOperationMode = 17; - attribute(readonly, reportable) enum8 effectiveControlMode = 18; - attribute(readonly, reportable) int16s capacity = 19; - attribute(readonly, reportable) int16u speed = 20; - attribute(writable, reportable) int24u lifetimeRunningHours = 21; - attribute(readonly, reportable) int24u power = 22; - attribute(writable, reportable) int32u lifetimeEnergyConsumed = 23; - attribute(writable, reportable) enum8 operationMode = 32; - attribute(writable, reportable) enum8 controlMode = 33; - attribute(readonly, reportable) bitmap16 alarmMask = 34; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s maxPressure = 0; + attribute(readonly) int16u maxSpeed = 1; + attribute(readonly) int16u maxFlow = 2; + attribute(readonly) int16s minConstPressure = 3; + attribute(readonly) int16s maxConstPressure = 4; + attribute(readonly) int16s minCompPressure = 5; + attribute(readonly) int16s maxCompPressure = 6; + attribute(readonly) int16u minConstSpeed = 7; + attribute(readonly) int16u maxConstSpeed = 8; + attribute(readonly) int16u minConstFlow = 9; + attribute(readonly) int16u maxConstFlow = 10; + attribute(readonly) int16s minConstTemp = 11; + attribute(readonly) int16s maxConstTemp = 12; + attribute(readonly) bitmap16 pumpStatus = 16; + attribute(readonly) enum8 effectiveOperationMode = 17; + attribute(readonly) enum8 effectiveControlMode = 18; + attribute(readonly) int16s capacity = 19; + attribute(readonly) int16u speed = 20; + attribute(writable) int24u lifetimeRunningHours = 21; + attribute(readonly) int24u power = 22; + attribute(writable) int32u lifetimeEnergyConsumed = 23; + attribute(writable) enum8 operationMode = 32; + attribute(writable) enum8 controlMode = 33; + attribute(readonly) bitmap16 alarmMask = 34; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster SoftwareDiagnostics = 52 { @@ -722,26 +722,26 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; - attribute(readonly, reportable) int64u currentHeapFree = 1; - attribute(readonly, reportable) int64u currentHeapUsed = 2; - attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) ThreadMetrics threadMetrics[] = 0; + attribute(readonly) int64u currentHeapFree = 1; + attribute(readonly) int64u currentHeapUsed = 2; + attribute(readonly) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } client cluster TemperatureMeasurement = 1026 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u clusterRevision = 65533; } server cluster TemperatureMeasurement = 1026 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u clusterRevision = 65533; } server cluster ThreadNetworkDiagnostics = 53 { @@ -821,76 +821,76 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) int16u channel = 0; - attribute(readonly, reportable) enum8 routingRole = 1; - attribute(readonly, reportable) octet_string networkName = 2; - attribute(readonly, reportable) int16u panId = 3; - attribute(readonly, reportable) int64u extendedPanId = 4; - attribute(readonly, reportable) octet_string meshLocalPrefix = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; - attribute(readonly, reportable) RouteTable routeTableList[] = 8; - attribute(readonly, reportable) int32u partitionId = 9; - attribute(readonly, reportable) int8u weighting = 10; - attribute(readonly, reportable) int8u dataVersion = 11; - attribute(readonly, reportable) int8u stableDataVersion = 12; - attribute(readonly, reportable) int8u leaderRouterId = 13; - attribute(readonly, reportable) int16u detachedRoleCount = 14; - attribute(readonly, reportable) int16u childRoleCount = 15; - attribute(readonly, reportable) int16u routerRoleCount = 16; - attribute(readonly, reportable) int16u leaderRoleCount = 17; - attribute(readonly, reportable) int16u attachAttemptCount = 18; - attribute(readonly, reportable) int16u partitionIdChangeCount = 19; - attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly, reportable) int16u parentChangeCount = 21; - attribute(readonly, reportable) int32u txTotalCount = 22; - attribute(readonly, reportable) int32u txUnicastCount = 23; - attribute(readonly, reportable) int32u txBroadcastCount = 24; - attribute(readonly, reportable) int32u txAckRequestedCount = 25; - attribute(readonly, reportable) int32u txAckedCount = 26; - attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; - attribute(readonly, reportable) int32u txDataCount = 28; - attribute(readonly, reportable) int32u txDataPollCount = 29; - attribute(readonly, reportable) int32u txBeaconCount = 30; - attribute(readonly, reportable) int32u txBeaconRequestCount = 31; - attribute(readonly, reportable) int32u txOtherCount = 32; - attribute(readonly, reportable) int32u txRetryCount = 33; - attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly, reportable) int32u txErrCcaCount = 36; - attribute(readonly, reportable) int32u txErrAbortCount = 37; - attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; - attribute(readonly, reportable) int32u rxTotalCount = 39; - attribute(readonly, reportable) int32u rxUnicastCount = 40; - attribute(readonly, reportable) int32u rxBroadcastCount = 41; - attribute(readonly, reportable) int32u rxDataCount = 42; - attribute(readonly, reportable) int32u rxDataPollCount = 43; - attribute(readonly, reportable) int32u rxBeaconCount = 44; - attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; - attribute(readonly, reportable) int32u rxOtherCount = 46; - attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; - attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; - attribute(readonly, reportable) int32u rxDuplicatedCount = 49; - attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; - attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly, reportable) int32u rxErrSecCount = 53; - attribute(readonly, reportable) int32u rxErrFcsCount = 54; - attribute(readonly, reportable) int32u rxErrOtherCount = 55; - attribute(readonly, reportable) int64u activeTimestamp = 56; - attribute(readonly, reportable) int64u pendingTimestamp = 57; - attribute(readonly, reportable) int32u delay = 58; - attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; - attribute(readonly, reportable) octet_string channelMask = 60; - attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u channel = 0; + attribute(readonly) enum8 routingRole = 1; + attribute(readonly) octet_string networkName = 2; + attribute(readonly) int16u panId = 3; + attribute(readonly) int64u extendedPanId = 4; + attribute(readonly) octet_string meshLocalPrefix = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) NeighborTable neighborTableList[] = 7; + attribute(readonly) RouteTable routeTableList[] = 8; + attribute(readonly) int32u partitionId = 9; + attribute(readonly) int8u weighting = 10; + attribute(readonly) int8u dataVersion = 11; + attribute(readonly) int8u stableDataVersion = 12; + attribute(readonly) int8u leaderRouterId = 13; + attribute(readonly) int16u detachedRoleCount = 14; + attribute(readonly) int16u childRoleCount = 15; + attribute(readonly) int16u routerRoleCount = 16; + attribute(readonly) int16u leaderRoleCount = 17; + attribute(readonly) int16u attachAttemptCount = 18; + attribute(readonly) int16u partitionIdChangeCount = 19; + attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly) int16u parentChangeCount = 21; + attribute(readonly) int32u txTotalCount = 22; + attribute(readonly) int32u txUnicastCount = 23; + attribute(readonly) int32u txBroadcastCount = 24; + attribute(readonly) int32u txAckRequestedCount = 25; + attribute(readonly) int32u txAckedCount = 26; + attribute(readonly) int32u txNoAckRequestedCount = 27; + attribute(readonly) int32u txDataCount = 28; + attribute(readonly) int32u txDataPollCount = 29; + attribute(readonly) int32u txBeaconCount = 30; + attribute(readonly) int32u txBeaconRequestCount = 31; + attribute(readonly) int32u txOtherCount = 32; + attribute(readonly) int32u txRetryCount = 33; + attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly) int32u txErrCcaCount = 36; + attribute(readonly) int32u txErrAbortCount = 37; + attribute(readonly) int32u txErrBusyChannelCount = 38; + attribute(readonly) int32u rxTotalCount = 39; + attribute(readonly) int32u rxUnicastCount = 40; + attribute(readonly) int32u rxBroadcastCount = 41; + attribute(readonly) int32u rxDataCount = 42; + attribute(readonly) int32u rxDataPollCount = 43; + attribute(readonly) int32u rxBeaconCount = 44; + attribute(readonly) int32u rxBeaconRequestCount = 45; + attribute(readonly) int32u rxOtherCount = 46; + attribute(readonly) int32u rxAddressFilteredCount = 47; + attribute(readonly) int32u rxDestAddrFilteredCount = 48; + attribute(readonly) int32u rxDuplicatedCount = 49; + attribute(readonly) int32u rxErrNoFrameCount = 50; + attribute(readonly) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly) int32u rxErrSecCount = 53; + attribute(readonly) int32u rxErrFcsCount = 54; + attribute(readonly) int32u rxErrOtherCount = 55; + attribute(readonly) int64u activeTimestamp = 56; + attribute(readonly) int64u pendingTimestamp = 57; + attribute(readonly) int32u delay = 58; + attribute(readonly) SecurityPolicy securityPolicy[] = 59; + attribute(readonly) octet_string channelMask = 60; + attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } 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 2e2303bfd2ec0e..04088538aedf2a 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 @@ -19,10 +19,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly, reportable) int8u windowStatus = 0; - attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; - attribute(readonly, reportable) int16u adminVendorId = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -57,18 +57,18 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly, reportable) int16u interactionModelVersion = 0; - attribute(readonly, reportable) char_string vendorName = 1; - attribute(readonly, reportable) vendor_id vendorID = 2; - attribute(readonly, reportable) char_string productName = 3; - attribute(readonly, reportable) int16u productID = 4; - attribute(writable, reportable) char_string nodeLabel = 5; - attribute(writable, reportable) char_string location = 6; - attribute(readonly, reportable) int16u hardwareVersion = 7; - attribute(readonly, reportable) char_string hardwareVersionString = 8; - attribute(readonly, reportable) int32u softwareVersion = 9; - attribute(readonly, reportable) char_string softwareVersionString = 10; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u interactionModelVersion = 0; + attribute(readonly) char_string vendorName = 1; + attribute(readonly) vendor_id vendorID = 2; + attribute(readonly) char_string productName = 3; + attribute(readonly) int16u productID = 4; + attribute(writable) char_string nodeLabel = 5; + attribute(writable) char_string location = 6; + attribute(readonly) int16u hardwareVersion = 7; + attribute(readonly) char_string hardwareVersionString = 8; + attribute(readonly) int32u softwareVersion = 9; + attribute(readonly) char_string softwareVersionString = 10; + attribute(readonly) int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } @@ -79,11 +79,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly, reportable) DeviceType deviceList[] = 0; - attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; - attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; - attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) DeviceType deviceList[] = 0; + attribute(readonly) CLUSTER_ID serverList[] = 1; + attribute(readonly) CLUSTER_ID clientList[] = 2; + attribute(readonly) ENDPOINT_NO partsList[] = 3; + attribute(readonly) int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -130,29 +130,29 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly, reportable) enum8 PHYRate = 0; - attribute(readonly, reportable) boolean fullDuplex = 1; - attribute(readonly, reportable) int64u packetRxCount = 2; - attribute(readonly, reportable) int64u packetTxCount = 3; - attribute(readonly, reportable) int64u txErrCount = 4; - attribute(readonly, reportable) int64u collisionCount = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) boolean carrierDetect = 7; - attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 PHYRate = 0; + attribute(readonly) boolean fullDuplex = 1; + attribute(readonly) int64u packetRxCount = 2; + attribute(readonly) int64u packetTxCount = 3; + attribute(readonly) int64u txErrCount = 4; + attribute(readonly) int64u collisionCount = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) boolean carrierDetect = 7; + attribute(readonly) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } client cluster FlowMeasurement = 1028 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -173,12 +173,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable, reportable) int64u breadcrumb = 0; - attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly, reportable) enum8 regulatoryConfig = 2; - attribute(readonly, reportable) enum8 locationCapability = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int64u breadcrumb = 0; + attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -291,15 +291,15 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly, reportable) int16u rebootCount = 1; - attribute(readonly, reportable) int64u upTime = 2; - attribute(readonly, reportable) int32u totalOperationalHours = 3; - attribute(readonly, reportable) enum8 bootReasons = 4; - attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; - attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly) int16u rebootCount = 1; + attribute(readonly) int64u upTime = 2; + attribute(readonly) int32u totalOperationalHours = 3; + attribute(readonly) enum8 bootReasons = 4; + attribute(readonly) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly) ENUM8 activeRadioFaults[] = 6; + attribute(readonly) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly) int16u clusterRevision = 65533; } client cluster LevelControl = 8 { @@ -313,8 +313,8 @@ client cluster LevelControl = 8 { kDown = 1; } - attribute(readonly, reportable) int8u currentLevel = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u currentLevel = 0; + attribute(readonly) int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -370,8 +370,8 @@ client cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute(writable, reportable) char_string activeLocale = 1; - attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -424,16 +424,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly, reportable) int8u maxNetworks = 0; - attribute(readonly, reportable) NetworkInfo networks[] = 1; - attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; - attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; - attribute(writable, reportable) boolean interfaceEnabled = 4; - attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly, reportable) octet_string lastNetworkID = 6; - attribute(readonly, reportable) int32u lastConnectErrorValue = 7; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -509,8 +509,8 @@ client cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly, reportable) boolean onOff = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) boolean onOff = 0; + attribute(readonly) int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -540,12 +540,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; - attribute(readonly, reportable) int8u supportedFabrics = 2; - attribute(readonly, reportable) int8u commissionedFabrics = 3; - attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) FabricDescriptor fabricsList[] = 1; + attribute(readonly) int8u supportedFabrics = 2; + attribute(readonly) int8u commissionedFabrics = 3; + attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly) fabric_idx currentFabricIndex = 5; + attribute(readonly) int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -620,10 +620,10 @@ server cluster OperationalCredentials = 62 { } client cluster PressureMeasurement = 1027 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u clusterRevision = 65533; } client cluster PumpConfigurationAndControl = 512 { @@ -694,14 +694,14 @@ client cluster PumpConfigurationAndControl = 512 { info event TurbineOperation = 16 { } - attribute(readonly, reportable) int16s maxPressure = 0; - attribute(readonly, reportable) int16u maxSpeed = 1; - attribute(readonly, reportable) int16u maxFlow = 2; - attribute(readonly, reportable) enum8 effectiveOperationMode = 17; - attribute(readonly, reportable) enum8 effectiveControlMode = 18; - attribute(readonly, reportable) int16s capacity = 19; - attribute(writable, reportable) enum8 operationMode = 32; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s maxPressure = 0; + attribute(readonly) int16u maxSpeed = 1; + attribute(readonly) int16u maxFlow = 2; + attribute(readonly) enum8 effectiveOperationMode = 17; + attribute(readonly) enum8 effectiveControlMode = 18; + attribute(readonly) int16s capacity = 19; + attribute(writable) enum8 operationMode = 32; + attribute(readonly) int16u clusterRevision = 65533; } server cluster SoftwareDiagnostics = 52 { @@ -717,19 +717,19 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; - attribute(readonly, reportable) int64u currentHeapFree = 1; - attribute(readonly, reportable) int64u currentHeapUsed = 2; - attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) ThreadMetrics threadMetrics[] = 0; + attribute(readonly) int64u currentHeapFree = 1; + attribute(readonly) int64u currentHeapUsed = 2; + attribute(readonly) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } client cluster TemperatureMeasurement = 1026 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u clusterRevision = 65533; } server cluster ThreadNetworkDiagnostics = 53 { @@ -809,76 +809,76 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) int16u channel = 0; - attribute(readonly, reportable) enum8 routingRole = 1; - attribute(readonly, reportable) octet_string networkName = 2; - attribute(readonly, reportable) int16u panId = 3; - attribute(readonly, reportable) int64u extendedPanId = 4; - attribute(readonly, reportable) octet_string meshLocalPrefix = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; - attribute(readonly, reportable) RouteTable routeTableList[] = 8; - attribute(readonly, reportable) int32u partitionId = 9; - attribute(readonly, reportable) int8u weighting = 10; - attribute(readonly, reportable) int8u dataVersion = 11; - attribute(readonly, reportable) int8u stableDataVersion = 12; - attribute(readonly, reportable) int8u leaderRouterId = 13; - attribute(readonly, reportable) int16u detachedRoleCount = 14; - attribute(readonly, reportable) int16u childRoleCount = 15; - attribute(readonly, reportable) int16u routerRoleCount = 16; - attribute(readonly, reportable) int16u leaderRoleCount = 17; - attribute(readonly, reportable) int16u attachAttemptCount = 18; - attribute(readonly, reportable) int16u partitionIdChangeCount = 19; - attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly, reportable) int16u parentChangeCount = 21; - attribute(readonly, reportable) int32u txTotalCount = 22; - attribute(readonly, reportable) int32u txUnicastCount = 23; - attribute(readonly, reportable) int32u txBroadcastCount = 24; - attribute(readonly, reportable) int32u txAckRequestedCount = 25; - attribute(readonly, reportable) int32u txAckedCount = 26; - attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; - attribute(readonly, reportable) int32u txDataCount = 28; - attribute(readonly, reportable) int32u txDataPollCount = 29; - attribute(readonly, reportable) int32u txBeaconCount = 30; - attribute(readonly, reportable) int32u txBeaconRequestCount = 31; - attribute(readonly, reportable) int32u txOtherCount = 32; - attribute(readonly, reportable) int32u txRetryCount = 33; - attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly, reportable) int32u txErrCcaCount = 36; - attribute(readonly, reportable) int32u txErrAbortCount = 37; - attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; - attribute(readonly, reportable) int32u rxTotalCount = 39; - attribute(readonly, reportable) int32u rxUnicastCount = 40; - attribute(readonly, reportable) int32u rxBroadcastCount = 41; - attribute(readonly, reportable) int32u rxDataCount = 42; - attribute(readonly, reportable) int32u rxDataPollCount = 43; - attribute(readonly, reportable) int32u rxBeaconCount = 44; - attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; - attribute(readonly, reportable) int32u rxOtherCount = 46; - attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; - attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; - attribute(readonly, reportable) int32u rxDuplicatedCount = 49; - attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; - attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly, reportable) int32u rxErrSecCount = 53; - attribute(readonly, reportable) int32u rxErrFcsCount = 54; - attribute(readonly, reportable) int32u rxErrOtherCount = 55; - attribute(readonly, reportable) int64u activeTimestamp = 56; - attribute(readonly, reportable) int64u pendingTimestamp = 57; - attribute(readonly, reportable) int32u delay = 58; - attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; - attribute(readonly, reportable) octet_string channelMask = 60; - attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u channel = 0; + attribute(readonly) enum8 routingRole = 1; + attribute(readonly) octet_string networkName = 2; + attribute(readonly) int16u panId = 3; + attribute(readonly) int64u extendedPanId = 4; + attribute(readonly) octet_string meshLocalPrefix = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) NeighborTable neighborTableList[] = 7; + attribute(readonly) RouteTable routeTableList[] = 8; + attribute(readonly) int32u partitionId = 9; + attribute(readonly) int8u weighting = 10; + attribute(readonly) int8u dataVersion = 11; + attribute(readonly) int8u stableDataVersion = 12; + attribute(readonly) int8u leaderRouterId = 13; + attribute(readonly) int16u detachedRoleCount = 14; + attribute(readonly) int16u childRoleCount = 15; + attribute(readonly) int16u routerRoleCount = 16; + attribute(readonly) int16u leaderRoleCount = 17; + attribute(readonly) int16u attachAttemptCount = 18; + attribute(readonly) int16u partitionIdChangeCount = 19; + attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly) int16u parentChangeCount = 21; + attribute(readonly) int32u txTotalCount = 22; + attribute(readonly) int32u txUnicastCount = 23; + attribute(readonly) int32u txBroadcastCount = 24; + attribute(readonly) int32u txAckRequestedCount = 25; + attribute(readonly) int32u txAckedCount = 26; + attribute(readonly) int32u txNoAckRequestedCount = 27; + attribute(readonly) int32u txDataCount = 28; + attribute(readonly) int32u txDataPollCount = 29; + attribute(readonly) int32u txBeaconCount = 30; + attribute(readonly) int32u txBeaconRequestCount = 31; + attribute(readonly) int32u txOtherCount = 32; + attribute(readonly) int32u txRetryCount = 33; + attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly) int32u txErrCcaCount = 36; + attribute(readonly) int32u txErrAbortCount = 37; + attribute(readonly) int32u txErrBusyChannelCount = 38; + attribute(readonly) int32u rxTotalCount = 39; + attribute(readonly) int32u rxUnicastCount = 40; + attribute(readonly) int32u rxBroadcastCount = 41; + attribute(readonly) int32u rxDataCount = 42; + attribute(readonly) int32u rxDataPollCount = 43; + attribute(readonly) int32u rxBeaconCount = 44; + attribute(readonly) int32u rxBeaconRequestCount = 45; + attribute(readonly) int32u rxOtherCount = 46; + attribute(readonly) int32u rxAddressFilteredCount = 47; + attribute(readonly) int32u rxDestAddrFilteredCount = 48; + attribute(readonly) int32u rxDuplicatedCount = 49; + attribute(readonly) int32u rxErrNoFrameCount = 50; + attribute(readonly) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly) int32u rxErrSecCount = 53; + attribute(readonly) int32u rxErrFcsCount = 54; + attribute(readonly) int32u rxErrOtherCount = 55; + attribute(readonly) int64u activeTimestamp = 56; + attribute(readonly) int64u pendingTimestamp = 57; + attribute(readonly) int32u delay = 58; + attribute(readonly) SecurityPolicy securityPolicy[] = 59; + attribute(readonly) octet_string channelMask = 60; + attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -925,21 +925,21 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) octet_string bssid = 0; - attribute(readonly, reportable) enum8 securityType = 1; - attribute(readonly, reportable) enum8 wiFiVersion = 2; - attribute(readonly, reportable) int16u channelNumber = 3; - attribute(readonly, reportable) int8s rssi = 4; - attribute(readonly, reportable) int32u beaconLostCount = 5; - attribute(readonly, reportable) int32u beaconRxCount = 6; - attribute(readonly, reportable) int32u packetMulticastRxCount = 7; - attribute(readonly, reportable) int32u packetMulticastTxCount = 8; - attribute(readonly, reportable) int32u packetUnicastRxCount = 9; - attribute(readonly, reportable) int32u packetUnicastTxCount = 10; - attribute(readonly, reportable) int64u currentMaxRate = 11; - attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) octet_string bssid = 0; + attribute(readonly) enum8 securityType = 1; + attribute(readonly) enum8 wiFiVersion = 2; + attribute(readonly) int16u channelNumber = 3; + attribute(readonly) int8s rssi = 4; + attribute(readonly) int32u beaconLostCount = 5; + attribute(readonly) int32u beaconRxCount = 6; + attribute(readonly) int32u packetMulticastRxCount = 7; + attribute(readonly) int32u packetMulticastTxCount = 8; + attribute(readonly) int32u packetUnicastRxCount = 9; + attribute(readonly) int32u packetUnicastTxCount = 10; + attribute(readonly) int64u currentMaxRate = 11; + attribute(readonly) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index 12fbfc1c2337a5..42d02bcdea1886 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -19,10 +19,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly, reportable) int8u windowStatus = 0; - attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; - attribute(readonly, reportable) int16u adminVendorId = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -57,18 +57,18 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly, reportable) int16u interactionModelVersion = 0; - attribute(readonly, reportable) char_string vendorName = 1; - attribute(readonly, reportable) vendor_id vendorID = 2; - attribute(readonly, reportable) char_string productName = 3; - attribute(readonly, reportable) int16u productID = 4; - attribute(writable, reportable) char_string nodeLabel = 5; - attribute(writable, reportable) char_string location = 6; - attribute(readonly, reportable) int16u hardwareVersion = 7; - attribute(readonly, reportable) char_string hardwareVersionString = 8; - attribute(readonly, reportable) int32u softwareVersion = 9; - attribute(readonly, reportable) char_string softwareVersionString = 10; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u interactionModelVersion = 0; + attribute(readonly) char_string vendorName = 1; + attribute(readonly) vendor_id vendorID = 2; + attribute(readonly) char_string productName = 3; + attribute(readonly) int16u productID = 4; + attribute(writable) char_string nodeLabel = 5; + attribute(writable) char_string location = 6; + attribute(readonly) int16u hardwareVersion = 7; + attribute(readonly) char_string hardwareVersionString = 8; + attribute(readonly) int32u softwareVersion = 9; + attribute(readonly) char_string softwareVersionString = 10; + attribute(readonly) int16u clusterRevision = 65533; } server cluster Descriptor = 29 { @@ -77,11 +77,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly, reportable) DeviceType deviceList[] = 0; - attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; - attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; - attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) DeviceType deviceList[] = 0; + attribute(readonly) CLUSTER_ID serverList[] = 1; + attribute(readonly) CLUSTER_ID clientList[] = 2; + attribute(readonly) ENDPOINT_NO partsList[] = 3; + attribute(readonly) int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -128,22 +128,22 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly, reportable) enum8 PHYRate = 0; - attribute(readonly, reportable) boolean fullDuplex = 1; - attribute(readonly, reportable) int64u packetRxCount = 2; - attribute(readonly, reportable) int64u packetTxCount = 3; - attribute(readonly, reportable) int64u txErrCount = 4; - attribute(readonly, reportable) int64u collisionCount = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) boolean carrierDetect = 7; - attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 PHYRate = 0; + attribute(readonly) boolean fullDuplex = 1; + attribute(readonly) int64u packetRxCount = 2; + attribute(readonly) int64u packetTxCount = 3; + attribute(readonly) int64u txErrCount = 4; + attribute(readonly) int64u collisionCount = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) boolean carrierDetect = 7; + attribute(readonly) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -164,12 +164,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable, reportable) int64u breadcrumb = 0; - attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly, reportable) enum8 regulatoryConfig = 2; - attribute(readonly, reportable) enum8 locationCapability = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int64u breadcrumb = 0; + attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -282,20 +282,20 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly, reportable) int16u rebootCount = 1; - attribute(readonly, reportable) int64u upTime = 2; - attribute(readonly, reportable) int32u totalOperationalHours = 3; - attribute(readonly, reportable) enum8 bootReasons = 4; - attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; - attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly) int16u rebootCount = 1; + attribute(readonly) int64u upTime = 2; + attribute(readonly) int32u totalOperationalHours = 3; + attribute(readonly) enum8 bootReasons = 4; + attribute(readonly) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly) ENUM8 activeRadioFaults[] = 6; + attribute(readonly) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly) int16u clusterRevision = 65533; } server cluster LocalizationConfiguration = 43 { - attribute(writable, reportable) char_string activeLocale = 1; - attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -348,16 +348,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly, reportable) int8u maxNetworks = 0; - attribute(readonly, reportable) NetworkInfo networks[] = 1; - attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; - attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; - attribute(writable, reportable) boolean interfaceEnabled = 4; - attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly, reportable) octet_string lastNetworkID = 6; - attribute(readonly, reportable) int32u lastConnectErrorValue = 7; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct AddOrUpdateWiFiNetworkRequest { OCTET_STRING ssid = 0; @@ -434,12 +434,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; - attribute(readonly, reportable) int8u supportedFabrics = 2; - attribute(readonly, reportable) int8u commissionedFabrics = 3; - attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) FabricDescriptor fabricsList[] = 1; + attribute(readonly) int8u supportedFabrics = 2; + attribute(readonly) int8u commissionedFabrics = 3; + attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly) fabric_idx currentFabricIndex = 5; + attribute(readonly) int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -518,21 +518,21 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster TemperatureMeasurement = 1026 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -579,21 +579,21 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) octet_string bssid = 0; - attribute(readonly, reportable) enum8 securityType = 1; - attribute(readonly, reportable) enum8 wiFiVersion = 2; - attribute(readonly, reportable) int16u channelNumber = 3; - attribute(readonly, reportable) int8s rssi = 4; - attribute(readonly, reportable) int32u beaconLostCount = 5; - attribute(readonly, reportable) int32u beaconRxCount = 6; - attribute(readonly, reportable) int32u packetMulticastRxCount = 7; - attribute(readonly, reportable) int32u packetMulticastTxCount = 8; - attribute(readonly, reportable) int32u packetUnicastRxCount = 9; - attribute(readonly, reportable) int32u packetUnicastTxCount = 10; - attribute(readonly, reportable) int64u currentMaxRate = 11; - attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) octet_string bssid = 0; + attribute(readonly) enum8 securityType = 1; + attribute(readonly) enum8 wiFiVersion = 2; + attribute(readonly) int16u channelNumber = 3; + attribute(readonly) int8s rssi = 4; + attribute(readonly) int32u beaconLostCount = 5; + attribute(readonly) int32u beaconRxCount = 6; + attribute(readonly) int32u packetMulticastRxCount = 7; + attribute(readonly) int32u packetMulticastTxCount = 8; + attribute(readonly) int32u packetUnicastRxCount = 9; + attribute(readonly) int32u packetUnicastTxCount = 10; + attribute(readonly) int64u currentMaxRate = 11; + attribute(readonly) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index ca99688932e6ea..d18513da56a02b 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -19,10 +19,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly, reportable) int8u windowStatus = 0; - attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; - attribute(readonly, reportable) int16u adminVendorId = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -57,32 +57,32 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly, reportable) int16u interactionModelVersion = 0; - attribute(readonly, reportable) char_string vendorName = 1; - attribute(readonly, reportable) vendor_id vendorID = 2; - attribute(readonly, reportable) char_string productName = 3; - attribute(readonly, reportable) int16u productID = 4; - attribute(writable, reportable) char_string nodeLabel = 5; - attribute(writable, reportable) char_string location = 6; - attribute(readonly, reportable) int16u hardwareVersion = 7; - attribute(readonly, reportable) char_string hardwareVersionString = 8; - attribute(readonly, reportable) int32u softwareVersion = 9; - attribute(readonly, reportable) char_string softwareVersionString = 10; - attribute(readonly, reportable) char_string manufacturingDate = 11; - attribute(readonly, reportable) char_string partNumber = 12; - attribute(readonly, reportable) long_char_string productURL = 13; - attribute(readonly, reportable) char_string productLabel = 14; - attribute(readonly, reportable) char_string serialNumber = 15; - attribute(writable, reportable) boolean localConfigDisabled = 16; - attribute(readonly, reportable) boolean reachable = 17; - attribute(readonly, reportable) char_string uniqueID = 18; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u interactionModelVersion = 0; + attribute(readonly) char_string vendorName = 1; + attribute(readonly) vendor_id vendorID = 2; + attribute(readonly) char_string productName = 3; + attribute(readonly) int16u productID = 4; + attribute(writable) char_string nodeLabel = 5; + attribute(writable) char_string location = 6; + attribute(readonly) int16u hardwareVersion = 7; + attribute(readonly) char_string hardwareVersionString = 8; + attribute(readonly) int32u softwareVersion = 9; + attribute(readonly) char_string softwareVersionString = 10; + attribute(readonly) char_string manufacturingDate = 11; + attribute(readonly) char_string partNumber = 12; + attribute(readonly) long_char_string productURL = 13; + attribute(readonly) char_string productLabel = 14; + attribute(readonly) char_string serialNumber = 15; + attribute(writable) boolean localConfigDisabled = 16; + attribute(readonly) boolean reachable = 17; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly) int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } server cluster Binding = 30 { - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; request struct BindRequest { NODE_ID nodeId = 0; @@ -108,11 +108,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly, reportable) DeviceType deviceList[] = 0; - attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; - attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; - attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) DeviceType deviceList[] = 0; + attribute(readonly) CLUSTER_ID serverList[] = 1; + attribute(readonly) CLUSTER_ID clientList[] = 2; + attribute(readonly) ENDPOINT_NO partsList[] = 3; + attribute(readonly) int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -159,22 +159,22 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly, reportable) enum8 PHYRate = 0; - attribute(readonly, reportable) boolean fullDuplex = 1; - attribute(readonly, reportable) int64u packetRxCount = 2; - attribute(readonly, reportable) int64u packetTxCount = 3; - attribute(readonly, reportable) int64u txErrCount = 4; - attribute(readonly, reportable) int64u collisionCount = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) boolean carrierDetect = 7; - attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 PHYRate = 0; + attribute(readonly) boolean fullDuplex = 1; + attribute(readonly) int64u packetRxCount = 2; + attribute(readonly) int64u packetTxCount = 3; + attribute(readonly) int64u txErrCount = 4; + attribute(readonly) int64u collisionCount = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) boolean carrierDetect = 7; + attribute(readonly) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -195,12 +195,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable, reportable) int64u breadcrumb = 0; - attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly, reportable) enum8 regulatoryConfig = 2; - attribute(readonly, reportable) enum8 locationCapability = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int64u breadcrumb = 0; + attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -313,15 +313,15 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly, reportable) int16u rebootCount = 1; - attribute(readonly, reportable) int64u upTime = 2; - attribute(readonly, reportable) int32u totalOperationalHours = 3; - attribute(readonly, reportable) enum8 bootReasons = 4; - attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; - attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly) int16u rebootCount = 1; + attribute(readonly) int64u upTime = 2; + attribute(readonly) int32u totalOperationalHours = 3; + attribute(readonly) enum8 bootReasons = 4; + attribute(readonly) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly) ENUM8 activeRadioFaults[] = 6; + attribute(readonly) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly) int16u clusterRevision = 65533; } server cluster GroupKeyManagement = 63 { @@ -343,14 +343,14 @@ server cluster GroupKeyManagement = 63 { CHAR_STRING groupName = 3; } - attribute(readonly, reportable) GroupKey groupKeyMap[] = 0; - attribute(readonly, reportable) GroupInfo groupTable[] = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) GroupKey groupKeyMap[] = 0; + attribute(readonly) GroupInfo groupTable[] = 1; + attribute(readonly) int16u clusterRevision = 65533; } server cluster Groups = 4 { - attribute(readonly, reportable) bitmap8 nameSupport = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) bitmap8 nameSupport = 0; + attribute(readonly) int16u clusterRevision = 65533; request struct AddGroupRequest { INT16U groupId = 0; @@ -426,9 +426,9 @@ client cluster Identify = 3 { kActuator = 5; } - attribute(writable, reportable) int16u identifyTime = 0; - attribute(readonly, reportable) enum8 identifyType = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int16u identifyTime = 0; + attribute(readonly) enum8 identifyType = 1; + attribute(readonly) int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -465,9 +465,9 @@ server cluster Identify = 3 { kActuator = 5; } - attribute(writable, reportable) int16u identifyTime = 0; - attribute(readonly, reportable) enum8 identifyType = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int16u identifyTime = 0; + attribute(readonly) enum8 identifyType = 1; + attribute(readonly) int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -482,8 +482,8 @@ server cluster Identify = 3 { } server cluster LocalizationConfiguration = 43 { - attribute(writable, reportable) char_string activeLocale = 1; - attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -536,16 +536,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly, reportable) int8u maxNetworks = 0; - attribute(readonly, reportable) NetworkInfo networks[] = 1; - attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; - attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; - attribute(writable, reportable) boolean interfaceEnabled = 4; - attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly, reportable) octet_string lastNetworkID = 6; - attribute(readonly, reportable) int32u lastConnectErrorValue = 7; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -626,7 +626,7 @@ server cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -693,12 +693,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; - attribute(readonly, reportable) int8u supportedFabrics = 2; - attribute(readonly, reportable) int8u commissionedFabrics = 3; - attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) FabricDescriptor fabricsList[] = 1; + attribute(readonly) int8u supportedFabrics = 2; + attribute(readonly) int8u commissionedFabrics = 3; + attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly) fabric_idx currentFabricIndex = 5; + attribute(readonly) int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -779,12 +779,12 @@ server cluster Scenes = 5 { INT8U value = 3; } - attribute(readonly, reportable) int8u sceneCount = 0; - attribute(readonly, reportable) int8u currentScene = 1; - attribute(readonly, reportable) int16u currentGroup = 2; - attribute(readonly, reportable) boolean sceneValid = 3; - attribute(readonly, reportable) bitmap8 nameSupport = 4; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u sceneCount = 0; + attribute(readonly) int8u currentScene = 1; + attribute(readonly) int16u currentGroup = 2; + attribute(readonly) boolean sceneValid = 3; + attribute(readonly) bitmap8 nameSupport = 4; + attribute(readonly) int16u clusterRevision = 65533; request struct AddSceneRequest { INT16U groupId = 0; @@ -885,12 +885,12 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; - attribute(readonly, reportable) int64u currentHeapFree = 1; - attribute(readonly, reportable) int64u currentHeapUsed = 2; - attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) ThreadMetrics threadMetrics[] = 0; + attribute(readonly) int64u currentHeapFree = 1; + attribute(readonly) int64u currentHeapUsed = 2; + attribute(readonly) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster Thermostat = 513 { @@ -900,25 +900,25 @@ server cluster Thermostat = 513 { kHeatAndCoolSetpoints = 2; } - attribute(readonly, reportable) int16s localTemperature = 0; - attribute(readonly, reportable) int16s absMinHeatSetpointLimit = 3; - attribute(readonly, reportable) int16s absMaxHeatSetpointLimit = 4; - attribute(readonly, reportable) int16s absMinCoolSetpointLimit = 5; - attribute(readonly, reportable) int16s absMaxCoolSetpointLimit = 6; - attribute(writable, reportable) int16s occupiedCoolingSetpoint = 17; - attribute(writable, reportable) int16s occupiedHeatingSetpoint = 18; - attribute(writable, reportable) int16s minHeatSetpointLimit = 21; - attribute(writable, reportable) int16s maxHeatSetpointLimit = 22; - attribute(writable, reportable) int16s minCoolSetpointLimit = 23; - attribute(writable, reportable) int16s maxCoolSetpointLimit = 24; - attribute(writable, reportable) int8s minSetpointDeadBand = 25; - attribute(writable, reportable) enum8 controlSequenceOfOperation = 27; - attribute(writable, reportable) enum8 systemMode = 28; - attribute(readonly, reportable) enum8 startOfWeek = 32; - attribute(readonly, reportable) int8u numberOfWeeklyTransitions = 33; - attribute(readonly, reportable) int8u numberOfDailyTransitions = 34; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s localTemperature = 0; + attribute(readonly) int16s absMinHeatSetpointLimit = 3; + attribute(readonly) int16s absMaxHeatSetpointLimit = 4; + attribute(readonly) int16s absMinCoolSetpointLimit = 5; + attribute(readonly) int16s absMaxCoolSetpointLimit = 6; + attribute(writable) int16s occupiedCoolingSetpoint = 17; + attribute(writable) int16s occupiedHeatingSetpoint = 18; + attribute(writable) int16s minHeatSetpointLimit = 21; + attribute(writable) int16s maxHeatSetpointLimit = 22; + attribute(writable) int16s minCoolSetpointLimit = 23; + attribute(writable) int16s maxCoolSetpointLimit = 24; + attribute(writable) int8s minSetpointDeadBand = 25; + attribute(writable) enum8 controlSequenceOfOperation = 27; + attribute(writable) enum8 systemMode = 28; + attribute(readonly) enum8 startOfWeek = 32; + attribute(readonly) int8u numberOfWeeklyTransitions = 33; + attribute(readonly) int8u numberOfDailyTransitions = 34; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct GetWeeklyScheduleRequest { DayOfWeek daysToReturn = 0; @@ -1037,76 +1037,76 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) int16u channel = 0; - attribute(readonly, reportable) enum8 routingRole = 1; - attribute(readonly, reportable) octet_string networkName = 2; - attribute(readonly, reportable) int16u panId = 3; - attribute(readonly, reportable) int64u extendedPanId = 4; - attribute(readonly, reportable) octet_string meshLocalPrefix = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; - attribute(readonly, reportable) RouteTable routeTableList[] = 8; - attribute(readonly, reportable) int32u partitionId = 9; - attribute(readonly, reportable) int8u weighting = 10; - attribute(readonly, reportable) int8u dataVersion = 11; - attribute(readonly, reportable) int8u stableDataVersion = 12; - attribute(readonly, reportable) int8u leaderRouterId = 13; - attribute(readonly, reportable) int16u detachedRoleCount = 14; - attribute(readonly, reportable) int16u childRoleCount = 15; - attribute(readonly, reportable) int16u routerRoleCount = 16; - attribute(readonly, reportable) int16u leaderRoleCount = 17; - attribute(readonly, reportable) int16u attachAttemptCount = 18; - attribute(readonly, reportable) int16u partitionIdChangeCount = 19; - attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly, reportable) int16u parentChangeCount = 21; - attribute(readonly, reportable) int32u txTotalCount = 22; - attribute(readonly, reportable) int32u txUnicastCount = 23; - attribute(readonly, reportable) int32u txBroadcastCount = 24; - attribute(readonly, reportable) int32u txAckRequestedCount = 25; - attribute(readonly, reportable) int32u txAckedCount = 26; - attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; - attribute(readonly, reportable) int32u txDataCount = 28; - attribute(readonly, reportable) int32u txDataPollCount = 29; - attribute(readonly, reportable) int32u txBeaconCount = 30; - attribute(readonly, reportable) int32u txBeaconRequestCount = 31; - attribute(readonly, reportable) int32u txOtherCount = 32; - attribute(readonly, reportable) int32u txRetryCount = 33; - attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly, reportable) int32u txErrCcaCount = 36; - attribute(readonly, reportable) int32u txErrAbortCount = 37; - attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; - attribute(readonly, reportable) int32u rxTotalCount = 39; - attribute(readonly, reportable) int32u rxUnicastCount = 40; - attribute(readonly, reportable) int32u rxBroadcastCount = 41; - attribute(readonly, reportable) int32u rxDataCount = 42; - attribute(readonly, reportable) int32u rxDataPollCount = 43; - attribute(readonly, reportable) int32u rxBeaconCount = 44; - attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; - attribute(readonly, reportable) int32u rxOtherCount = 46; - attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; - attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; - attribute(readonly, reportable) int32u rxDuplicatedCount = 49; - attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; - attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly, reportable) int32u rxErrSecCount = 53; - attribute(readonly, reportable) int32u rxErrFcsCount = 54; - attribute(readonly, reportable) int32u rxErrOtherCount = 55; - attribute(readonly, reportable) int64u activeTimestamp = 56; - attribute(readonly, reportable) int64u pendingTimestamp = 57; - attribute(readonly, reportable) int32u delay = 58; - attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; - attribute(readonly, reportable) octet_string channelMask = 60; - attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u channel = 0; + attribute(readonly) enum8 routingRole = 1; + attribute(readonly) octet_string networkName = 2; + attribute(readonly) int16u panId = 3; + attribute(readonly) int64u extendedPanId = 4; + attribute(readonly) octet_string meshLocalPrefix = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) NeighborTable neighborTableList[] = 7; + attribute(readonly) RouteTable routeTableList[] = 8; + attribute(readonly) int32u partitionId = 9; + attribute(readonly) int8u weighting = 10; + attribute(readonly) int8u dataVersion = 11; + attribute(readonly) int8u stableDataVersion = 12; + attribute(readonly) int8u leaderRouterId = 13; + attribute(readonly) int16u detachedRoleCount = 14; + attribute(readonly) int16u childRoleCount = 15; + attribute(readonly) int16u routerRoleCount = 16; + attribute(readonly) int16u leaderRoleCount = 17; + attribute(readonly) int16u attachAttemptCount = 18; + attribute(readonly) int16u partitionIdChangeCount = 19; + attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly) int16u parentChangeCount = 21; + attribute(readonly) int32u txTotalCount = 22; + attribute(readonly) int32u txUnicastCount = 23; + attribute(readonly) int32u txBroadcastCount = 24; + attribute(readonly) int32u txAckRequestedCount = 25; + attribute(readonly) int32u txAckedCount = 26; + attribute(readonly) int32u txNoAckRequestedCount = 27; + attribute(readonly) int32u txDataCount = 28; + attribute(readonly) int32u txDataPollCount = 29; + attribute(readonly) int32u txBeaconCount = 30; + attribute(readonly) int32u txBeaconRequestCount = 31; + attribute(readonly) int32u txOtherCount = 32; + attribute(readonly) int32u txRetryCount = 33; + attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly) int32u txErrCcaCount = 36; + attribute(readonly) int32u txErrAbortCount = 37; + attribute(readonly) int32u txErrBusyChannelCount = 38; + attribute(readonly) int32u rxTotalCount = 39; + attribute(readonly) int32u rxUnicastCount = 40; + attribute(readonly) int32u rxBroadcastCount = 41; + attribute(readonly) int32u rxDataCount = 42; + attribute(readonly) int32u rxDataPollCount = 43; + attribute(readonly) int32u rxBeaconCount = 44; + attribute(readonly) int32u rxBeaconRequestCount = 45; + attribute(readonly) int32u rxOtherCount = 46; + attribute(readonly) int32u rxAddressFilteredCount = 47; + attribute(readonly) int32u rxDestAddrFilteredCount = 48; + attribute(readonly) int32u rxDuplicatedCount = 49; + attribute(readonly) int32u rxErrNoFrameCount = 50; + attribute(readonly) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly) int32u rxErrSecCount = 53; + attribute(readonly) int32u rxErrFcsCount = 54; + attribute(readonly) int32u rxErrOtherCount = 55; + attribute(readonly) int64u activeTimestamp = 56; + attribute(readonly) int64u pendingTimestamp = 57; + attribute(readonly) int32u delay = 58; + attribute(readonly) SecurityPolicy securityPolicy[] = 59; + attribute(readonly) octet_string channelMask = 60; + attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -1153,21 +1153,21 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) octet_string bssid = 0; - attribute(readonly, reportable) enum8 securityType = 1; - attribute(readonly, reportable) enum8 wiFiVersion = 2; - attribute(readonly, reportable) int16u channelNumber = 3; - attribute(readonly, reportable) int8s rssi = 4; - attribute(readonly, reportable) int32u beaconLostCount = 5; - attribute(readonly, reportable) int32u beaconRxCount = 6; - attribute(readonly, reportable) int32u packetMulticastRxCount = 7; - attribute(readonly, reportable) int32u packetMulticastTxCount = 8; - attribute(readonly, reportable) int32u packetUnicastRxCount = 9; - attribute(readonly, reportable) int32u packetUnicastTxCount = 10; - attribute(readonly, reportable) int64u currentMaxRate = 11; - attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) octet_string bssid = 0; + attribute(readonly) enum8 securityType = 1; + attribute(readonly) enum8 wiFiVersion = 2; + attribute(readonly) int16u channelNumber = 3; + attribute(readonly) int8s rssi = 4; + attribute(readonly) int32u beaconLostCount = 5; + attribute(readonly) int32u beaconRxCount = 6; + attribute(readonly) int32u packetMulticastRxCount = 7; + attribute(readonly) int32u packetMulticastTxCount = 8; + attribute(readonly) int32u packetUnicastRxCount = 9; + attribute(readonly) int32u packetUnicastTxCount = 10; + attribute(readonly) int64u currentMaxRate = 11; + attribute(readonly) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 33413202a9d4b4..0881c0bcb7573e 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -7,7 +7,7 @@ struct LabelStruct { } server cluster AccountLogin = 1294 { - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; request struct GetSetupPINRequestRequest { CHAR_STRING tempAccountIdentifier = 0; @@ -40,10 +40,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly, reportable) int8u windowStatus = 0; - attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; - attribute(readonly, reportable) int16u adminVendorId = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -76,15 +76,15 @@ server cluster ApplicationBasic = 1293 { CHAR_STRING applicationId = 2; } - attribute(readonly, reportable) char_string vendorName = 0; - attribute(readonly, reportable) int16u vendorId = 1; - attribute(readonly, reportable) char_string applicationName = 2; - attribute(readonly, reportable) int16u productId = 3; - attribute(writable, reportable) ApplicationBasicApplication applicationApp = 4; - attribute(readonly, reportable) ApplicationStatusEnum applicationStatus = 5; - attribute(readonly, reportable) char_string applicationVersion = 6; - attribute(readonly, reportable) vendor_id allowedVendorList[] = 7; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) char_string vendorName = 0; + attribute(readonly) int16u vendorId = 1; + attribute(readonly) char_string applicationName = 2; + attribute(readonly) int16u productId = 3; + attribute(writable) ApplicationBasicApplication applicationApp = 4; + attribute(readonly) ApplicationStatusEnum applicationStatus = 5; + attribute(readonly) char_string applicationVersion = 6; + attribute(readonly) vendor_id allowedVendorList[] = 7; + attribute(readonly) int16u clusterRevision = 65533; } server cluster ApplicationLauncher = 1292 { @@ -104,9 +104,9 @@ server cluster ApplicationLauncher = 1292 { CHAR_STRING applicationId = 2; } - attribute(readonly, reportable) INT16U applicationLauncherList[] = 0; - attribute(writable, reportable) ApplicationEP applicationLauncherApp = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) INT16U applicationLauncherList[] = 0; + attribute(writable) ApplicationEP applicationLauncherApp = 1; + attribute(readonly) int16u clusterRevision = 65533; request struct HideAppRequestRequest { ApplicationLauncherApplication application = 0; @@ -147,9 +147,9 @@ server cluster AudioOutput = 1291 { CHAR_STRING name = 3; } - attribute(readonly, reportable) OutputInfo audioOutputList[] = 0; - attribute(readonly, reportable) int8u currentAudioOutput = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) OutputInfo audioOutputList[] = 0; + attribute(readonly) int8u currentAudioOutput = 1; + attribute(readonly) int16u clusterRevision = 65533; request struct RenameOutputRequestRequest { INT8U index = 0; @@ -179,31 +179,31 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly, reportable) int16u interactionModelVersion = 0; - attribute(readonly, reportable) char_string vendorName = 1; - attribute(readonly, reportable) vendor_id vendorID = 2; - attribute(readonly, reportable) char_string productName = 3; - attribute(readonly, reportable) int16u productID = 4; - attribute(writable, reportable) char_string nodeLabel = 5; - attribute(writable, reportable) char_string location = 6; - attribute(readonly, reportable) int16u hardwareVersion = 7; - attribute(readonly, reportable) char_string hardwareVersionString = 8; - attribute(readonly, reportable) int32u softwareVersion = 9; - attribute(readonly, reportable) char_string softwareVersionString = 10; - attribute(readonly, reportable) char_string manufacturingDate = 11; - attribute(readonly, reportable) char_string partNumber = 12; - attribute(readonly, reportable) long_char_string productURL = 13; - attribute(readonly, reportable) char_string productLabel = 14; - attribute(readonly, reportable) char_string serialNumber = 15; - attribute(writable, reportable) boolean localConfigDisabled = 16; - attribute(readonly, reportable) char_string uniqueID = 18; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u interactionModelVersion = 0; + attribute(readonly) char_string vendorName = 1; + attribute(readonly) vendor_id vendorID = 2; + attribute(readonly) char_string productName = 3; + attribute(readonly) int16u productID = 4; + attribute(writable) char_string nodeLabel = 5; + attribute(writable) char_string location = 6; + attribute(readonly) int16u hardwareVersion = 7; + attribute(readonly) char_string hardwareVersionString = 8; + attribute(readonly) int32u softwareVersion = 9; + attribute(readonly) char_string softwareVersionString = 10; + attribute(readonly) char_string manufacturingDate = 11; + attribute(readonly) char_string partNumber = 12; + attribute(readonly) long_char_string productURL = 13; + attribute(readonly) char_string productLabel = 14; + attribute(readonly) char_string serialNumber = 15; + attribute(writable) boolean localConfigDisabled = 16; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly) int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } client cluster Binding = 30 { - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; request struct BindRequest { NODE_ID nodeId = 0; @@ -224,7 +224,7 @@ client cluster Binding = 30 { } server cluster Binding = 30 { - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; request struct BindRequest { NODE_ID nodeId = 0; @@ -269,10 +269,10 @@ server cluster Channel = 1284 { LineupInfoTypeEnum lineupInfoType = 4; } - attribute(readonly, reportable) ChannelInfo channelList[] = 0; - attribute(writable, reportable) LineupInfo channelLineup = 1; - attribute(writable, reportable) ChannelInfo currentChannel = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) ChannelInfo channelList[] = 0; + attribute(writable) LineupInfo channelLineup = 1; + attribute(writable) ChannelInfo currentChannel = 2; + attribute(readonly) int16u clusterRevision = 65533; request struct ChangeChannelByNumberRequestRequest { INT16U majorNumber = 0; @@ -361,9 +361,9 @@ server cluster ContentLauncher = 1290 { MetricTypeEnum metric = 3; } - attribute(readonly, reportable) CHAR_STRING acceptHeaderList[] = 0; - attribute(writable, reportable) bitmap32 supportedStreamingProtocols = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) CHAR_STRING acceptHeaderList[] = 0; + attribute(writable) bitmap32 supportedStreamingProtocols = 1; + attribute(readonly) int16u clusterRevision = 65533; request struct LaunchContentRequestRequest { BOOLEAN autoPlay = 0; @@ -392,11 +392,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly, reportable) DeviceType deviceList[] = 0; - attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; - attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; - attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) DeviceType deviceList[] = 0; + attribute(readonly) CLUSTER_ID serverList[] = 1; + attribute(readonly) CLUSTER_ID clientList[] = 2; + attribute(readonly) ENDPOINT_NO partsList[] = 3; + attribute(readonly) int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -443,22 +443,22 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly, reportable) enum8 PHYRate = 0; - attribute(readonly, reportable) boolean fullDuplex = 1; - attribute(readonly, reportable) int64u packetRxCount = 2; - attribute(readonly, reportable) int64u packetTxCount = 3; - attribute(readonly, reportable) int64u txErrCount = 4; - attribute(readonly, reportable) int64u collisionCount = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) boolean carrierDetect = 7; - attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 PHYRate = 0; + attribute(readonly) boolean fullDuplex = 1; + attribute(readonly) int64u packetRxCount = 2; + attribute(readonly) int64u packetTxCount = 3; + attribute(readonly) int64u txErrCount = 4; + attribute(readonly) int64u collisionCount = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) boolean carrierDetect = 7; + attribute(readonly) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } client cluster GeneralCommissioning = 48 { @@ -479,12 +479,12 @@ client cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable, reportable) int64u breadcrumb = 0; - attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly, reportable) enum8 regulatoryConfig = 2; - attribute(readonly, reportable) enum8 locationCapability = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int64u breadcrumb = 0; + attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -537,12 +537,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable, reportable) int64u breadcrumb = 0; - attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly, reportable) enum8 regulatoryConfig = 2; - attribute(readonly, reportable) enum8 locationCapability = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int64u breadcrumb = 0; + attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -655,15 +655,15 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly, reportable) int16u rebootCount = 1; - attribute(readonly, reportable) int64u upTime = 2; - attribute(readonly, reportable) int32u totalOperationalHours = 3; - attribute(readonly, reportable) enum8 bootReasons = 4; - attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; - attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly) int16u rebootCount = 1; + attribute(readonly) int64u upTime = 2; + attribute(readonly) int32u totalOperationalHours = 3; + attribute(readonly) enum8 bootReasons = 4; + attribute(readonly) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly) ENUM8 activeRadioFaults[] = 6; + attribute(readonly) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly) int16u clusterRevision = 65533; } server cluster GroupKeyManagement = 63 { @@ -685,9 +685,9 @@ server cluster GroupKeyManagement = 63 { CHAR_STRING groupName = 3; } - attribute(readonly, reportable) GroupKey groupKeyMap[] = 0; - attribute(readonly, reportable) GroupInfo groupTable[] = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) GroupKey groupKeyMap[] = 0; + attribute(readonly) GroupInfo groupTable[] = 1; + attribute(readonly) int16u clusterRevision = 65533; } server cluster KeypadInput = 1289 { @@ -786,7 +786,7 @@ server cluster KeypadInput = 1289 { kInvalidKeyInCurrentState = 2; } - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; request struct SendKeyRequestRequest { CecKeyCode keyCode = 0; @@ -806,22 +806,22 @@ server cluster LevelControl = 8 { kDown = 1; } - attribute(readonly, reportable) int8u currentLevel = 0; - attribute(readonly, reportable) int16u remainingTime = 1; - attribute(readonly, reportable) int8u minLevel = 2; - attribute(readonly, reportable) int8u maxLevel = 3; - attribute(readonly, reportable) int16u currentFrequency = 4; - attribute(readonly, reportable) int16u minFrequency = 5; - attribute(readonly, reportable) int16u maxFrequency = 6; - attribute(writable, reportable) bitmap8 options = 15; - attribute(writable, reportable) int16u onOffTransitionTime = 16; - attribute(writable, reportable) int8u onLevel = 17; - attribute(writable, reportable) int16u onTransitionTime = 18; - attribute(writable, reportable) int16u offTransitionTime = 19; - attribute(writable, reportable) int8u defaultMoveRate = 20; - attribute(writable, reportable) int8u startUpCurrentLevel = 16384; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u currentLevel = 0; + attribute(readonly) int16u remainingTime = 1; + attribute(readonly) int8u minLevel = 2; + attribute(readonly) int8u maxLevel = 3; + attribute(readonly) int16u currentFrequency = 4; + attribute(readonly) int16u minFrequency = 5; + attribute(readonly) int16u maxFrequency = 6; + attribute(writable) bitmap8 options = 15; + attribute(writable) int16u onOffTransitionTime = 16; + attribute(writable) int8u onLevel = 17; + attribute(writable) int16u onTransitionTime = 18; + attribute(writable) int16u offTransitionTime = 19; + attribute(writable) int8u defaultMoveRate = 20; + attribute(writable) int8u startUpCurrentLevel = 16384; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -877,12 +877,12 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute(writable, reportable) char_string activeLocale = 1; - attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; } server cluster LowPower = 1288 { - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; command Sleep(): DefaultSuccess = 0; } @@ -910,9 +910,9 @@ server cluster MediaInput = 1287 { CHAR_STRING description = 4; } - attribute(readonly, reportable) InputInfo mediaInputList[] = 0; - attribute(readonly, reportable) int8u currentMediaInput = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) InputInfo mediaInputList[] = 0; + attribute(readonly) int8u currentMediaInput = 1; + attribute(readonly) int16u clusterRevision = 65533; request struct RenameInputRequestRequest { INT8U index = 0; @@ -951,14 +951,14 @@ server cluster MediaPlayback = 1286 { INT64U position = 2; } - attribute(readonly, reportable) PlaybackStateEnum playbackState = 0; - attribute(readonly, reportable) epoch_us startTime = 1; - attribute(readonly, reportable) int64u duration = 2; - attribute(writable, reportable) PlaybackPosition position = 3; - attribute(readonly, reportable) single playbackSpeed = 4; - attribute(readonly, reportable) int64u seekRangeEnd = 5; - attribute(readonly, reportable) int64u seekRangeStart = 6; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) PlaybackStateEnum playbackState = 0; + attribute(readonly) epoch_us startTime = 1; + attribute(readonly) int64u duration = 2; + attribute(writable) PlaybackPosition position = 3; + attribute(readonly) single playbackSpeed = 4; + attribute(readonly) int64u seekRangeEnd = 5; + attribute(readonly) int64u seekRangeStart = 6; + attribute(readonly) int16u clusterRevision = 65533; request struct SeekRequestRequest { INT64U position = 0; @@ -1039,16 +1039,16 @@ client cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly, reportable) int8u maxNetworks = 0; - attribute(readonly, reportable) NetworkInfo networks[] = 1; - attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; - attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; - attribute(writable, reportable) boolean interfaceEnabled = 4; - attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly, reportable) octet_string lastNetworkID = 6; - attribute(readonly, reportable) int32u lastConnectErrorValue = 7; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -1158,16 +1158,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly, reportable) int8u maxNetworks = 0; - attribute(readonly, reportable) NetworkInfo networks[] = 1; - attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; - attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; - attribute(writable, reportable) boolean interfaceEnabled = 4; - attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly, reportable) octet_string lastNetworkID = 6; - attribute(readonly, reportable) int32u lastConnectErrorValue = 7; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -1248,7 +1248,7 @@ server cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -1308,8 +1308,8 @@ server cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly, reportable) boolean onOff = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) boolean onOff = 0; + attribute(readonly) int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -1339,12 +1339,12 @@ client cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; - attribute(readonly, reportable) int8u supportedFabrics = 2; - attribute(readonly, reportable) int8u commissionedFabrics = 3; - attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) FabricDescriptor fabricsList[] = 1; + attribute(readonly) int8u supportedFabrics = 2; + attribute(readonly) int8u commissionedFabrics = 3; + attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly) fabric_idx currentFabricIndex = 5; + attribute(readonly) int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -1430,12 +1430,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; - attribute(readonly, reportable) int8u supportedFabrics = 2; - attribute(readonly, reportable) int8u commissionedFabrics = 3; - attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) FabricDescriptor fabricsList[] = 1; + attribute(readonly) int8u supportedFabrics = 2; + attribute(readonly) int8u commissionedFabrics = 3; + attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly) fabric_idx currentFabricIndex = 5; + attribute(readonly) int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -1510,10 +1510,10 @@ server cluster OperationalCredentials = 62 { } server cluster RelativeHumidityMeasurement = 1029 { - attribute(readonly, reportable) int16u measuredValue = 0; - attribute(readonly, reportable) int16u minMeasuredValue = 1; - attribute(readonly, reportable) int16u maxMeasuredValue = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u measuredValue = 0; + attribute(readonly) int16u minMeasuredValue = 1; + attribute(readonly) int16u maxMeasuredValue = 2; + attribute(readonly) int16u clusterRevision = 65533; } server cluster SoftwareDiagnostics = 52 { @@ -1529,12 +1529,12 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; - attribute(readonly, reportable) int64u currentHeapFree = 1; - attribute(readonly, reportable) int64u currentHeapUsed = 2; - attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) ThreadMetrics threadMetrics[] = 0; + attribute(readonly) int64u currentHeapFree = 1; + attribute(readonly) int64u currentHeapUsed = 2; + attribute(readonly) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster TargetNavigator = 1285 { @@ -1549,9 +1549,9 @@ server cluster TargetNavigator = 1285 { CHAR_STRING name = 2; } - attribute(readonly, reportable) TargetInfo targetNavigatorList[] = 0; - attribute(readonly, reportable) int8u currentNavigatorTarget = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) TargetInfo targetNavigatorList[] = 0; + attribute(readonly) int8u currentNavigatorTarget = 1; + attribute(readonly) int16u clusterRevision = 65533; request struct NavigateTargetRequestRequest { INT8U target = 0; @@ -1643,81 +1643,81 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) int16u channel = 0; - attribute(readonly, reportable) enum8 routingRole = 1; - attribute(readonly, reportable) octet_string networkName = 2; - attribute(readonly, reportable) int16u panId = 3; - attribute(readonly, reportable) int64u extendedPanId = 4; - attribute(readonly, reportable) octet_string meshLocalPrefix = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; - attribute(readonly, reportable) RouteTable routeTableList[] = 8; - attribute(readonly, reportable) int32u partitionId = 9; - attribute(readonly, reportable) int8u weighting = 10; - attribute(readonly, reportable) int8u dataVersion = 11; - attribute(readonly, reportable) int8u stableDataVersion = 12; - attribute(readonly, reportable) int8u leaderRouterId = 13; - attribute(readonly, reportable) int16u detachedRoleCount = 14; - attribute(readonly, reportable) int16u childRoleCount = 15; - attribute(readonly, reportable) int16u routerRoleCount = 16; - attribute(readonly, reportable) int16u leaderRoleCount = 17; - attribute(readonly, reportable) int16u attachAttemptCount = 18; - attribute(readonly, reportable) int16u partitionIdChangeCount = 19; - attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly, reportable) int16u parentChangeCount = 21; - attribute(readonly, reportable) int32u txTotalCount = 22; - attribute(readonly, reportable) int32u txUnicastCount = 23; - attribute(readonly, reportable) int32u txBroadcastCount = 24; - attribute(readonly, reportable) int32u txAckRequestedCount = 25; - attribute(readonly, reportable) int32u txAckedCount = 26; - attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; - attribute(readonly, reportable) int32u txDataCount = 28; - attribute(readonly, reportable) int32u txDataPollCount = 29; - attribute(readonly, reportable) int32u txBeaconCount = 30; - attribute(readonly, reportable) int32u txBeaconRequestCount = 31; - attribute(readonly, reportable) int32u txOtherCount = 32; - attribute(readonly, reportable) int32u txRetryCount = 33; - attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly, reportable) int32u txErrCcaCount = 36; - attribute(readonly, reportable) int32u txErrAbortCount = 37; - attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; - attribute(readonly, reportable) int32u rxTotalCount = 39; - attribute(readonly, reportable) int32u rxUnicastCount = 40; - attribute(readonly, reportable) int32u rxBroadcastCount = 41; - attribute(readonly, reportable) int32u rxDataCount = 42; - attribute(readonly, reportable) int32u rxDataPollCount = 43; - attribute(readonly, reportable) int32u rxBeaconCount = 44; - attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; - attribute(readonly, reportable) int32u rxOtherCount = 46; - attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; - attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; - attribute(readonly, reportable) int32u rxDuplicatedCount = 49; - attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; - attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly, reportable) int32u rxErrSecCount = 53; - attribute(readonly, reportable) int32u rxErrFcsCount = 54; - attribute(readonly, reportable) int32u rxErrOtherCount = 55; - attribute(readonly, reportable) int64u activeTimestamp = 56; - attribute(readonly, reportable) int64u pendingTimestamp = 57; - attribute(readonly, reportable) int32u delay = 58; - attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; - attribute(readonly, reportable) octet_string channelMask = 60; - attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u channel = 0; + attribute(readonly) enum8 routingRole = 1; + attribute(readonly) octet_string networkName = 2; + attribute(readonly) int16u panId = 3; + attribute(readonly) int64u extendedPanId = 4; + attribute(readonly) octet_string meshLocalPrefix = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) NeighborTable neighborTableList[] = 7; + attribute(readonly) RouteTable routeTableList[] = 8; + attribute(readonly) int32u partitionId = 9; + attribute(readonly) int8u weighting = 10; + attribute(readonly) int8u dataVersion = 11; + attribute(readonly) int8u stableDataVersion = 12; + attribute(readonly) int8u leaderRouterId = 13; + attribute(readonly) int16u detachedRoleCount = 14; + attribute(readonly) int16u childRoleCount = 15; + attribute(readonly) int16u routerRoleCount = 16; + attribute(readonly) int16u leaderRoleCount = 17; + attribute(readonly) int16u attachAttemptCount = 18; + attribute(readonly) int16u partitionIdChangeCount = 19; + attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly) int16u parentChangeCount = 21; + attribute(readonly) int32u txTotalCount = 22; + attribute(readonly) int32u txUnicastCount = 23; + attribute(readonly) int32u txBroadcastCount = 24; + attribute(readonly) int32u txAckRequestedCount = 25; + attribute(readonly) int32u txAckedCount = 26; + attribute(readonly) int32u txNoAckRequestedCount = 27; + attribute(readonly) int32u txDataCount = 28; + attribute(readonly) int32u txDataPollCount = 29; + attribute(readonly) int32u txBeaconCount = 30; + attribute(readonly) int32u txBeaconRequestCount = 31; + attribute(readonly) int32u txOtherCount = 32; + attribute(readonly) int32u txRetryCount = 33; + attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly) int32u txErrCcaCount = 36; + attribute(readonly) int32u txErrAbortCount = 37; + attribute(readonly) int32u txErrBusyChannelCount = 38; + attribute(readonly) int32u rxTotalCount = 39; + attribute(readonly) int32u rxUnicastCount = 40; + attribute(readonly) int32u rxBroadcastCount = 41; + attribute(readonly) int32u rxDataCount = 42; + attribute(readonly) int32u rxDataPollCount = 43; + attribute(readonly) int32u rxBeaconCount = 44; + attribute(readonly) int32u rxBeaconRequestCount = 45; + attribute(readonly) int32u rxOtherCount = 46; + attribute(readonly) int32u rxAddressFilteredCount = 47; + attribute(readonly) int32u rxDestAddrFilteredCount = 48; + attribute(readonly) int32u rxDuplicatedCount = 49; + attribute(readonly) int32u rxErrNoFrameCount = 50; + attribute(readonly) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly) int32u rxErrSecCount = 53; + attribute(readonly) int32u rxErrFcsCount = 54; + attribute(readonly) int32u rxErrOtherCount = 55; + attribute(readonly) int64u activeTimestamp = 56; + attribute(readonly) int64u pendingTimestamp = 57; + attribute(readonly) int32u delay = 58; + attribute(readonly) SecurityPolicy securityPolicy[] = 59; + attribute(readonly) octet_string channelMask = 60; + attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster WakeOnLan = 1283 { - attribute(readonly, reportable) char_string wakeOnLanMacAddress = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) char_string wakeOnLanMacAddress = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -1764,21 +1764,21 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) octet_string bssid = 0; - attribute(readonly, reportable) enum8 securityType = 1; - attribute(readonly, reportable) enum8 wiFiVersion = 2; - attribute(readonly, reportable) int16u channelNumber = 3; - attribute(readonly, reportable) int8s rssi = 4; - attribute(readonly, reportable) int32u beaconLostCount = 5; - attribute(readonly, reportable) int32u beaconRxCount = 6; - attribute(readonly, reportable) int32u packetMulticastRxCount = 7; - attribute(readonly, reportable) int32u packetMulticastTxCount = 8; - attribute(readonly, reportable) int32u packetUnicastRxCount = 9; - attribute(readonly, reportable) int32u packetUnicastTxCount = 10; - attribute(readonly, reportable) int64u currentMaxRate = 11; - attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) octet_string bssid = 0; + attribute(readonly) enum8 securityType = 1; + attribute(readonly) enum8 wiFiVersion = 2; + attribute(readonly) int16u channelNumber = 3; + attribute(readonly) int8s rssi = 4; + attribute(readonly) int32u beaconLostCount = 5; + attribute(readonly) int32u beaconRxCount = 6; + attribute(readonly) int32u packetMulticastRxCount = 7; + attribute(readonly) int32u packetMulticastTxCount = 8; + attribute(readonly) int32u packetUnicastRxCount = 9; + attribute(readonly) int32u packetUnicastTxCount = 10; + attribute(readonly) int64u currentMaxRate = 11; + attribute(readonly) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } 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 665e20470def72..d79822852c6e06 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 @@ -7,7 +7,7 @@ struct LabelStruct { } client cluster AccountLogin = 1294 { - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; request struct GetSetupPINRequestRequest { CHAR_STRING tempAccountIdentifier = 0; @@ -36,10 +36,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly, reportable) int8u windowStatus = 0; - attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; - attribute(readonly, reportable) int16u adminVendorId = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -67,13 +67,13 @@ client cluster ApplicationBasic = 1293 { kActiveVisibleNotFocus = 3; } - attribute(readonly, reportable) char_string vendorName = 0; - attribute(readonly, reportable) int16u vendorId = 1; - attribute(readonly, reportable) char_string applicationName = 2; - attribute(readonly, reportable) int16u productId = 3; - attribute(readonly, reportable) ApplicationStatusEnum applicationStatus = 5; - attribute(readonly, reportable) char_string applicationVersion = 6; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) char_string vendorName = 0; + attribute(readonly) int16u vendorId = 1; + attribute(readonly) char_string applicationName = 2; + attribute(readonly) int16u productId = 3; + attribute(readonly) ApplicationStatusEnum applicationStatus = 5; + attribute(readonly) char_string applicationVersion = 6; + attribute(readonly) int16u clusterRevision = 65533; } client cluster ApplicationLauncher = 1292 { @@ -88,8 +88,8 @@ client cluster ApplicationLauncher = 1292 { CHAR_STRING applicationId = 2; } - attribute(readonly, reportable) INT16U applicationLauncherList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) INT16U applicationLauncherList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; request struct HideAppRequestRequest { ApplicationLauncherApplication application = 0; @@ -125,8 +125,8 @@ client cluster AudioOutput = 1291 { CHAR_STRING name = 3; } - attribute(readonly, reportable) OutputInfo audioOutputList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) OutputInfo audioOutputList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; request struct RenameOutputRequestRequest { INT8U index = 0; @@ -142,11 +142,11 @@ client cluster AudioOutput = 1291 { } server cluster BarrierControl = 259 { - attribute(readonly, reportable) enum8 barrierMovingState = 1; - attribute(readonly, reportable) bitmap16 barrierSafetyStatus = 2; - attribute(readonly, reportable) bitmap8 barrierCapabilities = 3; - attribute(readonly, reportable) int8u barrierPosition = 10; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 barrierMovingState = 1; + attribute(readonly) bitmap16 barrierSafetyStatus = 2; + attribute(readonly) bitmap8 barrierCapabilities = 3; + attribute(readonly) int8u barrierPosition = 10; + attribute(readonly) int16u clusterRevision = 65533; request struct BarrierControlGoToPercentRequest { INT8U percentOpen = 0; @@ -171,39 +171,39 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly, reportable) int16u interactionModelVersion = 0; - attribute(readonly, reportable) char_string vendorName = 1; - attribute(readonly, reportable) vendor_id vendorID = 2; - attribute(readonly, reportable) char_string productName = 3; - attribute(readonly, reportable) int16u productID = 4; - attribute(writable, reportable) char_string nodeLabel = 5; - attribute(writable, reportable) char_string location = 6; - attribute(readonly, reportable) int16u hardwareVersion = 7; - attribute(readonly, reportable) char_string hardwareVersionString = 8; - attribute(readonly, reportable) int32u softwareVersion = 9; - attribute(readonly, reportable) char_string softwareVersionString = 10; - attribute(readonly, reportable) char_string manufacturingDate = 11; - attribute(readonly, reportable) char_string partNumber = 12; - attribute(readonly, reportable) long_char_string productURL = 13; - attribute(readonly, reportable) char_string productLabel = 14; - attribute(readonly, reportable) char_string serialNumber = 15; - attribute(writable, reportable) boolean localConfigDisabled = 16; - attribute(readonly, reportable) boolean reachable = 17; - attribute(readonly, reportable) char_string uniqueID = 18; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u interactionModelVersion = 0; + attribute(readonly) char_string vendorName = 1; + attribute(readonly) vendor_id vendorID = 2; + attribute(readonly) char_string productName = 3; + attribute(readonly) int16u productID = 4; + attribute(writable) char_string nodeLabel = 5; + attribute(writable) char_string location = 6; + attribute(readonly) int16u hardwareVersion = 7; + attribute(readonly) char_string hardwareVersionString = 8; + attribute(readonly) int32u softwareVersion = 9; + attribute(readonly) char_string softwareVersionString = 10; + attribute(readonly) char_string manufacturingDate = 11; + attribute(readonly) char_string partNumber = 12; + attribute(readonly) long_char_string productURL = 13; + attribute(readonly) char_string productLabel = 14; + attribute(readonly) char_string serialNumber = 15; + attribute(writable) boolean localConfigDisabled = 16; + attribute(readonly) boolean reachable = 17; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly) int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } server cluster BinaryInputBasic = 15 { - attribute(writable, reportable) boolean outOfService = 81; - attribute(writable, reportable) boolean presentValue = 85; - attribute(readonly, reportable) bitmap8 statusFlags = 111; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) boolean outOfService = 81; + attribute(writable) boolean presentValue = 85; + attribute(readonly) bitmap8 statusFlags = 111; + attribute(readonly) int16u clusterRevision = 65533; } server cluster Binding = 30 { - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; request struct BindRequest { NODE_ID nodeId = 0; @@ -224,21 +224,21 @@ server cluster Binding = 30 { } server cluster BridgedDeviceBasic = 57 { - attribute(readonly, reportable) char_string vendorName = 1; - attribute(readonly, reportable) int16u vendorID = 2; - attribute(readonly, reportable) char_string productName = 3; - attribute(writable, reportable) char_string nodeLabel = 5; - attribute(readonly, reportable) int16u hardwareVersion = 7; - attribute(readonly, reportable) char_string hardwareVersionString = 8; - attribute(readonly, reportable) int32u softwareVersion = 9; - attribute(readonly, reportable) char_string softwareVersionString = 10; - attribute(readonly, reportable) char_string manufacturingDate = 11; - attribute(readonly, reportable) char_string partNumber = 12; - attribute(readonly, reportable) long_char_string productURL = 13; - attribute(readonly, reportable) char_string productLabel = 14; - attribute(readonly, reportable) char_string serialNumber = 15; - attribute(readonly, reportable) boolean reachable = 17; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) char_string vendorName = 1; + attribute(readonly) int16u vendorID = 2; + attribute(readonly) char_string productName = 3; + attribute(writable) char_string nodeLabel = 5; + attribute(readonly) int16u hardwareVersion = 7; + attribute(readonly) char_string hardwareVersionString = 8; + attribute(readonly) int32u softwareVersion = 9; + attribute(readonly) char_string softwareVersionString = 10; + attribute(readonly) char_string manufacturingDate = 11; + attribute(readonly) char_string partNumber = 12; + attribute(readonly) long_char_string productURL = 13; + attribute(readonly) char_string productLabel = 14; + attribute(readonly) char_string serialNumber = 15; + attribute(readonly) boolean reachable = 17; + attribute(readonly) int16u clusterRevision = 65533; command Leave(): DefaultSuccess = 2; command ReachableChanged(): DefaultSuccess = 3; @@ -271,10 +271,10 @@ client cluster Channel = 1284 { LineupInfoTypeEnum lineupInfoType = 4; } - attribute(readonly, reportable) ChannelInfo channelList[] = 0; - attribute(writable, reportable) LineupInfo channelLineup = 1; - attribute(writable, reportable) ChannelInfo currentChannel = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) ChannelInfo channelList[] = 0; + attribute(writable) LineupInfo channelLineup = 1; + attribute(writable) ChannelInfo currentChannel = 2; + attribute(readonly) int16u clusterRevision = 65533; request struct ChangeChannelByNumberRequestRequest { INT16U majorNumber = 0; @@ -341,57 +341,57 @@ server cluster ColorControl = 768 { kDown = 3; } - attribute(readonly, reportable) int8u currentHue = 0; - attribute(readonly, reportable) int8u currentSaturation = 1; - attribute(readonly, reportable) int16u remainingTime = 2; - attribute(readonly, reportable) int16u currentX = 3; - attribute(readonly, reportable) int16u currentY = 4; - attribute(readonly, reportable) enum8 driftCompensation = 5; - attribute(readonly, reportable) char_string compensationText = 6; - attribute(readonly, reportable) int16u colorTemperature = 7; - attribute(readonly, reportable) enum8 colorMode = 8; - attribute(writable, reportable) bitmap8 colorControlOptions = 15; - attribute(readonly, reportable) int8u numberOfPrimaries = 16; - attribute(readonly, reportable) int16u primary1X = 17; - attribute(readonly, reportable) int16u primary1Y = 18; - attribute(readonly, reportable) int8u primary1Intensity = 19; - attribute(readonly, reportable) int16u primary2X = 21; - attribute(readonly, reportable) int16u primary2Y = 22; - attribute(readonly, reportable) int8u primary2Intensity = 23; - attribute(readonly, reportable) int16u primary3X = 25; - attribute(readonly, reportable) int16u primary3Y = 26; - attribute(readonly, reportable) int8u primary3Intensity = 27; - attribute(readonly, reportable) int16u primary4X = 32; - attribute(readonly, reportable) int16u primary4Y = 33; - attribute(readonly, reportable) int8u primary4Intensity = 34; - attribute(readonly, reportable) int16u primary5X = 36; - attribute(readonly, reportable) int16u primary5Y = 37; - attribute(readonly, reportable) int8u primary5Intensity = 38; - attribute(readonly, reportable) int16u primary6X = 40; - attribute(readonly, reportable) int16u primary6Y = 41; - attribute(readonly, reportable) int8u primary6Intensity = 42; - attribute(writable, reportable) int16u whitePointX = 48; - attribute(writable, reportable) int16u whitePointY = 49; - attribute(writable, reportable) int16u colorPointRX = 50; - attribute(writable, reportable) int16u colorPointRY = 51; - attribute(writable, reportable) int8u colorPointRIntensity = 52; - attribute(writable, reportable) int16u colorPointGX = 54; - attribute(writable, reportable) int16u colorPointGY = 55; - attribute(writable, reportable) int8u colorPointGIntensity = 56; - attribute(writable, reportable) int16u colorPointBX = 58; - attribute(writable, reportable) int16u colorPointBY = 59; - attribute(writable, reportable) int8u colorPointBIntensity = 60; - attribute(readonly, reportable) int16u enhancedCurrentHue = 16384; - attribute(readonly, reportable) enum8 enhancedColorMode = 16385; - attribute(readonly, reportable) int8u colorLoopActive = 16386; - attribute(readonly, reportable) int8u colorLoopDirection = 16387; - attribute(readonly, reportable) int16u colorLoopTime = 16388; - attribute(readonly, reportable) bitmap16 colorCapabilities = 16394; - attribute(readonly, reportable) int16u colorTempPhysicalMin = 16395; - attribute(readonly, reportable) int16u colorTempPhysicalMax = 16396; - attribute(readonly, reportable) int16u coupleColorTempToLevelMinMireds = 16397; - attribute(writable, reportable) int16u startUpColorTemperatureMireds = 16400; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u currentHue = 0; + attribute(readonly) int8u currentSaturation = 1; + attribute(readonly) int16u remainingTime = 2; + attribute(readonly) int16u currentX = 3; + attribute(readonly) int16u currentY = 4; + attribute(readonly) enum8 driftCompensation = 5; + attribute(readonly) char_string compensationText = 6; + attribute(readonly) int16u colorTemperature = 7; + attribute(readonly) enum8 colorMode = 8; + attribute(writable) bitmap8 colorControlOptions = 15; + attribute(readonly) int8u numberOfPrimaries = 16; + attribute(readonly) int16u primary1X = 17; + attribute(readonly) int16u primary1Y = 18; + attribute(readonly) int8u primary1Intensity = 19; + attribute(readonly) int16u primary2X = 21; + attribute(readonly) int16u primary2Y = 22; + attribute(readonly) int8u primary2Intensity = 23; + attribute(readonly) int16u primary3X = 25; + attribute(readonly) int16u primary3Y = 26; + attribute(readonly) int8u primary3Intensity = 27; + attribute(readonly) int16u primary4X = 32; + attribute(readonly) int16u primary4Y = 33; + attribute(readonly) int8u primary4Intensity = 34; + attribute(readonly) int16u primary5X = 36; + attribute(readonly) int16u primary5Y = 37; + attribute(readonly) int8u primary5Intensity = 38; + attribute(readonly) int16u primary6X = 40; + attribute(readonly) int16u primary6Y = 41; + attribute(readonly) int8u primary6Intensity = 42; + attribute(writable) int16u whitePointX = 48; + attribute(writable) int16u whitePointY = 49; + attribute(writable) int16u colorPointRX = 50; + attribute(writable) int16u colorPointRY = 51; + attribute(writable) int8u colorPointRIntensity = 52; + attribute(writable) int16u colorPointGX = 54; + attribute(writable) int16u colorPointGY = 55; + attribute(writable) int8u colorPointGIntensity = 56; + attribute(writable) int16u colorPointBX = 58; + attribute(writable) int16u colorPointBY = 59; + attribute(writable) int8u colorPointBIntensity = 60; + attribute(readonly) int16u enhancedCurrentHue = 16384; + attribute(readonly) enum8 enhancedColorMode = 16385; + attribute(readonly) int8u colorLoopActive = 16386; + attribute(readonly) int8u colorLoopDirection = 16387; + attribute(readonly) int16u colorLoopTime = 16388; + attribute(readonly) bitmap16 colorCapabilities = 16394; + attribute(readonly) int16u colorTempPhysicalMin = 16395; + attribute(readonly) int16u colorTempPhysicalMax = 16396; + attribute(readonly) int16u coupleColorTempToLevelMinMireds = 16397; + attribute(writable) int16u startUpColorTemperatureMireds = 16400; + attribute(readonly) int16u clusterRevision = 65533; request struct MoveColorRequest { INT16S rateX = 0; @@ -580,9 +580,9 @@ client cluster ContentLauncher = 1290 { MetricTypeEnum metric = 3; } - attribute(readonly, reportable) CHAR_STRING acceptHeaderList[] = 0; - attribute(writable, reportable) bitmap32 supportedStreamingProtocols = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) CHAR_STRING acceptHeaderList[] = 0; + attribute(writable) bitmap32 supportedStreamingProtocols = 1; + attribute(readonly) int16u clusterRevision = 65533; request struct LaunchContentRequestRequest { BOOLEAN autoPlay = 0; @@ -606,11 +606,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly, reportable) DeviceType deviceList[] = 0; - attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; - attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; - attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) DeviceType deviceList[] = 0; + attribute(readonly) CLUSTER_ID serverList[] = 1; + attribute(readonly) CLUSTER_ID clientList[] = 2; + attribute(readonly) ENDPOINT_NO partsList[] = 3; + attribute(readonly) int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -879,34 +879,34 @@ server cluster DoorLock = 257 { nullable INT16U dataIndex = 6; } - attribute(readonly, reportable) DlLockState lockState = 0; - attribute(readonly, reportable) DlLockType lockType = 1; - attribute(readonly, reportable) boolean actuatorEnabled = 2; - attribute(readonly, reportable) DlDoorState doorState = 3; - attribute(writable, reportable) int32u doorOpenEvents = 4; - attribute(writable, reportable) int32u doorClosedEvents = 5; - attribute(writable, reportable) int16u openPeriod = 6; - attribute(readonly, reportable) int16u numberOfTotalUsersSupported = 17; - attribute(readonly, reportable) int16u numberOfPINUsersSupported = 18; - attribute(readonly, reportable) int16u numberOfWeekDaySchedulesSupportedPerUser = 20; - attribute(readonly, reportable) int16u numberOfYearDaySchedulesSupportedPerUser = 21; - attribute(readonly, reportable) int16u numberOfHolidaySchedulesSupported = 22; - attribute(readonly, reportable) int8u maxPINCodeLength = 23; - attribute(readonly, reportable) int8u minPINCodeLength = 24; - attribute(readonly, reportable) bitmap8 credentialRulesSupport = 27; - attribute(writable, reportable) char_string language = 33; - attribute(writable, reportable) int32u autoRelockTime = 35; - attribute(writable, reportable) int8u soundVolume = 36; - attribute(writable, reportable) DlOperatingMode operatingMode = 37; - attribute(readonly, reportable) bitmap16 supportedOperatingModes = 38; - attribute(readonly, reportable) bitmap16 defaultConfigurationRegister = 39; - attribute(writable, reportable) boolean enableOneTouchLocking = 41; - attribute(writable, reportable) boolean enableInsideStatusLED = 42; - attribute(writable, reportable) boolean enablePrivacyModeButton = 43; - attribute(writable, reportable) int8u wrongCodeEntryLimit = 48; - attribute(writable, reportable) int8u userCodeTemporaryDisableTime = 49; - attribute(writable, reportable) boolean requirePINforRemoteOperation = 51; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) DlLockState lockState = 0; + attribute(readonly) DlLockType lockType = 1; + attribute(readonly) boolean actuatorEnabled = 2; + attribute(readonly) DlDoorState doorState = 3; + attribute(writable) int32u doorOpenEvents = 4; + attribute(writable) int32u doorClosedEvents = 5; + attribute(writable) int16u openPeriod = 6; + attribute(readonly) int16u numberOfTotalUsersSupported = 17; + attribute(readonly) int16u numberOfPINUsersSupported = 18; + attribute(readonly) int16u numberOfWeekDaySchedulesSupportedPerUser = 20; + attribute(readonly) int16u numberOfYearDaySchedulesSupportedPerUser = 21; + attribute(readonly) int16u numberOfHolidaySchedulesSupported = 22; + attribute(readonly) int8u maxPINCodeLength = 23; + attribute(readonly) int8u minPINCodeLength = 24; + attribute(readonly) bitmap8 credentialRulesSupport = 27; + attribute(writable) char_string language = 33; + attribute(writable) int32u autoRelockTime = 35; + attribute(writable) int8u soundVolume = 36; + attribute(writable) DlOperatingMode operatingMode = 37; + attribute(readonly) bitmap16 supportedOperatingModes = 38; + attribute(readonly) bitmap16 defaultConfigurationRegister = 39; + attribute(writable) boolean enableOneTouchLocking = 41; + attribute(writable) boolean enableInsideStatusLED = 42; + attribute(writable) boolean enablePrivacyModeButton = 43; + attribute(writable) int8u wrongCodeEntryLimit = 48; + attribute(writable) int8u userCodeTemporaryDisableTime = 49; + attribute(writable) boolean requirePINforRemoteOperation = 51; + attribute(readonly) int16u clusterRevision = 65533; request struct ClearCredentialRequest { DlCredential credential = 0; @@ -999,29 +999,29 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly, reportable) enum8 PHYRate = 0; - attribute(readonly, reportable) boolean fullDuplex = 1; - attribute(readonly, reportable) int64u packetRxCount = 2; - attribute(readonly, reportable) int64u packetTxCount = 3; - attribute(readonly, reportable) int64u txErrCount = 4; - attribute(readonly, reportable) int64u collisionCount = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) boolean carrierDetect = 7; - attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 PHYRate = 0; + attribute(readonly) boolean fullDuplex = 1; + attribute(readonly) int64u packetRxCount = 2; + attribute(readonly) int64u packetTxCount = 3; + attribute(readonly) int64u txErrCount = 4; + attribute(readonly) int64u collisionCount = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) boolean carrierDetect = 7; + attribute(readonly) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster FlowMeasurement = 1028 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -1042,12 +1042,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable, reportable) int64u breadcrumb = 0; - attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly, reportable) enum8 regulatoryConfig = 2; - attribute(readonly, reportable) enum8 locationCapability = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int64u breadcrumb = 0; + attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -1160,15 +1160,15 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly, reportable) int16u rebootCount = 1; - attribute(readonly, reportable) int64u upTime = 2; - attribute(readonly, reportable) int32u totalOperationalHours = 3; - attribute(readonly, reportable) enum8 bootReasons = 4; - attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; - attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly) int16u rebootCount = 1; + attribute(readonly) int64u upTime = 2; + attribute(readonly) int32u totalOperationalHours = 3; + attribute(readonly) enum8 bootReasons = 4; + attribute(readonly) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly) ENUM8 activeRadioFaults[] = 6; + attribute(readonly) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly) int16u clusterRevision = 65533; } server cluster GroupKeyManagement = 63 { @@ -1190,14 +1190,14 @@ server cluster GroupKeyManagement = 63 { CHAR_STRING groupName = 3; } - attribute(readonly, reportable) GroupKey groupKeyMap[] = 0; - attribute(readonly, reportable) GroupInfo groupTable[] = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) GroupKey groupKeyMap[] = 0; + attribute(readonly) GroupInfo groupTable[] = 1; + attribute(readonly) int16u clusterRevision = 65533; } server cluster Groups = 4 { - attribute(readonly, reportable) bitmap8 nameSupport = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) bitmap8 nameSupport = 0; + attribute(readonly) int16u clusterRevision = 65533; request struct AddGroupRequest { INT16U groupId = 0; @@ -1277,12 +1277,12 @@ server cluster IasZone = 1280 { kInvalidZoneType = 65535; } - attribute(readonly, reportable) enum8 zoneState = 0; - attribute(readonly, reportable) enum16 zoneType = 1; - attribute(readonly, reportable) bitmap16 zoneStatus = 2; - attribute(writable, reportable) node_id iasCieAddress = 16; - attribute(readonly, reportable) int8u zoneId = 17; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 zoneState = 0; + attribute(readonly) enum16 zoneType = 1; + attribute(readonly) bitmap16 zoneStatus = 2; + attribute(writable) node_id iasCieAddress = 16; + attribute(readonly) int8u zoneId = 17; + attribute(readonly) int16u clusterRevision = 65533; request struct ZoneEnrollRequestRequest { IasZoneType zoneType = 0; @@ -1328,8 +1328,8 @@ server cluster Identify = 3 { kActuator = 5; } - attribute(writable, reportable) int16u identifyTime = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int16u identifyTime = 0; + attribute(readonly) int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -1439,7 +1439,7 @@ client cluster KeypadInput = 1289 { kInvalidKeyInCurrentState = 2; } - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; request struct SendKeyRequestRequest { CecKeyCode keyCode = 0; @@ -1459,21 +1459,21 @@ server cluster LevelControl = 8 { kDown = 1; } - attribute(readonly, reportable) int8u currentLevel = 0; - attribute(readonly, reportable) int16u remainingTime = 1; - attribute(readonly, reportable) int8u minLevel = 2; - attribute(readonly, reportable) int8u maxLevel = 3; - attribute(readonly, reportable) int16u currentFrequency = 4; - attribute(readonly, reportable) int16u minFrequency = 5; - attribute(readonly, reportable) int16u maxFrequency = 6; - attribute(writable, reportable) bitmap8 options = 15; - attribute(writable, reportable) int16u onOffTransitionTime = 16; - attribute(writable, reportable) int8u onLevel = 17; - attribute(writable, reportable) int16u onTransitionTime = 18; - attribute(writable, reportable) int16u offTransitionTime = 19; - attribute(writable, reportable) int8u defaultMoveRate = 20; - attribute(writable, reportable) int8u startUpCurrentLevel = 16384; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u currentLevel = 0; + attribute(readonly) int16u remainingTime = 1; + attribute(readonly) int8u minLevel = 2; + attribute(readonly) int8u maxLevel = 3; + attribute(readonly) int16u currentFrequency = 4; + attribute(readonly) int16u minFrequency = 5; + attribute(readonly) int16u maxFrequency = 6; + attribute(writable) bitmap8 options = 15; + attribute(writable) int16u onOffTransitionTime = 16; + attribute(writable) int8u onLevel = 17; + attribute(writable) int16u onTransitionTime = 18; + attribute(writable) int16u offTransitionTime = 19; + attribute(writable) int8u defaultMoveRate = 20; + attribute(writable) int8u startUpCurrentLevel = 16384; + attribute(readonly) int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -1529,8 +1529,8 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute(writable, reportable) char_string activeLocale = 1; - attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; } client cluster MediaInput = 1287 { @@ -1556,8 +1556,8 @@ client cluster MediaInput = 1287 { CHAR_STRING description = 4; } - attribute(readonly, reportable) InputInfo mediaInputList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) InputInfo mediaInputList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; request struct RenameInputRequestRequest { INT8U index = 0; @@ -1591,7 +1591,7 @@ client cluster MediaPlayback = 1286 { kSeekOutOfRange = 5; } - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; request struct SeekRequestRequest { INT64U position = 0; @@ -1668,16 +1668,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly, reportable) int8u maxNetworks = 0; - attribute(readonly, reportable) NetworkInfo networks[] = 1; - attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; - attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; - attribute(writable, reportable) boolean interfaceEnabled = 4; - attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly, reportable) octet_string lastNetworkID = 6; - attribute(readonly, reportable) int32u lastConnectErrorValue = 7; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -1758,7 +1758,7 @@ server cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -1803,10 +1803,10 @@ server cluster OtaSoftwareUpdateProvider = 41 { } server cluster OccupancySensing = 1030 { - attribute(readonly, reportable) bitmap8 occupancy = 0; - attribute(readonly, reportable) enum8 occupancySensorType = 1; - attribute(readonly, reportable) bitmap8 occupancySensorTypeBitmap = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) bitmap8 occupancy = 0; + attribute(readonly) enum8 occupancySensorType = 1; + attribute(readonly) bitmap8 occupancySensorTypeBitmap = 2; + attribute(readonly) int16u clusterRevision = 65533; } server cluster OnOff = 6 { @@ -1825,13 +1825,13 @@ server cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly, reportable) boolean onOff = 0; - attribute(readonly, reportable) boolean globalSceneControl = 16384; - attribute(writable, reportable) int16u onTime = 16385; - attribute(writable, reportable) int16u offWaitTime = 16386; - attribute(writable, reportable) enum8 startUpOnOff = 16387; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) boolean onOff = 0; + attribute(readonly) boolean globalSceneControl = 16384; + attribute(writable) int16u onTime = 16385; + attribute(writable) int16u offWaitTime = 16386; + attribute(writable) enum8 startUpOnOff = 16387; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -1861,12 +1861,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; - attribute(readonly, reportable) int8u supportedFabrics = 2; - attribute(readonly, reportable) int8u commissionedFabrics = 3; - attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) FabricDescriptor fabricsList[] = 1; + attribute(readonly) int8u supportedFabrics = 2; + attribute(readonly) int8u commissionedFabrics = 3; + attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly) fabric_idx currentFabricIndex = 5; + attribute(readonly) int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -1941,17 +1941,17 @@ server cluster OperationalCredentials = 62 { } server cluster PressureMeasurement = 1027 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u clusterRevision = 65533; } server cluster RelativeHumidityMeasurement = 1029 { - attribute(readonly, reportable) int16u measuredValue = 0; - attribute(readonly, reportable) int16u minMeasuredValue = 1; - attribute(readonly, reportable) int16u maxMeasuredValue = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u measuredValue = 0; + attribute(readonly) int16u minMeasuredValue = 1; + attribute(readonly) int16u maxMeasuredValue = 2; + attribute(readonly) int16u clusterRevision = 65533; } server cluster Scenes = 5 { @@ -1961,12 +1961,12 @@ server cluster Scenes = 5 { INT8U value = 3; } - attribute(readonly, reportable) int8u sceneCount = 0; - attribute(readonly, reportable) int8u currentScene = 1; - attribute(readonly, reportable) int16u currentGroup = 2; - attribute(readonly, reportable) boolean sceneValid = 3; - attribute(readonly, reportable) bitmap8 nameSupport = 4; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u sceneCount = 0; + attribute(readonly) int8u currentScene = 1; + attribute(readonly) int16u currentGroup = 2; + attribute(readonly) boolean sceneValid = 3; + attribute(readonly) bitmap8 nameSupport = 4; + attribute(readonly) int16u clusterRevision = 65533; request struct AddSceneRequest { INT16U groupId = 0; @@ -2067,12 +2067,12 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; - attribute(readonly, reportable) int64u currentHeapFree = 1; - attribute(readonly, reportable) int64u currentHeapUsed = 2; - attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) ThreadMetrics threadMetrics[] = 0; + attribute(readonly) int64u currentHeapFree = 1; + attribute(readonly) int64u currentHeapUsed = 2; + attribute(readonly) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster Switch = 59 { @@ -2106,9 +2106,9 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } - attribute(readonly, reportable) int8u numberOfPositions = 0; - attribute(readonly, reportable) int8u currentPosition = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u numberOfPositions = 0; + attribute(readonly) int8u currentPosition = 1; + attribute(readonly) int16u clusterRevision = 65533; } client cluster TargetNavigator = 1285 { @@ -2123,8 +2123,8 @@ client cluster TargetNavigator = 1285 { CHAR_STRING name = 2; } - attribute(readonly, reportable) TargetInfo targetNavigatorList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) TargetInfo targetNavigatorList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; request struct NavigateTargetRequestRequest { INT8U target = 0; @@ -2135,10 +2135,10 @@ client cluster TargetNavigator = 1285 { } server cluster TemperatureMeasurement = 1026 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u clusterRevision = 65533; } server cluster TestCluster = 1295 { @@ -2163,27 +2163,27 @@ server cluster TestCluster = 1295 { SimpleEnum arg6[] = 6; } - attribute(writable, reportable) boolean boolean = 0; - attribute(writable, reportable) bitmap8 bitmap8 = 1; - attribute(writable, reportable) bitmap16 bitmap16 = 2; - attribute(writable, reportable) bitmap32 bitmap32 = 3; - attribute(writable, reportable) bitmap64 bitmap64 = 4; - attribute(writable, reportable) int8u int8u = 5; - attribute(writable, reportable) int16u int16u = 6; - attribute(writable, reportable) int32u int32u = 8; - attribute(writable, reportable) int64u int64u = 12; - attribute(writable, reportable) int8s int8s = 13; - attribute(writable, reportable) int16s int16s = 14; - attribute(writable, reportable) int32s int32s = 16; - attribute(writable, reportable) int64s int64s = 20; - attribute(writable, reportable) enum8 enum8 = 21; - attribute(writable, reportable) enum16 enum16 = 22; - attribute(writable, reportable) octet_string octetString = 25; - attribute(writable, reportable) INT8U listInt8u[] = 26; - attribute(writable, reportable) OCTET_STRING listOctetString[] = 27; - attribute(writable, reportable) TestListStructOctet listStructOctetString[] = 28; - attribute(writable, reportable) long_octet_string longOctetString = 29; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) boolean boolean = 0; + attribute(writable) bitmap8 bitmap8 = 1; + attribute(writable) bitmap16 bitmap16 = 2; + attribute(writable) bitmap32 bitmap32 = 3; + attribute(writable) bitmap64 bitmap64 = 4; + attribute(writable) int8u int8u = 5; + attribute(writable) int16u int16u = 6; + attribute(writable) int32u int32u = 8; + attribute(writable) int64u int64u = 12; + attribute(writable) int8s int8s = 13; + attribute(writable) int16s int16s = 14; + attribute(writable) int32s int32s = 16; + attribute(writable) int64s int64s = 20; + attribute(writable) enum8 enum8 = 21; + attribute(writable) enum16 enum16 = 22; + attribute(writable) octet_string octetString = 25; + attribute(writable) INT8U listInt8u[] = 26; + attribute(writable) OCTET_STRING listOctetString[] = 27; + attribute(writable) TestListStructOctet listStructOctetString[] = 28; + attribute(writable) long_octet_string longOctetString = 29; + attribute(readonly) int16u clusterRevision = 65533; response struct TestSpecificResponse { INT8U returnValue = 0; @@ -2201,16 +2201,16 @@ server cluster Thermostat = 513 { kHeatAndCoolSetpoints = 2; } - attribute(readonly, reportable) int16s localTemperature = 0; - attribute(writable, reportable) int16s occupiedCoolingSetpoint = 17; - attribute(writable, reportable) int16s occupiedHeatingSetpoint = 18; - attribute(writable, reportable) enum8 controlSequenceOfOperation = 27; - attribute(writable, reportable) enum8 systemMode = 28; - attribute(readonly, reportable) enum8 startOfWeek = 32; - attribute(readonly, reportable) int8u numberOfWeeklyTransitions = 33; - attribute(readonly, reportable) int8u numberOfDailyTransitions = 34; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s localTemperature = 0; + attribute(writable) int16s occupiedCoolingSetpoint = 17; + attribute(writable) int16s occupiedHeatingSetpoint = 18; + attribute(writable) enum8 controlSequenceOfOperation = 27; + attribute(writable) enum8 systemMode = 28; + attribute(readonly) enum8 startOfWeek = 32; + attribute(readonly) int8u numberOfWeeklyTransitions = 33; + attribute(readonly) int8u numberOfDailyTransitions = 34; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; response struct GetWeeklyScheduleResponse { ENUM8 numberOfTransitionsForSequence = 0; @@ -2297,81 +2297,81 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) int16u channel = 0; - attribute(readonly, reportable) enum8 routingRole = 1; - attribute(readonly, reportable) octet_string networkName = 2; - attribute(readonly, reportable) int16u panId = 3; - attribute(readonly, reportable) int64u extendedPanId = 4; - attribute(readonly, reportable) octet_string meshLocalPrefix = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; - attribute(readonly, reportable) RouteTable routeTableList[] = 8; - attribute(readonly, reportable) int32u partitionId = 9; - attribute(readonly, reportable) int8u weighting = 10; - attribute(readonly, reportable) int8u dataVersion = 11; - attribute(readonly, reportable) int8u stableDataVersion = 12; - attribute(readonly, reportable) int8u leaderRouterId = 13; - attribute(readonly, reportable) int16u detachedRoleCount = 14; - attribute(readonly, reportable) int16u childRoleCount = 15; - attribute(readonly, reportable) int16u routerRoleCount = 16; - attribute(readonly, reportable) int16u leaderRoleCount = 17; - attribute(readonly, reportable) int16u attachAttemptCount = 18; - attribute(readonly, reportable) int16u partitionIdChangeCount = 19; - attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly, reportable) int16u parentChangeCount = 21; - attribute(readonly, reportable) int32u txTotalCount = 22; - attribute(readonly, reportable) int32u txUnicastCount = 23; - attribute(readonly, reportable) int32u txBroadcastCount = 24; - attribute(readonly, reportable) int32u txAckRequestedCount = 25; - attribute(readonly, reportable) int32u txAckedCount = 26; - attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; - attribute(readonly, reportable) int32u txDataCount = 28; - attribute(readonly, reportable) int32u txDataPollCount = 29; - attribute(readonly, reportable) int32u txBeaconCount = 30; - attribute(readonly, reportable) int32u txBeaconRequestCount = 31; - attribute(readonly, reportable) int32u txOtherCount = 32; - attribute(readonly, reportable) int32u txRetryCount = 33; - attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly, reportable) int32u txErrCcaCount = 36; - attribute(readonly, reportable) int32u txErrAbortCount = 37; - attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; - attribute(readonly, reportable) int32u rxTotalCount = 39; - attribute(readonly, reportable) int32u rxUnicastCount = 40; - attribute(readonly, reportable) int32u rxBroadcastCount = 41; - attribute(readonly, reportable) int32u rxDataCount = 42; - attribute(readonly, reportable) int32u rxDataPollCount = 43; - attribute(readonly, reportable) int32u rxBeaconCount = 44; - attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; - attribute(readonly, reportable) int32u rxOtherCount = 46; - attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; - attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; - attribute(readonly, reportable) int32u rxDuplicatedCount = 49; - attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; - attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly, reportable) int32u rxErrSecCount = 53; - attribute(readonly, reportable) int32u rxErrFcsCount = 54; - attribute(readonly, reportable) int32u rxErrOtherCount = 55; - attribute(readonly, reportable) int64u activeTimestamp = 56; - attribute(readonly, reportable) int64u pendingTimestamp = 57; - attribute(readonly, reportable) int32u delay = 58; - attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; - attribute(readonly, reportable) octet_string channelMask = 60; - attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u channel = 0; + attribute(readonly) enum8 routingRole = 1; + attribute(readonly) octet_string networkName = 2; + attribute(readonly) int16u panId = 3; + attribute(readonly) int64u extendedPanId = 4; + attribute(readonly) octet_string meshLocalPrefix = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) NeighborTable neighborTableList[] = 7; + attribute(readonly) RouteTable routeTableList[] = 8; + attribute(readonly) int32u partitionId = 9; + attribute(readonly) int8u weighting = 10; + attribute(readonly) int8u dataVersion = 11; + attribute(readonly) int8u stableDataVersion = 12; + attribute(readonly) int8u leaderRouterId = 13; + attribute(readonly) int16u detachedRoleCount = 14; + attribute(readonly) int16u childRoleCount = 15; + attribute(readonly) int16u routerRoleCount = 16; + attribute(readonly) int16u leaderRoleCount = 17; + attribute(readonly) int16u attachAttemptCount = 18; + attribute(readonly) int16u partitionIdChangeCount = 19; + attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly) int16u parentChangeCount = 21; + attribute(readonly) int32u txTotalCount = 22; + attribute(readonly) int32u txUnicastCount = 23; + attribute(readonly) int32u txBroadcastCount = 24; + attribute(readonly) int32u txAckRequestedCount = 25; + attribute(readonly) int32u txAckedCount = 26; + attribute(readonly) int32u txNoAckRequestedCount = 27; + attribute(readonly) int32u txDataCount = 28; + attribute(readonly) int32u txDataPollCount = 29; + attribute(readonly) int32u txBeaconCount = 30; + attribute(readonly) int32u txBeaconRequestCount = 31; + attribute(readonly) int32u txOtherCount = 32; + attribute(readonly) int32u txRetryCount = 33; + attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly) int32u txErrCcaCount = 36; + attribute(readonly) int32u txErrAbortCount = 37; + attribute(readonly) int32u txErrBusyChannelCount = 38; + attribute(readonly) int32u rxTotalCount = 39; + attribute(readonly) int32u rxUnicastCount = 40; + attribute(readonly) int32u rxBroadcastCount = 41; + attribute(readonly) int32u rxDataCount = 42; + attribute(readonly) int32u rxDataPollCount = 43; + attribute(readonly) int32u rxBeaconCount = 44; + attribute(readonly) int32u rxBeaconRequestCount = 45; + attribute(readonly) int32u rxOtherCount = 46; + attribute(readonly) int32u rxAddressFilteredCount = 47; + attribute(readonly) int32u rxDestAddrFilteredCount = 48; + attribute(readonly) int32u rxDuplicatedCount = 49; + attribute(readonly) int32u rxErrNoFrameCount = 50; + attribute(readonly) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly) int32u rxErrSecCount = 53; + attribute(readonly) int32u rxErrFcsCount = 54; + attribute(readonly) int32u rxErrOtherCount = 55; + attribute(readonly) int64u activeTimestamp = 56; + attribute(readonly) int64u pendingTimestamp = 57; + attribute(readonly) int32u delay = 58; + attribute(readonly) SecurityPolicy securityPolicy[] = 59; + attribute(readonly) octet_string channelMask = 60; + attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster WakeOnLan = 1283 { - attribute(readonly, reportable) char_string wakeOnLanMacAddress = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) char_string wakeOnLanMacAddress = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -2418,43 +2418,43 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) octet_string bssid = 0; - attribute(readonly, reportable) enum8 securityType = 1; - attribute(readonly, reportable) enum8 wiFiVersion = 2; - attribute(readonly, reportable) int16u channelNumber = 3; - attribute(readonly, reportable) int8s rssi = 4; - attribute(readonly, reportable) int32u beaconLostCount = 5; - attribute(readonly, reportable) int32u beaconRxCount = 6; - attribute(readonly, reportable) int32u packetMulticastRxCount = 7; - attribute(readonly, reportable) int32u packetMulticastTxCount = 8; - attribute(readonly, reportable) int32u packetUnicastRxCount = 9; - attribute(readonly, reportable) int32u packetUnicastTxCount = 10; - attribute(readonly, reportable) int64u currentMaxRate = 11; - attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) octet_string bssid = 0; + attribute(readonly) enum8 securityType = 1; + attribute(readonly) enum8 wiFiVersion = 2; + attribute(readonly) int16u channelNumber = 3; + attribute(readonly) int8s rssi = 4; + attribute(readonly) int32u beaconLostCount = 5; + attribute(readonly) int32u beaconRxCount = 6; + attribute(readonly) int32u packetMulticastRxCount = 7; + attribute(readonly) int32u packetMulticastTxCount = 8; + attribute(readonly) int32u packetUnicastRxCount = 9; + attribute(readonly) int32u packetUnicastTxCount = 10; + attribute(readonly) int64u currentMaxRate = 11; + attribute(readonly) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster WindowCovering = 258 { - attribute(readonly, reportable) enum8 type = 0; - attribute(readonly, reportable) int16u currentPositionLift = 3; - attribute(readonly, reportable) int16u currentPositionTilt = 4; - attribute(readonly, reportable) bitmap8 configStatus = 7; - attribute(readonly, reportable) Percent currentPositionLiftPercentage = 8; - attribute(readonly, reportable) Percent currentPositionTiltPercentage = 9; - attribute(readonly, reportable) bitmap8 operationalStatus = 10; - attribute(readonly, reportable) Percent100ths targetPositionLiftPercent100ths = 11; - attribute(readonly, reportable) Percent100ths targetPositionTiltPercent100ths = 12; - attribute(readonly, reportable) enum8 endProductType = 13; - attribute(readonly, reportable) Percent100ths currentPositionLiftPercent100ths = 14; - attribute(readonly, reportable) Percent100ths currentPositionTiltPercent100ths = 15; - attribute(readonly, reportable) int16u installedOpenLimitLift = 16; - attribute(readonly, reportable) int16u installedClosedLimitLift = 17; - attribute(readonly, reportable) int16u installedOpenLimitTilt = 18; - attribute(readonly, reportable) int16u installedClosedLimitTilt = 19; - attribute(writable, reportable) bitmap8 mode = 23; - attribute(readonly, reportable) bitmap16 safetyStatus = 26; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 type = 0; + attribute(readonly) int16u currentPositionLift = 3; + attribute(readonly) int16u currentPositionTilt = 4; + attribute(readonly) bitmap8 configStatus = 7; + attribute(readonly) Percent currentPositionLiftPercentage = 8; + attribute(readonly) Percent currentPositionTiltPercentage = 9; + attribute(readonly) bitmap8 operationalStatus = 10; + attribute(readonly) Percent100ths targetPositionLiftPercent100ths = 11; + attribute(readonly) Percent100ths targetPositionTiltPercent100ths = 12; + attribute(readonly) enum8 endProductType = 13; + attribute(readonly) Percent100ths currentPositionLiftPercent100ths = 14; + attribute(readonly) Percent100ths currentPositionTiltPercent100ths = 15; + attribute(readonly) int16u installedOpenLimitLift = 16; + attribute(readonly) int16u installedClosedLimitLift = 17; + attribute(readonly) int16u installedOpenLimitTilt = 18; + attribute(readonly) int16u installedClosedLimitTilt = 19; + attribute(writable) bitmap8 mode = 23; + attribute(readonly) bitmap16 safetyStatus = 26; + attribute(readonly) int16u clusterRevision = 65533; } diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 761b83c3792474..3417687e94b7a9 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -19,10 +19,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly, reportable) int8u windowStatus = 0; - attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; - attribute(readonly, reportable) int16u adminVendorId = 2; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -57,25 +57,25 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly, reportable) int16u interactionModelVersion = 0; - attribute(readonly, reportable) char_string vendorName = 1; - attribute(readonly, reportable) vendor_id vendorID = 2; - attribute(readonly, reportable) char_string productName = 3; - attribute(readonly, reportable) int16u productID = 4; - attribute(writable, reportable) char_string nodeLabel = 5; - attribute(writable, reportable) char_string location = 6; - attribute(readonly, reportable) int16u hardwareVersion = 7; - attribute(readonly, reportable) char_string hardwareVersionString = 8; - attribute(readonly, reportable) int32u softwareVersion = 9; - attribute(readonly, reportable) char_string softwareVersionString = 10; - attribute(readonly, reportable) char_string manufacturingDate = 11; - attribute(readonly, reportable) char_string partNumber = 12; - attribute(readonly, reportable) long_char_string productURL = 13; - attribute(readonly, reportable) char_string productLabel = 14; - attribute(readonly, reportable) char_string serialNumber = 15; - attribute(writable, reportable) boolean localConfigDisabled = 16; - attribute(readonly, reportable) boolean reachable = 17; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u interactionModelVersion = 0; + attribute(readonly) char_string vendorName = 1; + attribute(readonly) vendor_id vendorID = 2; + attribute(readonly) char_string productName = 3; + attribute(readonly) int16u productID = 4; + attribute(writable) char_string nodeLabel = 5; + attribute(writable) char_string location = 6; + attribute(readonly) int16u hardwareVersion = 7; + attribute(readonly) char_string hardwareVersionString = 8; + attribute(readonly) int32u softwareVersion = 9; + attribute(readonly) char_string softwareVersionString = 10; + attribute(readonly) char_string manufacturingDate = 11; + attribute(readonly) char_string partNumber = 12; + attribute(readonly) long_char_string productURL = 13; + attribute(readonly) char_string productLabel = 14; + attribute(readonly) char_string serialNumber = 15; + attribute(writable) boolean localConfigDisabled = 16; + attribute(readonly) boolean reachable = 17; + attribute(readonly) int16u clusterRevision = 65533; } server cluster Descriptor = 29 { @@ -84,11 +84,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly, reportable) DeviceType deviceList[] = 0; - attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; - attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; - attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) DeviceType deviceList[] = 0; + attribute(readonly) CLUSTER_ID serverList[] = 1; + attribute(readonly) CLUSTER_ID clientList[] = 2; + attribute(readonly) ENDPOINT_NO partsList[] = 3; + attribute(readonly) int16u clusterRevision = 65533; } server cluster EthernetNetworkDiagnostics = 55 { @@ -105,22 +105,22 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly, reportable) enum8 PHYRate = 0; - attribute(readonly, reportable) boolean fullDuplex = 1; - attribute(readonly, reportable) int64u packetRxCount = 2; - attribute(readonly, reportable) int64u packetTxCount = 3; - attribute(readonly, reportable) int64u txErrCount = 4; - attribute(readonly, reportable) int64u collisionCount = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) boolean carrierDetect = 7; - attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 PHYRate = 0; + attribute(readonly) boolean fullDuplex = 1; + attribute(readonly) int64u packetRxCount = 2; + attribute(readonly) int64u packetTxCount = 3; + attribute(readonly) int64u txErrCount = 4; + attribute(readonly) int64u collisionCount = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) boolean carrierDetect = 7; + attribute(readonly) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -141,12 +141,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable, reportable) int64u breadcrumb = 0; - attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly, reportable) enum8 regulatoryConfig = 2; - attribute(readonly, reportable) enum8 locationCapability = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int64u breadcrumb = 0; + attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -259,15 +259,15 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly, reportable) int16u rebootCount = 1; - attribute(readonly, reportable) int64u upTime = 2; - attribute(readonly, reportable) int32u totalOperationalHours = 3; - attribute(readonly, reportable) enum8 bootReasons = 4; - attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; - attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly) int16u rebootCount = 1; + attribute(readonly) int64u upTime = 2; + attribute(readonly) int32u totalOperationalHours = 3; + attribute(readonly) enum8 bootReasons = 4; + attribute(readonly) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly) ENUM8 activeRadioFaults[] = 6; + attribute(readonly) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly) int16u clusterRevision = 65533; } server cluster Identify = 3 { @@ -293,9 +293,9 @@ server cluster Identify = 3 { kActuator = 5; } - attribute(writable, reportable) int16u identifyTime = 0; - attribute(readonly, reportable) enum8 identifyType = 1; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int16u identifyTime = 0; + attribute(readonly) enum8 identifyType = 1; + attribute(readonly) int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -316,8 +316,8 @@ server cluster Identify = 3 { } server cluster LocalizationConfiguration = 43 { - attribute(writable, reportable) char_string activeLocale = 1; - attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -370,16 +370,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly, reportable) int8u maxNetworks = 0; - attribute(readonly, reportable) NetworkInfo networks[] = 1; - attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; - attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; - attribute(writable, reportable) boolean interfaceEnabled = 4; - attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly, reportable) octet_string lastNetworkID = 6; - attribute(readonly, reportable) int32u lastConnectErrorValue = 7; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -462,12 +462,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; - attribute(readonly, reportable) int8u supportedFabrics = 2; - attribute(readonly, reportable) int8u commissionedFabrics = 3; - attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) FabricDescriptor fabricsList[] = 1; + attribute(readonly) int8u supportedFabrics = 2; + attribute(readonly) int8u commissionedFabrics = 3; + attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly) fabric_idx currentFabricIndex = 5; + attribute(readonly) int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -542,17 +542,17 @@ server cluster OperationalCredentials = 62 { } server cluster PowerSource = 47 { - attribute(readonly, reportable) enum8 status = 0; - attribute(readonly, reportable) int8u order = 1; - attribute(readonly, reportable) char_string description = 2; - attribute(readonly, reportable) int32u batteryVoltage = 11; - attribute(readonly, reportable) int8u batteryPercentRemaining = 12; - attribute(readonly, reportable) int32u batteryTimeRemaining = 13; - attribute(readonly, reportable) enum8 batteryChargeLevel = 14; - attribute(readonly, reportable) ENUM8 activeBatteryFaults[] = 18; - attribute(readonly, reportable) enum8 batteryChargeState = 26; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 status = 0; + attribute(readonly) int8u order = 1; + attribute(readonly) char_string description = 2; + attribute(readonly) int32u batteryVoltage = 11; + attribute(readonly) int8u batteryPercentRemaining = 12; + attribute(readonly) int32u batteryTimeRemaining = 13; + attribute(readonly) enum8 batteryChargeLevel = 14; + attribute(readonly) ENUM8 activeBatteryFaults[] = 18; + attribute(readonly) enum8 batteryChargeState = 26; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster SoftwareDiagnostics = 52 { @@ -568,12 +568,12 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; - attribute(readonly, reportable) int64u currentHeapFree = 1; - attribute(readonly, reportable) int64u currentHeapUsed = 2; - attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) ThreadMetrics threadMetrics[] = 0; + attribute(readonly) int64u currentHeapFree = 1; + attribute(readonly) int64u currentHeapUsed = 2; + attribute(readonly) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster ThreadNetworkDiagnostics = 53 { @@ -653,76 +653,76 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) int16u channel = 0; - attribute(readonly, reportable) enum8 routingRole = 1; - attribute(readonly, reportable) octet_string networkName = 2; - attribute(readonly, reportable) int16u panId = 3; - attribute(readonly, reportable) int64u extendedPanId = 4; - attribute(readonly, reportable) octet_string meshLocalPrefix = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; - attribute(readonly, reportable) RouteTable routeTableList[] = 8; - attribute(readonly, reportable) int32u partitionId = 9; - attribute(readonly, reportable) int8u weighting = 10; - attribute(readonly, reportable) int8u dataVersion = 11; - attribute(readonly, reportable) int8u stableDataVersion = 12; - attribute(readonly, reportable) int8u leaderRouterId = 13; - attribute(readonly, reportable) int16u detachedRoleCount = 14; - attribute(readonly, reportable) int16u childRoleCount = 15; - attribute(readonly, reportable) int16u routerRoleCount = 16; - attribute(readonly, reportable) int16u leaderRoleCount = 17; - attribute(readonly, reportable) int16u attachAttemptCount = 18; - attribute(readonly, reportable) int16u partitionIdChangeCount = 19; - attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly, reportable) int16u parentChangeCount = 21; - attribute(readonly, reportable) int32u txTotalCount = 22; - attribute(readonly, reportable) int32u txUnicastCount = 23; - attribute(readonly, reportable) int32u txBroadcastCount = 24; - attribute(readonly, reportable) int32u txAckRequestedCount = 25; - attribute(readonly, reportable) int32u txAckedCount = 26; - attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; - attribute(readonly, reportable) int32u txDataCount = 28; - attribute(readonly, reportable) int32u txDataPollCount = 29; - attribute(readonly, reportable) int32u txBeaconCount = 30; - attribute(readonly, reportable) int32u txBeaconRequestCount = 31; - attribute(readonly, reportable) int32u txOtherCount = 32; - attribute(readonly, reportable) int32u txRetryCount = 33; - attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly, reportable) int32u txErrCcaCount = 36; - attribute(readonly, reportable) int32u txErrAbortCount = 37; - attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; - attribute(readonly, reportable) int32u rxTotalCount = 39; - attribute(readonly, reportable) int32u rxUnicastCount = 40; - attribute(readonly, reportable) int32u rxBroadcastCount = 41; - attribute(readonly, reportable) int32u rxDataCount = 42; - attribute(readonly, reportable) int32u rxDataPollCount = 43; - attribute(readonly, reportable) int32u rxBeaconCount = 44; - attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; - attribute(readonly, reportable) int32u rxOtherCount = 46; - attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; - attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; - attribute(readonly, reportable) int32u rxDuplicatedCount = 49; - attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; - attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly, reportable) int32u rxErrSecCount = 53; - attribute(readonly, reportable) int32u rxErrFcsCount = 54; - attribute(readonly, reportable) int32u rxErrOtherCount = 55; - attribute(readonly, reportable) int64u activeTimestamp = 56; - attribute(readonly, reportable) int64u pendingTimestamp = 57; - attribute(readonly, reportable) int32u delay = 58; - attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; - attribute(readonly, reportable) octet_string channelMask = 60; - attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u channel = 0; + attribute(readonly) enum8 routingRole = 1; + attribute(readonly) octet_string networkName = 2; + attribute(readonly) int16u panId = 3; + attribute(readonly) int64u extendedPanId = 4; + attribute(readonly) octet_string meshLocalPrefix = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) NeighborTable neighborTableList[] = 7; + attribute(readonly) RouteTable routeTableList[] = 8; + attribute(readonly) int32u partitionId = 9; + attribute(readonly) int8u weighting = 10; + attribute(readonly) int8u dataVersion = 11; + attribute(readonly) int8u stableDataVersion = 12; + attribute(readonly) int8u leaderRouterId = 13; + attribute(readonly) int16u detachedRoleCount = 14; + attribute(readonly) int16u childRoleCount = 15; + attribute(readonly) int16u routerRoleCount = 16; + attribute(readonly) int16u leaderRoleCount = 17; + attribute(readonly) int16u attachAttemptCount = 18; + attribute(readonly) int16u partitionIdChangeCount = 19; + attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly) int16u parentChangeCount = 21; + attribute(readonly) int32u txTotalCount = 22; + attribute(readonly) int32u txUnicastCount = 23; + attribute(readonly) int32u txBroadcastCount = 24; + attribute(readonly) int32u txAckRequestedCount = 25; + attribute(readonly) int32u txAckedCount = 26; + attribute(readonly) int32u txNoAckRequestedCount = 27; + attribute(readonly) int32u txDataCount = 28; + attribute(readonly) int32u txDataPollCount = 29; + attribute(readonly) int32u txBeaconCount = 30; + attribute(readonly) int32u txBeaconRequestCount = 31; + attribute(readonly) int32u txOtherCount = 32; + attribute(readonly) int32u txRetryCount = 33; + attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly) int32u txErrCcaCount = 36; + attribute(readonly) int32u txErrAbortCount = 37; + attribute(readonly) int32u txErrBusyChannelCount = 38; + attribute(readonly) int32u rxTotalCount = 39; + attribute(readonly) int32u rxUnicastCount = 40; + attribute(readonly) int32u rxBroadcastCount = 41; + attribute(readonly) int32u rxDataCount = 42; + attribute(readonly) int32u rxDataPollCount = 43; + attribute(readonly) int32u rxBeaconCount = 44; + attribute(readonly) int32u rxBeaconRequestCount = 45; + attribute(readonly) int32u rxOtherCount = 46; + attribute(readonly) int32u rxAddressFilteredCount = 47; + attribute(readonly) int32u rxDestAddrFilteredCount = 48; + attribute(readonly) int32u rxDuplicatedCount = 49; + attribute(readonly) int32u rxErrNoFrameCount = 50; + attribute(readonly) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly) int32u rxErrSecCount = 53; + attribute(readonly) int32u rxErrFcsCount = 54; + attribute(readonly) int32u rxErrOtherCount = 55; + attribute(readonly) int64u activeTimestamp = 56; + attribute(readonly) int64u pendingTimestamp = 57; + attribute(readonly) int32u delay = 58; + attribute(readonly) SecurityPolicy securityPolicy[] = 59; + attribute(readonly) octet_string channelMask = 60; + attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -769,44 +769,44 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) octet_string bssid = 0; - attribute(readonly, reportable) enum8 securityType = 1; - attribute(readonly, reportable) enum8 wiFiVersion = 2; - attribute(readonly, reportable) int16u channelNumber = 3; - attribute(readonly, reportable) int8s rssi = 4; - attribute(readonly, reportable) int32u beaconLostCount = 5; - attribute(readonly, reportable) int32u beaconRxCount = 6; - attribute(readonly, reportable) int32u packetMulticastRxCount = 7; - attribute(readonly, reportable) int32u packetMulticastTxCount = 8; - attribute(readonly, reportable) int32u packetUnicastRxCount = 9; - attribute(readonly, reportable) int32u packetUnicastTxCount = 10; - attribute(readonly, reportable) int64u currentMaxRate = 11; - attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) octet_string bssid = 0; + attribute(readonly) enum8 securityType = 1; + attribute(readonly) enum8 wiFiVersion = 2; + attribute(readonly) int16u channelNumber = 3; + attribute(readonly) int8s rssi = 4; + attribute(readonly) int32u beaconLostCount = 5; + attribute(readonly) int32u beaconRxCount = 6; + attribute(readonly) int32u packetMulticastRxCount = 7; + attribute(readonly) int32u packetMulticastTxCount = 8; + attribute(readonly) int32u packetUnicastRxCount = 9; + attribute(readonly) int32u packetUnicastTxCount = 10; + attribute(readonly) int64u currentMaxRate = 11; + attribute(readonly) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } server cluster WindowCovering = 258 { - attribute(readonly, reportable) enum8 type = 0; - attribute(readonly, reportable) int16u currentPositionLift = 3; - attribute(readonly, reportable) int16u currentPositionTilt = 4; - attribute(readonly, reportable) bitmap8 configStatus = 7; - attribute(readonly, reportable) Percent currentPositionLiftPercentage = 8; - attribute(readonly, reportable) Percent currentPositionTiltPercentage = 9; - attribute(readonly, reportable) bitmap8 operationalStatus = 10; - attribute(readonly, reportable) Percent100ths targetPositionLiftPercent100ths = 11; - attribute(readonly, reportable) Percent100ths targetPositionTiltPercent100ths = 12; - attribute(readonly, reportable) enum8 endProductType = 13; - attribute(readonly, reportable) Percent100ths currentPositionLiftPercent100ths = 14; - attribute(readonly, reportable) Percent100ths currentPositionTiltPercent100ths = 15; - attribute(readonly, reportable) int16u installedOpenLimitLift = 16; - attribute(readonly, reportable) int16u installedClosedLimitLift = 17; - attribute(readonly, reportable) int16u installedOpenLimitTilt = 18; - attribute(readonly, reportable) int16u installedClosedLimitTilt = 19; - attribute(writable, reportable) bitmap8 mode = 23; - attribute(readonly, reportable) bitmap16 safetyStatus = 26; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 type = 0; + attribute(readonly) int16u currentPositionLift = 3; + attribute(readonly) int16u currentPositionTilt = 4; + attribute(readonly) bitmap8 configStatus = 7; + attribute(readonly) Percent currentPositionLiftPercentage = 8; + attribute(readonly) Percent currentPositionTiltPercentage = 9; + attribute(readonly) bitmap8 operationalStatus = 10; + attribute(readonly) Percent100ths targetPositionLiftPercent100ths = 11; + attribute(readonly) Percent100ths targetPositionTiltPercent100ths = 12; + attribute(readonly) enum8 endProductType = 13; + attribute(readonly) Percent100ths currentPositionLiftPercent100ths = 14; + attribute(readonly) Percent100ths currentPositionTiltPercent100ths = 15; + attribute(readonly) int16u installedOpenLimitLift = 16; + attribute(readonly) int16u installedClosedLimitLift = 17; + attribute(readonly) int16u installedOpenLimitTilt = 18; + attribute(readonly) int16u installedClosedLimitTilt = 19; + attribute(writable) bitmap8 mode = 23; + attribute(readonly) bitmap16 safetyStatus = 26; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct GoToLiftPercentageRequest { Percent liftPercentageValue = 0; diff --git a/src/app/zap-templates/templates/app/MatterIDL.zapt b/src/app/zap-templates/templates/app/MatterIDL.zapt index 44906fc5e8ac5a..a20411c00e3f8b 100644 --- a/src/app/zap-templates/templates/app/MatterIDL.zapt +++ b/src/app/zap-templates/templates/app/MatterIDL.zapt @@ -37,9 +37,9 @@ {{~else~}} readonly {{~/if~}} - {{~#if isReportableAttribute~}} - , reportable - {{~/if~}} + {{~#unless isReportableAttribute~}} + , nosubscribe + {{~/unless~}} ) {{type}} {{asLowerCamelCase name~}} {{~#if isList~}} [] diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 60efc6717c3eab..43a0c50e380e18 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -40,15 +40,15 @@ client cluster AccessControl = 31 { OCTET_STRING data = 1; } - attribute(writable, reportable) AccessControlEntry acl[] = 0; - attribute(writable, reportable) ExtensionEntry extension[] = 1; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) AccessControlEntry acl[] = 0; + attribute(writable) ExtensionEntry extension[] = 1; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; } client cluster AccountLogin = 1294 { - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct GetSetupPINRequestRequest { CHAR_STRING tempAccountIdentifier = 0; @@ -81,11 +81,11 @@ client cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly, reportable) int8u windowStatus = 0; - attribute(readonly, reportable) fabric_idx adminFabricIndex = 1; - attribute(readonly, reportable) int16u adminVendorId = 2; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -118,16 +118,16 @@ client cluster ApplicationBasic = 1293 { CHAR_STRING applicationId = 2; } - attribute(readonly, reportable) char_string vendorName = 0; - attribute(readonly, reportable) int16u vendorId = 1; - attribute(readonly, reportable) char_string applicationName = 2; - attribute(readonly, reportable) int16u productId = 3; - attribute(writable, reportable) ApplicationBasicApplication applicationApp = 4; - attribute(readonly, reportable) ApplicationStatusEnum applicationStatus = 5; - attribute(readonly, reportable) char_string applicationVersion = 6; - attribute(readonly, reportable) vendor_id allowedVendorList[] = 7; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) char_string vendorName = 0; + attribute(readonly) int16u vendorId = 1; + attribute(readonly) char_string applicationName = 2; + attribute(readonly) int16u productId = 3; + attribute(writable) ApplicationBasicApplication applicationApp = 4; + attribute(readonly) ApplicationStatusEnum applicationStatus = 5; + attribute(readonly) char_string applicationVersion = 6; + attribute(readonly) vendor_id allowedVendorList[] = 7; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; } client cluster ApplicationLauncher = 1292 { @@ -142,9 +142,9 @@ client cluster ApplicationLauncher = 1292 { CHAR_STRING applicationId = 2; } - attribute(readonly, reportable) INT16U applicationLauncherList[] = 0; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) INT16U applicationLauncherList[] = 0; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct HideAppRequestRequest { ApplicationLauncherApplication application = 0; @@ -185,10 +185,10 @@ client cluster AudioOutput = 1291 { CHAR_STRING name = 3; } - attribute(readonly, reportable) OutputInfo audioOutputList[] = 0; - attribute(readonly, reportable) int8u currentAudioOutput = 1; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) OutputInfo audioOutputList[] = 0; + attribute(readonly) int8u currentAudioOutput = 1; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct RenameOutputRequestRequest { INT8U index = 0; @@ -204,12 +204,12 @@ client cluster AudioOutput = 1291 { } client cluster BarrierControl = 259 { - attribute(readonly, reportable) enum8 barrierMovingState = 1; - attribute(readonly, reportable) bitmap16 barrierSafetyStatus = 2; - attribute(readonly, reportable) bitmap8 barrierCapabilities = 3; - attribute(readonly, reportable) int8u barrierPosition = 10; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 barrierMovingState = 1; + attribute(readonly) bitmap16 barrierSafetyStatus = 2; + attribute(readonly) bitmap8 barrierCapabilities = 3; + attribute(readonly) int8u barrierPosition = 10; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct BarrierControlGoToPercentRequest { INT8U percentOpen = 0; @@ -234,42 +234,42 @@ client cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly, reportable) int16u interactionModelVersion = 0; - attribute(readonly, reportable) char_string vendorName = 1; - attribute(readonly, reportable) vendor_id vendorID = 2; - attribute(readonly, reportable) char_string productName = 3; - attribute(readonly, reportable) int16u productID = 4; - attribute(writable, reportable) char_string nodeLabel = 5; - attribute(writable, reportable) char_string location = 6; - attribute(readonly, reportable) int16u hardwareVersion = 7; - attribute(readonly, reportable) char_string hardwareVersionString = 8; - attribute(readonly, reportable) int32u softwareVersion = 9; - attribute(readonly, reportable) char_string softwareVersionString = 10; - attribute(readonly, reportable) char_string manufacturingDate = 11; - attribute(readonly, reportable) char_string partNumber = 12; - attribute(readonly, reportable) long_char_string productURL = 13; - attribute(readonly, reportable) char_string productLabel = 14; - attribute(readonly, reportable) char_string serialNumber = 15; - attribute(writable, reportable) boolean localConfigDisabled = 16; - attribute(readonly, reportable) boolean reachable = 17; - attribute(readonly, reportable) char_string uniqueID = 18; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u interactionModelVersion = 0; + attribute(readonly) char_string vendorName = 1; + attribute(readonly) vendor_id vendorID = 2; + attribute(readonly) char_string productName = 3; + attribute(readonly) int16u productID = 4; + attribute(writable) char_string nodeLabel = 5; + attribute(writable) char_string location = 6; + attribute(readonly) int16u hardwareVersion = 7; + attribute(readonly) char_string hardwareVersionString = 8; + attribute(readonly) int32u softwareVersion = 9; + attribute(readonly) char_string softwareVersionString = 10; + attribute(readonly) char_string manufacturingDate = 11; + attribute(readonly) char_string partNumber = 12; + attribute(readonly) long_char_string productURL = 13; + attribute(readonly) char_string productLabel = 14; + attribute(readonly) char_string serialNumber = 15; + attribute(writable) boolean localConfigDisabled = 16; + attribute(readonly) boolean reachable = 17; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } client cluster BinaryInputBasic = 15 { - attribute(writable, reportable) boolean outOfService = 81; - attribute(writable, reportable) boolean presentValue = 85; - attribute(readonly, reportable) bitmap8 statusFlags = 111; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) boolean outOfService = 81; + attribute(writable) boolean presentValue = 85; + attribute(readonly) bitmap8 statusFlags = 111; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; } client cluster Binding = 30 { - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct BindRequest { NODE_ID nodeId = 0; @@ -294,9 +294,9 @@ client cluster BooleanState = 69 { boolean stateValue = 0; } - attribute(readonly, reportable) boolean stateValue = 0; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) boolean stateValue = 0; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; } client cluster BridgedActions = 37 { @@ -357,11 +357,11 @@ client cluster BridgedActions = 37 { ActionErrorEnum error = 3; } - attribute(readonly, reportable) ActionStruct actionList[] = 0; - attribute(readonly, reportable) EndpointListStruct endpointList[] = 1; - attribute(readonly, reportable) long_char_string setupUrl = 2; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) ActionStruct actionList[] = 0; + attribute(readonly) EndpointListStruct endpointList[] = 1; + attribute(readonly) long_char_string setupUrl = 2; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct DisableActionRequest { INT16U actionID = 0; @@ -443,8 +443,8 @@ client cluster BridgedActions = 37 { } client cluster BridgedDeviceBasic = 57 { - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; } client cluster Channel = 1284 { @@ -465,9 +465,9 @@ client cluster Channel = 1284 { CHAR_STRING affiliateCallSign = 5; } - attribute(readonly, reportable) ChannelInfo channelList[] = 0; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) ChannelInfo channelList[] = 0; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct ChangeChannelByNumberRequestRequest { INT16U majorNumber = 0; @@ -539,60 +539,60 @@ client cluster ColorControl = 768 { kDown = 3; } - attribute(readonly, reportable) int8u currentHue = 0; - attribute(readonly, reportable) int8u currentSaturation = 1; - attribute(readonly, reportable) int16u remainingTime = 2; - attribute(readonly, reportable) int16u currentX = 3; - attribute(readonly, reportable) int16u currentY = 4; - attribute(readonly, reportable) enum8 driftCompensation = 5; - attribute(readonly, reportable) char_string compensationText = 6; - attribute(readonly, reportable) int16u colorTemperature = 7; - attribute(readonly, reportable) enum8 colorMode = 8; - attribute(writable, reportable) bitmap8 colorControlOptions = 15; - attribute(readonly, reportable) int8u numberOfPrimaries = 16; - attribute(readonly, reportable) int16u primary1X = 17; - attribute(readonly, reportable) int16u primary1Y = 18; - attribute(readonly, reportable) int8u primary1Intensity = 19; - attribute(readonly, reportable) int16u primary2X = 21; - attribute(readonly, reportable) int16u primary2Y = 22; - attribute(readonly, reportable) int8u primary2Intensity = 23; - attribute(readonly, reportable) int16u primary3X = 25; - attribute(readonly, reportable) int16u primary3Y = 26; - attribute(readonly, reportable) int8u primary3Intensity = 27; - attribute(readonly, reportable) int16u primary4X = 32; - attribute(readonly, reportable) int16u primary4Y = 33; - attribute(readonly, reportable) int8u primary4Intensity = 34; - attribute(readonly, reportable) int16u primary5X = 36; - attribute(readonly, reportable) int16u primary5Y = 37; - attribute(readonly, reportable) int8u primary5Intensity = 38; - attribute(readonly, reportable) int16u primary6X = 40; - attribute(readonly, reportable) int16u primary6Y = 41; - attribute(readonly, reportable) int8u primary6Intensity = 42; - attribute(writable, reportable) int16u whitePointX = 48; - attribute(writable, reportable) int16u whitePointY = 49; - attribute(writable, reportable) int16u colorPointRX = 50; - attribute(writable, reportable) int16u colorPointRY = 51; - attribute(writable, reportable) int8u colorPointRIntensity = 52; - attribute(writable, reportable) int16u colorPointGX = 54; - attribute(writable, reportable) int16u colorPointGY = 55; - attribute(writable, reportable) int8u colorPointGIntensity = 56; - attribute(writable, reportable) int16u colorPointBX = 58; - attribute(writable, reportable) int16u colorPointBY = 59; - attribute(writable, reportable) int8u colorPointBIntensity = 60; - attribute(readonly, reportable) int16u enhancedCurrentHue = 16384; - attribute(readonly, reportable) enum8 enhancedColorMode = 16385; - attribute(readonly, reportable) int8u colorLoopActive = 16386; - attribute(readonly, reportable) int8u colorLoopDirection = 16387; - attribute(readonly, reportable) int16u colorLoopTime = 16388; - attribute(readonly, reportable) int16u colorLoopStartEnhancedHue = 16389; - attribute(readonly, reportable) int16u colorLoopStoredEnhancedHue = 16390; - attribute(readonly, reportable) bitmap16 colorCapabilities = 16394; - attribute(readonly, reportable) int16u colorTempPhysicalMin = 16395; - attribute(readonly, reportable) int16u colorTempPhysicalMax = 16396; - attribute(readonly, reportable) int16u coupleColorTempToLevelMinMireds = 16397; - attribute(writable, reportable) int16u startUpColorTemperatureMireds = 16400; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u currentHue = 0; + attribute(readonly) int8u currentSaturation = 1; + attribute(readonly) int16u remainingTime = 2; + attribute(readonly) int16u currentX = 3; + attribute(readonly) int16u currentY = 4; + attribute(readonly) enum8 driftCompensation = 5; + attribute(readonly) char_string compensationText = 6; + attribute(readonly) int16u colorTemperature = 7; + attribute(readonly) enum8 colorMode = 8; + attribute(writable) bitmap8 colorControlOptions = 15; + attribute(readonly) int8u numberOfPrimaries = 16; + attribute(readonly) int16u primary1X = 17; + attribute(readonly) int16u primary1Y = 18; + attribute(readonly) int8u primary1Intensity = 19; + attribute(readonly) int16u primary2X = 21; + attribute(readonly) int16u primary2Y = 22; + attribute(readonly) int8u primary2Intensity = 23; + attribute(readonly) int16u primary3X = 25; + attribute(readonly) int16u primary3Y = 26; + attribute(readonly) int8u primary3Intensity = 27; + attribute(readonly) int16u primary4X = 32; + attribute(readonly) int16u primary4Y = 33; + attribute(readonly) int8u primary4Intensity = 34; + attribute(readonly) int16u primary5X = 36; + attribute(readonly) int16u primary5Y = 37; + attribute(readonly) int8u primary5Intensity = 38; + attribute(readonly) int16u primary6X = 40; + attribute(readonly) int16u primary6Y = 41; + attribute(readonly) int8u primary6Intensity = 42; + attribute(writable) int16u whitePointX = 48; + attribute(writable) int16u whitePointY = 49; + attribute(writable) int16u colorPointRX = 50; + attribute(writable) int16u colorPointRY = 51; + attribute(writable) int8u colorPointRIntensity = 52; + attribute(writable) int16u colorPointGX = 54; + attribute(writable) int16u colorPointGY = 55; + attribute(writable) int8u colorPointGIntensity = 56; + attribute(writable) int16u colorPointBX = 58; + attribute(writable) int16u colorPointBY = 59; + attribute(writable) int8u colorPointBIntensity = 60; + attribute(readonly) int16u enhancedCurrentHue = 16384; + attribute(readonly) enum8 enhancedColorMode = 16385; + attribute(readonly) int8u colorLoopActive = 16386; + attribute(readonly) int8u colorLoopDirection = 16387; + attribute(readonly) int16u colorLoopTime = 16388; + attribute(readonly) int16u colorLoopStartEnhancedHue = 16389; + attribute(readonly) int16u colorLoopStoredEnhancedHue = 16390; + attribute(readonly) bitmap16 colorCapabilities = 16394; + attribute(readonly) int16u colorTempPhysicalMin = 16395; + attribute(readonly) int16u colorTempPhysicalMax = 16396; + attribute(readonly) int16u coupleColorTempToLevelMinMireds = 16397; + attribute(writable) int16u startUpColorTemperatureMireds = 16400; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct ColorLoopSetRequest { ColorLoopUpdateFlags updateFlags = 0; @@ -827,10 +827,10 @@ client cluster ContentLauncher = 1290 { MetricTypeEnum metric = 3; } - attribute(readonly, reportable) CHAR_STRING acceptHeaderList[] = 0; - attribute(writable, reportable) bitmap32 supportedStreamingProtocols = 1; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) CHAR_STRING acceptHeaderList[] = 0; + attribute(writable) bitmap32 supportedStreamingProtocols = 1; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct LaunchContentRequestRequest { BOOLEAN autoPlay = 0; @@ -859,12 +859,12 @@ client cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly, reportable) DeviceType deviceList[] = 0; - attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; - attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; - attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) DeviceType deviceList[] = 0; + attribute(readonly) CLUSTER_ID serverList[] = 1; + attribute(readonly) CLUSTER_ID clientList[] = 2; + attribute(readonly) ENDPOINT_NO partsList[] = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; } client cluster DiagnosticLogs = 50 { @@ -887,7 +887,7 @@ client cluster DiagnosticLogs = 50 { kBdx = 1; } - attribute(readonly, reportable) attrib_id attributeList[] = 65531; + attribute(readonly) attrib_id attributeList[] = 65531; request struct RetrieveLogsRequestRequest { LogsIntent intent = 0; @@ -1141,24 +1141,24 @@ client cluster DoorLock = 257 { nullable INT16U dataIndex = 6; } - attribute(readonly, reportable) DlLockState lockState = 0; - attribute(readonly, reportable) DlLockType lockType = 1; - attribute(readonly, reportable) boolean actuatorEnabled = 2; - attribute(readonly, reportable) DlDoorState doorState = 3; - attribute(readonly, reportable) int16u numberOfTotalUsersSupported = 17; - attribute(readonly, reportable) int16u numberOfPINUsersSupported = 18; - attribute(readonly, reportable) int8u maxPINCodeLength = 23; - attribute(readonly, reportable) int8u minPINCodeLength = 24; - attribute(writable, reportable) char_string language = 33; - attribute(writable, reportable) int32u autoRelockTime = 35; - attribute(writable, reportable) int8u soundVolume = 36; - attribute(writable, reportable) DlOperatingMode operatingMode = 37; - attribute(readonly, reportable) bitmap16 supportedOperatingModes = 38; - attribute(writable, reportable) boolean enableOneTouchLocking = 41; - attribute(writable, reportable) boolean enablePrivacyModeButton = 43; - attribute(writable, reportable) int8u wrongCodeEntryLimit = 48; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) DlLockState lockState = 0; + attribute(readonly) DlLockType lockType = 1; + attribute(readonly) boolean actuatorEnabled = 2; + attribute(readonly) DlDoorState doorState = 3; + attribute(readonly) int16u numberOfTotalUsersSupported = 17; + attribute(readonly) int16u numberOfPINUsersSupported = 18; + attribute(readonly) int8u maxPINCodeLength = 23; + attribute(readonly) int8u minPINCodeLength = 24; + attribute(writable) char_string language = 33; + attribute(writable) int32u autoRelockTime = 35; + attribute(writable) int8u soundVolume = 36; + attribute(writable) DlOperatingMode operatingMode = 37; + attribute(readonly) bitmap16 supportedOperatingModes = 38; + attribute(writable) boolean enableOneTouchLocking = 41; + attribute(writable) boolean enablePrivacyModeButton = 43; + attribute(writable) int8u wrongCodeEntryLimit = 48; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct ClearCredentialRequest { DlCredential credential = 0; @@ -1238,19 +1238,19 @@ client cluster DoorLock = 257 { } client cluster ElectricalMeasurement = 2820 { - attribute(readonly, reportable) bitmap32 measurementType = 0; - attribute(readonly, reportable) int32s totalActivePower = 772; - attribute(readonly, reportable) int16u rmsVoltage = 1285; - attribute(readonly, reportable) int16u rmsVoltageMin = 1286; - attribute(readonly, reportable) int16u rmsVoltageMax = 1287; - attribute(readonly, reportable) int16u rmsCurrent = 1288; - attribute(readonly, reportable) int16u rmsCurrentMin = 1289; - attribute(readonly, reportable) int16u rmsCurrentMax = 1290; - attribute(readonly, reportable) int16s activePower = 1291; - attribute(readonly, reportable) int16s activePowerMin = 1292; - attribute(readonly, reportable) int16s activePowerMax = 1293; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) bitmap32 measurementType = 0; + attribute(readonly) int32s totalActivePower = 772; + attribute(readonly) int16u rmsVoltage = 1285; + attribute(readonly) int16u rmsVoltageMin = 1286; + attribute(readonly) int16u rmsVoltageMax = 1287; + attribute(readonly) int16u rmsCurrent = 1288; + attribute(readonly) int16u rmsCurrentMin = 1289; + attribute(readonly) int16u rmsCurrentMax = 1290; + attribute(readonly) int16s activePower = 1291; + attribute(readonly) int16s activePowerMin = 1292; + attribute(readonly) int16s activePowerMax = 1293; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; } client cluster EthernetNetworkDiagnostics = 55 { @@ -1267,35 +1267,35 @@ client cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly, reportable) enum8 PHYRate = 0; - attribute(readonly, reportable) boolean fullDuplex = 1; - attribute(readonly, reportable) int64u packetRxCount = 2; - attribute(readonly, reportable) int64u packetTxCount = 3; - attribute(readonly, reportable) int64u txErrCount = 4; - attribute(readonly, reportable) int64u collisionCount = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) boolean carrierDetect = 7; - attribute(readonly, reportable) int64u timeSinceReset = 8; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 PHYRate = 0; + attribute(readonly) boolean fullDuplex = 1; + attribute(readonly) int64u packetRxCount = 2; + attribute(readonly) int64u packetTxCount = 3; + attribute(readonly) int64u txErrCount = 4; + attribute(readonly) int64u collisionCount = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) boolean carrierDetect = 7; + attribute(readonly) int64u timeSinceReset = 8; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } client cluster FixedLabel = 64 { - attribute(readonly, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; } client cluster FlowMeasurement = 1028 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u tolerance = 3; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u tolerance = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; } client cluster GeneralCommissioning = 48 { @@ -1316,12 +1316,12 @@ client cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable, reportable) int64u breadcrumb = 0; - attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly, reportable) enum8 regulatoryConfig = 2; - attribute(readonly, reportable) enum8 locationCapability = 3; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int64u breadcrumb = 0; + attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -1434,16 +1434,16 @@ client cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly, reportable) int16u rebootCount = 1; - attribute(readonly, reportable) int64u upTime = 2; - attribute(readonly, reportable) int32u totalOperationalHours = 3; - attribute(readonly, reportable) enum8 bootReasons = 4; - attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; - attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly) int16u rebootCount = 1; + attribute(readonly) int64u upTime = 2; + attribute(readonly) int32u totalOperationalHours = 3; + attribute(readonly) enum8 bootReasons = 4; + attribute(readonly) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly) ENUM8 activeRadioFaults[] = 6; + attribute(readonly) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; } client cluster GroupKeyManagement = 63 { @@ -1476,12 +1476,12 @@ client cluster GroupKeyManagement = 63 { INT64U epochStartTime2 = 7; } - attribute(readonly, reportable) GroupKey groupKeyMap[] = 0; - attribute(readonly, reportable) GroupInfo groupTable[] = 1; - attribute(readonly, reportable) int16u maxGroupsPerFabric = 2; - attribute(readonly, reportable) int16u maxGroupKeysPerFabric = 3; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) GroupKey groupKeyMap[] = 0; + attribute(readonly) GroupInfo groupTable[] = 1; + attribute(readonly) int16u maxGroupsPerFabric = 2; + attribute(readonly) int16u maxGroupKeysPerFabric = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct KeySetReadRequest { INT16U groupKeySetID = 0; @@ -1514,9 +1514,9 @@ client cluster GroupKeyManagement = 63 { } client cluster Groups = 4 { - attribute(readonly, reportable) bitmap8 nameSupport = 0; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) bitmap8 nameSupport = 0; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct AddGroupRequest { INT16U groupId = 0; @@ -1592,10 +1592,10 @@ client cluster Identify = 3 { kActuator = 5; } - attribute(writable, reportable) int16u identifyTime = 0; - attribute(readonly, reportable) enum8 identifyType = 1; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) int16u identifyTime = 0; + attribute(readonly) enum8 identifyType = 1; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -1621,13 +1621,13 @@ client cluster IlluminanceMeasurement = 1024 { kCmos = 1; } - attribute(readonly, reportable) int16u measuredValue = 0; - attribute(readonly, reportable) int16u minMeasuredValue = 1; - attribute(readonly, reportable) int16u maxMeasuredValue = 2; - attribute(readonly, reportable) int16u tolerance = 3; - attribute(readonly, reportable) enum8 lightSensorType = 4; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u measuredValue = 0; + attribute(readonly) int16u minMeasuredValue = 1; + attribute(readonly) int16u maxMeasuredValue = 2; + attribute(readonly) int16u tolerance = 3; + attribute(readonly) enum8 lightSensorType = 4; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; } client cluster KeypadInput = 1289 { @@ -1726,8 +1726,8 @@ client cluster KeypadInput = 1289 { kInvalidKeyInCurrentState = 2; } - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct SendKeyRequestRequest { CecKeyCode keyCode = 0; @@ -1751,23 +1751,23 @@ client cluster LevelControl = 8 { kDown = 1; } - attribute(readonly, reportable) int8u currentLevel = 0; - attribute(readonly, reportable) int16u remainingTime = 1; - attribute(readonly, reportable) int8u minLevel = 2; - attribute(readonly, reportable) int8u maxLevel = 3; - attribute(readonly, reportable) int16u currentFrequency = 4; - attribute(readonly, reportable) int16u minFrequency = 5; - attribute(readonly, reportable) int16u maxFrequency = 6; - attribute(writable, reportable) bitmap8 options = 15; - attribute(writable, reportable) int16u onOffTransitionTime = 16; - attribute(writable, reportable) int8u onLevel = 17; - attribute(writable, reportable) int16u onTransitionTime = 18; - attribute(writable, reportable) int16u offTransitionTime = 19; - attribute(writable, reportable) int8u defaultMoveRate = 20; - attribute(writable, reportable) int8u startUpCurrentLevel = 16384; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u currentLevel = 0; + attribute(readonly) int16u remainingTime = 1; + attribute(readonly) int8u minLevel = 2; + attribute(readonly) int8u maxLevel = 3; + attribute(readonly) int16u currentFrequency = 4; + attribute(readonly) int16u minFrequency = 5; + attribute(readonly) int16u maxFrequency = 6; + attribute(writable) bitmap8 options = 15; + attribute(writable) int16u onOffTransitionTime = 16; + attribute(writable) int8u onLevel = 17; + attribute(writable) int16u onTransitionTime = 18; + attribute(writable) int16u offTransitionTime = 19; + attribute(writable) int8u defaultMoveRate = 20; + attribute(writable) int8u startUpCurrentLevel = 16384; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -1823,13 +1823,13 @@ client cluster LevelControl = 8 { } client cluster LocalizationConfiguration = 43 { - attribute(writable, reportable) char_string activeLocale = 1; - attribute(readonly, reportable) CHAR_STRING supportedLocales[] = 2; + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; } client cluster LowPower = 1288 { - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; command Sleep(): DefaultSuccess = 0; } @@ -1857,10 +1857,10 @@ client cluster MediaInput = 1287 { CHAR_STRING description = 4; } - attribute(readonly, reportable) InputInfo mediaInputList[] = 0; - attribute(readonly, reportable) int8u currentMediaInput = 1; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) InputInfo mediaInputList[] = 0; + attribute(readonly) int8u currentMediaInput = 1; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct RenameInputRequestRequest { INT8U index = 0; @@ -1894,14 +1894,14 @@ client cluster MediaPlayback = 1286 { kSeekOutOfRange = 5; } - attribute(readonly, reportable) PlaybackStateEnum playbackState = 0; - attribute(readonly, reportable) epoch_us startTime = 1; - attribute(readonly, reportable) int64u duration = 2; - attribute(readonly, reportable) single playbackSpeed = 4; - attribute(readonly, reportable) int64u seekRangeEnd = 5; - attribute(readonly, reportable) int64u seekRangeStart = 6; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) PlaybackStateEnum playbackState = 0; + attribute(readonly) epoch_us startTime = 1; + attribute(readonly) int64u duration = 2; + attribute(readonly) single playbackSpeed = 4; + attribute(readonly) int64u seekRangeEnd = 5; + attribute(readonly) int64u seekRangeStart = 6; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct SeekRequestRequest { INT64U position = 0; @@ -1939,13 +1939,13 @@ client cluster ModeSelect = 80 { INT32U semanticTag = 3; } - attribute(readonly, reportable) int8u currentMode = 0; - attribute(readonly, reportable) ModeOptionStruct supportedModes[] = 1; - attribute(writable, reportable) int8u onMode = 2; - attribute(readonly, reportable) int8u startUpMode = 3; - attribute(readonly, reportable) char_string description = 4; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u currentMode = 0; + attribute(readonly) ModeOptionStruct supportedModes[] = 1; + attribute(writable) int8u onMode = 2; + attribute(readonly) int8u startUpMode = 3; + attribute(readonly) char_string description = 4; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct ChangeToModeRequest { INT8U newMode = 0; @@ -2004,16 +2004,16 @@ client cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly, reportable) int8u maxNetworks = 0; - attribute(readonly, reportable) NetworkInfo networks[] = 1; - attribute(readonly, reportable) int8u scanMaxTimeSeconds = 2; - attribute(readonly, reportable) int8u connectMaxTimeSeconds = 3; - attribute(writable, reportable) boolean interfaceEnabled = 4; - attribute(readonly, reportable) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly, reportable) octet_string lastNetworkID = 6; - attribute(readonly, reportable) int32u lastConnectErrorValue = 7; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -2094,8 +2094,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -2191,12 +2191,12 @@ client cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute(writable, reportable) ProviderLocation defaultOtaProviders[] = 0; - attribute(readonly, reportable) boolean updatePossible = 1; - attribute(readonly, reportable) OTAUpdateStateEnum updateState = 2; - attribute(readonly, reportable) int8u updateStateProgress = 3; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) ProviderLocation defaultOtaProviders[] = 0; + attribute(readonly) boolean updatePossible = 1; + attribute(readonly) OTAUpdateStateEnum updateState = 2; + attribute(readonly) int8u updateStateProgress = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct AnnounceOtaProviderRequest { node_id providerNodeId = 0; @@ -2210,11 +2210,11 @@ client cluster OtaSoftwareUpdateRequestor = 42 { } client cluster OccupancySensing = 1030 { - attribute(readonly, reportable) bitmap8 occupancy = 0; - attribute(readonly, reportable) enum8 occupancySensorType = 1; - attribute(readonly, reportable) bitmap8 occupancySensorTypeBitmap = 2; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) bitmap8 occupancy = 0; + attribute(readonly) enum8 occupancySensorType = 1; + attribute(readonly) bitmap8 occupancySensorTypeBitmap = 2; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; } client cluster OnOff = 6 { @@ -2233,14 +2233,14 @@ client cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly, reportable) boolean onOff = 0; - attribute(readonly, reportable) boolean globalSceneControl = 16384; - attribute(writable, reportable) int16u onTime = 16385; - attribute(writable, reportable) int16u offWaitTime = 16386; - attribute(writable, reportable) enum8 startUpOnOff = 16387; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) boolean onOff = 0; + attribute(readonly) boolean globalSceneControl = 16384; + attribute(writable) int16u onTime = 16385; + attribute(writable) int16u offWaitTime = 16386; + attribute(writable) enum8 startUpOnOff = 16387; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct OffWithEffectRequest { OnOffEffectIdentifier effectId = 0; @@ -2262,10 +2262,10 @@ client cluster OnOff = 6 { } client cluster OnOffSwitchConfiguration = 7 { - attribute(readonly, reportable) enum8 switchType = 0; - attribute(writable, reportable) enum8 switchActions = 16; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 switchType = 0; + attribute(writable) enum8 switchActions = 16; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; } client cluster OperationalCredentials = 62 { @@ -2291,13 +2291,13 @@ client cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; - attribute(readonly, reportable) int8u supportedFabrics = 2; - attribute(readonly, reportable) int8u commissionedFabrics = 3; - attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) FabricDescriptor fabricsList[] = 1; + attribute(readonly) int8u supportedFabrics = 2; + attribute(readonly) int8u commissionedFabrics = 3; + attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly) fabric_idx currentFabricIndex = 5; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -2372,32 +2372,32 @@ client cluster OperationalCredentials = 62 { } client cluster PowerSource = 47 { - attribute(readonly, reportable) enum8 status = 0; - attribute(readonly, reportable) int8u order = 1; - attribute(readonly, reportable) char_string description = 2; - attribute(readonly, reportable) int32u batteryVoltage = 11; - attribute(readonly, reportable) int8u batteryPercentRemaining = 12; - attribute(readonly, reportable) int32u batteryTimeRemaining = 13; - attribute(readonly, reportable) enum8 batteryChargeLevel = 14; - attribute(readonly, reportable) ENUM8 activeBatteryFaults[] = 18; - attribute(readonly, reportable) enum8 batteryChargeState = 26; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 status = 0; + attribute(readonly) int8u order = 1; + attribute(readonly) char_string description = 2; + attribute(readonly) int32u batteryVoltage = 11; + attribute(readonly) int8u batteryPercentRemaining = 12; + attribute(readonly) int32u batteryTimeRemaining = 13; + attribute(readonly) enum8 batteryChargeLevel = 14; + attribute(readonly) ENUM8 activeBatteryFaults[] = 18; + attribute(readonly) enum8 batteryChargeState = 26; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } client cluster PowerSourceConfiguration = 46 { - attribute(readonly, reportable) INT8U sources[] = 0; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) INT8U sources[] = 0; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; } client cluster PressureMeasurement = 1027 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; } client cluster PumpConfigurationAndControl = 512 { @@ -2468,42 +2468,42 @@ client cluster PumpConfigurationAndControl = 512 { info event TurbineOperation = 16 { } - attribute(readonly, reportable) int16s maxPressure = 0; - attribute(readonly, reportable) int16u maxSpeed = 1; - attribute(readonly, reportable) int16u maxFlow = 2; - attribute(readonly, reportable) int16s minConstPressure = 3; - attribute(readonly, reportable) int16s maxConstPressure = 4; - attribute(readonly, reportable) int16s minCompPressure = 5; - attribute(readonly, reportable) int16s maxCompPressure = 6; - attribute(readonly, reportable) int16u minConstSpeed = 7; - attribute(readonly, reportable) int16u maxConstSpeed = 8; - attribute(readonly, reportable) int16u minConstFlow = 9; - attribute(readonly, reportable) int16u maxConstFlow = 10; - attribute(readonly, reportable) int16s minConstTemp = 11; - attribute(readonly, reportable) int16s maxConstTemp = 12; - attribute(readonly, reportable) bitmap16 pumpStatus = 16; - attribute(readonly, reportable) enum8 effectiveOperationMode = 17; - attribute(readonly, reportable) enum8 effectiveControlMode = 18; - attribute(readonly, reportable) int16s capacity = 19; - attribute(readonly, reportable) int16u speed = 20; - attribute(writable, reportable) int24u lifetimeRunningHours = 21; - attribute(readonly, reportable) int24u power = 22; - attribute(writable, reportable) int32u lifetimeEnergyConsumed = 23; - attribute(writable, reportable) enum8 operationMode = 32; - attribute(writable, reportable) enum8 controlMode = 33; - attribute(readonly, reportable) bitmap16 alarmMask = 34; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s maxPressure = 0; + attribute(readonly) int16u maxSpeed = 1; + attribute(readonly) int16u maxFlow = 2; + attribute(readonly) int16s minConstPressure = 3; + attribute(readonly) int16s maxConstPressure = 4; + attribute(readonly) int16s minCompPressure = 5; + attribute(readonly) int16s maxCompPressure = 6; + attribute(readonly) int16u minConstSpeed = 7; + attribute(readonly) int16u maxConstSpeed = 8; + attribute(readonly) int16u minConstFlow = 9; + attribute(readonly) int16u maxConstFlow = 10; + attribute(readonly) int16s minConstTemp = 11; + attribute(readonly) int16s maxConstTemp = 12; + attribute(readonly) bitmap16 pumpStatus = 16; + attribute(readonly) enum8 effectiveOperationMode = 17; + attribute(readonly) enum8 effectiveControlMode = 18; + attribute(readonly) int16s capacity = 19; + attribute(readonly) int16u speed = 20; + attribute(writable) int24u lifetimeRunningHours = 21; + attribute(readonly) int24u power = 22; + attribute(writable) int32u lifetimeEnergyConsumed = 23; + attribute(writable) enum8 operationMode = 32; + attribute(writable) enum8 controlMode = 33; + attribute(readonly) bitmap16 alarmMask = 34; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } client cluster RelativeHumidityMeasurement = 1029 { - attribute(readonly, reportable) int16u measuredValue = 0; - attribute(readonly, reportable) int16u minMeasuredValue = 1; - attribute(readonly, reportable) int16u maxMeasuredValue = 2; - attribute(readonly, reportable) int16u tolerance = 3; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u measuredValue = 0; + attribute(readonly) int16u minMeasuredValue = 1; + attribute(readonly) int16u maxMeasuredValue = 2; + attribute(readonly) int16u tolerance = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; } client cluster Scenes = 5 { @@ -2513,13 +2513,13 @@ client cluster Scenes = 5 { INT8U value = 3; } - attribute(readonly, reportable) int8u sceneCount = 0; - attribute(readonly, reportable) int8u currentScene = 1; - attribute(readonly, reportable) int16u currentGroup = 2; - attribute(readonly, reportable) boolean sceneValid = 3; - attribute(readonly, reportable) bitmap8 nameSupport = 4; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u sceneCount = 0; + attribute(readonly) int8u currentScene = 1; + attribute(readonly) int16u currentGroup = 2; + attribute(readonly) boolean sceneValid = 3; + attribute(readonly) bitmap8 nameSupport = 4; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct AddSceneRequest { INT16U groupId = 0; @@ -2620,13 +2620,13 @@ client cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; - attribute(readonly, reportable) int64u currentHeapFree = 1; - attribute(readonly, reportable) int64u currentHeapUsed = 2; - attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) ThreadMetrics threadMetrics[] = 0; + attribute(readonly) int64u currentHeapFree = 1; + attribute(readonly) int64u currentHeapUsed = 2; + attribute(readonly) int64u currentHeapHighWatermark = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; command ResetWatermarks(): DefaultSuccess = 0; } @@ -2662,12 +2662,12 @@ client cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } - attribute(readonly, reportable) int8u numberOfPositions = 0; - attribute(readonly, reportable) int8u currentPosition = 1; - attribute(readonly, reportable) int8u multiPressMax = 2; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int8u numberOfPositions = 0; + attribute(readonly) int8u currentPosition = 1; + attribute(readonly) int8u multiPressMax = 2; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; } client cluster TargetNavigator = 1285 { @@ -2682,10 +2682,10 @@ client cluster TargetNavigator = 1285 { CHAR_STRING name = 2; } - attribute(readonly, reportable) TargetInfo targetNavigatorList[] = 0; - attribute(readonly, reportable) int8u currentNavigatorTarget = 1; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) TargetInfo targetNavigatorList[] = 0; + attribute(readonly) int8u currentNavigatorTarget = 1; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct NavigateTargetRequestRequest { INT8U target = 0; @@ -2701,12 +2701,12 @@ client cluster TargetNavigator = 1285 { } client cluster TemperatureMeasurement = 1026 { - attribute(readonly, reportable) int16s measuredValue = 0; - attribute(readonly, reportable) int16s minMeasuredValue = 1; - attribute(readonly, reportable) int16s maxMeasuredValue = 2; - attribute(readonly, reportable) int16u tolerance = 3; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s measuredValue = 0; + attribute(readonly) int16s minMeasuredValue = 1; + attribute(readonly) int16s maxMeasuredValue = 2; + attribute(readonly) int16u tolerance = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; } client cluster TestCluster = 1295 { @@ -2773,86 +2773,86 @@ client cluster TestCluster = 1295 { SimpleEnum arg6[] = 6; } - attribute(writable, reportable) boolean boolean = 0; - attribute(writable, reportable) bitmap8 bitmap8 = 1; - attribute(writable, reportable) bitmap16 bitmap16 = 2; - attribute(writable, reportable) bitmap32 bitmap32 = 3; - attribute(writable, reportable) bitmap64 bitmap64 = 4; - attribute(writable, reportable) int8u int8u = 5; - attribute(writable, reportable) int16u int16u = 6; - attribute(writable, reportable) int24u int24u = 7; - attribute(writable, reportable) int32u int32u = 8; - attribute(writable, reportable) int40u int40u = 9; - attribute(writable, reportable) int48u int48u = 10; - attribute(writable, reportable) int56u int56u = 11; - attribute(writable, reportable) int64u int64u = 12; - attribute(writable, reportable) int8s int8s = 13; - attribute(writable, reportable) int16s int16s = 14; - attribute(writable, reportable) int24s int24s = 15; - attribute(writable, reportable) int32s int32s = 16; - attribute(writable, reportable) int40s int40s = 17; - attribute(writable, reportable) int48s int48s = 18; - attribute(writable, reportable) int56s int56s = 19; - attribute(writable, reportable) int64s int64s = 20; - attribute(writable, reportable) enum8 enum8 = 21; - attribute(writable, reportable) enum16 enum16 = 22; - attribute(writable, reportable) single floatSingle = 23; - attribute(writable, reportable) double floatDouble = 24; - attribute(writable, reportable) octet_string octetString = 25; - attribute(writable, reportable) INT8U listInt8u[] = 26; - attribute(writable, reportable) OCTET_STRING listOctetString[] = 27; - attribute(writable, reportable) TestListStructOctet listStructOctetString[] = 28; - attribute(writable, reportable) long_octet_string longOctetString = 29; - attribute(writable, reportable) char_string charString = 30; - attribute(writable, reportable) long_char_string longCharString = 31; - attribute(writable, reportable) epoch_us epochUs = 32; - attribute(writable, reportable) epoch_s epochS = 33; - attribute(writable, reportable) vendor_id vendorId = 34; - attribute(writable, reportable) NullablesAndOptionalsStruct listNullablesAndOptionalsStruct[] = 35; - attribute(writable, reportable) SimpleEnum enumAttr = 36; - attribute(writable, reportable) SimpleStruct structAttr = 37; - attribute(writable, reportable) int8u rangeRestrictedInt8u = 38; - attribute(writable, reportable) int8s rangeRestrictedInt8s = 39; - attribute(writable, reportable) int16u rangeRestrictedInt16u = 40; - attribute(writable, reportable) int16s rangeRestrictedInt16s = 41; - attribute(readonly, reportable) LONG_OCTET_STRING listLongOctetString[] = 42; - attribute(writable, reportable) boolean timedWriteBoolean = 48; - attribute(writable, reportable) boolean unsupported = 255; - attribute(writable, reportable) boolean nullableBoolean = 32768; - attribute(writable, reportable) bitmap8 nullableBitmap8 = 32769; - attribute(writable, reportable) bitmap16 nullableBitmap16 = 32770; - attribute(writable, reportable) bitmap32 nullableBitmap32 = 32771; - attribute(writable, reportable) bitmap64 nullableBitmap64 = 32772; - attribute(writable, reportable) int8u nullableInt8u = 32773; - attribute(writable, reportable) int16u nullableInt16u = 32774; - attribute(writable, reportable) int24u nullableInt24u = 32775; - attribute(writable, reportable) int32u nullableInt32u = 32776; - attribute(writable, reportable) int40u nullableInt40u = 32777; - attribute(writable, reportable) int48u nullableInt48u = 32778; - attribute(writable, reportable) int56u nullableInt56u = 32779; - attribute(writable, reportable) int64u nullableInt64u = 32780; - attribute(writable, reportable) int8s nullableInt8s = 32781; - attribute(writable, reportable) int16s nullableInt16s = 32782; - attribute(writable, reportable) int24s nullableInt24s = 32783; - attribute(writable, reportable) int32s nullableInt32s = 32784; - attribute(writable, reportable) int40s nullableInt40s = 32785; - attribute(writable, reportable) int48s nullableInt48s = 32786; - attribute(writable, reportable) int56s nullableInt56s = 32787; - attribute(writable, reportable) int64s nullableInt64s = 32788; - attribute(writable, reportable) enum8 nullableEnum8 = 32789; - attribute(writable, reportable) enum16 nullableEnum16 = 32790; - attribute(writable, reportable) single nullableFloatSingle = 32791; - attribute(writable, reportable) double nullableFloatDouble = 32792; - attribute(writable, reportable) octet_string nullableOctetString = 32793; - attribute(writable, reportable) char_string nullableCharString = 32798; - attribute(writable, reportable) SimpleEnum nullableEnumAttr = 32804; - attribute(writable, reportable) SimpleStruct nullableStruct = 32805; - attribute(writable, reportable) int8u nullableRangeRestrictedInt8u = 32806; - attribute(writable, reportable) int8s nullableRangeRestrictedInt8s = 32807; - attribute(writable, reportable) int16u nullableRangeRestrictedInt16u = 32808; - attribute(writable, reportable) int16s nullableRangeRestrictedInt16s = 32809; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) boolean boolean = 0; + attribute(writable) bitmap8 bitmap8 = 1; + attribute(writable) bitmap16 bitmap16 = 2; + attribute(writable) bitmap32 bitmap32 = 3; + attribute(writable) bitmap64 bitmap64 = 4; + attribute(writable) int8u int8u = 5; + attribute(writable) int16u int16u = 6; + attribute(writable) int24u int24u = 7; + attribute(writable) int32u int32u = 8; + attribute(writable) int40u int40u = 9; + attribute(writable) int48u int48u = 10; + attribute(writable) int56u int56u = 11; + attribute(writable) int64u int64u = 12; + attribute(writable) int8s int8s = 13; + attribute(writable) int16s int16s = 14; + attribute(writable) int24s int24s = 15; + attribute(writable) int32s int32s = 16; + attribute(writable) int40s int40s = 17; + attribute(writable) int48s int48s = 18; + attribute(writable) int56s int56s = 19; + attribute(writable) int64s int64s = 20; + attribute(writable) enum8 enum8 = 21; + attribute(writable) enum16 enum16 = 22; + attribute(writable) single floatSingle = 23; + attribute(writable) double floatDouble = 24; + attribute(writable) octet_string octetString = 25; + attribute(writable) INT8U listInt8u[] = 26; + attribute(writable) OCTET_STRING listOctetString[] = 27; + attribute(writable) TestListStructOctet listStructOctetString[] = 28; + attribute(writable) long_octet_string longOctetString = 29; + attribute(writable) char_string charString = 30; + attribute(writable) long_char_string longCharString = 31; + attribute(writable) epoch_us epochUs = 32; + attribute(writable) epoch_s epochS = 33; + attribute(writable) vendor_id vendorId = 34; + attribute(writable) NullablesAndOptionalsStruct listNullablesAndOptionalsStruct[] = 35; + attribute(writable) SimpleEnum enumAttr = 36; + attribute(writable) SimpleStruct structAttr = 37; + attribute(writable) int8u rangeRestrictedInt8u = 38; + attribute(writable) int8s rangeRestrictedInt8s = 39; + attribute(writable) int16u rangeRestrictedInt16u = 40; + attribute(writable) int16s rangeRestrictedInt16s = 41; + attribute(readonly) LONG_OCTET_STRING listLongOctetString[] = 42; + attribute(writable) boolean timedWriteBoolean = 48; + attribute(writable) boolean unsupported = 255; + attribute(writable) boolean nullableBoolean = 32768; + attribute(writable) bitmap8 nullableBitmap8 = 32769; + attribute(writable) bitmap16 nullableBitmap16 = 32770; + attribute(writable) bitmap32 nullableBitmap32 = 32771; + attribute(writable) bitmap64 nullableBitmap64 = 32772; + attribute(writable) int8u nullableInt8u = 32773; + attribute(writable) int16u nullableInt16u = 32774; + attribute(writable) int24u nullableInt24u = 32775; + attribute(writable) int32u nullableInt32u = 32776; + attribute(writable) int40u nullableInt40u = 32777; + attribute(writable) int48u nullableInt48u = 32778; + attribute(writable) int56u nullableInt56u = 32779; + attribute(writable) int64u nullableInt64u = 32780; + attribute(writable) int8s nullableInt8s = 32781; + attribute(writable) int16s nullableInt16s = 32782; + attribute(writable) int24s nullableInt24s = 32783; + attribute(writable) int32s nullableInt32s = 32784; + attribute(writable) int40s nullableInt40s = 32785; + attribute(writable) int48s nullableInt48s = 32786; + attribute(writable) int56s nullableInt56s = 32787; + attribute(writable) int64s nullableInt64s = 32788; + attribute(writable) enum8 nullableEnum8 = 32789; + attribute(writable) enum16 nullableEnum16 = 32790; + attribute(writable) single nullableFloatSingle = 32791; + attribute(writable) double nullableFloatDouble = 32792; + attribute(writable) octet_string nullableOctetString = 32793; + attribute(writable) char_string nullableCharString = 32798; + attribute(writable) SimpleEnum nullableEnumAttr = 32804; + attribute(writable) SimpleStruct nullableStruct = 32805; + attribute(writable) int8u nullableRangeRestrictedInt8u = 32806; + attribute(writable) int8s nullableRangeRestrictedInt8s = 32807; + attribute(writable) int16u nullableRangeRestrictedInt16u = 32808; + attribute(writable) int16s nullableRangeRestrictedInt16s = 32809; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; request struct SimpleStructEchoRequestRequest { SimpleStruct arg1 = 0; @@ -2973,26 +2973,26 @@ client cluster Thermostat = 513 { kHeatAndCoolSetpoints = 2; } - attribute(readonly, reportable) int16s localTemperature = 0; - attribute(readonly, reportable) int16s absMinHeatSetpointLimit = 3; - attribute(readonly, reportable) int16s absMaxHeatSetpointLimit = 4; - attribute(readonly, reportable) int16s absMinCoolSetpointLimit = 5; - attribute(readonly, reportable) int16s absMaxCoolSetpointLimit = 6; - attribute(writable, reportable) int16s occupiedCoolingSetpoint = 17; - attribute(writable, reportable) int16s occupiedHeatingSetpoint = 18; - attribute(writable, reportable) int16s minHeatSetpointLimit = 21; - attribute(writable, reportable) int16s maxHeatSetpointLimit = 22; - attribute(writable, reportable) int16s minCoolSetpointLimit = 23; - attribute(writable, reportable) int16s maxCoolSetpointLimit = 24; - attribute(writable, reportable) int8s minSetpointDeadBand = 25; - attribute(writable, reportable) enum8 controlSequenceOfOperation = 27; - attribute(writable, reportable) enum8 systemMode = 28; - attribute(readonly, reportable) enum8 startOfWeek = 32; - attribute(readonly, reportable) int8u numberOfWeeklyTransitions = 33; - attribute(readonly, reportable) int8u numberOfDailyTransitions = 34; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16s localTemperature = 0; + attribute(readonly) int16s absMinHeatSetpointLimit = 3; + attribute(readonly) int16s absMaxHeatSetpointLimit = 4; + attribute(readonly) int16s absMinCoolSetpointLimit = 5; + attribute(readonly) int16s absMaxCoolSetpointLimit = 6; + attribute(writable) int16s occupiedCoolingSetpoint = 17; + attribute(writable) int16s occupiedHeatingSetpoint = 18; + attribute(writable) int16s minHeatSetpointLimit = 21; + attribute(writable) int16s maxHeatSetpointLimit = 22; + attribute(writable) int16s minCoolSetpointLimit = 23; + attribute(writable) int16s maxCoolSetpointLimit = 24; + attribute(writable) int8s minSetpointDeadBand = 25; + attribute(writable) enum8 controlSequenceOfOperation = 27; + attribute(writable) enum8 systemMode = 28; + attribute(readonly) enum8 startOfWeek = 32; + attribute(readonly) int8u numberOfWeeklyTransitions = 33; + attribute(readonly) int8u numberOfDailyTransitions = 34; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct GetWeeklyScheduleRequest { DayOfWeek daysToReturn = 0; @@ -3035,11 +3035,11 @@ client cluster Thermostat = 513 { } client cluster ThermostatUserInterfaceConfiguration = 516 { - attribute(writable, reportable) enum8 temperatureDisplayMode = 0; - attribute(writable, reportable) enum8 keypadLockout = 1; - attribute(writable, reportable) enum8 scheduleProgrammingVisibility = 2; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) enum8 temperatureDisplayMode = 0; + attribute(writable) enum8 keypadLockout = 1; + attribute(writable) enum8 scheduleProgrammingVisibility = 2; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; } client cluster ThreadNetworkDiagnostics = 53 { @@ -3119,85 +3119,85 @@ client cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) int16u channel = 0; - attribute(readonly, reportable) enum8 routingRole = 1; - attribute(readonly, reportable) octet_string networkName = 2; - attribute(readonly, reportable) int16u panId = 3; - attribute(readonly, reportable) int64u extendedPanId = 4; - attribute(readonly, reportable) octet_string meshLocalPrefix = 5; - attribute(readonly, reportable) int64u overrunCount = 6; - attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; - attribute(readonly, reportable) RouteTable routeTableList[] = 8; - attribute(readonly, reportable) int32u partitionId = 9; - attribute(readonly, reportable) int8u weighting = 10; - attribute(readonly, reportable) int8u dataVersion = 11; - attribute(readonly, reportable) int8u stableDataVersion = 12; - attribute(readonly, reportable) int8u leaderRouterId = 13; - attribute(readonly, reportable) int16u detachedRoleCount = 14; - attribute(readonly, reportable) int16u childRoleCount = 15; - attribute(readonly, reportable) int16u routerRoleCount = 16; - attribute(readonly, reportable) int16u leaderRoleCount = 17; - attribute(readonly, reportable) int16u attachAttemptCount = 18; - attribute(readonly, reportable) int16u partitionIdChangeCount = 19; - attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly, reportable) int16u parentChangeCount = 21; - attribute(readonly, reportable) int32u txTotalCount = 22; - attribute(readonly, reportable) int32u txUnicastCount = 23; - attribute(readonly, reportable) int32u txBroadcastCount = 24; - attribute(readonly, reportable) int32u txAckRequestedCount = 25; - attribute(readonly, reportable) int32u txAckedCount = 26; - attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; - attribute(readonly, reportable) int32u txDataCount = 28; - attribute(readonly, reportable) int32u txDataPollCount = 29; - attribute(readonly, reportable) int32u txBeaconCount = 30; - attribute(readonly, reportable) int32u txBeaconRequestCount = 31; - attribute(readonly, reportable) int32u txOtherCount = 32; - attribute(readonly, reportable) int32u txRetryCount = 33; - attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly, reportable) int32u txErrCcaCount = 36; - attribute(readonly, reportable) int32u txErrAbortCount = 37; - attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; - attribute(readonly, reportable) int32u rxTotalCount = 39; - attribute(readonly, reportable) int32u rxUnicastCount = 40; - attribute(readonly, reportable) int32u rxBroadcastCount = 41; - attribute(readonly, reportable) int32u rxDataCount = 42; - attribute(readonly, reportable) int32u rxDataPollCount = 43; - attribute(readonly, reportable) int32u rxBeaconCount = 44; - attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; - attribute(readonly, reportable) int32u rxOtherCount = 46; - attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; - attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; - attribute(readonly, reportable) int32u rxDuplicatedCount = 49; - attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; - attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly, reportable) int32u rxErrSecCount = 53; - attribute(readonly, reportable) int32u rxErrFcsCount = 54; - attribute(readonly, reportable) int32u rxErrOtherCount = 55; - attribute(readonly, reportable) int64u activeTimestamp = 56; - attribute(readonly, reportable) int64u pendingTimestamp = 57; - attribute(readonly, reportable) int32u delay = 58; - attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; - attribute(readonly, reportable) octet_string channelMask = 60; - attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) int16u channel = 0; + attribute(readonly) enum8 routingRole = 1; + attribute(readonly) octet_string networkName = 2; + attribute(readonly) int16u panId = 3; + attribute(readonly) int64u extendedPanId = 4; + attribute(readonly) octet_string meshLocalPrefix = 5; + attribute(readonly) int64u overrunCount = 6; + attribute(readonly) NeighborTable neighborTableList[] = 7; + attribute(readonly) RouteTable routeTableList[] = 8; + attribute(readonly) int32u partitionId = 9; + attribute(readonly) int8u weighting = 10; + attribute(readonly) int8u dataVersion = 11; + attribute(readonly) int8u stableDataVersion = 12; + attribute(readonly) int8u leaderRouterId = 13; + attribute(readonly) int16u detachedRoleCount = 14; + attribute(readonly) int16u childRoleCount = 15; + attribute(readonly) int16u routerRoleCount = 16; + attribute(readonly) int16u leaderRoleCount = 17; + attribute(readonly) int16u attachAttemptCount = 18; + attribute(readonly) int16u partitionIdChangeCount = 19; + attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly) int16u parentChangeCount = 21; + attribute(readonly) int32u txTotalCount = 22; + attribute(readonly) int32u txUnicastCount = 23; + attribute(readonly) int32u txBroadcastCount = 24; + attribute(readonly) int32u txAckRequestedCount = 25; + attribute(readonly) int32u txAckedCount = 26; + attribute(readonly) int32u txNoAckRequestedCount = 27; + attribute(readonly) int32u txDataCount = 28; + attribute(readonly) int32u txDataPollCount = 29; + attribute(readonly) int32u txBeaconCount = 30; + attribute(readonly) int32u txBeaconRequestCount = 31; + attribute(readonly) int32u txOtherCount = 32; + attribute(readonly) int32u txRetryCount = 33; + attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly) int32u txErrCcaCount = 36; + attribute(readonly) int32u txErrAbortCount = 37; + attribute(readonly) int32u txErrBusyChannelCount = 38; + attribute(readonly) int32u rxTotalCount = 39; + attribute(readonly) int32u rxUnicastCount = 40; + attribute(readonly) int32u rxBroadcastCount = 41; + attribute(readonly) int32u rxDataCount = 42; + attribute(readonly) int32u rxDataPollCount = 43; + attribute(readonly) int32u rxBeaconCount = 44; + attribute(readonly) int32u rxBeaconRequestCount = 45; + attribute(readonly) int32u rxOtherCount = 46; + attribute(readonly) int32u rxAddressFilteredCount = 47; + attribute(readonly) int32u rxDestAddrFilteredCount = 48; + attribute(readonly) int32u rxDuplicatedCount = 49; + attribute(readonly) int32u rxErrNoFrameCount = 50; + attribute(readonly) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly) int32u rxErrSecCount = 53; + attribute(readonly) int32u rxErrFcsCount = 54; + attribute(readonly) int32u rxErrOtherCount = 55; + attribute(readonly) int64u activeTimestamp = 56; + attribute(readonly) int64u pendingTimestamp = 57; + attribute(readonly) int32u delay = 58; + attribute(readonly) SecurityPolicy securityPolicy[] = 59; + attribute(readonly) octet_string channelMask = 60; + attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } client cluster UserLabel = 65 { - attribute(writable, reportable) LabelStruct labelList[] = 0; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; } client cluster WakeOnLan = 1283 { - attribute(readonly, reportable) char_string wakeOnLanMacAddress = 0; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) char_string wakeOnLanMacAddress = 0; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; } client cluster WiFiNetworkDiagnostics = 54 { @@ -3244,48 +3244,48 @@ client cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly, reportable) octet_string bssid = 0; - attribute(readonly, reportable) enum8 securityType = 1; - attribute(readonly, reportable) enum8 wiFiVersion = 2; - attribute(readonly, reportable) int16u channelNumber = 3; - attribute(readonly, reportable) int8s rssi = 4; - attribute(readonly, reportable) int32u beaconLostCount = 5; - attribute(readonly, reportable) int32u beaconRxCount = 6; - attribute(readonly, reportable) int32u packetMulticastRxCount = 7; - attribute(readonly, reportable) int32u packetMulticastTxCount = 8; - attribute(readonly, reportable) int32u packetUnicastRxCount = 9; - attribute(readonly, reportable) int32u packetUnicastTxCount = 10; - attribute(readonly, reportable) int64u currentMaxRate = 11; - attribute(readonly, reportable) int64u overrunCount = 12; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) octet_string bssid = 0; + attribute(readonly) enum8 securityType = 1; + attribute(readonly) enum8 wiFiVersion = 2; + attribute(readonly) int16u channelNumber = 3; + attribute(readonly) int8s rssi = 4; + attribute(readonly) int32u beaconLostCount = 5; + attribute(readonly) int32u beaconRxCount = 6; + attribute(readonly) int32u packetMulticastRxCount = 7; + attribute(readonly) int32u packetMulticastTxCount = 8; + attribute(readonly) int32u packetUnicastRxCount = 9; + attribute(readonly) int32u packetUnicastTxCount = 10; + attribute(readonly) int64u currentMaxRate = 11; + attribute(readonly) int64u overrunCount = 12; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } client cluster WindowCovering = 258 { - attribute(readonly, reportable) enum8 type = 0; - attribute(readonly, reportable) int16u currentPositionLift = 3; - attribute(readonly, reportable) int16u currentPositionTilt = 4; - attribute(readonly, reportable) bitmap8 configStatus = 7; - attribute(readonly, reportable) Percent currentPositionLiftPercentage = 8; - attribute(readonly, reportable) Percent currentPositionTiltPercentage = 9; - attribute(readonly, reportable) bitmap8 operationalStatus = 10; - attribute(readonly, reportable) Percent100ths targetPositionLiftPercent100ths = 11; - attribute(readonly, reportable) Percent100ths targetPositionTiltPercent100ths = 12; - attribute(readonly, reportable) enum8 endProductType = 13; - attribute(readonly, reportable) Percent100ths currentPositionLiftPercent100ths = 14; - attribute(readonly, reportable) Percent100ths currentPositionTiltPercent100ths = 15; - attribute(readonly, reportable) int16u installedOpenLimitLift = 16; - attribute(readonly, reportable) int16u installedClosedLimitLift = 17; - attribute(readonly, reportable) int16u installedOpenLimitTilt = 18; - attribute(readonly, reportable) int16u installedClosedLimitTilt = 19; - attribute(writable, reportable) bitmap8 mode = 23; - attribute(readonly, reportable) bitmap16 safetyStatus = 26; - attribute(readonly, reportable) attrib_id attributeList[] = 65531; - attribute(readonly, reportable) bitmap32 featureMap = 65532; - attribute(readonly, reportable) int16u clusterRevision = 65533; + attribute(readonly) enum8 type = 0; + attribute(readonly) int16u currentPositionLift = 3; + attribute(readonly) int16u currentPositionTilt = 4; + attribute(readonly) bitmap8 configStatus = 7; + attribute(readonly) Percent currentPositionLiftPercentage = 8; + attribute(readonly) Percent currentPositionTiltPercentage = 9; + attribute(readonly) bitmap8 operationalStatus = 10; + attribute(readonly) Percent100ths targetPositionLiftPercent100ths = 11; + attribute(readonly) Percent100ths targetPositionTiltPercent100ths = 12; + attribute(readonly) enum8 endProductType = 13; + attribute(readonly) Percent100ths currentPositionLiftPercent100ths = 14; + attribute(readonly) Percent100ths currentPositionTiltPercent100ths = 15; + attribute(readonly) int16u installedOpenLimitLift = 16; + attribute(readonly) int16u installedClosedLimitLift = 17; + attribute(readonly) int16u installedOpenLimitTilt = 18; + attribute(readonly) int16u installedClosedLimitTilt = 19; + attribute(writable) bitmap8 mode = 23; + attribute(readonly) bitmap16 safetyStatus = 26; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; request struct GoToLiftPercentageRequest { Percent liftPercentageValue = 0; From 78a6636ada5191fe76d0964190a4d60c0a47d464 Mon Sep 17 00:00:00 2001 From: Kevin Coppock <47542933+g-coppock@users.noreply.github.com> Date: Tue, 18 Jan 2022 12:08:37 -0600 Subject: [PATCH 054/124] Allow null NetworkCredentials in commissionDevice() (#13655) For IP commissioning, no credentials should be added, but currently the Java layer requires either a Thread or Wi-Fi network. The underlying commissioner logic already has safeguards to ensure that a network is provided unless we are doing IP commissioning. --- src/controller/java/CHIPDeviceController-JNI.cpp | 7 +++++-- .../src/chip/devicecontroller/ChipDeviceController.java | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp index f80a21896e327d..5adb06dd43f17c 100644 --- a/src/controller/java/CHIPDeviceController-JNI.cpp +++ b/src/controller/java/CHIPDeviceController-JNI.cpp @@ -187,8 +187,11 @@ JNI_METHOD(void, commissionDevice) ChipLogProgress(Controller, "commissionDevice() called"); CommissioningParameters commissioningParams = CommissioningParameters(); - err = wrapper->ApplyNetworkCredentials(commissioningParams, networkCredentials); - VerifyOrExit(err == CHIP_NO_ERROR, err = CHIP_ERROR_INVALID_ARGUMENT); + if (networkCredentials != nullptr) + { + err = wrapper->ApplyNetworkCredentials(commissioningParams, networkCredentials); + VerifyOrExit(err == CHIP_NO_ERROR, err = CHIP_ERROR_INVALID_ARGUMENT); + } if (csrNonce != nullptr) { diff --git a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java index 477e47058bf5ac..5f85dede15a222 100644 --- a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java +++ b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java @@ -141,7 +141,7 @@ public void establishPaseConnection(long deviceId, String address, int port, lon * @param deviceId the ID of the node to be commissioned * @param networkCredentials the credentials (Wi-Fi or Thread) to be provisioned */ - public void commissionDevice(long deviceId, NetworkCredentials networkCredentials) { + public void commissionDevice(long deviceId, @Nullable NetworkCredentials networkCredentials) { commissionDevice(deviceControllerPtr, deviceId, /* csrNonce= */ null, networkCredentials); } @@ -155,7 +155,7 @@ public void commissionDevice(long deviceId, NetworkCredentials networkCredential * @param networkCredentials the credentials (Wi-Fi or Thread) to be provisioned */ public void commissionDevice( - long deviceId, @Nullable byte[] csrNonce, NetworkCredentials networkCredentials) { + long deviceId, @Nullable byte[] csrNonce, @Nullable NetworkCredentials networkCredentials) { commissionDevice(deviceControllerPtr, deviceId, csrNonce, networkCredentials); } @@ -331,7 +331,7 @@ private native void commissionDevice( long deviceControllerPtr, long deviceId, @Nullable byte[] csrNonce, - NetworkCredentials networkCredentials); + @Nullable NetworkCredentials networkCredentials); private native void unpairDevice(long deviceControllerPtr, long deviceId); From 4f84672ff7c430141393e2738b633f99763c0d82 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 18 Jan 2022 18:46:20 -0500 Subject: [PATCH 055/124] Fix compilation when a response command argument name-collides with a struct. (#13663) --- .../templates/app/CHIPClientCallbacks-src.zapt | 2 +- .../zap-generated/CHIPClientCallbacks.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/zap-templates/templates/app/CHIPClientCallbacks-src.zapt b/src/app/zap-templates/templates/app/CHIPClientCallbacks-src.zapt index 4e07abd270c089..ed842866a36702 100644 --- a/src/app/zap-templates/templates/app/CHIPClientCallbacks-src.zapt +++ b/src/app/zap-templates/templates/app/CHIPClientCallbacks-src.zapt @@ -171,7 +171,7 @@ bool emberAf{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Call GET_CLUSTER_RESPONSE_CALLBACKS("{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Callback"); Callback::Callback<{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Callback> * cb = Callback::Callback<{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Callback>::FromCancelable(onSuccessCallback); - cb->mCall(cb->mContext{{#chip_cluster_response_arguments}}, {{#if isArray}}{{asSymbol label}}{{else}}{{#if_is_struct type}}{{asUnderlyingZclType type}}(){{else}}{{asSymbol label}}{{/if_is_struct}}{{/if}}{{/chip_cluster_response_arguments}}); + cb->mCall(cb->mContext{{#chip_cluster_response_arguments}}, {{#if isArray}}{{asSymbol label}}{{else}}{{#if_is_struct type}}::{{asUnderlyingZclType type}}(){{else}}{{asSymbol label}}{{/if_is_struct}}{{/if}}{{/chip_cluster_response_arguments}}); return true; } diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp index 2747ebd5c3e560..dd20a3ee7b79d6 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp @@ -2331,7 +2331,7 @@ bool emberAfChannelClusterChangeChannelResponseCallback( Callback::Callback * cb = Callback::Callback::FromCancelable(onSuccessCallback); - cb->mCall(cb->mContext, ChannelInfo(), errorType); + cb->mCall(cb->mContext, ::ChannelInfo(), errorType); return true; } @@ -2498,7 +2498,7 @@ bool emberAfGroupKeyManagementClusterKeySetReadResponseCallback( Callback::Callback * cb = Callback::Callback::FromCancelable(onSuccessCallback); - cb->mCall(cb->mContext, GroupKeySet()); + cb->mCall(cb->mContext, ::GroupKeySet()); return true; } @@ -2897,7 +2897,7 @@ bool emberAfTestClusterClusterSimpleStructResponseCallback( Callback::Callback * cb = Callback::Callback::FromCancelable(onSuccessCallback); - cb->mCall(cb->mContext, SimpleStruct()); + cb->mCall(cb->mContext, ::SimpleStruct()); return true; } From 150c479672ddd355a8494c2c0d813f2f03d96da0 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Tue, 18 Jan 2022 17:54:22 -0800 Subject: [PATCH 056/124] Add event definitions in Access Control Cluster xml (#13667) * Add event definations in Access Control Cluster * Run codegen --- .../all-clusters-app.matter | 22 ++ .../chip/access-control-cluster.xml | 23 ++ .../data_model/controller-clusters.matter | 22 ++ .../python/chip/clusters/Objects.py | 60 ++++ .../CHIP/zap-generated/CHIPCallbackBridge.mm | 52 ++++ .../CHIPCallbackBridge_internal.h | 61 ++++ .../zap-generated/cluster-objects.cpp | 100 +++++++ .../zap-generated/cluster-objects.h | 99 +++++++ .../zap-generated/cluster/Commands.h | 265 +++++++++++++++++- 9 files changed, 699 insertions(+), 5 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index f6e3cf50fcb031..8bc60ce732b015 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 @@ -13,6 +13,12 @@ server cluster AccessControl = 31 { kGroup = 3; } + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + enum Privilege : ENUM8 { kView = 1; kProxyView = 2; @@ -40,6 +46,22 @@ server cluster AccessControl = 31 { OCTET_STRING data = 1; } + info event AccessControlEntryChanged = 0 { + fabric_idx adminFabricIndex = 0; + node_id adminNodeID = 1; + INT16U adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + AccessControlEntry latestValue = 4; + } + + info event AccessControlExtensionChanged = 1 { + fabric_idx adminFabricIndex = 0; + node_id adminNodeID = 1; + INT16U adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + ExtensionEntry latestValue = 4; + } + attribute(writable) AccessControlEntry acl[] = 0; attribute(writable) ExtensionEntry extension[] = 1; attribute(readonly) int16u clusterRevision = 65533; diff --git a/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml index fe997a4c3cda39..6b912b1de27157 100644 --- a/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml @@ -33,6 +33,13 @@ limitations under the License. + + + + + + + @@ -79,5 +86,21 @@ limitations under the License. + + The cluster SHALL send AccessControlEntryChanged events whenever its ACL attribute data is changed by an Administrator. + + + + + + + + The cluster SHALL send AccessControlExtensionChanged events whenever its extension attribute data is changed by an Administrator. + + + + + + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 43a0c50e380e18..f37ee214bc9abb 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -13,6 +13,12 @@ client cluster AccessControl = 31 { kGroup = 3; } + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + enum Privilege : ENUM8 { kView = 1; kProxyView = 2; @@ -40,6 +46,22 @@ client cluster AccessControl = 31 { OCTET_STRING data = 1; } + info event AccessControlEntryChanged = 0 { + fabric_idx adminFabricIndex = 0; + node_id adminNodeID = 1; + INT16U adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + AccessControlEntry latestValue = 4; + } + + info event AccessControlExtensionChanged = 1 { + fabric_idx adminFabricIndex = 0; + node_id adminNodeID = 1; + INT16U adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + ExtensionEntry latestValue = 4; + } + attribute(writable) AccessControlEntry acl[] = 0; attribute(writable) ExtensionEntry extension[] = 1; attribute(readonly) attrib_id attributeList[] = 65531; diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index c10a80d81e035c..c41372e5433178 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -5135,6 +5135,11 @@ class AuthMode(IntEnum): kCase = 0x02 kGroup = 0x03 + class ChangeTypeEnum(IntEnum): + kChanged = 0x00 + kAdded = 0x01 + kRemoved = 0x02 + class Privilege(IntEnum): kView = 0x01 kProxyView = 0x02 @@ -5276,6 +5281,61 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + class Events: + @dataclass + class AccessControlEntryChanged(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x001F + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="adminFabricIndex", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="adminNodeID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="adminPasscodeID", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="changeType", Tag=3, Type=AccessControl.Enums.ChangeTypeEnum), + ClusterObjectFieldDescriptor(Label="latestValue", Tag=4, Type=AccessControl.Structs.AccessControlEntry), + ]) + + adminFabricIndex: 'uint' = 0 + adminNodeID: 'uint' = 0 + adminPasscodeID: 'uint' = 0 + changeType: 'AccessControl.Enums.ChangeTypeEnum' = 0 + latestValue: 'AccessControl.Structs.AccessControlEntry' = field(default_factory=lambda: AccessControl.Structs.AccessControlEntry()) + + @dataclass + class AccessControlExtensionChanged(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x001F + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="adminFabricIndex", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="adminNodeID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="adminPasscodeID", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="changeType", Tag=3, Type=AccessControl.Enums.ChangeTypeEnum), + ClusterObjectFieldDescriptor(Label="latestValue", Tag=4, Type=AccessControl.Structs.ExtensionEntry), + ]) + + adminFabricIndex: 'uint' = 0 + adminNodeID: 'uint' = 0 + adminPasscodeID: 'uint' = 0 + changeType: 'AccessControl.Enums.ChangeTypeEnum' = 0 + latestValue: 'AccessControl.Structs.ExtensionEntry' = field(default_factory=lambda: AccessControl.Structs.ExtensionEntry()) + @dataclass class PollControl(Cluster): diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index c9fb60c87a4b87..ceddfbdd80ab0e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -6724,6 +6724,58 @@ } } +void CHIPAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::AccessControl::ChangeTypeEnum value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; + DispatchSuccess(context, objCValue); +}; + +void CHIPAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + NSNumber * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; + } + DispatchSuccess(context, objCValue); +}; + +void CHIPNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + void CHIPAccessControlClusterPrivilegeAttributeCallbackBridge::OnSuccessFn( void * context, chip::app::Clusters::AccessControl::Privilege value) { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h index 2e401162c7c2f0..86c30b46373114 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h @@ -165,6 +165,9 @@ typedef void (*NullableApplianceControlClusterWarningEventAttributeCallback)( typedef void (*AccessControlClusterAuthModeAttributeCallback)(void *, chip::app::Clusters::AccessControl::AuthMode); typedef void (*NullableAccessControlClusterAuthModeAttributeCallback)( void *, const chip::app::DataModel::Nullable &); +typedef void (*AccessControlClusterChangeTypeEnumAttributeCallback)(void *, chip::app::Clusters::AccessControl::ChangeTypeEnum); +typedef void (*NullableAccessControlClusterChangeTypeEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); typedef void (*AccessControlClusterPrivilegeAttributeCallback)(void *, chip::app::Clusters::AccessControl::Privilege); typedef void (*NullableAccessControlClusterPrivilegeAttributeCallback)( void *, const chip::app::DataModel::Nullable &); @@ -5403,6 +5406,64 @@ class CHIPNullableAccessControlClusterAuthModeAttributeCallbackSubscriptionBridg SubscriptionEstablishedHandler mEstablishedHandler; }; +class CHIPAccessControlClusterChangeTypeEnumAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, chip::app::Clusters::AccessControl::ChangeTypeEnum value); +}; + +class CHIPAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge + : public CHIPAccessControlClusterChangeTypeEnumAttributeCallbackBridge +{ +public: + CHIPAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); +}; + +class CHIPNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge + : public CHIPNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge +{ +public: + CHIPNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + class CHIPAccessControlClusterPrivilegeAttributeCallbackBridge : public CHIPCallbackBridge { 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 434c297a8fb0c0..7e95d5d2a9690c 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 @@ -4635,6 +4635,106 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } // namespace Attributes namespace Events { +namespace AccessControlEntryChanged { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAdminFabricIndex)), adminFabricIndex)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAdminNodeID)), adminNodeID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAdminPasscodeID)), adminPasscodeID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kChangeType)), changeType)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLatestValue)), latestValue)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kAdminFabricIndex): + ReturnErrorOnFailure(DataModel::Decode(reader, adminFabricIndex)); + break; + case to_underlying(Fields::kAdminNodeID): + ReturnErrorOnFailure(DataModel::Decode(reader, adminNodeID)); + break; + case to_underlying(Fields::kAdminPasscodeID): + ReturnErrorOnFailure(DataModel::Decode(reader, adminPasscodeID)); + break; + case to_underlying(Fields::kChangeType): + ReturnErrorOnFailure(DataModel::Decode(reader, changeType)); + break; + case to_underlying(Fields::kLatestValue): + ReturnErrorOnFailure(DataModel::Decode(reader, latestValue)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace AccessControlEntryChanged. +namespace AccessControlExtensionChanged { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAdminFabricIndex)), adminFabricIndex)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAdminNodeID)), adminNodeID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAdminPasscodeID)), adminPasscodeID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kChangeType)), changeType)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLatestValue)), latestValue)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kAdminFabricIndex): + ReturnErrorOnFailure(DataModel::Decode(reader, adminFabricIndex)); + break; + case to_underlying(Fields::kAdminNodeID): + ReturnErrorOnFailure(DataModel::Decode(reader, adminNodeID)); + break; + case to_underlying(Fields::kAdminPasscodeID): + ReturnErrorOnFailure(DataModel::Decode(reader, adminPasscodeID)); + break; + case to_underlying(Fields::kChangeType): + ReturnErrorOnFailure(DataModel::Decode(reader, changeType)); + break; + case to_underlying(Fields::kLatestValue): + ReturnErrorOnFailure(DataModel::Decode(reader, latestValue)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace AccessControlExtensionChanged. } // namespace Events } // namespace AccessControl 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 58bd22d5af126a..01549823f9e6bf 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 @@ -6402,6 +6402,13 @@ enum class AuthMode : uint8_t kCase = 0x02, kGroup = 0x03, }; +// Enum for ChangeTypeEnum +enum class ChangeTypeEnum : uint8_t +{ + kChanged = 0x00, + kAdded = 0x01, + kRemoved = 0x02, +}; // Enum for Privilege enum class Privilege : uint8_t { @@ -6576,6 +6583,98 @@ struct TypeInfo }; }; } // namespace Attributes +namespace Events { +namespace AccessControlEntryChanged { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +static constexpr EventId kEventId = 0x00000000; + +enum class Fields +{ + kAdminFabricIndex = 0, + kAdminNodeID = 1, + kAdminPasscodeID = 2, + kChangeType = 3, + kLatestValue = 4, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return kEventId; } + static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } + + chip::FabricIndex adminFabricIndex = static_cast(0); + chip::NodeId adminNodeID = static_cast(0); + uint16_t adminPasscodeID = static_cast(0); + ChangeTypeEnum changeType = static_cast(0); + Structs::AccessControlEntry::Type latestValue; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return kEventId; } + static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } + + chip::FabricIndex adminFabricIndex = static_cast(0); + chip::NodeId adminNodeID = static_cast(0); + uint16_t adminPasscodeID = static_cast(0); + ChangeTypeEnum changeType = static_cast(0); + Structs::AccessControlEntry::DecodableType latestValue; + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace AccessControlEntryChanged +namespace AccessControlExtensionChanged { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +static constexpr EventId kEventId = 0x00000001; + +enum class Fields +{ + kAdminFabricIndex = 0, + kAdminNodeID = 1, + kAdminPasscodeID = 2, + kChangeType = 3, + kLatestValue = 4, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return kEventId; } + static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } + + chip::FabricIndex adminFabricIndex = static_cast(0); + chip::NodeId adminNodeID = static_cast(0); + uint16_t adminPasscodeID = static_cast(0); + ChangeTypeEnum changeType = static_cast(0); + Structs::ExtensionEntry::Type latestValue; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return kEventId; } + static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } + + chip::FabricIndex adminFabricIndex = static_cast(0); + chip::NodeId adminNodeID = static_cast(0); + uint16_t adminPasscodeID = static_cast(0); + ChangeTypeEnum changeType = static_cast(0); + Structs::ExtensionEntry::DecodableType latestValue; + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace AccessControlExtensionChanged +} // namespace Events } // namespace AccessControl namespace PollControl { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 693545450dfaea..5a20477601ac5b 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -148,6 +148,10 @@ CHIP_ERROR LogValue(const char * label, size_t indent, CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::TestCluster::Structs::TestListStructOctet::DecodableType & value); +CHIP_ERROR LogValue(const char * label, size_t indent, + chip::app::Clusters::AccessControl::Events::AccessControlEntryChanged::DecodableType value); +CHIP_ERROR LogValue(const char * label, size_t indent, + chip::app::Clusters::AccessControl::Events::AccessControlExtensionChanged::DecodableType value); CHIP_ERROR LogValue(const char * label, size_t indent, chip::app::Clusters::BridgedActions::Events::StateChanged::DecodableType value); CHIP_ERROR LogValue(const char * label, size_t indent, @@ -2543,6 +2547,104 @@ CHIP_ERROR LogValue(const char * label, size_t indent, // be logging. #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-function" +CHIP_ERROR LogValue(const char * label, size_t indent, + chip::app::Clusters::AccessControl::Events::AccessControlEntryChanged::DecodableType value) +{ + ChipLogProgress(chipTool, "%s%s: {", IndentStr(indent).c_str(), label); + { + CHIP_ERROR err = LogValue("AdminFabricIndex", indent + 1, value.adminFabricIndex); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sEvent truncated due to invalid value for 'AdminFabricIndex'", + IndentStr(indent + 1).c_str()); + return err; + } + } + { + CHIP_ERROR err = LogValue("AdminNodeID", indent + 1, value.adminNodeID); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sEvent truncated due to invalid value for 'AdminNodeID'", IndentStr(indent + 1).c_str()); + return err; + } + } + { + CHIP_ERROR err = LogValue("AdminPasscodeID", indent + 1, value.adminPasscodeID); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sEvent truncated due to invalid value for 'AdminPasscodeID'", + IndentStr(indent + 1).c_str()); + return err; + } + } + { + CHIP_ERROR err = LogValue("ChangeType", indent + 1, value.changeType); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sEvent truncated due to invalid value for 'ChangeType'", IndentStr(indent + 1).c_str()); + return err; + } + } + { + CHIP_ERROR err = LogValue("LatestValue", indent + 1, value.latestValue); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sEvent truncated due to invalid value for 'LatestValue'", IndentStr(indent + 1).c_str()); + return err; + } + } + ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); + return CHIP_NO_ERROR; +} +CHIP_ERROR LogValue(const char * label, size_t indent, + chip::app::Clusters::AccessControl::Events::AccessControlExtensionChanged::DecodableType value) +{ + ChipLogProgress(chipTool, "%s%s: {", IndentStr(indent).c_str(), label); + { + CHIP_ERROR err = LogValue("AdminFabricIndex", indent + 1, value.adminFabricIndex); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sEvent truncated due to invalid value for 'AdminFabricIndex'", + IndentStr(indent + 1).c_str()); + return err; + } + } + { + CHIP_ERROR err = LogValue("AdminNodeID", indent + 1, value.adminNodeID); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sEvent truncated due to invalid value for 'AdminNodeID'", IndentStr(indent + 1).c_str()); + return err; + } + } + { + CHIP_ERROR err = LogValue("AdminPasscodeID", indent + 1, value.adminPasscodeID); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sEvent truncated due to invalid value for 'AdminPasscodeID'", + IndentStr(indent + 1).c_str()); + return err; + } + } + { + CHIP_ERROR err = LogValue("ChangeType", indent + 1, value.changeType); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sEvent truncated due to invalid value for 'ChangeType'", IndentStr(indent + 1).c_str()); + return err; + } + } + { + CHIP_ERROR err = LogValue("LatestValue", indent + 1, value.latestValue); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sEvent truncated due to invalid value for 'LatestValue'", IndentStr(indent + 1).c_str()); + return err; + } + } + ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); + return CHIP_NO_ERROR; +} CHIP_ERROR LogValue(const char * label, size_t indent, chip::app::Clusters::BridgedActions::Events::StateChanged::DecodableType value) { @@ -4516,8 +4618,157 @@ static void OnThermostatGetWeeklyScheduleResponseSuccess( | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * AccessControlEntryChanged | 0x0000 | +| * AccessControlExtensionChanged | 0x0001 | \*----------------------------------------------------------------------------*/ +/* + * Event AccessControlEntryChanged + */ +class ReadAccessControlAccessControlEntryChanged : public ModelCommand +{ +public: + ReadAccessControlAccessControlEntryChanged() : ModelCommand("read-event") + { + AddArgument("event-name", "access-control-entry-changed"); + ModelCommand::AddArguments(); + } + + ~ReadAccessControlAccessControlEntryChanged() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x001F) ReadEvent on endpoint %" PRIu8, endpointId); + + chip::Controller::AccessControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadEvent( + this, OnEventResponse, OnDefaultFailure); + } + + static void OnEventResponse(void * context, + chip::app::Clusters::AccessControl::Events::AccessControlEntryChanged::DecodableType value) + { + OnGeneralAttributeEventResponse(context, "AccessControl.AccessControlEntryChanged response", value); + } +}; + +class ReportAccessControlAccessControlEntryChanged : public ModelCommand +{ +public: + ReportAccessControlAccessControlEntryChanged() : ModelCommand("report-event") + { + AddArgument("event-name", "access-control-entry-changed"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportAccessControlAccessControlEntryChanged() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x001F) ReportEvent on endpoint %" PRIu8, endpointId); + + chip::Controller::AccessControlCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeEvent( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, + chip::app::Clusters::AccessControl::Events::AccessControlEntryChanged::DecodableType value) + { + LogValue("AccessControl.AccessControlEntryChanged report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; +/* + * Event AccessControlExtensionChanged + */ +class ReadAccessControlAccessControlExtensionChanged : public ModelCommand +{ +public: + ReadAccessControlAccessControlExtensionChanged() : ModelCommand("read-event") + { + AddArgument("event-name", "access-control-extension-changed"); + ModelCommand::AddArguments(); + } + + ~ReadAccessControlAccessControlExtensionChanged() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x001F) ReadEvent on endpoint %" PRIu8, endpointId); + + chip::Controller::AccessControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadEvent( + this, OnEventResponse, OnDefaultFailure); + } + + static void OnEventResponse(void * context, + chip::app::Clusters::AccessControl::Events::AccessControlExtensionChanged::DecodableType value) + { + OnGeneralAttributeEventResponse(context, "AccessControl.AccessControlExtensionChanged response", value); + } +}; + +class ReportAccessControlAccessControlExtensionChanged : public ModelCommand +{ +public: + ReportAccessControlAccessControlExtensionChanged() : ModelCommand("report-event") + { + AddArgument("event-name", "access-control-extension-changed"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportAccessControlAccessControlExtensionChanged() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x001F) ReportEvent on endpoint %" PRIu8, endpointId); + + chip::Controller::AccessControlCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeEvent( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport(void * context, + chip::app::Clusters::AccessControl::Events::AccessControlExtensionChanged::DecodableType value) + { + LogValue("AccessControl.AccessControlExtensionChanged report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute Acl */ @@ -59892,11 +60143,15 @@ void registerClusterAccessControl(Commands & commands) const char * clusterName = "AccessControl"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); From a04bf546e4fbaebbd21e6d1070ba0db77af219ea Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Wed, 19 Jan 2022 07:52:11 -0500 Subject: [PATCH 057/124] Add message receive and send tracing to chip-tool (#13637) * Add message receive and send tracing to chip-tool - Move tracing from SecureMessageCodec to SessionManager to allow covering both received and sent messages - Add received message tracing - Update trace handling to be flexible to receiving a context pointer. - Refactor trace handling logic in common/tracing to be more flexible to - Add bookend FinishEvent to the TraceStream interface to assist in event flushing. Testing done: - Integration tests pass, unit tests all pass - Validated manually through several runs that with chip-tool (using `--trace_log 1`) that dumped received/sent message traces match the outer higher-level (but less detailed) logs around them * Restyled by clang-format * Address review comments Co-authored-by: Restyled.io --- examples/common/tracing/TraceHandlers.cpp | 234 ++++++++++++++++-- examples/common/tracing/TraceHandlers.h | 36 ++- .../public/pw_trace_chip/trace_chip.h | 6 +- .../platform/linux/pw_trace_chip/trace.cc | 19 +- src/transport/SecureMessageCodec.cpp | 3 - src/transport/SessionManager.cpp | 19 +- src/transport/TraceMessage.h | 49 +++- src/transport/raw/MessageHeader.h | 3 + 8 files changed, 318 insertions(+), 51 deletions(-) diff --git a/examples/common/tracing/TraceHandlers.cpp b/examples/common/tracing/TraceHandlers.cpp index 5842b3dc87305a..fb131dd6d46fab 100644 --- a/examples/common/tracing/TraceHandlers.cpp +++ b/examples/common/tracing/TraceHandlers.cpp @@ -24,8 +24,13 @@ #include "pw_trace/trace.h" #include "pw_trace_chip/trace_chip.h" #include "transport/TraceMessage.h" +#include +#include #include +// For `s` std::string literal suffix +using namespace std::string_literals; + namespace chip { namespace trace { @@ -50,21 +55,30 @@ class TraceOutput void DeleteStream() { SetStream(nullptr); } - void Stream(const std::string & tag, const std::string & data) + void StartEvent(const std::string & label) + { + std::lock_guard guard(mLock); + if (mStream) + { + mStream->StartEvent(label); + } + } + + void AddField(const std::string & tag, const std::string & data) { std::lock_guard guard(mLock); if (mStream) { - mStream->Stream(tag, data); + mStream->AddField(tag, data); } } - void Handler(const std::string & label) + void FinishEvent() { std::lock_guard guard(mLock); if (mStream) { - mStream->Handler(label); + mStream->FinishEvent(); } } @@ -73,42 +87,228 @@ class TraceOutput TraceStream * mStream = nullptr; }; -TraceOutput output; +struct TraceHandlerContext +{ + TraceOutput * sink; +}; + +TraceOutput gTraceOutput; +TraceHandlerContext gTraceHandlerContext = { .sink = &gTraceOutput }; -// TODO: Framework this into a registry of handlers for different message types. -bool TraceDefaultHandler(const TraceEventFields & trace) +std::string AsJsonKey(const std::string & key, const std::string & value, bool prepend_comma) +{ + return (prepend_comma ? ", "s : ""s) + "\""s + key + "\": " + value; +} + +std::string AsFirstJsonKey(const std::string & key, const std::string & value) +{ + return AsJsonKey(key, value, /* prepend_comma = */ false); +} + +std::string AsNextJsonKey(const std::string & key, const std::string & value) +{ + return AsJsonKey(key, value, /* prepend_comma = */ true); +} + +std::string AsJsonString(const std::string & value) +{ + return "\""s + value + "\""s; +} + +std::string AsJsonString(const Transport::PeerAddress * peerAddress) +{ + char convBuf[Transport::PeerAddress::kMaxToStringSize] = { 0 }; + + peerAddress->ToString(convBuf); + return AsJsonString(convBuf); +} + +std::string AsJsonBool(bool isTrue) +{ + return isTrue ? "true"s : "false"s; +} + +std::string AsJsonHexString(const uint8_t * buf, size_t bufLen) +{ + // Fill a string long enough for the hex conversion, that will be overwritten + std::string hexBuf(2 * bufLen, '0'); + + CHIP_ERROR status = Encoding::BytesToLowercaseHexBuffer(buf, bufLen, hexBuf.data(), hexBuf.size()); + + // Static conditions exist that should ensure never failing. Catch failure in an assert. + VerifyOrDie(status == CHIP_NO_ERROR); + + return AsJsonString(hexBuf); +} + +std::string PacketHeaderToJson(const PacketHeader * packetHeader) +{ + std::string jsonBody; + + uint32_t messageCounter = packetHeader->GetMessageCounter(); + jsonBody += AsFirstJsonKey("msg_counter", std::to_string(messageCounter)); + + const Optional & sourceNodeId = packetHeader->GetSourceNodeId(); + if (sourceNodeId.HasValue()) + { + jsonBody += AsNextJsonKey("source_node_id", std::to_string(sourceNodeId.Value())); + } + + uint16_t sessionId = packetHeader->GetSessionId(); + const Optional & groupId = packetHeader->GetDestinationGroupId(); + const Optional & destNodeId = packetHeader->GetDestinationNodeId(); + if (packetHeader->IsValidGroupMsg()) + { + if (groupId.HasValue()) + { + jsonBody += AsNextJsonKey("group_id", std::to_string(groupId.Value())); + } + + jsonBody += AsNextJsonKey("group_key_hash", std::to_string(sessionId)); + } + else if (destNodeId.HasValue()) + { + jsonBody += AsNextJsonKey("dest_node_id", std::to_string(destNodeId.Value())); + } + + jsonBody += AsNextJsonKey("session_id", std::to_string(sessionId)); + + uint8_t messageFlags = packetHeader->GetMessageFlags(); + jsonBody += AsNextJsonKey("msg_flags", std::to_string(messageFlags)); + + uint8_t securityFlags = packetHeader->GetSecurityFlags(); + jsonBody += AsNextJsonKey("security_flags", std::to_string(securityFlags)); + + return jsonBody; +} + +std::string PayloadHeaderToJson(const PayloadHeader * payloadHeader) +{ + + std::string jsonBody; + + uint8_t exchangeFlags = payloadHeader->GetExhangeFlags(); + jsonBody += AsFirstJsonKey("exchange_flags", std::to_string(exchangeFlags)); + + uint16_t exchangeId = payloadHeader->GetExchangeID(); + jsonBody += AsNextJsonKey("exchange_id", std::to_string(exchangeId)); + + uint32_t protocolId = payloadHeader->GetProtocolID().ToFullyQualifiedSpecForm(); + jsonBody += AsNextJsonKey("protocol_id", std::to_string(protocolId)); + + uint8_t protocolOpcode = payloadHeader->GetMessageType(); + jsonBody += AsNextJsonKey("protocol_opcode", std::to_string(protocolOpcode)); + + bool isInitiator = payloadHeader->IsInitiator(); + jsonBody += AsNextJsonKey("is_initiator", AsJsonBool(isInitiator)); + + bool needsAck = payloadHeader->NeedsAck(); + jsonBody += AsNextJsonKey("is_ack_requested", AsJsonBool(needsAck)); + + const Optional & acknowledgedMessageCounter = payloadHeader->GetAckMessageCounter(); + if (acknowledgedMessageCounter.HasValue()) + { + jsonBody += AsNextJsonKey("acknowledged_msg_counter", std::to_string(acknowledgedMessageCounter.Value())); + } + + return jsonBody; +} + +bool SecureMessageSentHandler(const TraceEventFields & eventFields, TraceHandlerContext * context) +{ + if (eventFields.dataSize != sizeof(TraceSecureMessageSentData)) + { + return false; + } + + const auto * eventData = reinterpret_cast(eventFields.dataBuffer); + std::string jsonBody = "{"; + jsonBody += PacketHeaderToJson(eventData->packetHeader); + jsonBody += ", "; + jsonBody += PayloadHeaderToJson(eventData->payloadHeader); + jsonBody += ", "; + jsonBody += AsFirstJsonKey("payload_size", std::to_string(eventData->packetSize)); + jsonBody += ", "; + jsonBody += AsFirstJsonKey("payload_hex", AsJsonHexString(eventData->packetPayload, eventData->packetSize)); + jsonBody += "}"; + + TraceOutput * sink = context->sink; + sink->StartEvent(std::string{ kTraceMessageEvent } + "." + kTraceMessageSentDataFormat); + sink->AddField("json", jsonBody); + sink->FinishEvent(); + + return true; +} + +bool SecureMessageReceivedHandler(const TraceEventFields & eventFields, TraceHandlerContext * context) { - if (strcmp(trace.dataFormat, kTraceSecureMessageDataFormat) != 0 || trace.dataSize != sizeof(TraceSecureMessageData)) + if (eventFields.dataSize != sizeof(TraceSecureMessageReceivedData)) { return false; } - const TraceSecureMessageData * msg = reinterpret_cast(trace.dataBuffer); - output.Handler("Default"); - output.Stream("ExchangeId", std::to_string(msg->payloadHeader->GetExchangeID())); - output.Stream("MsgType", std::to_string(msg->payloadHeader->GetMessageType())); - output.Stream("MessageCounter", std::to_string(msg->packetHeader->GetMessageCounter())); - output.Stream("PacketSize", std::to_string(msg->packetSize)); + const auto * eventData = reinterpret_cast(eventFields.dataBuffer); + + std::string jsonBody = "{"; + jsonBody += AsFirstJsonKey("peer_address", AsJsonString(eventData->peerAddress)); + jsonBody += ", "; + jsonBody += PacketHeaderToJson(eventData->packetHeader); + jsonBody += ", "; + jsonBody += PayloadHeaderToJson(eventData->payloadHeader); + jsonBody += ", "; + jsonBody += AsFirstJsonKey("payload_size", std::to_string(eventData->packetSize)); + jsonBody += ", "; + jsonBody += AsFirstJsonKey("payload_hex", AsJsonHexString(eventData->packetPayload, eventData->packetSize)); + jsonBody += "}"; + + TraceOutput * sink = context->sink; + sink->StartEvent(std::string{ kTraceMessageEvent } + "." + kTraceMessageReceivedDataFormat); + sink->AddField("json", jsonBody); + sink->FinishEvent(); + + // Note that `eventData->session` is currently ignored. return true; } +// TODO: Framework this into a registry of handlers for different message types. +bool TraceDefaultHandler(const TraceEventFields & eventFields, void * context) +{ + TraceHandlerContext * ourContext = reinterpret_cast(context); + if (ourContext == nullptr) + { + return false; + } + + if (std::string{ eventFields.dataFormat } == kTraceMessageSentDataFormat) + { + return SecureMessageSentHandler(eventFields, ourContext); + } + else if (std::string{ eventFields.dataFormat } == kTraceMessageReceivedDataFormat) + { + return SecureMessageReceivedHandler(eventFields, ourContext); + } + + return false; +} + } // namespace void SetTraceStream(TraceStream * stream) { - output.SetStream(stream); + gTraceOutput.SetStream(stream); } void InitTrace() { - RegisterTraceHandler(TraceDefaultHandler); + void * context = &gTraceHandlerContext; + RegisterTraceHandler(TraceDefaultHandler, context); } void DeInitTrace() { UnregisterAllTraceHandlers(); - output.DeleteStream(); + gTraceOutput.DeleteStream(); } } // namespace trace diff --git a/examples/common/tracing/TraceHandlers.h b/examples/common/tracing/TraceHandlers.h index 434f253b62a014..fb60e3e4db316d 100644 --- a/examples/common/tracing/TraceHandlers.h +++ b/examples/common/tracing/TraceHandlers.h @@ -28,19 +28,32 @@ namespace trace { class TraceStream { public: - virtual ~TraceStream() = default; - virtual void Stream(const std::string & tag, const std::string & data) = 0; - virtual void Handler(const std::string & label) = 0; + virtual ~TraceStream() = default; + virtual void StartEvent(const std::string & label) = 0; + virtual void AddField(const std::string & tag, const std::string & data) = 0; + virtual void FinishEvent() = 0; }; class TraceStreamLog : public TraceStream { public: - void Stream(const std::string & tag, const std::string & data) override + void StartEvent(const std::string & label) override { - ChipLogAutomation(" %s: %s", tag.data(), data.data()); + mStreamLine = ">>>" + label + "<<<\t"; + mIsFirstField = true; } - void Handler(const std::string & label) override { ChipLogAutomation("%s", label.data()); } + + void AddField(const std::string & tag, const std::string & data) override + { + mStreamLine += (mIsFirstField ? "" : "\t") + tag + "|" + data; + mIsFirstField = false; + } + + void FinishEvent() override { ChipLogAutomation("TraceStream:%s", mStreamLine.c_str()); } + +protected: + std::string mStreamLine; + bool mIsFirstField = true; }; class TraceStreamFile : public TraceStream @@ -49,25 +62,28 @@ class TraceStreamFile : public TraceStream TraceStreamFile(const char * fileName) { mFile.open(fileName); } ~TraceStreamFile() { mFile.close(); } - void Stream(const std::string & tag, const std::string & data) override + void AddField(const std::string & tag, const std::string & data) override { if (mFile.is_open()) { - mFile << " " << tag.data() << ": " << data.data() << "\n"; + mFile << " " << tag.data() << "\t" << data.data() << "\n"; mFile.flush(); } } - void Handler(const std::string & label) override + + void StartEvent(const std::string & label) override { if (mFile.is_open()) { struct timeval tv; gettimeofday(&tv, nullptr); - mFile << label << " [" << tv.tv_sec << "." << tv.tv_usec << "]\n"; + mFile << "\f[" << tv.tv_sec << "." << tv.tv_usec << "]\t" << label << "\n"; mFile.flush(); } } + void FinishEvent() override {} + private: std::ofstream mFile; }; diff --git a/examples/platform/linux/pw_trace_chip/public/pw_trace_chip/trace_chip.h b/examples/platform/linux/pw_trace_chip/public/pw_trace_chip/trace_chip.h index 3eca6335360c6f..c65899c29b0e0e 100644 --- a/examples/platform/linux/pw_trace_chip/public/pw_trace_chip/trace_chip.h +++ b/examples/platform/linux/pw_trace_chip/public/pw_trace_chip/trace_chip.h @@ -69,10 +69,10 @@ struct TraceEventFields size_t dataSize; }; -typedef bool (*TraceHandlerCallback)(const TraceEventFields & trace); +typedef bool (*TraceHandlerCallback)(const TraceEventFields & eventFields, void * context); -// Register a trace handler which gets called for all data trace events. -void RegisterTraceHandler(TraceHandlerCallback callback); +// Register an additional trace handler which gets called for all data trace events with the given context +void RegisterTraceHandler(TraceHandlerCallback callback, void * context); void UnregisterAllTraceHandlers(); // These are what the facade actually calls. diff --git a/examples/platform/linux/pw_trace_chip/trace.cc b/examples/platform/linux/pw_trace_chip/trace.cc index 427f22d3f5e80d..bf005c518933fd 100644 --- a/examples/platform/linux/pw_trace_chip/trace.cc +++ b/examples/platform/linux/pw_trace_chip/trace.cc @@ -25,31 +25,40 @@ namespace chip { namespace trace { + namespace { +struct TraceHandlerEntry +{ + // Handler callback that will receive the event + TraceHandlerCallback callback; + // Registration-time context provided for the given handler + void * context; +}; + std::mutex handlerLock; -std::vector traceHandlers; +std::vector traceHandlers; } // namespace void TraceEvent(const char * module, const char * label, TraceEventType eventType, const char * group, uint32_t traceId, uint8_t flags, const char * dataFormat, const void * dataBuffer, size_t dataSize) { - TraceEventFields fields = { module, label, eventType, group, traceId, flags, dataFormat, dataBuffer, dataSize }; + TraceEventFields eventFields = { module, label, eventType, group, traceId, flags, dataFormat, dataBuffer, dataSize }; std::lock_guard guard(handlerLock); for (const auto & handler : traceHandlers) { - if (handler(fields)) + if (handler.callback(eventFields, handler.context)) { return; } } } -void RegisterTraceHandler(TraceHandlerCallback callback) +void RegisterTraceHandler(TraceHandlerCallback callback, void * context) { std::lock_guard guard(handlerLock); - traceHandlers.push_back(callback); + traceHandlers.push_back(TraceHandlerEntry{ callback, context }); } void UnregisterAllTraceHandlers() diff --git a/src/transport/SecureMessageCodec.cpp b/src/transport/SecureMessageCodec.cpp index 3fb6775311fd3d..5ae7a56d3eee19 100644 --- a/src/transport/SecureMessageCodec.cpp +++ b/src/transport/SecureMessageCodec.cpp @@ -29,8 +29,6 @@ #include #include -#include "transport/TraceMessage.h" - namespace chip { using System::PacketBuffer; @@ -53,7 +51,6 @@ CHIP_ERROR Encrypt(Transport::SecureSession * session, PayloadHeader & payloadHe uint8_t * data = msgBuf->Start(); uint16_t totalLen = msgBuf->TotalLength(); - CHIP_TRACE_MESSAGE(payloadHeader, packetHeader, data, totalLen); MessageAuthenticationCode mac; ReturnErrorOnFailure(session->EncryptBeforeSend(data, totalLen, data, packetHeader, mac)); diff --git a/src/transport/SessionManager.cpp b/src/transport/SessionManager.cpp index 25a195ff3fca9e..2aca1cdcaf8445 100644 --- a/src/transport/SessionManager.cpp +++ b/src/transport/SessionManager.cpp @@ -29,6 +29,7 @@ #include #include +#include "transport/TraceMessage.h" #include #include #include @@ -135,6 +136,10 @@ CHIP_ERROR SessionManager::PrepareMessage(const SessionHandle & sessionHandle, P { return CHIP_ERROR_INTERNAL; } + + // Trace before any encryption + CHIP_TRACE_MESSAGE_SENT(payloadHeader, packetHeader, message->Start(), message->TotalLength()); + // TODO #11911 Update SecureMessageCodec::Encrypt for Group ReturnErrorOnFailure(payloadHeader.EncodeBeforeData(message)); @@ -158,6 +163,9 @@ CHIP_ERROR SessionManager::PrepareMessage(const SessionHandle & sessionHandle, P .SetSessionId(session->GetPeerSessionId()) // .SetSessionType(Header::SessionType::kUnicastSession); + // Trace before any encryption + CHIP_TRACE_MESSAGE_SENT(payloadHeader, packetHeader, message->Start(), message->TotalLength()); + ReturnErrorOnFailure(SecureMessageCodec::Encrypt(session, payloadHeader, packetHeader, message)); ReturnErrorOnFailure(counter.Advance()); @@ -168,14 +176,16 @@ CHIP_ERROR SessionManager::PrepareMessage(const SessionHandle & sessionHandle, P } break; case Transport::Session::SessionType::kUnauthenticated: { - ReturnErrorOnFailure(payloadHeader.EncodeBeforeData(message)); - MessageCounter & counter = mGlobalUnencryptedMessageCounter; uint32_t messageCounter = counter.Value(); ReturnErrorOnFailure(counter.Advance()); - packetHeader.SetMessageCounter(messageCounter); + // Trace after all headers are settled. + CHIP_TRACE_MESSAGE_SENT(payloadHeader, packetHeader, message->Start(), message->TotalLength()); + + ReturnErrorOnFailure(payloadHeader.EncodeBeforeData(message)); + #if CHIP_PROGRESS_LOGGING destination = kUndefinedNodeId; fabricIndex = kUndefinedFabricIndex; @@ -457,6 +467,7 @@ void SessionManager::MessageDispatch(const PacketHeader & packetHeader, const Tr if (mCB != nullptr) { + CHIP_TRACE_MESSAGE_RECEIVED(payloadHeader, packetHeader, unsecuredSession, peerAddress, msg->Start(), msg->TotalLength()); mCB->OnMessageReceived(packetHeader, payloadHeader, session, peerAddress, isDuplicate, std::move(msg)); } } @@ -532,6 +543,7 @@ void SessionManager::SecureUnicastMessageDispatch(const PacketHeader & packetHea if (mCB != nullptr) { + CHIP_TRACE_MESSAGE_RECEIVED(payloadHeader, packetHeader, secureSession, peerAddress, msg->Start(), msg->TotalLength()); mCB->OnMessageReceived(packetHeader, payloadHeader, session.Value(), peerAddress, isDuplicate, std::move(msg)); } } @@ -609,6 +621,7 @@ void SessionManager::SecureGroupMessageDispatch(const PacketHeader & packetHeade VerifyOrReturn(session.HasValue(), ChipLogError(Inet, "Error when creating group session handle.")); Transport::GroupSession * groupSession = session.Value()->AsGroupSession(); + CHIP_TRACE_MESSAGE_RECEIVED(payloadHeader, packetHeader, groupSession, peerAddress, msg->Start(), msg->TotalLength()); mCB->OnMessageReceived(packetHeader, payloadHeader, session.Value(), peerAddress, isDuplicate, std::move(msg)); RemoveGroupSession(groupSession); diff --git a/src/transport/TraceMessage.h b/src/transport/TraceMessage.h index b59ba910e76e72..0863bf0cc9cec8 100644 --- a/src/transport/TraceMessage.h +++ b/src/transport/TraceMessage.h @@ -19,20 +19,37 @@ #pragma once #include +#include #include +#include #if CHIP_CONFIG_TRANSPORT_TRACE_ENABLED #include "pw_trace/trace.h" -#define CHIP_TRACE_MESSAGE(payloadHeader, packetHeader, data, dataLen) \ +#define CHIP_TRACE_MESSAGE_SENT(payloadHeader, packetHeader, data, dataLen) \ do \ { \ - ::chip::trace::TraceSecureMessageData _trace_data{ &payloadHeader, &packetHeader, data, dataLen }; \ - PW_TRACE_INSTANT_DATA("SecureMsg", ::chip::trace::kTraceSecureMessageDataFormat, \ - reinterpret_cast(&_trace_data), sizeof(_trace_data)); \ + const ::chip::trace::TraceSecureMessageSentData _trace_data{ &payloadHeader, &packetHeader, data, dataLen }; \ + PW_TRACE_INSTANT_DATA("SecureMsg", ::chip::trace::kTraceMessageSentDataFormat, \ + reinterpret_cast(&_trace_data), sizeof(_trace_data)); \ } while (0) + +#define CHIP_TRACE_MESSAGE_RECEIVED(payloadHeader, packetHeader, session, peerAddress, data, dataLen) \ + do \ + { \ + const ::chip::trace::TraceSecureMessageReceivedData _trace_data{ &payloadHeader, &packetHeader, session, \ + &peerAddress, data, dataLen }; \ + PW_TRACE_INSTANT_DATA("SecureMsg", ::chip::trace::kTraceMessageReceivedDataFormat, \ + reinterpret_cast(&_trace_data), sizeof(_trace_data)); \ + } while (0) + #else -#define CHIP_TRACE_MESSAGE(payloadHeader, packetHeader, data, dataLen) \ +#define CHIP_TRACE_MESSAGE_SENT(payloadHeader, packetHeader, data, dataLen) \ + do \ + { \ + } while (0) + +#define CHIP_TRACE_MESSAGE_RECEIVED(payloadHeader, packetHeader, session, peerAddress, data, dataLen) \ do \ { \ } while (0) @@ -42,13 +59,25 @@ namespace chip { namespace trace { -constexpr const char * kTraceSecureMessageDataFormat = "SecMsg"; +constexpr const char * kTraceMessageEvent = "SecureMsg"; +constexpr const char * kTraceMessageSentDataFormat = "SecMsgSent"; +constexpr const char * kTraceMessageReceivedDataFormat = "SecMsgReceived"; + +struct TraceSecureMessageSentData +{ + const PayloadHeader * payloadHeader; + const PacketHeader * packetHeader; + const uint8_t * packetPayload; + size_t packetSize; +}; -struct TraceSecureMessageData +struct TraceSecureMessageReceivedData { - PayloadHeader * payloadHeader; - PacketHeader * packetHeader; - uint8_t * packetPayload; + const PayloadHeader * payloadHeader; + const PacketHeader * packetHeader; + const Transport::Session * session; + const Transport::PeerAddress * peerAddress; + const uint8_t * packetPayload; size_t packetSize; }; diff --git a/src/transport/raw/MessageHeader.h b/src/transport/raw/MessageHeader.h index 14e49272db62b3..e5e048855d5060 100644 --- a/src/transport/raw/MessageHeader.h +++ b/src/transport/raw/MessageHeader.h @@ -439,6 +439,9 @@ class PayloadHeader /** Get the secure msg type from this header. */ uint8_t GetMessageType() const { return mMessageType; } + /** Get the raw exchange flags from this header. */ + uint8_t GetExhangeFlags() const { return mExchangeFlags.Raw(); } + /** Check whether the header has a given secure message type */ bool HasMessageType(uint8_t type) const { return mMessageType == type; } template ::value>> From fe55a3db844103ba40bcee67ad51868433834843 Mon Sep 17 00:00:00 2001 From: Song GUO Date: Thu, 20 Jan 2022 00:05:08 +0800 Subject: [PATCH 058/124] [Java] Move ZCL Write API to separate file to avoid OOM during Android build (#13686) * Split Write functions for Java * Run Codegen --- src/controller/java/BUILD.gn | 1 + .../java/templates/CHIPClusters-JNI.zapt | 41 - .../java/templates/CHIPClustersWrite-JNI.zapt | 74 + src/controller/java/templates/templates.json | 5 + .../java/zap-generated/CHIPClusters-JNI.cpp | 20369 ++++++---------- .../zap-generated/CHIPClustersWrite-JNI.cpp | 6345 +++++ 6 files changed, 13459 insertions(+), 13376 deletions(-) create mode 100644 src/controller/java/templates/CHIPClustersWrite-JNI.zapt create mode 100644 src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index 697a49f1b433db..5d9b6f8a0db893 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -34,6 +34,7 @@ shared_library("jni") { "CHIPDeviceController-JNI.cpp", "zap-generated/CHIPClusters-JNI.cpp", "zap-generated/CHIPClustersRead-JNI.cpp", + "zap-generated/CHIPClustersWrite-JNI.cpp", "zap-generated/CHIPInvokeCallbacks.cpp", "zap-generated/CHIPInvokeCallbacks.h", "zap-generated/CHIPReadCallbacks.cpp", diff --git a/src/controller/java/templates/CHIPClusters-JNI.zapt b/src/controller/java/templates/CHIPClusters-JNI.zapt index 7ae507f0d7e56a..9c5fb5bff7fcce 100644 --- a/src/controller/java/templates/CHIPClusters-JNI.zapt +++ b/src/controller/java/templates/CHIPClusters-JNI.zapt @@ -87,47 +87,6 @@ JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, {{asLowerCamelCase name}}) {{/chip_cluster_commands}} {{#chip_server_cluster_attributes}} {{#unless (isStrEqual chipCallback.name "Unsupported")}} -{{#if isWritableAttribute}} -{{! TODO: Lists not supported in attribute writes yet. }} -{{#unless isList}} - -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; - using TypeInfo = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; - TypeInfo::Type cppValue; - - {{>encode_value target="cppValue" source="value" cluster=parent.name}} - - std::unique_ptr onSuccess(Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure(Platform::New(callback), Platform::Delete); - VerifyOrReturn(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(); -} -{{/unless}} -{{/if}} {{#if isReportableAttribute}} {{#unless isList}} JNI_METHOD(void, {{asCamelCased ../name false}}Cluster, subscribe{{asCamelCased name false}}Attribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) diff --git a/src/controller/java/templates/CHIPClustersWrite-JNI.zapt b/src/controller/java/templates/CHIPClustersWrite-JNI.zapt new file mode 100644 index 00000000000000..d6cf240b496302 --- /dev/null +++ b/src/controller/java/templates/CHIPClustersWrite-JNI.zapt @@ -0,0 +1,74 @@ +{{> header}} +{{#if (chip_has_client_clusters)}} +#include "CHIPCallbackTypes.h" +#include "CHIPInvokeCallbacks.h" +#include "CHIPReadCallbacks.h" + +#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 namespace chip::Controller; + +{{#chip_client_clusters}} +{{#chip_server_cluster_attributes}} +{{#unless (isStrEqual chipCallback.name "Unsupported")}} +{{#if isWritableAttribute}} +{{! TODO: Lists not supported in attribute writes yet. }} +{{#unless isList}} + +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; + using TypeInfo = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; + TypeInfo::Type cppValue; + + {{>encode_value target="cppValue" source="value" cluster=parent.name}} + + std::unique_ptr onSuccess(Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure(Platform::New(callback), Platform::Delete); + VerifyOrReturn(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(); +} +{{/unless}} +{{/if}} +{{/unless}} +{{/chip_server_cluster_attributes}} +{{/chip_client_clusters}} +{{/if}} diff --git a/src/controller/java/templates/templates.json b/src/controller/java/templates/templates.json index 67884e239c724d..d7cc8dfb9cc88d 100644 --- a/src/controller/java/templates/templates.json +++ b/src/controller/java/templates/templates.json @@ -71,6 +71,11 @@ "name": "CHIP ZCL API for Java (native code for reads)", "output": "src/controller/java/zap-generated/CHIPClustersRead-JNI.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.zapt", "name": "CHIP cluster attribute read callback for Java (native code)", diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index 35460734475ca5..7d7a7c1a0394f3 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -1741,53 +1741,6 @@ JNI_METHOD(void, BasicCluster, subscribeProductIDAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, BasicCluster, writeNodeLabelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::Basic::Attributes::NodeLabel::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = chip::JniUtfString(env, static_cast(value)).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; - BasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, BasicCluster, subscribeNodeLabelAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -1824,53 +1777,6 @@ JNI_METHOD(void, BasicCluster, subscribeNodeLabelAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, BasicCluster, writeLocationAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::Basic::Attributes::Location::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = chip::JniUtfString(env, static_cast(value)).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; - BasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, BasicCluster, subscribeLocationAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -2238,53 +2144,6 @@ JNI_METHOD(void, BasicCluster, subscribeSerialNumberAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, BasicCluster, writeLocalConfigDisabledAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::Basic::Attributes::LocalConfigDisabled::TypeInfo; - TypeInfo::Type cppValue; - - 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; - BasicCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, BasicCluster, subscribeLocalConfigDisabledAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -2440,52 +2299,6 @@ JNI_METHOD(jlong, BinaryInputBasicCluster, initWithDevice)(JNIEnv * env, jobject return reinterpret_cast(cppCluster); } -JNI_METHOD(void, BinaryInputBasicCluster, writeOutOfServiceAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::OutOfService::TypeInfo; - TypeInfo::Type cppValue; - - 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, subscribeOutOfServiceAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -2523,53 +2336,6 @@ JNI_METHOD(void, BinaryInputBasicCluster, subscribeOutOfServiceAttribute) 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; - using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::PresentValue::TypeInfo; - TypeInfo::Type cppValue; - - 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, subscribePresentValueAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -5199,53 +4965,6 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorModeAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ColorControlCluster, writeColorControlOptionsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorControlOptions::TypeInfo; - TypeInfo::Type cppValue; - - 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, subscribeColorControlOptionsAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -5986,24 +5705,18 @@ JNI_METHOD(void, ColorControlCluster, subscribePrimary6IntensityAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ColorControlCluster, writeWhitePointXAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ColorControlCluster, subscribeWhitePointXAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::WhitePointX::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -6014,26 +5727,22 @@ JNI_METHOD(void, ColorControlCluster, writeWhitePointXAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::WhitePointX::TypeInfo; + 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)); + 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(); } -JNI_METHOD(void, ColorControlCluster, subscribeWhitePointXAttribute) +JNI_METHOD(void, ColorControlCluster, subscribeWhitePointYAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -6055,9 +5764,9 @@ JNI_METHOD(void, ColorControlCluster, subscribeWhitePointXAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::WhitePointX::TypeInfo; + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::WhitePointY::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -6070,24 +5779,18 @@ JNI_METHOD(void, ColorControlCluster, subscribeWhitePointXAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ColorControlCluster, writeWhitePointYAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ColorControlCluster, subscribeColorPointRXAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::WhitePointY::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -6098,26 +5801,22 @@ JNI_METHOD(void, ColorControlCluster, writeWhitePointYAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::TypeInfo; + 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)); + 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(); } -JNI_METHOD(void, ColorControlCluster, subscribeWhitePointYAttribute) +JNI_METHOD(void, ColorControlCluster, subscribeColorPointRYAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -6139,9 +5838,9 @@ JNI_METHOD(void, ColorControlCluster, subscribeWhitePointYAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::WhitePointY::TypeInfo; + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -6154,24 +5853,18 @@ JNI_METHOD(void, ColorControlCluster, subscribeWhitePointYAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ColorControlCluster, writeColorPointRXAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ColorControlCluster, subscribeColorPointRIntensityAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -6182,26 +5875,22 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointRXAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + 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)); + 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, ColorControlCluster, subscribeColorPointRXAttribute) +JNI_METHOD(void, ColorControlCluster, subscribeColorPointGXAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -6223,9 +5912,9 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointRXAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::TypeInfo; + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -6238,24 +5927,18 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointRXAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ColorControlCluster, writeColorPointRYAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ColorControlCluster, subscribeColorPointGYAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -6266,31 +5949,27 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointRYAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::TypeInfo; + 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)); + 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(); } -JNI_METHOD(void, ColorControlCluster, subscribeColorPointRYAttribute) +JNI_METHOD(void, ColorControlCluster, subscribeColorPointGIntensityAttribute) (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); + 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)); @@ -6307,14 +5986,14 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointRYAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::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); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -6322,24 +6001,18 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointRYAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ColorControlCluster, writeColorPointRIntensityAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ColorControlCluster, subscribeColorPointBXAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -6350,31 +6023,27 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointRIntensityAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::TypeInfo; + 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)); + 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(); } -JNI_METHOD(void, ColorControlCluster, subscribeColorPointRIntensityAttribute) +JNI_METHOD(void, ColorControlCluster, subscribeColorPointBYAttribute) (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); + 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)); @@ -6391,14 +6060,14 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointRIntensityAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::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); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -6406,24 +6075,18 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointRIntensityAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ColorControlCluster, writeColorPointGXAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ColorControlCluster, subscribeColorPointBIntensityAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -6434,26 +6097,22 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointGXAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + 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)); + 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, ColorControlCluster, subscribeColorPointGXAttribute) +JNI_METHOD(void, ColorControlCluster, subscribeEnhancedCurrentHueAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -6475,9 +6134,9 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointGXAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::EnhancedCurrentHue::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, @@ -6490,24 +6149,18 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointGXAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ColorControlCluster, writeColorPointGYAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ColorControlCluster, subscribeEnhancedColorModeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -6518,31 +6171,27 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointGYAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::EnhancedColorMode::TypeInfo; + 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)); + 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, ColorControlCluster, subscribeColorPointGYAttribute) +JNI_METHOD(void, ColorControlCluster, subscribeColorLoopActiveAttribute) (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); + 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)); @@ -6559,14 +6208,14 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointGYAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::TypeInfo; + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorLoopActive::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -6574,24 +6223,18 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointGYAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ColorControlCluster, writeColorPointGIntensityAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ColorControlCluster, subscribeColorLoopDirectionAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -6602,31 +6245,27 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointGIntensityAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorLoopDirection::TypeInfo; + 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)); + 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, ColorControlCluster, subscribeColorPointGIntensityAttribute) +JNI_METHOD(void, ColorControlCluster, subscribeColorLoopTimeAttribute) (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); + 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)); @@ -6643,14 +6282,14 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointGIntensityAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorLoopTime::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); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -6658,24 +6297,18 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointGIntensityAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ColorControlCluster, writeColorPointBXAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ColorControlCluster, subscribeColorLoopStartEnhancedHueAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -6686,26 +6319,23 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointBXAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could 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)); + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorLoopStartEnhancedHue::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(); } -JNI_METHOD(void, ColorControlCluster, subscribeColorPointBXAttribute) +JNI_METHOD(void, ColorControlCluster, subscribeColorLoopStoredEnhancedHueAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -6727,9 +6357,10 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointBXAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::TypeInfo; + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -6742,24 +6373,18 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointBXAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ColorControlCluster, writeColorPointBYAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ColorControlCluster, subscribeColorCapabilitiesAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -6770,26 +6395,22 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointBYAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorCapabilities::TypeInfo; + 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)); + 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(); } -JNI_METHOD(void, ColorControlCluster, subscribeColorPointBYAttribute) +JNI_METHOD(void, ColorControlCluster, subscribeColorTempPhysicalMinAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -6811,9 +6432,9 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointBYAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMin::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, @@ -6826,24 +6447,18 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointBYAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ColorControlCluster, writeColorPointBIntensityAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ColorControlCluster, subscribeColorTempPhysicalMaxAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -6854,31 +6469,27 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointBIntensityAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMax::TypeInfo; + 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)); + 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(); } -JNI_METHOD(void, ColorControlCluster, subscribeColorPointBIntensityAttribute) +JNI_METHOD(void, ColorControlCluster, subscribeCoupleColorTempToLevelMinMiredsAttribute) (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); + 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)); @@ -6895,14 +6506,15 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointBIntensityAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::CoupleColorTempToLevelMinMireds::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); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -6910,7 +6522,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorPointBIntensityAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ColorControlCluster, subscribeEnhancedCurrentHueAttribute) +JNI_METHOD(void, ColorControlCluster, subscribeStartUpColorTemperatureMiredsAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -6932,9 +6544,10 @@ JNI_METHOD(void, ColorControlCluster, subscribeEnhancedCurrentHueAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::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, @@ -6947,12 +6560,12 @@ JNI_METHOD(void, ColorControlCluster, subscribeEnhancedCurrentHueAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ColorControlCluster, subscribeEnhancedColorModeAttribute) +JNI_METHOD(void, ColorControlCluster, subscribeClusterRevisionAttribute) (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); + 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)); @@ -6969,14 +6582,14 @@ JNI_METHOD(void, ColorControlCluster, subscribeEnhancedColorModeAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::EnhancedColorMode::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ClusterRevision::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); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -6984,49 +6597,123 @@ JNI_METHOD(void, ColorControlCluster, subscribeEnhancedColorModeAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ColorControlCluster, subscribeColorLoopActiveAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(jlong, ContentLauncherCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + ContentLauncherCluster * cppCluster = new ContentLauncherCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, ContentLauncherCluster, launchContentRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject autoPlay, jstring data, jobject parameterList, + jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + ContentLauncherCluster * cppCluster; + + chip::app::Clusters::ContentLauncher::Commands::LaunchContentRequest::Type request; + + request.autoPlay = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(autoPlay)); + request.data = chip::JniUtfString(env, static_cast(data)).charSpan(); + request.search = chip::app::DataModel::List(); + + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + 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(); +} +JNI_METHOD(void, ContentLauncherCluster, launchURLRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring contentURL, jstring displayString, jstring providerName, + jobject background, jobject logo, jobject progressBar, jobject splash, jobject waterMark, jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + ContentLauncherCluster * cppCluster; + + chip::app::Clusters::ContentLauncher::Commands::LaunchURLRequest::Type request; + + request.contentURL = chip::JniUtfString(env, static_cast(contentURL)).charSpan(); + request.displayString = chip::JniUtfString(env, static_cast(displayString)).charSpan(); + request.brandingInformation = chip::app::Clusters::ContentLauncher::Structs::BrandingInformation::Type(); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - ColorControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorLoopActive::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ColorControlCluster, subscribeColorLoopDirectionAttribute) +JNI_METHOD(void, ContentLauncherCluster, subscribeSupportedStreamingProtocolsAttribute) (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); + 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)); @@ -7037,20 +6724,21 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorLoopDirectionAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + ContentLauncherCluster * 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::ColorControl::Attributes::ColorLoopDirection::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::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); + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -7058,7 +6746,7 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorLoopDirectionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ColorControlCluster, subscribeColorLoopTimeAttribute) +JNI_METHOD(void, ContentLauncherCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -7074,15 +6762,15 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorLoopTimeAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + ContentLauncherCluster * 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::ColorControl::Attributes::ColorLoopTime::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ContentLauncher::Attributes::ClusterRevision::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, @@ -7095,7 +6783,16 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorLoopTimeAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ColorControlCluster, subscribeColorLoopStartEnhancedHueAttribute) +JNI_METHOD(jlong, DescriptorCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + DescriptorCluster * cppCluster = new DescriptorCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, DescriptorCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -7111,16 +6808,15 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorLoopStartEnhancedHueAttribut 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); + CHIP_ERROR err = CHIP_NO_ERROR; + DescriptorCluster * 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::ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; + using TypeInfo = chip::app::Clusters::Descriptor::Attributes::ClusterRevision::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -7133,341 +6829,281 @@ JNI_METHOD(void, ColorControlCluster, subscribeColorLoopStartEnhancedHueAttribut onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ColorControlCluster, subscribeColorLoopStoredEnhancedHueAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(jlong, DiagnosticLogsCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { 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)); + DiagnosticLogsCluster * cppCluster = new DiagnosticLogsCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, DiagnosticLogsCluster, retrieveLogsRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject intent, jobject requestedProtocol, + jbyteArray transferFileDesignator, jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + DiagnosticLogsCluster * cppCluster; + + chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Type request; + + request.intent = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(intent)); + request.requestedProtocol = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(requestedProtocol)); + request.transferFileDesignator = chip::JniByteArray(env, static_cast(transferFileDesignator)).byteSpan(); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - ColorControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ColorControlCluster, subscribeColorCapabilitiesAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(jlong, DoorLockCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { 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)); + DoorLockCluster * cppCluster = new DoorLockCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, DoorLockCluster, clearCredential) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject credentialType, jobject credentialIndex, + jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + DoorLockCluster * cppCluster; + + chip::app::Clusters::DoorLock::Commands::ClearCredential::Type request; + + request.credential = chip::app::Clusters::DoorLock::Structs::DlCredential::Type(); + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - ColorControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorCapabilities::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ColorControlCluster, subscribeColorTempPhysicalMinAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, DoorLockCluster, clearUser) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject userIndex, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + DoorLockCluster * cppCluster; + + chip::app::Clusters::DoorLock::Commands::ClearUser::Type request; + + request.userIndex = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(userIndex)); + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - ColorControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMin::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ColorControlCluster, subscribeColorTempPhysicalMaxAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, DoorLockCluster, getCredentialStatus) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject credentialType, jobject credentialIndex, + jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + DoorLockCluster * cppCluster; + + chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type request; + request.credential = chip::app::Clusters::DoorLock::Structs::DlCredential::Type(); + + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - ColorControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMax::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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(); -} -JNI_METHOD(void, ColorControlCluster, subscribeCoupleColorTempToLevelMinMiredsAttribute) -(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; - ColorControlCluster * 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::ColorControl::Attributes::CoupleColorTempToLevelMinMireds::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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ColorControlCluster, writeStartUpColorTemperatureMiredsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, DoorLockCluster, getUser) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject userIndex, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; - TypeInfo::Type cppValue; + CHIP_ERROR err = CHIP_NO_ERROR; + DoorLockCluster * cppCluster; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + chip::app::Clusters::DoorLock::Commands::GetUser::Type request; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + request.userIndex = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(userIndex)); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - ColorControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - if (timedWriteTimeoutMs == nullptr) + if (timedInvokeTimeoutMs == nullptr) { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); } else { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} -JNI_METHOD(void, ColorControlCluster, subscribeStartUpColorTemperatureMiredsAttribute) -(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; - ColorControlCluster * 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::ColorControl::Attributes::StartUpColorTemperatureMireds::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(); -} -JNI_METHOD(void, ColorControlCluster, subscribeClusterRevisionAttribute) -(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; - ColorControlCluster * 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::ColorControl::Attributes::ClusterRevision::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)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, ContentLauncherCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - ContentLauncherCluster * cppCluster = new ContentLauncherCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, ContentLauncherCluster, launchContentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject autoPlay, jstring data, jobject parameterList, - jobject timedInvokeTimeoutMs) +JNI_METHOD(void, DoorLockCluster, lockDoor) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject pinCode, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - ContentLauncherCluster * cppCluster; + DoorLockCluster * cppCluster; - chip::app::Clusters::ContentLauncher::Commands::LaunchContentRequest::Type request; + chip::app::Clusters::DoorLock::Commands::LockDoor::Type request; - request.autoPlay = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(autoPlay)); - request.data = chip::JniUtfString(env, static_cast(data)).charSpan(); - request.search = chip::app::DataModel::List(); + chip::JniReferences::GetInstance().GetOptionalValue(pinCode, pinCode); + request.pinCode = chip::Optional(chip::JniByteArray(env, static_cast(pinCode)).byteSpan()); - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -7477,13 +7113,12 @@ JNI_METHOD(void, ContentLauncherCluster, launchContentRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -7502,23 +7137,27 @@ JNI_METHOD(void, ContentLauncherCluster, launchContentRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ContentLauncherCluster, launchURLRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring contentURL, jstring displayString, jstring providerName, - jobject background, jobject logo, jobject progressBar, jobject splash, jobject waterMark, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, DoorLockCluster, setCredential) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject operationType, jobject credentialType, + jobject credentialIndex, jbyteArray credentialData, jobject userIndex, jobject userStatus, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - ContentLauncherCluster * cppCluster; + DoorLockCluster * cppCluster; - chip::app::Clusters::ContentLauncher::Commands::LaunchURLRequest::Type request; + chip::app::Clusters::DoorLock::Commands::SetCredential::Type request; - request.contentURL = chip::JniUtfString(env, static_cast(contentURL)).charSpan(); - request.displayString = chip::JniUtfString(env, static_cast(displayString)).charSpan(); - request.brandingInformation = chip::app::Clusters::ContentLauncher::Structs::BrandingInformation::Type(); + request.operationType = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(operationType)); + request.credential = chip::app::Clusters::DoorLock::Structs::DlCredential::Type(); + request.credentialData = chip::JniByteArray(env, static_cast(credentialData)).byteSpan(); + request.userIndex = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(userIndex)); + request.userStatus = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(userStatus)); - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -7528,13 +7167,13 @@ JNI_METHOD(void, ContentLauncherCluster, launchURLRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -7553,59 +7192,128 @@ JNI_METHOD(void, ContentLauncherCluster, launchURLRequest) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ContentLauncherCluster, writeSupportedStreamingProtocolsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, DoorLockCluster, setUser) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject operationType, jobject userIndex, jstring userName, + jobject userUniqueId, jobject userStatus, jobject userType, jobject credentialRule, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; - TypeInfo::Type cppValue; - - 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; - ContentLauncherCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + CHIP_ERROR err = CHIP_NO_ERROR; + DoorLockCluster * cppCluster; - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + chip::app::Clusters::DoorLock::Commands::SetUser::Type request; - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + request.operationType = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(operationType)); + request.userIndex = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(userIndex)); + chip::CharSpan userNameValue; + if (userName != nullptr) + { + userNameValue = chip::JniUtfString(env, static_cast(userName)).charSpan(); + } + request.userName = userName == nullptr ? chip::app::DataModel::Nullable() + : chip::app::DataModel::Nullable(userNameValue); + uint32_t userUniqueIdValue; + if (userUniqueId != nullptr) + { + userUniqueIdValue = chip::JniReferences::GetInstance().LongToPrimitive(userUniqueId); + } + request.userUniqueId = userUniqueId == nullptr ? chip::app::DataModel::Nullable() + : chip::app::DataModel::Nullable(userUniqueIdValue); + request.userStatus = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(userStatus)); + request.userType = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(userType)); + request.credentialRule = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(credentialRule)); + + 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->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ContentLauncherCluster, subscribeSupportedStreamingProtocolsAttribute) +JNI_METHOD(void, DoorLockCluster, unlockDoor) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject pinCode, jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + DoorLockCluster * cppCluster; + + chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type request; + + chip::JniReferences::GetInstance().GetOptionalValue(pinCode, pinCode); + request.pinCode = chip::Optional(chip::JniByteArray(env, static_cast(pinCode)).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(); +} +JNI_METHOD(void, DoorLockCluster, subscribeLockStateAttribute) (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); + 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)); @@ -7616,21 +7324,20 @@ JNI_METHOD(void, ContentLauncherCluster, subscribeSupportedStreamingProtocolsAtt chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - ContentLauncherCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::LockState::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), - CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + CHIPDoorLockLockStateAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -7638,12 +7345,12 @@ JNI_METHOD(void, ContentLauncherCluster, subscribeSupportedStreamingProtocolsAtt onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ContentLauncherCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, DoorLockCluster, subscribeLockTypeAttribute) (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); + 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)); @@ -7654,20 +7361,20 @@ JNI_METHOD(void, ContentLauncherCluster, subscribeClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - ContentLauncherCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::ContentLauncher::Attributes::ClusterRevision::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::LockType::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); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -7675,21 +7382,12 @@ JNI_METHOD(void, ContentLauncherCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, DescriptorCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - DescriptorCluster * cppCluster = new DescriptorCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, DescriptorCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, DoorLockCluster, subscribeActuatorEnabledAttribute) (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); + 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)); @@ -7700,20 +7398,20 @@ JNI_METHOD(void, DescriptorCluster, subscribeClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - DescriptorCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::Descriptor::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::ActuatorEnabled::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + CHIPBooleanAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -7721,491 +7419,235 @@ JNI_METHOD(void, DescriptorCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, DiagnosticLogsCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - DiagnosticLogsCluster * cppCluster = new DiagnosticLogsCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, DiagnosticLogsCluster, retrieveLogsRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject intent, jobject requestedProtocol, - jbyteArray transferFileDesignator, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, DoorLockCluster, subscribeDoorStateAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - DiagnosticLogsCluster * cppCluster; - - chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Type request; - - request.intent = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(intent)); - request.requestedProtocol = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(requestedProtocol)); - request.transferFileDesignator = chip::JniByteArray(env, static_cast(transferFileDesignator)).byteSpan(); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::DoorState::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPDoorLockDoorStateAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, DoorLockCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(void, DoorLockCluster, subscribeNumberOfTotalUsersSupportedAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - DoorLockCluster * cppCluster = new DoorLockCluster(); + 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)); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} + 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)); -JNI_METHOD(void, DoorLockCluster, clearCredential) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject credentialType, jobject credentialIndex, - jobject timedInvokeTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster; + 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)); - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type request; - - request.credential = chip::app::Clusters::DoorLock::Structs::DlCredential::Type(); - - 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()); + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, clearUser) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject userIndex, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, DoorLockCluster, subscribeNumberOfPINUsersSupportedAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster; - - chip::app::Clusters::DoorLock::Commands::ClearUser::Type request; - - request.userIndex = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(userIndex)); + 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 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, getCredentialStatus) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject credentialType, jobject credentialIndex, - jobject timedInvokeTimeoutMs) +JNI_METHOD(void, DoorLockCluster, subscribeMaxPINCodeLengthAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster; - - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type request; - - request.credential = chip::app::Clusters::DoorLock::Structs::DlCredential::Type(); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::MaxPINCodeLength::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, getUser) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject userIndex, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, DoorLockCluster, subscribeMinPINCodeLengthAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster; - - chip::app::Clusters::DoorLock::Commands::GetUser::Type request; - - request.userIndex = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(userIndex)); + 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 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::MinPINCodeLength::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, lockDoor) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject pinCode, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, DoorLockCluster, subscribeLanguageAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster; - - chip::app::Clusters::DoorLock::Commands::LockDoor::Type request; - - chip::JniReferences::GetInstance().GetOptionalValue(pinCode, pinCode); - request.pinCode = chip::Optional(chip::JniByteArray(env, static_cast(pinCode)).byteSpan()); + 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 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::Language::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPCharStringAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, setCredential) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject operationType, jobject credentialType, - jobject credentialIndex, jbyteArray credentialData, jobject userIndex, jobject userStatus, jobject timedInvokeTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster; - - chip::app::Clusters::DoorLock::Commands::SetCredential::Type request; - - request.operationType = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(operationType)); - request.credential = chip::app::Clusters::DoorLock::Structs::DlCredential::Type(); - request.credentialData = chip::JniByteArray(env, static_cast(credentialData)).byteSpan(); - request.userIndex = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(userIndex)); - request.userStatus = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(userStatus)); - - 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(); -} -JNI_METHOD(void, DoorLockCluster, setUser) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject operationType, jobject userIndex, jstring userName, - jobject userUniqueId, jobject userStatus, jobject userType, jobject credentialRule, jobject timedInvokeTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster; - - chip::app::Clusters::DoorLock::Commands::SetUser::Type request; - - request.operationType = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(operationType)); - request.userIndex = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(userIndex)); - chip::CharSpan userNameValue; - if (userName != nullptr) - { - userNameValue = chip::JniUtfString(env, static_cast(userName)).charSpan(); - } - request.userName = userName == nullptr ? chip::app::DataModel::Nullable() - : chip::app::DataModel::Nullable(userNameValue); - uint32_t userUniqueIdValue; - if (userUniqueId != nullptr) - { - userUniqueIdValue = chip::JniReferences::GetInstance().LongToPrimitive(userUniqueId); - } - request.userUniqueId = userUniqueId == nullptr ? chip::app::DataModel::Nullable() - : chip::app::DataModel::Nullable(userUniqueIdValue); - request.userStatus = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(userStatus)); - request.userType = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(userType)); - request.credentialRule = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(credentialRule)); - - 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(); -} -JNI_METHOD(void, DoorLockCluster, unlockDoor) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject pinCode, jobject timedInvokeTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster; - - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type request; - - chip::JniReferences::GetInstance().GetOptionalValue(pinCode, pinCode); - request.pinCode = chip::Optional(chip::JniByteArray(env, static_cast(pinCode)).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(); -} -JNI_METHOD(void, DoorLockCluster, subscribeLockStateAttribute) +JNI_METHOD(void, DoorLockCluster, subscribeAutoRelockTimeAttribute) (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); + 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)); @@ -8222,14 +7664,14 @@ JNI_METHOD(void, DoorLockCluster, subscribeLockStateAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::LockState::TypeInfo; + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPDoorLockLockStateAttributeCallback::OnSubscriptionEstablished); + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -8237,7 +7679,7 @@ JNI_METHOD(void, DoorLockCluster, subscribeLockStateAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, subscribeLockTypeAttribute) +JNI_METHOD(void, DoorLockCluster, subscribeSoundVolumeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -8259,9 +7701,9 @@ JNI_METHOD(void, DoorLockCluster, subscribeLockTypeAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::LockType::TypeInfo; + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::SoundVolume::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -8274,12 +7716,12 @@ JNI_METHOD(void, DoorLockCluster, subscribeLockTypeAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, subscribeActuatorEnabledAttribute) +JNI_METHOD(void, DoorLockCluster, subscribeOperatingModeAttribute) (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); + 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)); @@ -8296,14 +7738,14 @@ JNI_METHOD(void, DoorLockCluster, subscribeActuatorEnabledAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::ActuatorEnabled::TypeInfo; + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::OperatingMode::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPBooleanAttributeCallback::OnSubscriptionEstablished); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -8311,13 +7753,12 @@ JNI_METHOD(void, DoorLockCluster, subscribeActuatorEnabledAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, subscribeDoorStateAttribute) +JNI_METHOD(void, DoorLockCluster, subscribeSupportedOperatingModesAttribute) (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); + 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)); @@ -8334,14 +7775,14 @@ JNI_METHOD(void, DoorLockCluster, subscribeDoorStateAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::DoorState::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::SupportedOperatingModes::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), - CHIPDoorLockDoorStateAttributeCallback::OnSubscriptionEstablished); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -8349,12 +7790,12 @@ JNI_METHOD(void, DoorLockCluster, subscribeDoorStateAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, subscribeNumberOfTotalUsersSupportedAttribute) +JNI_METHOD(void, DoorLockCluster, subscribeEnableOneTouchLockingAttribute) (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); + 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)); @@ -8371,14 +7812,14 @@ JNI_METHOD(void, DoorLockCluster, subscribeNumberOfTotalUsersSupportedAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::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); + CHIPBooleanAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -8386,12 +7827,12 @@ JNI_METHOD(void, DoorLockCluster, subscribeNumberOfTotalUsersSupportedAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, subscribeNumberOfPINUsersSupportedAttribute) +JNI_METHOD(void, DoorLockCluster, subscribeEnablePrivacyModeButtonAttribute) (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); + 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)); @@ -8408,14 +7849,14 @@ JNI_METHOD(void, DoorLockCluster, subscribeNumberOfPINUsersSupportedAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::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); + CHIPBooleanAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -8423,7 +7864,7 @@ JNI_METHOD(void, DoorLockCluster, subscribeNumberOfPINUsersSupportedAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, subscribeMaxPINCodeLengthAttribute) +JNI_METHOD(void, DoorLockCluster, subscribeWrongCodeEntryLimitAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -8445,9 +7886,9 @@ JNI_METHOD(void, DoorLockCluster, subscribeMaxPINCodeLengthAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -8460,12 +7901,12 @@ JNI_METHOD(void, DoorLockCluster, subscribeMaxPINCodeLengthAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, subscribeMinPINCodeLengthAttribute) +JNI_METHOD(void, DoorLockCluster, subscribeClusterRevisionAttribute) (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); + 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)); @@ -8482,14 +7923,14 @@ JNI_METHOD(void, DoorLockCluster, subscribeMinPINCodeLengthAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::MinPINCodeLength::TypeInfo; + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::ClusterRevision::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -8497,59 +7938,58 @@ JNI_METHOD(void, DoorLockCluster, subscribeMinPINCodeLengthAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, DoorLockCluster, writeLanguageAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) +JNI_METHOD(jlong, ElectricalMeasurementCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::Language::TypeInfo; - TypeInfo::Type cppValue; + ElectricalMeasurementCluster * cppCluster = new ElectricalMeasurementCluster(); - cppValue = chip::JniUtfString(env, static_cast(value)).charSpan(); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); +JNI_METHOD(void, ElectricalMeasurementCluster, subscribeMeasurementTypeAttribute) +(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), Platform::Delete); + 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; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); + 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()); + using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, subscribeLanguageAttribute) +JNI_METHOD(void, ElectricalMeasurementCluster, subscribeTotalActivePowerAttribute) (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); + 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)); @@ -8560,20 +8000,21 @@ JNI_METHOD(void, DoorLockCluster, subscribeLanguageAttribute) 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); + 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)); - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::Language::TypeInfo; + using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPCharStringAttributeCallback::OnSubscriptionEstablished); + CHIPInt32sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -8581,59 +8022,49 @@ JNI_METHOD(void, DoorLockCluster, subscribeLanguageAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, DoorLockCluster, writeAutoRelockTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsVoltageAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); + 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()); + using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; + 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)); + 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(); } -JNI_METHOD(void, DoorLockCluster, subscribeAutoRelockTimeAttribute) +JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsVoltageMinAttribute) (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); + 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)); @@ -8644,20 +8075,20 @@ JNI_METHOD(void, DoorLockCluster, subscribeAutoRelockTimeAttribute) 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); + 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)); - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMin::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), - CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -8665,59 +8096,49 @@ JNI_METHOD(void, DoorLockCluster, subscribeAutoRelockTimeAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, DoorLockCluster, writeSoundVolumeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsVoltageMaxAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::SoundVolume::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); + 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()); + using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; + 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)); + 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(); } -JNI_METHOD(void, DoorLockCluster, subscribeSoundVolumeAttribute) +JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsCurrentAttribute) (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); + 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)); @@ -8728,20 +8149,20 @@ JNI_METHOD(void, DoorLockCluster, subscribeSoundVolumeAttribute) 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); + 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)); - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::SoundVolume::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrent::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); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -8749,59 +8170,49 @@ JNI_METHOD(void, DoorLockCluster, subscribeSoundVolumeAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, DoorLockCluster, writeOperatingModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsCurrentMinAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::OperatingMode::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); + 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()); + using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; + 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)); + 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(); } -JNI_METHOD(void, DoorLockCluster, subscribeOperatingModeAttribute) +JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsCurrentMaxAttribute) (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); + 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)); @@ -8812,20 +8223,20 @@ JNI_METHOD(void, DoorLockCluster, subscribeOperatingModeAttribute) 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); + 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)); - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::OperatingMode::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMax::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); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -8833,12 +8244,12 @@ JNI_METHOD(void, DoorLockCluster, subscribeOperatingModeAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, subscribeSupportedOperatingModesAttribute) +JNI_METHOD(void, ElectricalMeasurementCluster, subscribeActivePowerAttribute) (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); + 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)); @@ -8849,20 +8260,20 @@ JNI_METHOD(void, DoorLockCluster, subscribeSupportedOperatingModesAttribute) 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); + 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)); - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::SupportedOperatingModes::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePower::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); + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -8870,59 +8281,49 @@ JNI_METHOD(void, DoorLockCluster, subscribeSupportedOperatingModesAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, DoorLockCluster, writeEnableOneTouchLockingAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ElectricalMeasurementCluster, subscribeActivePowerMinAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); + 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()); + using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, subscribeEnableOneTouchLockingAttribute) +JNI_METHOD(void, ElectricalMeasurementCluster, subscribeActivePowerMaxAttribute) (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); + 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)); @@ -8933,20 +8334,20 @@ JNI_METHOD(void, DoorLockCluster, subscribeEnableOneTouchLockingAttribute) 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); + 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)); - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMax::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), - CHIPBooleanAttributeCallback::OnSubscriptionEstablished); + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -8954,59 +8355,12 @@ JNI_METHOD(void, DoorLockCluster, subscribeEnableOneTouchLockingAttribute) 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; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; - TypeInfo::Type cppValue; - - 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, subscribeEnablePrivacyModeButtonAttribute) +JNI_METHOD(void, ElectricalMeasurementCluster, subscribeClusterRevisionAttribute) (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); + 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)); @@ -9017,20 +8371,20 @@ JNI_METHOD(void, DoorLockCluster, subscribeEnablePrivacyModeButtonAttribute) 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); + 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)); - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::ClusterRevision::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), - CHIPBooleanAttributeCallback::OnSubscriptionEstablished); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -9038,54 +8392,60 @@ JNI_METHOD(void, DoorLockCluster, subscribeEnablePrivacyModeButtonAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(jlong, EthernetNetworkDiagnosticsCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + EthernetNetworkDiagnosticsCluster * cppCluster = new EthernetNetworkDiagnosticsCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} -JNI_METHOD(void, DoorLockCluster, writeWrongCodeEntryLimitAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, resetCounts) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - TypeInfo::Type cppValue; + CHIP_ERROR err = CHIP_NO_ERROR; + EthernetNetworkDiagnosticsCluster * cppCluster; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Type request; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - if (timedWriteTimeoutMs == nullptr) + if (timedInvokeTimeoutMs == nullptr) { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); } else { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, subscribeWrongCodeEntryLimitAttribute) +JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribePHYRateAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -9101,15 +8461,15 @@ JNI_METHOD(void, DoorLockCluster, subscribeWrongCodeEntryLimitAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + EthernetNetworkDiagnosticsCluster * 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::DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PHYRate::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, @@ -9122,12 +8482,12 @@ JNI_METHOD(void, DoorLockCluster, subscribeWrongCodeEntryLimitAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeFullDuplexAttribute) (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); + 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)); @@ -9138,20 +8498,20 @@ JNI_METHOD(void, DoorLockCluster, subscribeClusterRevisionAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + EthernetNetworkDiagnosticsCluster * 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::DoorLock::Attributes::ClusterRevision::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FullDuplex::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); + CHIPBooleanAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -9159,21 +8519,12 @@ JNI_METHOD(void, DoorLockCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, ElectricalMeasurementCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - ElectricalMeasurementCluster * cppCluster = new ElectricalMeasurementCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, ElectricalMeasurementCluster, subscribeMeasurementTypeAttribute) +JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribePacketRxCountAttribute) (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); + 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)); @@ -9184,20 +8535,21 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeMeasurementTypeAttribute 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); + CHIP_ERROR err = CHIP_NO_ERROR; + EthernetNetworkDiagnosticsCluster * 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::ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketRxCount::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), - CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -9205,12 +8557,12 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeMeasurementTypeAttribute onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ElectricalMeasurementCluster, subscribeTotalActivePowerAttribute) +JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribePacketTxCountAttribute) (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); + 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)); @@ -9221,21 +8573,21 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeTotalActivePowerAttribut 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); + CHIP_ERROR err = CHIP_NO_ERROR; + EthernetNetworkDiagnosticsCluster * 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::ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; + using TypeInfo = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + 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), - CHIPInt32sAttributeCallback::OnSubscriptionEstablished); + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -9243,12 +8595,12 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeTotalActivePowerAttribut onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsVoltageAttribute) +JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeTxErrCountAttribute) (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); + 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)); @@ -9259,20 +8611,20 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsVoltageAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + EthernetNetworkDiagnosticsCluster * 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::ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TxErrCount::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); + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -9280,12 +8632,12 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsVoltageAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsVoltageMinAttribute) +JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeCollisionCountAttribute) (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); + 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)); @@ -9296,20 +8648,21 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsVoltageMinAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + EthernetNetworkDiagnosticsCluster * 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::ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CollisionCount::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); + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -9317,12 +8670,12 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsVoltageMinAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsVoltageMaxAttribute) +JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeOverrunCountAttribute) (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); + 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)); @@ -9333,20 +8686,21 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsVoltageMaxAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + EthernetNetworkDiagnosticsCluster * 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::ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::OverrunCount::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); + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -9354,12 +8708,12 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsVoltageMaxAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsCurrentAttribute) +JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeCarrierDetectAttribute) (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); + 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)); @@ -9370,20 +8724,21 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsCurrentAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + EthernetNetworkDiagnosticsCluster * 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::ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CarrierDetect::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); + CHIPBooleanAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -9391,12 +8746,12 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsCurrentAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsCurrentMinAttribute) +JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeTimeSinceResetAttribute) (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); + 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)); @@ -9407,20 +8762,21 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsCurrentMinAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + EthernetNetworkDiagnosticsCluster * 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::ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TimeSinceReset::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); + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -9428,12 +8784,12 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsCurrentMinAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsCurrentMaxAttribute) +JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeFeatureMapAttribute) (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); + 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)); @@ -9444,20 +8800,20 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsCurrentMaxAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + EthernetNetworkDiagnosticsCluster * 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::ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FeatureMap::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); + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -9465,12 +8821,12 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeRmsCurrentMaxAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ElectricalMeasurementCluster, subscribeActivePowerAttribute) +JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeClusterRevisionAttribute) (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); + 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)); @@ -9481,20 +8837,21 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeActivePowerAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + EthernetNetworkDiagnosticsCluster * 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::ElectricalMeasurement::Attributes::ActivePower::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::ClusterRevision::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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -9502,12 +8859,21 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeActivePowerAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ElectricalMeasurementCluster, subscribeActivePowerMinAttribute) +JNI_METHOD(jlong, FixedLabelCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + FixedLabelCluster * cppCluster = new FixedLabelCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, FixedLabelCluster, subscribeClusterRevisionAttribute) (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); + 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)); @@ -9518,20 +8884,20 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeActivePowerMinAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + FixedLabelCluster * 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::ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::FixedLabel::Attributes::ClusterRevision::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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -9539,7 +8905,16 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeActivePowerMinAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ElectricalMeasurementCluster, subscribeActivePowerMaxAttribute) +JNI_METHOD(jlong, FlowMeasurementCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + FlowMeasurementCluster * cppCluster = new FlowMeasurementCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, FlowMeasurementCluster, subscribeMeasuredValueAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -9555,15 +8930,15 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeActivePowerMaxAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + FlowMeasurementCluster * 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::ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::FlowMeasurement::Attributes::MeasuredValue::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, @@ -9576,12 +8951,12 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeActivePowerMaxAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ElectricalMeasurementCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, FlowMeasurementCluster, subscribeMinMeasuredValueAttribute) (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); + 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)); @@ -9592,20 +8967,20 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeClusterRevisionAttribute 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); + CHIP_ERROR err = CHIP_NO_ERROR; + FlowMeasurementCluster * 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::ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::FlowMeasurement::Attributes::MinMeasuredValue::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); + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -9613,65 +8988,12 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeClusterRevisionAttribute onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, EthernetNetworkDiagnosticsCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - EthernetNetworkDiagnosticsCluster * cppCluster = new EthernetNetworkDiagnosticsCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, resetCounts) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - EthernetNetworkDiagnosticsCluster * cppCluster; - - chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Type request; - - 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(); -} -JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribePHYRateAttribute) +JNI_METHOD(void, FlowMeasurementCluster, subscribeMaxMeasuredValueAttribute) (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); + 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)); @@ -9682,20 +9004,20 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribePHYRateAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - EthernetNetworkDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + FlowMeasurementCluster * 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::EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::FlowMeasurement::Attributes::MaxMeasuredValue::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); + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -9703,12 +9025,12 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribePHYRateAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeFullDuplexAttribute) +JNI_METHOD(void, FlowMeasurementCluster, subscribeToleranceAttribute) (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); + 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)); @@ -9719,20 +9041,20 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeFullDuplexAttribute chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - EthernetNetworkDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + FlowMeasurementCluster * 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::EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::FlowMeasurement::Attributes::Tolerance::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), - CHIPBooleanAttributeCallback::OnSubscriptionEstablished); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -9740,12 +9062,12 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeFullDuplexAttribute onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribePacketRxCountAttribute) +JNI_METHOD(void, FlowMeasurementCluster, subscribeClusterRevisionAttribute) (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); + 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)); @@ -9756,21 +9078,20 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribePacketRxCountAttrib chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - EthernetNetworkDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + FlowMeasurementCluster * 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::EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::FlowMeasurement::Attributes::ClusterRevision::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), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -9778,163 +9099,176 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribePacketRxCountAttrib onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribePacketTxCountAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(jlong, GeneralCommissioningCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { 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)); + GeneralCommissioningCluster * cppCluster = new GeneralCommissioningCluster(); - 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)); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} - CHIP_ERROR err = CHIP_NO_ERROR; - EthernetNetworkDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); +JNI_METHOD(void, GeneralCommissioningCluster, armFailSafe) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject expiryLengthSeconds, jobject breadcrumb, jobject timeoutMs, + jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + GeneralCommissioningCluster * cppCluster; - using TypeInfo = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type request; - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} -JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeTxErrCountAttribute) -(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)); + request.expiryLengthSeconds = static_cast( + chip::JniReferences::GetInstance().IntegerToPrimitive(expiryLengthSeconds)); + request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); + request.timeoutMs = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(timeoutMs)); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - EthernetNetworkDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + 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), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeCollisionCountAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, GeneralCommissioningCluster, commissioningComplete) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + GeneralCommissioningCluster * cppCluster; + + chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type request; + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - EthernetNetworkDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + 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), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeOverrunCountAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, GeneralCommissioningCluster, setRegulatoryConfig) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject location, jstring countryCode, jobject breadcrumb, + jobject timeoutMs, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + GeneralCommissioningCluster * cppCluster; + + chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type request; + + request.location = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(location)); + request.countryCode = chip::JniUtfString(env, static_cast(countryCode)).charSpan(); + request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); + request.timeoutMs = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(timeoutMs)); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - EthernetNetworkDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + 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), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeCarrierDetectAttribute) +JNI_METHOD(void, GeneralCommissioningCluster, subscribeBreadcrumbAttribute) (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); + 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)); @@ -9945,21 +9279,20 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeCarrierDetectAttrib chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - EthernetNetworkDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::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), - CHIPBooleanAttributeCallback::OnSubscriptionEstablished); + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -9967,12 +9300,12 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeCarrierDetectAttrib onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeTimeSinceResetAttribute) +JNI_METHOD(void, GeneralCommissioningCluster, subscribeRegulatoryConfigAttribute) (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); + 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)); @@ -9983,21 +9316,20 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeTimeSinceResetAttri chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - EthernetNetworkDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::GeneralCommissioning::Attributes::RegulatoryConfig::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), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -10005,12 +9337,12 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeTimeSinceResetAttri onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeFeatureMapAttribute) +JNI_METHOD(void, GeneralCommissioningCluster, subscribeLocationCapabilityAttribute) (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); + 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)); @@ -10021,20 +9353,21 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeFeatureMapAttribute chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - EthernetNetworkDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::GeneralCommissioning::Attributes::LocationCapability::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), - CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -10042,7 +9375,7 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeFeatureMapAttribute onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, GeneralCommissioningCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -10058,16 +9391,15 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeClusterRevisionAttr chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - EthernetNetworkDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::GeneralCommissioning::Attributes::ClusterRevision::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, @@ -10080,16 +9412,16 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeClusterRevisionAttr onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, FixedLabelCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(jlong, GeneralDiagnosticsCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - FixedLabelCluster * cppCluster = new FixedLabelCluster(); + GeneralDiagnosticsCluster * cppCluster = new GeneralDiagnosticsCluster(); cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, FixedLabelCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeRebootCountAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -10105,15 +9437,15 @@ JNI_METHOD(void, FixedLabelCluster, subscribeClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - FixedLabelCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + GeneralDiagnosticsCluster * 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::FixedLabel::Attributes::ClusterRevision::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::GeneralDiagnostics::Attributes::RebootCount::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, @@ -10126,21 +9458,12 @@ JNI_METHOD(void, FixedLabelCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, FlowMeasurementCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeUpTimeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - FlowMeasurementCluster * cppCluster = new FlowMeasurementCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, FlowMeasurementCluster, subscribeMeasuredValueAttribute) -(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); + 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)); @@ -10151,20 +9474,20 @@ JNI_METHOD(void, FlowMeasurementCluster, subscribeMeasuredValueAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - FlowMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + GeneralDiagnosticsCluster * 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::FlowMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = chip::app::Clusters::GeneralDiagnostics::Attributes::UpTime::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -10172,12 +9495,12 @@ JNI_METHOD(void, FlowMeasurementCluster, subscribeMeasuredValueAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, FlowMeasurementCluster, subscribeMinMeasuredValueAttribute) +JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeTotalOperationalHoursAttribute) (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); + 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)); @@ -10188,20 +9511,21 @@ JNI_METHOD(void, FlowMeasurementCluster, subscribeMinMeasuredValueAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - FlowMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + GeneralDiagnosticsCluster * 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::FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::GeneralDiagnostics::Attributes::TotalOperationalHours::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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -10209,12 +9533,12 @@ JNI_METHOD(void, FlowMeasurementCluster, subscribeMinMeasuredValueAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, FlowMeasurementCluster, subscribeMaxMeasuredValueAttribute) +JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeBootReasonsAttribute) (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); + 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)); @@ -10225,57 +9549,20 @@ JNI_METHOD(void, FlowMeasurementCluster, subscribeMaxMeasuredValueAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - FlowMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + GeneralDiagnosticsCluster * 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::FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::GeneralDiagnostics::Attributes::BootReasons::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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} -JNI_METHOD(void, FlowMeasurementCluster, subscribeToleranceAttribute) -(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; - FlowMeasurementCluster * 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::FlowMeasurement::Attributes::Tolerance::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); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -10283,7 +9570,7 @@ JNI_METHOD(void, FlowMeasurementCluster, subscribeToleranceAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, FlowMeasurementCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -10299,14 +9586,14 @@ JNI_METHOD(void, FlowMeasurementCluster, subscribeClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - FlowMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + GeneralDiagnosticsCluster * 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::FlowMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); @@ -10320,34 +9607,31 @@ JNI_METHOD(void, FlowMeasurementCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, GeneralCommissioningCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(jlong, GroupKeyManagementCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - GeneralCommissioningCluster * cppCluster = new GeneralCommissioningCluster(); + GroupKeyManagementCluster * cppCluster = new GroupKeyManagementCluster(); cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, GeneralCommissioningCluster, armFailSafe) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject expiryLengthSeconds, jobject breadcrumb, jobject timeoutMs, - jobject timedInvokeTimeoutMs) +JNI_METHOD(void, GroupKeyManagementCluster, keySetRead) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - GeneralCommissioningCluster * cppCluster; + GroupKeyManagementCluster * cppCluster; - chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type request; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type request; - request.expiryLengthSeconds = static_cast( - chip::JniReferences::GetInstance().IntegerToPrimitive(expiryLengthSeconds)); - request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); - request.timeoutMs = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(timeoutMs)); + request.groupKeySetID = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupKeySetID)); - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -10357,13 +9641,13 @@ JNI_METHOD(void, GeneralCommissioningCluster, armFailSafe) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -10382,19 +9666,21 @@ JNI_METHOD(void, GeneralCommissioningCluster, armFailSafe) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GeneralCommissioningCluster, commissioningComplete) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, GroupKeyManagementCluster, keySetReadAllIndices) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetIDs, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - GeneralCommissioningCluster * cppCluster; + GroupKeyManagementCluster * cppCluster; - chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type request; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Type request; - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + request.groupKeySetIDs = chip::app::DataModel::List(); + + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -10404,13 +9690,13 @@ JNI_METHOD(void, GeneralCommissioningCluster, commissioningComplete) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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( + chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); @@ -10430,25 +9716,20 @@ JNI_METHOD(void, GeneralCommissioningCluster, commissioningComplete) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GeneralCommissioningCluster, setRegulatoryConfig) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject location, jstring countryCode, jobject breadcrumb, - jobject timeoutMs, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, GroupKeyManagementCluster, keySetRemove) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetID, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - GeneralCommissioningCluster * cppCluster; + GroupKeyManagementCluster * cppCluster; - chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type request; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type request; - request.location = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(location)); - request.countryCode = chip::JniUtfString(env, static_cast(countryCode)).charSpan(); - request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); - request.timeoutMs = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(timeoutMs)); + request.groupKeySetID = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupKeySetID)); - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -10458,14 +9739,12 @@ JNI_METHOD(void, GeneralCommissioningCluster, setRegulatoryConfig) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -10484,59 +9763,60 @@ JNI_METHOD(void, GeneralCommissioningCluster, setRegulatoryConfig) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, GeneralCommissioningCluster, writeBreadcrumbAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, GroupKeyManagementCluster, keySetWrite) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetID, jobject securityPolicy, + jbyteArray epochKey0, jobject epochStartTime0, jbyteArray epochKey1, jobject epochStartTime1, jbyteArray epochKey2, + jobject epochStartTime2, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; - TypeInfo::Type cppValue; + CHIP_ERROR err = CHIP_NO_ERROR; + GroupKeyManagementCluster * cppCluster; + + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type request; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + request.groupKeySet = chip::app::Clusters::GroupKeyManagement::Structs::GroupKeySet::Type(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - GeneralCommissioningCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - if (timedWriteTimeoutMs == nullptr) + if (timedInvokeTimeoutMs == nullptr) { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); } else { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GeneralCommissioningCluster, subscribeBreadcrumbAttribute) +JNI_METHOD(void, GroupKeyManagementCluster, subscribeMaxGroupsPerFabricAttribute) (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); + 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)); @@ -10547,20 +9827,20 @@ JNI_METHOD(void, GeneralCommissioningCluster, subscribeBreadcrumbAttribute) 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); + 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)); - using TypeInfo = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupsPerFabric::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), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -10568,12 +9848,12 @@ JNI_METHOD(void, GeneralCommissioningCluster, subscribeBreadcrumbAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GeneralCommissioningCluster, subscribeRegulatoryConfigAttribute) +JNI_METHOD(void, GroupKeyManagementCluster, subscribeMaxGroupKeysPerFabricAttribute) (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); + 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)); @@ -10584,20 +9864,21 @@ JNI_METHOD(void, GeneralCommissioningCluster, subscribeRegulatoryConfigAttribute 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); + 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)); - using TypeInfo = chip::app::Clusters::GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::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); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -10605,45 +9886,7 @@ JNI_METHOD(void, GeneralCommissioningCluster, subscribeRegulatoryConfigAttribute onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GeneralCommissioningCluster, subscribeLocationCapabilityAttribute) -(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; - GeneralCommissioningCluster * 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::GeneralCommissioning::Attributes::LocationCapability::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, GeneralCommissioningCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, GroupKeyManagementCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -10659,14 +9902,14 @@ JNI_METHOD(void, GeneralCommissioningCluster, subscribeClusterRevisionAttribute) 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); + 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)); - using TypeInfo = chip::app::Clusters::GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); @@ -10680,226 +9923,265 @@ JNI_METHOD(void, GeneralCommissioningCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, GeneralDiagnosticsCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(jlong, GroupsCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - GeneralDiagnosticsCluster * cppCluster = new GeneralDiagnosticsCluster(); + GroupsCluster * cppCluster = new GroupsCluster(); cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeRebootCountAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, GroupsCluster, addGroup) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jstring groupName, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + GroupsCluster * cppCluster; + + chip::app::Clusters::Groups::Commands::AddGroup::Type request; + request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + request.groupName = chip::JniUtfString(env, static_cast(groupName)).charSpan(); + + std::unique_ptr onSuccess( + Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - GeneralDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::GeneralDiagnostics::Attributes::RebootCount::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeUpTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, GroupsCluster, addGroupIfIdentifying) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jstring groupName, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + GroupsCluster * cppCluster; + + chip::app::Clusters::Groups::Commands::AddGroupIfIdentifying::Type request; + + request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + request.groupName = chip::JniUtfString(env, static_cast(groupName)).charSpan(); + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - GeneralDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::GeneralDiagnostics::Attributes::UpTime::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeTotalOperationalHoursAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, GroupsCluster, getGroupMembership) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupList, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + GroupsCluster * cppCluster; + + chip::app::Clusters::Groups::Commands::GetGroupMembership::Type request; + + request.groupList = chip::app::DataModel::List(); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - GeneralDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), - CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeBootReasonsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, GroupsCluster, removeAllGroups) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + GroupsCluster * cppCluster; + + chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type request; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - GeneralDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::GeneralDiagnostics::Attributes::BootReasons::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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)); + 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(); } -JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeClusterRevisionAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, GroupsCluster, removeGroup) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + GroupsCluster * cppCluster; + + chip::app::Clusters::Groups::Commands::RemoveGroup::Type request; + + request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - GeneralDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, GroupKeyManagementCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - GroupKeyManagementCluster * cppCluster = new GroupKeyManagementCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, GroupKeyManagementCluster, keySetRead) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetID, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, GroupsCluster, viewGroup) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - GroupKeyManagementCluster * cppCluster; + GroupsCluster * cppCluster; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type request; + chip::app::Clusters::Groups::Commands::ViewGroup::Type request; - request.groupKeySetID = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupKeySetID)); + request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -10909,13 +10191,12 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetRead) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -10934,21 +10215,103 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetRead) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GroupKeyManagementCluster, keySetReadAllIndices) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetIDs, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, GroupsCluster, subscribeNameSupportAttribute) +(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; + GroupsCluster * 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::Groups::Attributes::NameSupport::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, GroupsCluster, subscribeClusterRevisionAttribute) +(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; + GroupsCluster * 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::Groups::Attributes::ClusterRevision::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(); +} +JNI_METHOD(jlong, IdentifyCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + IdentifyCluster * cppCluster = new IdentifyCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, IdentifyCluster, identify) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject identifyTime, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - GroupKeyManagementCluster * cppCluster; + IdentifyCluster * cppCluster; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Type request; + chip::app::Clusters::Identify::Commands::Identify::Type request; - request.groupKeySetIDs = chip::app::DataModel::List(); + request.identifyTime = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(identifyTime)); - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -10958,14 +10321,12 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetReadAllIndices) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -10984,20 +10345,18 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetReadAllIndices) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GroupKeyManagementCluster, keySetRemove) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetID, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, IdentifyCluster, identifyQuery) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - GroupKeyManagementCluster * cppCluster; - - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type request; + IdentifyCluster * cppCluster; - request.groupKeySetID = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupKeySetID)); + chip::app::Clusters::Identify::Commands::IdentifyQuery::Type request; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -11007,12 +10366,13 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetRemove) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -11031,18 +10391,20 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetRemove) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GroupKeyManagementCluster, keySetWrite) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetID, jobject securityPolicy, - jbyteArray epochKey0, jobject epochStartTime0, jbyteArray epochKey1, jobject epochStartTime1, jbyteArray epochKey2, - jobject epochStartTime2, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, IdentifyCluster, triggerEffect) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject effectIdentifier, jobject effectVariant, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - GroupKeyManagementCluster * cppCluster; + IdentifyCluster * cppCluster; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type request; + chip::app::Clusters::Identify::Commands::TriggerEffect::Type request; - request.groupKeySet = chip::app::Clusters::GroupKeyManagement::Structs::GroupKeySet::Type(); + request.effectIdentifier = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(effectIdentifier)); + request.effectVariant = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(effectVariant)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -11055,7 +10417,7 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetWrite) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); @@ -11079,7 +10441,7 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetWrite) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GroupKeyManagementCluster, subscribeMaxGroupsPerFabricAttribute) +JNI_METHOD(void, IdentifyCluster, subscribeIdentifyTimeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -11095,15 +10457,15 @@ JNI_METHOD(void, GroupKeyManagementCluster, subscribeMaxGroupsPerFabricAttribute 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); + 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)); - using TypeInfo = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::Identify::Attributes::IdentifyTime::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, @@ -11116,12 +10478,12 @@ JNI_METHOD(void, GroupKeyManagementCluster, subscribeMaxGroupsPerFabricAttribute onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GroupKeyManagementCluster, subscribeMaxGroupKeysPerFabricAttribute) +JNI_METHOD(void, IdentifyCluster, subscribeIdentifyTypeAttribute) (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); + 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)); @@ -11132,21 +10494,20 @@ JNI_METHOD(void, GroupKeyManagementCluster, subscribeMaxGroupKeysPerFabricAttrib 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); + 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)); - using TypeInfo = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; + using TypeInfo = chip::app::Clusters::Identify::Attributes::IdentifyType::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -11154,7 +10515,7 @@ JNI_METHOD(void, GroupKeyManagementCluster, subscribeMaxGroupKeysPerFabricAttrib onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GroupKeyManagementCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, IdentifyCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -11170,15 +10531,15 @@ JNI_METHOD(void, GroupKeyManagementCluster, subscribeClusterRevisionAttribute) 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); + 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)); - using TypeInfo = chip::app::Clusters::GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::Identify::Attributes::ClusterRevision::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, @@ -11191,265 +10552,272 @@ JNI_METHOD(void, GroupKeyManagementCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, GroupsCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(jlong, IlluminanceMeasurementCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - GroupsCluster * cppCluster = new GroupsCluster(); + IlluminanceMeasurementCluster * cppCluster = new IlluminanceMeasurementCluster(); cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, GroupsCluster, addGroup) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jstring groupName, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeMeasuredValueAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - GroupsCluster * cppCluster; - - chip::app::Clusters::Groups::Commands::AddGroup::Type request; - - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); - request.groupName = chip::JniUtfString(env, static_cast(groupName)).charSpan(); + 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 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + IlluminanceMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GroupsCluster, addGroupIfIdentifying) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jstring groupName, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeMinMeasuredValueAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - GroupsCluster * cppCluster; - - chip::app::Clusters::Groups::Commands::AddGroupIfIdentifying::Type request; - - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); - request.groupName = chip::JniUtfString(env, static_cast(groupName)).charSpan(); + 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 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + IlluminanceMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GroupsCluster, getGroupMembership) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupList, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeMaxMeasuredValueAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - GroupsCluster * cppCluster; - - chip::app::Clusters::Groups::Commands::GetGroupMembership::Type request; - - request.groupList = chip::app::DataModel::List(); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + IlluminanceMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GroupsCluster, removeAllGroups) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeToleranceAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - GroupsCluster * cppCluster; - - chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type request; + 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 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + IlluminanceMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GroupsCluster, removeGroup) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeLightSensorTypeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - GroupsCluster * cppCluster; + 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)); - chip::app::Clusters::Groups::Commands::RemoveGroup::Type request; + 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)); - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + CHIP_ERROR err = CHIP_NO_ERROR; + IlluminanceMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); + using TypeInfo = chip::app::Clusters::IlluminanceMeasurement::Attributes::LightSensorType::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), CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeClusterRevisionAttribute) +(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, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + 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, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + IlluminanceMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GroupsCluster, viewGroup) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject timedInvokeTimeoutMs) +JNI_METHOD(jlong, KeypadInputCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + KeypadInputCluster * cppCluster = new KeypadInputCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, KeypadInputCluster, sendKeyRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject keyCode, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - GroupsCluster * cppCluster; + KeypadInputCluster * cppCluster; - chip::app::Clusters::Groups::Commands::ViewGroup::Type request; + chip::app::Clusters::KeypadInput::Commands::SendKeyRequest::Type request; - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + request.keyCode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(keyCode)); - std::unique_ptr onSuccess( - Platform::New(callback), - Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -11459,12 +10827,13 @@ JNI_METHOD(void, GroupsCluster, viewGroup) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -11483,44 +10852,7 @@ JNI_METHOD(void, GroupsCluster, viewGroup) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GroupsCluster, subscribeNameSupportAttribute) -(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; - GroupsCluster * 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::Groups::Attributes::NameSupport::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, GroupsCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, KeypadInputCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -11536,15 +10868,15 @@ JNI_METHOD(void, GroupsCluster, subscribeClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - GroupsCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + KeypadInputCluster * 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::Groups::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = chip::app::Clusters::KeypadInput::Attributes::ClusterRevision::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -11557,26 +10889,31 @@ JNI_METHOD(void, GroupsCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, IdentifyCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(jlong, LevelControlCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - IdentifyCluster * cppCluster = new IdentifyCluster(); + LevelControlCluster * cppCluster = new LevelControlCluster(); cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, IdentifyCluster, identify) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject identifyTime, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, LevelControlCluster, move) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject moveMode, jobject rate, jobject optionMask, + jobject optionOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - IdentifyCluster * cppCluster; + LevelControlCluster * cppCluster; - chip::app::Clusters::Identify::Commands::Identify::Type request; + chip::app::Clusters::LevelControl::Commands::Move::Type request; - request.identifyTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(identifyTime)); + request.moveMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); + request.rate = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(rate)); + request.optionMask = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionMask)); + request.optionOverride = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -11589,7 +10926,7 @@ JNI_METHOD(void, IdentifyCluster, identify) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); @@ -11613,18 +10950,26 @@ JNI_METHOD(void, IdentifyCluster, identify) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, IdentifyCluster, identifyQuery) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, LevelControlCluster, moveToLevel) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject level, jobject transitionTime, jobject optionMask, + jobject optionOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - IdentifyCluster * cppCluster; + LevelControlCluster * cppCluster; - chip::app::Clusters::Identify::Commands::IdentifyQuery::Type request; + chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type request; - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + request.level = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(level)); + request.transitionTime = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + request.optionMask = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionMask)); + request.optionOverride = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionOverride)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -11634,13 +10979,12 @@ JNI_METHOD(void, IdentifyCluster, identifyQuery) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -11659,20 +11003,19 @@ JNI_METHOD(void, IdentifyCluster, identifyQuery) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, IdentifyCluster, triggerEffect) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject effectIdentifier, jobject effectVariant, +JNI_METHOD(void, LevelControlCluster, moveToLevelWithOnOff) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject level, jobject transitionTime, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - IdentifyCluster * cppCluster; + LevelControlCluster * cppCluster; - chip::app::Clusters::Identify::Commands::TriggerEffect::Type request; + chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type request; - request.effectIdentifier = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(effectIdentifier)); - request.effectVariant = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(effectVariant)); + request.level = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(level)); + request.transitionTime = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -11685,7 +11028,7 @@ JNI_METHOD(void, IdentifyCluster, triggerEffect) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); @@ -11709,91 +11052,252 @@ JNI_METHOD(void, IdentifyCluster, triggerEffect) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, IdentifyCluster, writeIdentifyTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, LevelControlCluster, moveWithOnOff) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject moveMode, jobject rate, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::Identify::Attributes::IdentifyTime::TypeInfo; - TypeInfo::Type cppValue; + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster; + + chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Type request; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + request.moveMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); + request.rate = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(rate)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - IdentifyCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - if (timedWriteTimeoutMs == nullptr) + if (timedInvokeTimeoutMs == nullptr) { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); } else { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, IdentifyCluster, subscribeIdentifyTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, LevelControlCluster, step) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject stepMode, jobject stepSize, jobject transitionTime, + jobject optionMask, jobject optionOverride, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster; + + chip::app::Clusters::LevelControl::Commands::Step::Type request; + + request.stepMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); + request.stepSize = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepSize)); + request.transitionTime = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + request.optionMask = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionMask)); + request.optionOverride = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionOverride)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + 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(); +} +JNI_METHOD(void, LevelControlCluster, stepWithOnOff) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject stepMode, jobject stepSize, jobject transitionTime, + jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster; + + chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Type request; + + request.stepMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); + request.stepSize = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepSize)); + request.transitionTime = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - IdentifyCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::Identify::Attributes::IdentifyTime::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, IdentifyCluster, subscribeIdentifyTypeAttribute) +JNI_METHOD(void, LevelControlCluster, stop) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject optionMask, jobject optionOverride, + jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster; + + chip::app::Clusters::LevelControl::Commands::Stop::Type request; + + request.optionMask = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionMask)); + request.optionOverride = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionOverride)); + + 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(); +} +JNI_METHOD(void, LevelControlCluster, stopWithOnOff) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster; + + chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Type request; + + 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(); +} +JNI_METHOD(void, LevelControlCluster, subscribeCurrentLevelAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -11809,15 +11313,15 @@ JNI_METHOD(void, IdentifyCluster, subscribeIdentifyTypeAttribute) 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); + 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)); - using TypeInfo = chip::app::Clusters::Identify::Attributes::IdentifyType::TypeInfo; + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::CurrentLevel::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -11830,7 +11334,7 @@ JNI_METHOD(void, IdentifyCluster, subscribeIdentifyTypeAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, IdentifyCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, LevelControlCluster, subscribeRemainingTimeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -11846,15 +11350,15 @@ JNI_METHOD(void, IdentifyCluster, subscribeClusterRevisionAttribute) 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); + 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)); - using TypeInfo = chip::app::Clusters::Identify::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::RemainingTime::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -11867,23 +11371,12 @@ JNI_METHOD(void, IdentifyCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, IlluminanceMeasurementCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - IlluminanceMeasurementCluster * cppCluster = new IlluminanceMeasurementCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeMeasuredValueAttribute) +JNI_METHOD(void, LevelControlCluster, subscribeMinLevelAttribute) (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); + 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)); @@ -11894,20 +11387,20 @@ JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeMeasuredValueAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - IlluminanceMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, + 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)); - using TypeInfo = chip::app::Clusters::IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::MinLevel::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), CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::OnSubscriptionEstablished); + 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)); @@ -11915,14 +11408,12 @@ JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeMeasuredValueAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeMinMeasuredValueAttribute) +JNI_METHOD(void, LevelControlCluster, subscribeMaxLevelAttribute) (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); + 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)); @@ -11933,21 +11424,20 @@ JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeMinMeasuredValueAttribu chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - IlluminanceMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::MaxLevel::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::OnSubscriptionEstablished); + 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)); @@ -11955,14 +11445,12 @@ JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeMinMeasuredValueAttribu onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeMaxMeasuredValueAttribute) +JNI_METHOD(void, LevelControlCluster, subscribeCurrentFrequencyAttribute) (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); + 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)); @@ -11973,21 +11461,20 @@ JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeMaxMeasuredValueAttribu chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - IlluminanceMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::CurrentFrequency::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::OnSubscriptionEstablished); + 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)); @@ -11995,7 +11482,7 @@ JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeMaxMeasuredValueAttribu onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeToleranceAttribute) +JNI_METHOD(void, LevelControlCluster, subscribeMinFrequencyAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -12011,15 +11498,15 @@ JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeToleranceAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - IlluminanceMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::MinFrequency::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, @@ -12032,14 +11519,12 @@ JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeToleranceAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeLightSensorTypeAttribute) +JNI_METHOD(void, LevelControlCluster, subscribeMaxFrequencyAttribute) (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); + 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)); @@ -12050,21 +11535,20 @@ JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeLightSensorTypeAttribut chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - IlluminanceMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::MaxFrequency::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::OnSubscriptionEstablished); + 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)); @@ -12072,12 +11556,12 @@ JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeLightSensorTypeAttribut onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, LevelControlCluster, 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); + 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)); @@ -12088,21 +11572,20 @@ JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeClusterRevisionAttribut chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - IlluminanceMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::Options::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -12110,69 +11593,50 @@ JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeClusterRevisionAttribut onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, KeypadInputCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - KeypadInputCluster * cppCluster = new KeypadInputCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, KeypadInputCluster, sendKeyRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject keyCode, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, LevelControlCluster, subscribeOnOffTransitionTimeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - KeypadInputCluster * cppCluster; - - chip::app::Clusters::KeypadInput::Commands::SendKeyRequest::Type request; - - request.keyCode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(keyCode)); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnOffTransitionTime::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, KeypadInputCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, LevelControlCluster, subscribeOnLevelAttribute) (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); + 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)); @@ -12183,20 +11647,20 @@ JNI_METHOD(void, KeypadInputCluster, subscribeClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - KeypadInputCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::KeypadInput::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnLevel::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + CHIPLevelControlOnLevelAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -12204,284 +11668,299 @@ JNI_METHOD(void, KeypadInputCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, LevelControlCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - LevelControlCluster * cppCluster = new LevelControlCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, LevelControlCluster, move) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject moveMode, jobject rate, jobject optionMask, - jobject optionOverride, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, LevelControlCluster, subscribeOnTransitionTimeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster; - - chip::app::Clusters::LevelControl::Commands::Move::Type request; - - request.moveMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); - request.rate = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(rate)); - request.optionMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionMask)); - request.optionOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionOverride)); + 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 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnTransitionTime::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPLevelControlOnTransitionTimeAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, moveToLevel) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject level, jobject transitionTime, jobject optionMask, - jobject optionOverride, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, LevelControlCluster, subscribeOffTransitionTimeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster; - - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type request; - - request.level = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(level)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); - request.optionMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionMask)); - request.optionOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionOverride)); + 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 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OffTransitionTime::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPLevelControlOffTransitionTimeAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, moveToLevelWithOnOff) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject level, jobject transitionTime, - jobject timedInvokeTimeoutMs) +JNI_METHOD(void, LevelControlCluster, subscribeDefaultMoveRateAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster; - - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type request; - - request.level = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(level)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + 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 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::DefaultMoveRate::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPLevelControlDefaultMoveRateAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, moveWithOnOff) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject moveMode, jobject rate, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, LevelControlCluster, subscribeStartUpCurrentLevelAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster; - - chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Type request; - - request.moveMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); - request.rate = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(rate)); + 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 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPLevelControlStartUpCurrentLevelAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, step) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject stepMode, jobject stepSize, jobject transitionTime, - jobject optionMask, jobject optionOverride, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, LevelControlCluster, subscribeFeatureMapAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster; - - chip::app::Clusters::LevelControl::Commands::Step::Type request; - - request.stepMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); - request.stepSize = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepSize)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); - request.optionMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionMask)); - request.optionOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionOverride)); + 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 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::FeatureMap::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, stepWithOnOff) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject stepMode, jobject stepSize, jobject transitionTime, - jobject timedInvokeTimeoutMs) +JNI_METHOD(void, LevelControlCluster, subscribeClusterRevisionAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster; + 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)); - chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Type request; + 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)); - request.stepMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); - request.stepSize = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepSize)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + 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)); + + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::ClusterRevision::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(); +} +JNI_METHOD(jlong, LocalizationConfigurationCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + LocalizationConfigurationCluster * cppCluster = new LocalizationConfigurationCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, LocalizationConfigurationCluster, subscribeActiveLocaleAttribute) +(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; + LocalizationConfigurationCluster * 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::LocalizationConfiguration::Attributes::ActiveLocale::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), + CHIPCharStringAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(jlong, LowPowerCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + LowPowerCluster * cppCluster = new LowPowerCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, LowPowerCluster, sleep) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + LowPowerCluster * cppCluster; + + chip::app::Clusters::LowPower::Commands::Sleep::Type request; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -12494,7 +11973,7 @@ JNI_METHOD(void, LevelControlCluster, stepWithOnOff) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); @@ -12518,20 +11997,60 @@ JNI_METHOD(void, LevelControlCluster, stepWithOnOff) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, stop) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject optionMask, jobject optionOverride, - jobject timedInvokeTimeoutMs) +JNI_METHOD(void, LowPowerCluster, subscribeClusterRevisionAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster; + 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)); - chip::app::Clusters::LevelControl::Commands::Stop::Type request; + 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)); - request.optionMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionMask)); - request.optionOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionOverride)); + CHIP_ERROR err = CHIP_NO_ERROR; + LowPowerCluster * 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::LowPower::Attributes::ClusterRevision::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(); +} +JNI_METHOD(jlong, MediaInputCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + MediaInputCluster * cppCluster = new MediaInputCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, MediaInputCluster, hideInputStatusRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + MediaInputCluster * cppCluster; + + chip::app::Clusters::MediaInput::Commands::HideInputStatusRequest::Type request; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -12544,7 +12063,7 @@ JNI_METHOD(void, LevelControlCluster, stop) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); @@ -12568,14 +12087,17 @@ JNI_METHOD(void, LevelControlCluster, stop) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, stopWithOnOff) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, MediaInputCluster, renameInputRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject index, jstring name, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster; + MediaInputCluster * cppCluster; - chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Type request; + chip::app::Clusters::MediaInput::Commands::RenameInputRequest::Type request; + + request.index = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(index)); + request.name = chip::JniUtfString(env, static_cast(name)).charSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -12588,7 +12110,7 @@ JNI_METHOD(void, LevelControlCluster, stopWithOnOff) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); @@ -12612,81 +12134,97 @@ JNI_METHOD(void, LevelControlCluster, stopWithOnOff) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, subscribeCurrentLevelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, MediaInputCluster, selectInputRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject index, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + MediaInputCluster * cppCluster; + + chip::app::Clusters::MediaInput::Commands::SelectInputRequest::Type request; + + request.index = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(index)); + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::CurrentLevel::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, subscribeRemainingTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, MediaInputCluster, showInputStatusRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + MediaInputCluster * cppCluster; + chip::app::Clusters::MediaInput::Commands::ShowInputStatusRequest::Type request; + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::RemainingTime::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, subscribeMinLevelAttribute) +JNI_METHOD(void, MediaInputCluster, subscribeCurrentMediaInputAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -12702,15 +12240,15 @@ JNI_METHOD(void, LevelControlCluster, subscribeMinLevelAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + MediaInputCluster * 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::LevelControl::Attributes::MinLevel::TypeInfo; + using TypeInfo = chip::app::Clusters::MediaInput::Attributes::CurrentMediaInput::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -12723,12 +12261,12 @@ JNI_METHOD(void, LevelControlCluster, subscribeMinLevelAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, subscribeMaxLevelAttribute) +JNI_METHOD(void, MediaInputCluster, subscribeClusterRevisionAttribute) (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); + 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)); @@ -12739,20 +12277,20 @@ JNI_METHOD(void, LevelControlCluster, subscribeMaxLevelAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + MediaInputCluster * 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::LevelControl::Attributes::MaxLevel::TypeInfo; + using TypeInfo = chip::app::Clusters::MediaInput::Attributes::ClusterRevision::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -12760,526 +12298,535 @@ JNI_METHOD(void, LevelControlCluster, subscribeMaxLevelAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, subscribeCurrentFrequencyAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(jlong, MediaPlaybackCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { 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)); + MediaPlaybackCluster * cppCluster = new MediaPlaybackCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, MediaPlaybackCluster, fastForwardRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + MediaPlaybackCluster * cppCluster; + + chip::app::Clusters::MediaPlayback::Commands::FastForwardRequest::Type request; + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::CurrentFrequency::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, subscribeMinFrequencyAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, MediaPlaybackCluster, nextRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + MediaPlaybackCluster * cppCluster; + + chip::app::Clusters::MediaPlayback::Commands::NextRequest::Type request; + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::MinFrequency::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, subscribeMaxFrequencyAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, MediaPlaybackCluster, pauseRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + MediaPlaybackCluster * cppCluster; + chip::app::Clusters::MediaPlayback::Commands::PauseRequest::Type request; + + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::MaxFrequency::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, LevelControlCluster, writeOptionsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, MediaPlaybackCluster, playRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::Options::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + CHIP_ERROR err = CHIP_NO_ERROR; + MediaPlaybackCluster * cppCluster; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + chip::app::Clusters::MediaPlayback::Commands::PlayRequest::Type request; + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - if (timedWriteTimeoutMs == nullptr) + if (timedInvokeTimeoutMs == nullptr) { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); } else { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, subscribeOptionsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, MediaPlaybackCluster, previousRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + MediaPlaybackCluster * cppCluster; + + chip::app::Clusters::MediaPlayback::Commands::PreviousRequest::Type request; + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::Options::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, LevelControlCluster, writeOnOffTransitionTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, MediaPlaybackCluster, rewindRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnOffTransitionTime::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + CHIP_ERROR err = CHIP_NO_ERROR; + MediaPlaybackCluster * cppCluster; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + chip::app::Clusters::MediaPlayback::Commands::RewindRequest::Type request; + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - if (timedWriteTimeoutMs == nullptr) + if (timedInvokeTimeoutMs == nullptr) { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); } else { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} -JNI_METHOD(void, LevelControlCluster, subscribeOnOffTransitionTimeAttribute) -(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; - LevelControlCluster * 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::LevelControl::Attributes::OnOffTransitionTime::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)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, LevelControlCluster, writeOnLevelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, MediaPlaybackCluster, seekRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject position, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnLevel::TypeInfo; - TypeInfo::Type cppValue; + CHIP_ERROR err = CHIP_NO_ERROR; + MediaPlaybackCluster * cppCluster; - uint8_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + chip::app::Clusters::MediaPlayback::Commands::SeekRequest::Type request; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + request.position = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(position)); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - if (timedWriteTimeoutMs == nullptr) + if (timedInvokeTimeoutMs == nullptr) { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); } else { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, subscribeOnLevelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, MediaPlaybackCluster, skipBackwardRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject deltaPositionMilliseconds, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + MediaPlaybackCluster * cppCluster; + + chip::app::Clusters::MediaPlayback::Commands::SkipBackwardRequest::Type request; + + request.deltaPositionMilliseconds = static_cast( + chip::JniReferences::GetInstance().LongToPrimitive(deltaPositionMilliseconds)); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnLevel::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPLevelControlOnLevelAttributeCallback::OnSubscriptionEstablished); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, LevelControlCluster, writeOnTransitionTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, MediaPlaybackCluster, skipForwardRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject deltaPositionMilliseconds, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnTransitionTime::TypeInfo; - TypeInfo::Type cppValue; + CHIP_ERROR err = CHIP_NO_ERROR; + MediaPlaybackCluster * cppCluster; - uint16_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + chip::app::Clusters::MediaPlayback::Commands::SkipForwardRequest::Type request; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + request.deltaPositionMilliseconds = static_cast( + chip::JniReferences::GetInstance().LongToPrimitive(deltaPositionMilliseconds)); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - if (timedWriteTimeoutMs == nullptr) + if (timedInvokeTimeoutMs == nullptr) { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); } else { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, subscribeOnTransitionTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, MediaPlaybackCluster, startOverRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + MediaPlaybackCluster * cppCluster; + + chip::app::Clusters::MediaPlayback::Commands::StartOverRequest::Type request; + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnTransitionTime::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPLevelControlOnTransitionTimeAttributeCallback::OnSubscriptionEstablished); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, LevelControlCluster, writeOffTransitionTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, MediaPlaybackCluster, stopRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OffTransitionTime::TypeInfo; - TypeInfo::Type cppValue; - - uint16_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + CHIP_ERROR err = CHIP_NO_ERROR; + MediaPlaybackCluster * cppCluster; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + chip::app::Clusters::MediaPlayback::Commands::StopRequest::Type request; + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - if (timedWriteTimeoutMs == nullptr) + if (timedInvokeTimeoutMs == nullptr) { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); } else { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, subscribeOffTransitionTimeAttribute) +JNI_METHOD(void, MediaPlaybackCluster, subscribePlaybackStateAttribute) (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); + 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)); @@ -13290,20 +12837,20 @@ JNI_METHOD(void, LevelControlCluster, subscribeOffTransitionTimeAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + MediaPlaybackCluster * 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::LevelControl::Attributes::OffTransitionTime::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::PlaybackState::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), - CHIPLevelControlOffTransitionTimeAttributeCallback::OnSubscriptionEstablished); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -13311,65 +12858,49 @@ JNI_METHOD(void, LevelControlCluster, subscribeOffTransitionTimeAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, LevelControlCluster, writeDefaultMoveRateAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, MediaPlaybackCluster, subscribeStartTimeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::DefaultMoveRate::TypeInfo; - TypeInfo::Type cppValue; - - uint8_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + MediaPlaybackCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::StartTime::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, subscribeDefaultMoveRateAttribute) +JNI_METHOD(void, MediaPlaybackCluster, subscribeDurationAttribute) (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); + 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)); @@ -13380,20 +12911,20 @@ JNI_METHOD(void, LevelControlCluster, subscribeDefaultMoveRateAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + MediaPlaybackCluster * 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::LevelControl::Attributes::DefaultMoveRate::TypeInfo; + using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::Duration::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPLevelControlDefaultMoveRateAttributeCallback::OnSubscriptionEstablished); + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -13401,66 +12932,49 @@ JNI_METHOD(void, LevelControlCluster, subscribeDefaultMoveRateAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, LevelControlCluster, writeStartUpCurrentLevelAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, MediaPlaybackCluster, subscribePlaybackSpeedAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - TypeInfo::Type cppValue; - - uint8_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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; - LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + MediaPlaybackCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPFloatAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, subscribeStartUpCurrentLevelAttribute) +JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeEndAttribute) (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); + 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)); @@ -13471,20 +12985,20 @@ JNI_METHOD(void, LevelControlCluster, subscribeStartUpCurrentLevelAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + MediaPlaybackCluster * 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::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::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), - CHIPLevelControlStartUpCurrentLevelAttributeCallback::OnSubscriptionEstablished); + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -13492,12 +13006,12 @@ JNI_METHOD(void, LevelControlCluster, subscribeStartUpCurrentLevelAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, subscribeFeatureMapAttribute) +JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeStartAttribute) (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); + 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)); @@ -13508,20 +13022,20 @@ JNI_METHOD(void, LevelControlCluster, subscribeFeatureMapAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + MediaPlaybackCluster * 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::LevelControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeStart::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -13529,7 +13043,7 @@ JNI_METHOD(void, LevelControlCluster, subscribeFeatureMapAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LevelControlCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, MediaPlaybackCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -13545,15 +13059,15 @@ JNI_METHOD(void, LevelControlCluster, subscribeClusterRevisionAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + MediaPlaybackCluster * 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::LevelControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::ClusterRevision::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -13566,67 +13080,67 @@ JNI_METHOD(void, LevelControlCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, LocalizationConfigurationCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(jlong, ModeSelectCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - LocalizationConfigurationCluster * cppCluster = new LocalizationConfigurationCluster(); + ModeSelectCluster * cppCluster = new ModeSelectCluster(); cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, LocalizationConfigurationCluster, writeActiveLocaleAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ModeSelectCluster, changeToMode) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject newMode, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; - TypeInfo::Type cppValue; + CHIP_ERROR err = CHIP_NO_ERROR; + ModeSelectCluster * cppCluster; - cppValue = chip::JniUtfString(env, static_cast(value)).charSpan(); + chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type request; + + request.newMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(newMode)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + 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)); - CHIP_ERROR err = CHIP_NO_ERROR; - LocalizationConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - if (timedWriteTimeoutMs == nullptr) + if (timedInvokeTimeoutMs == nullptr) { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); } else { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LocalizationConfigurationCluster, subscribeActiveLocaleAttribute) +JNI_METHOD(void, ModeSelectCluster, subscribeCurrentModeAttribute) (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); + 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)); @@ -13637,21 +13151,20 @@ JNI_METHOD(void, LocalizationConfigurationCluster, subscribeActiveLocaleAttribut 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); + 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)); - using TypeInfo = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + using TypeInfo = chip::app::Clusters::ModeSelect::Attributes::CurrentMode::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), - CHIPCharStringAttributeCallback::OnSubscriptionEstablished); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -13659,60 +13172,118 @@ JNI_METHOD(void, LocalizationConfigurationCluster, subscribeActiveLocaleAttribut onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, LowPowerCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(void, ModeSelectCluster, subscribeOnModeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - LowPowerCluster * cppCluster = new LowPowerCluster(); + 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)); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} + 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)); -JNI_METHOD(void, LowPowerCluster, sleep) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) + 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)); + + using TypeInfo = chip::app::Clusters::ModeSelect::Attributes::OnMode::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, ModeSelectCluster, subscribeStartUpModeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - LowPowerCluster * cppCluster; - - chip::app::Clusters::LowPower::Commands::Sleep::Type request; + 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 onSuccess( - Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); + 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; + ModeSelectCluster * 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::ModeSelect::Attributes::StartUpMode::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, ModeSelectCluster, subscribeDescriptionAttribute) +(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, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + 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, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + ModeSelectCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ModeSelect::Attributes::Description::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPCharStringAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, LowPowerCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, ModeSelectCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -13728,15 +13299,15 @@ JNI_METHOD(void, LowPowerCluster, subscribeClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - LowPowerCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::LowPower::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = chip::app::Clusters::ModeSelect::Attributes::ClusterRevision::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -13749,26 +13320,32 @@ JNI_METHOD(void, LowPowerCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, MediaInputCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(jlong, NetworkCommissioningCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - MediaInputCluster * cppCluster = new MediaInputCluster(); + NetworkCommissioningCluster * cppCluster = new NetworkCommissioningCluster(); cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, MediaInputCluster, hideInputStatusRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateThreadNetwork) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray operationalDataset, jobject breadcrumb, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - MediaInputCluster * cppCluster; + NetworkCommissioningCluster * cppCluster; - chip::app::Clusters::MediaInput::Commands::HideInputStatusRequest::Type request; + chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type request; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + request.operationalDataset = chip::JniByteArray(env, static_cast(operationalDataset)).byteSpan(); + request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); + + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -13778,12 +13355,13 @@ JNI_METHOD(void, MediaInputCluster, hideInputStatusRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -13802,20 +13380,24 @@ JNI_METHOD(void, MediaInputCluster, hideInputStatusRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaInputCluster, renameInputRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject index, jstring name, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateWiFiNetwork) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray ssid, jbyteArray credentials, jobject breadcrumb, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - MediaInputCluster * cppCluster; + NetworkCommissioningCluster * cppCluster; - chip::app::Clusters::MediaInput::Commands::RenameInputRequest::Type request; + chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type request; - request.index = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(index)); - request.name = chip::JniUtfString(env, static_cast(name)).charSpan(); + request.ssid = chip::JniByteArray(env, static_cast(ssid)).byteSpan(); + request.credentials = chip::JniByteArray(env, static_cast(credentials)).byteSpan(); + request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -13825,12 +13407,13 @@ JNI_METHOD(void, MediaInputCluster, renameInputRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -13849,19 +13432,23 @@ JNI_METHOD(void, MediaInputCluster, renameInputRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaInputCluster, selectInputRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject index, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, NetworkCommissioningCluster, connectNetwork) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray networkID, jobject breadcrumb, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - MediaInputCluster * cppCluster; + NetworkCommissioningCluster * cppCluster; - chip::app::Clusters::MediaInput::Commands::SelectInputRequest::Type request; + chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetwork::Type request; - request.index = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(index)); + request.networkID = chip::JniByteArray(env, static_cast(networkID)).byteSpan(); + request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -13871,12 +13458,13 @@ JNI_METHOD(void, MediaInputCluster, selectInputRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -13895,17 +13483,23 @@ JNI_METHOD(void, MediaInputCluster, selectInputRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaInputCluster, showInputStatusRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, NetworkCommissioningCluster, removeNetwork) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray networkID, jobject breadcrumb, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - MediaInputCluster * cppCluster; + NetworkCommissioningCluster * cppCluster; - chip::app::Clusters::MediaInput::Commands::ShowInputStatusRequest::Type request; + chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::Type request; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + request.networkID = chip::JniByteArray(env, static_cast(networkID)).byteSpan(); + request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); + + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -13915,12 +13509,13 @@ JNI_METHOD(void, MediaInputCluster, showInputStatusRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -13939,101 +13534,25 @@ JNI_METHOD(void, MediaInputCluster, showInputStatusRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaInputCluster, subscribeCurrentMediaInputAttribute) -(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; - MediaInputCluster * 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::MediaInput::Attributes::CurrentMediaInput::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, MediaInputCluster, subscribeClusterRevisionAttribute) -(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; - MediaInputCluster * 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::MediaInput::Attributes::ClusterRevision::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(); -} -JNI_METHOD(jlong, MediaPlaybackCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - MediaPlaybackCluster * cppCluster = new MediaPlaybackCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, MediaPlaybackCluster, fastForwardRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, NetworkCommissioningCluster, reorderNetwork) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray networkID, jobject networkIndex, jobject breadcrumb, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster; + NetworkCommissioningCluster * cppCluster; - chip::app::Clusters::MediaPlayback::Commands::FastForwardRequest::Type request; + chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Type request; - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + request.networkID = chip::JniByteArray(env, static_cast(networkID)).byteSpan(); + request.networkIndex = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(networkIndex)); + request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); + + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -14043,13 +13562,13 @@ JNI_METHOD(void, MediaPlaybackCluster, fastForwardRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -14068,18 +13587,22 @@ JNI_METHOD(void, MediaPlaybackCluster, fastForwardRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, nextRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, NetworkCommissioningCluster, scanNetworks) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray ssid, jobject breadcrumb, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster; + NetworkCommissioningCluster * cppCluster; - chip::app::Clusters::MediaPlayback::Commands::NextRequest::Type request; + chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Type request; - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + request.ssid = chip::JniByteArray(env, static_cast(ssid)).byteSpan(); + request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); + + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -14089,13 +13612,13 @@ JNI_METHOD(void, MediaPlaybackCluster, nextRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -14114,348 +13637,369 @@ JNI_METHOD(void, MediaPlaybackCluster, nextRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, pauseRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, NetworkCommissioningCluster, subscribeMaxNetworksAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster; - - chip::app::Clusters::MediaPlayback::Commands::PauseRequest::Type request; + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + NetworkCommissioningCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, playRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, NetworkCommissioningCluster, subscribeScanMaxTimeSecondsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster; - - chip::app::Clusters::MediaPlayback::Commands::PlayRequest::Type request; + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + NetworkCommissioningCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, previousRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, NetworkCommissioningCluster, subscribeConnectMaxTimeSecondsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster; - - chip::app::Clusters::MediaPlayback::Commands::PreviousRequest::Type request; + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + NetworkCommissioningCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, rewindRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, NetworkCommissioningCluster, subscribeInterfaceEnabledAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster; - - chip::app::Clusters::MediaPlayback::Commands::RewindRequest::Type request; + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + NetworkCommissioningCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPBooleanAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, seekRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject position, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, NetworkCommissioningCluster, subscribeLastNetworkingStatusAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster; - - chip::app::Clusters::MediaPlayback::Commands::SeekRequest::Type request; - - request.position = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(position)); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + NetworkCommissioningCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, skipBackwardRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject deltaPositionMilliseconds, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, NetworkCommissioningCluster, subscribeLastNetworkIDAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster; - - chip::app::Clusters::MediaPlayback::Commands::SkipBackwardRequest::Type request; - - request.deltaPositionMilliseconds = static_cast( - chip::JniReferences::GetInstance().LongToPrimitive(deltaPositionMilliseconds)); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + NetworkCommissioningCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPOctetStringAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, skipForwardRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject deltaPositionMilliseconds, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, NetworkCommissioningCluster, subscribeLastConnectErrorValueAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster; - - chip::app::Clusters::MediaPlayback::Commands::SkipForwardRequest::Type request; - - request.deltaPositionMilliseconds = static_cast( - chip::JniReferences::GetInstance().LongToPrimitive(deltaPositionMilliseconds)); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + NetworkCommissioningCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, startOverRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, NetworkCommissioningCluster, subscribeFeatureMapAttribute) +(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; + NetworkCommissioningCluster * 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::NetworkCommissioning::Attributes::FeatureMap::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), + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, NetworkCommissioningCluster, subscribeClusterRevisionAttribute) +(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; + NetworkCommissioningCluster * 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::NetworkCommissioning::Attributes::ClusterRevision::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(); +} +JNI_METHOD(jlong, OtaSoftwareUpdateProviderCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + OtaSoftwareUpdateProviderCluster * cppCluster = new OtaSoftwareUpdateProviderCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, applyUpdateRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray updateToken, jobject newVersion, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster; + OtaSoftwareUpdateProviderCluster * cppCluster; - chip::app::Clusters::MediaPlayback::Commands::StartOverRequest::Type request; + chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type request; - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + request.updateToken = chip::JniByteArray(env, static_cast(updateToken)).byteSpan(); + request.newVersion = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(newVersion)); + + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -14465,13 +14009,13 @@ JNI_METHOD(void, MediaPlaybackCluster, startOverRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -14490,18 +14034,22 @@ JNI_METHOD(void, MediaPlaybackCluster, startOverRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, stopRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, notifyUpdateApplied) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray updateToken, jobject softwareVersion, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster; + OtaSoftwareUpdateProviderCluster * cppCluster; - chip::app::Clusters::MediaPlayback::Commands::StopRequest::Type request; + chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type request; - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + request.updateToken = chip::JniByteArray(env, static_cast(updateToken)).byteSpan(); + request.softwareVersion = + static_cast(chip::JniReferences::GetInstance().LongToPrimitive(softwareVersion)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -14511,13 +14059,12 @@ JNI_METHOD(void, MediaPlaybackCluster, stopRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -14536,49 +14083,79 @@ JNI_METHOD(void, MediaPlaybackCluster, stopRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, subscribePlaybackStateAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, queryImage) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject vendorId, jobject productId, jobject softwareVersion, + jobject protocolsSupported, jobject hardwareVersion, jobject location, jobject requestorCanConsent, jobject metadataForProvider, + jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + OtaSoftwareUpdateProviderCluster * cppCluster; + + chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Type request; + + request.vendorId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(vendorId)); + request.productId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(productId)); + request.softwareVersion = + static_cast(chip::JniReferences::GetInstance().LongToPrimitive(softwareVersion)); + request.protocolsSupported = + chip::app::DataModel::List(); + chip::JniReferences::GetInstance().GetOptionalValue(hardwareVersion, hardwareVersion); + request.hardwareVersion = chip::Optional( + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(hardwareVersion))); + chip::JniReferences::GetInstance().GetOptionalValue(location, location); + request.location = chip::Optional(chip::JniUtfString(env, static_cast(location)).charSpan()); + chip::JniReferences::GetInstance().GetOptionalValue(requestorCanConsent, requestorCanConsent); + request.requestorCanConsent = chip::Optional(static_cast( + chip::JniReferences::GetInstance().BooleanToPrimitive(requestorCanConsent))); + chip::JniReferences::GetInstance().GetOptionalValue(metadataForProvider, metadataForProvider); + request.metadataForProvider = + chip::Optional(chip::JniByteArray(env, static_cast(metadataForProvider)).byteSpan()); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::PlaybackState::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, subscribeStartTimeAttribute) +JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, subscribeClusterRevisionAttribute) (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); + 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)); @@ -14589,20 +14166,21 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeStartTimeAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + OtaSoftwareUpdateProviderCluster * 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::MediaPlayback::Attributes::StartTime::TypeInfo; + using TypeInfo = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -14610,49 +14188,76 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeStartTimeAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, subscribeDurationAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(jlong, OtaSoftwareUpdateRequestorCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { 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)); + OtaSoftwareUpdateRequestorCluster * cppCluster = new OtaSoftwareUpdateRequestorCluster(); - 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)); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} - CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); +JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, announceOtaProvider) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject providerNodeId, jobject vendorId, + jobject announcementReason, jobject metadataForNode, jobject endpoint, jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + OtaSoftwareUpdateRequestorCluster * cppCluster; - using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::Duration::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Type request; + + request.providerNodeId = + static_cast(chip::JniReferences::GetInstance().LongToPrimitive(providerNodeId)); + request.vendorId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(vendorId)); + request.announcementReason = static_cast( + chip::JniReferences::GetInstance().IntegerToPrimitive(announcementReason)); + chip::JniReferences::GetInstance().GetOptionalValue(metadataForNode, metadataForNode); + request.metadataForNode = + chip::Optional(chip::JniByteArray(env, static_cast(metadataForNode)).byteSpan()); + request.endpoint = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(endpoint)); + + 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()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, subscribePlaybackSpeedAttribute) +JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, subscribeUpdatePossibleAttribute) (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); + 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)); @@ -14663,20 +14268,21 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribePlaybackSpeedAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; + using TypeInfo = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPFloatAttributeCallback::OnSubscriptionEstablished); + CHIPBooleanAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -14684,12 +14290,12 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribePlaybackSpeedAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeEndAttribute) +JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, subscribeUpdateStateAttribute) (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); + 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)); @@ -14700,20 +14306,21 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeEndAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; + using TypeInfo = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -14721,12 +14328,14 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeEndAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeStartAttribute) +JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, subscribeUpdateStateProgressAttribute) (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); + 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)); @@ -14737,20 +14346,22 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeStartAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeStart::TypeInfo; + using TypeInfo = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -14758,7 +14369,7 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeStartAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, MediaPlaybackCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -14774,15 +14385,16 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - MediaPlaybackCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -14795,62 +14407,16 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, ModeSelectCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(jlong, OccupancySensingCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - ModeSelectCluster * cppCluster = new ModeSelectCluster(); + OccupancySensingCluster * cppCluster = new OccupancySensingCluster(); cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, ModeSelectCluster, changeToMode) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject newMode, jobject timedInvokeTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - ModeSelectCluster * cppCluster; - - chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type request; - - request.newMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(newMode)); - - 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(); -} -JNI_METHOD(void, ModeSelectCluster, subscribeCurrentModeAttribute) +JNI_METHOD(void, OccupancySensingCluster, subscribeOccupancyAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -14866,15 +14432,15 @@ JNI_METHOD(void, ModeSelectCluster, subscribeCurrentModeAttribute) 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); + 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)); - using TypeInfo = chip::app::Clusters::ModeSelect::Attributes::CurrentMode::TypeInfo; + using TypeInfo = chip::app::Clusters::OccupancySensing::Attributes::Occupancy::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -14887,54 +14453,44 @@ JNI_METHOD(void, ModeSelectCluster, subscribeCurrentModeAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ModeSelectCluster, writeOnModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, OccupancySensingCluster, subscribeOccupancySensorTypeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ModeSelect::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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; - ModeSelectCluster * cppCluster = reinterpret_cast(clusterPtr); + 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()); + using TypeInfo = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorType::TypeInfo; + 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)); + 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, ModeSelectCluster, subscribeOnModeAttribute) +JNI_METHOD(void, OccupancySensingCluster, subscribeOccupancySensorTypeBitmapAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -14950,15 +14506,16 @@ JNI_METHOD(void, ModeSelectCluster, subscribeOnModeAttribute) 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); + 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)); - using TypeInfo = chip::app::Clusters::ModeSelect::Attributes::OnMode::TypeInfo; + using TypeInfo = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -14971,12 +14528,12 @@ JNI_METHOD(void, ModeSelectCluster, subscribeOnModeAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ModeSelectCluster, subscribeStartUpModeAttribute) +JNI_METHOD(void, OccupancySensingCluster, subscribeClusterRevisionAttribute) (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); + 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)); @@ -14987,20 +14544,20 @@ JNI_METHOD(void, ModeSelectCluster, subscribeStartUpModeAttribute) 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); + 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)); - using TypeInfo = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::OccupancySensing::Attributes::ClusterRevision::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); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -15008,106 +14565,25 @@ JNI_METHOD(void, ModeSelectCluster, subscribeStartUpModeAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ModeSelectCluster, subscribeDescriptionAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(jlong, OnOffCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { 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; - ModeSelectCluster * 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::ModeSelect::Attributes::Description::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), - CHIPCharStringAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} -JNI_METHOD(void, ModeSelectCluster, subscribeClusterRevisionAttribute) -(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; - ModeSelectCluster * 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::ModeSelect::Attributes::ClusterRevision::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(); -} -JNI_METHOD(jlong, NetworkCommissioningCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - NetworkCommissioningCluster * cppCluster = new NetworkCommissioningCluster(); + OnOffCluster * cppCluster = new OnOffCluster(); cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateThreadNetwork) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray operationalDataset, jobject breadcrumb, - jobject timedInvokeTimeoutMs) +JNI_METHOD(void, OnOffCluster, off)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - NetworkCommissioningCluster * cppCluster; - - chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type request; + OnOffCluster * cppCluster; - request.operationalDataset = chip::JniByteArray(env, static_cast(operationalDataset)).byteSpan(); - request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); + chip::app::Clusters::OnOff::Commands::Off::Type request; - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -15117,13 +14593,12 @@ JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateThreadNetwork) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -15142,24 +14617,22 @@ JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateThreadNetwork) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateWiFiNetwork) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray ssid, jbyteArray credentials, jobject breadcrumb, +JNI_METHOD(void, OnOffCluster, offWithEffect) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject effectId, jobject effectVariant, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - NetworkCommissioningCluster * cppCluster; + OnOffCluster * cppCluster; - chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type request; + chip::app::Clusters::OnOff::Commands::OffWithEffect::Type request; - request.ssid = chip::JniByteArray(env, static_cast(ssid)).byteSpan(); - request.credentials = chip::JniByteArray(env, static_cast(credentials)).byteSpan(); - request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); + request.effectId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(effectId)); + request.effectVariant = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(effectVariant)); - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -15169,13 +14642,12 @@ JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateWiFiNetwork) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -15194,23 +14666,16 @@ JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateWiFiNetwork) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, NetworkCommissioningCluster, connectNetwork) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray networkID, jobject breadcrumb, - jobject timedInvokeTimeoutMs) +JNI_METHOD(void, OnOffCluster, on)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - NetworkCommissioningCluster * cppCluster; - - chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetwork::Type request; + OnOffCluster * cppCluster; - request.networkID = chip::JniByteArray(env, static_cast(networkID)).byteSpan(); - request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); + chip::app::Clusters::OnOff::Commands::On::Type request; - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -15220,13 +14685,12 @@ JNI_METHOD(void, NetworkCommissioningCluster, connectNetwork) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -15245,23 +14709,17 @@ JNI_METHOD(void, NetworkCommissioningCluster, connectNetwork) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, NetworkCommissioningCluster, removeNetwork) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray networkID, jobject breadcrumb, - jobject timedInvokeTimeoutMs) +JNI_METHOD(void, OnOffCluster, onWithRecallGlobalScene) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - NetworkCommissioningCluster * cppCluster; - - chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::Type request; + OnOffCluster * cppCluster; - request.networkID = chip::JniByteArray(env, static_cast(networkID)).byteSpan(); - request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); + chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Type request; - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -15271,13 +14729,12 @@ JNI_METHOD(void, NetworkCommissioningCluster, removeNetwork) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -15296,25 +14753,24 @@ JNI_METHOD(void, NetworkCommissioningCluster, removeNetwork) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, NetworkCommissioningCluster, reorderNetwork) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray networkID, jobject networkIndex, jobject breadcrumb, +JNI_METHOD(void, OnOffCluster, onWithTimedOff) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject onOffControl, jobject onTime, jobject offWaitTime, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - NetworkCommissioningCluster * cppCluster; + OnOffCluster * cppCluster; - chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Type request; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type request; - request.networkID = chip::JniByteArray(env, static_cast(networkID)).byteSpan(); - request.networkIndex = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(networkIndex)); - request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); + request.onOffControl = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(onOffControl)); + request.onTime = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(onTime)); + request.offWaitTime = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(offWaitTime)); - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -15324,13 +14780,12 @@ JNI_METHOD(void, NetworkCommissioningCluster, reorderNetwork) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -15349,22 +14804,16 @@ JNI_METHOD(void, NetworkCommissioningCluster, reorderNetwork) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, NetworkCommissioningCluster, scanNetworks) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray ssid, jobject breadcrumb, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, OnOffCluster, toggle)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - NetworkCommissioningCluster * cppCluster; - - chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Type request; + OnOffCluster * cppCluster; - request.ssid = chip::JniByteArray(env, static_cast(ssid)).byteSpan(); - request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); + chip::app::Clusters::OnOff::Commands::Toggle::Type request; - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -15374,13 +14823,12 @@ JNI_METHOD(void, NetworkCommissioningCluster, scanNetworks) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -15399,12 +14847,12 @@ JNI_METHOD(void, NetworkCommissioningCluster, scanNetworks) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, NetworkCommissioningCluster, subscribeMaxNetworksAttribute) +JNI_METHOD(void, OnOffCluster, subscribeOnOffAttribute) (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); + 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)); @@ -15415,20 +14863,19 @@ JNI_METHOD(void, NetworkCommissioningCluster, subscribeMaxNetworksAttribute) 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); + 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)); - using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::OnOff::Attributes::OnOff::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); + CHIPBooleanAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -15436,12 +14883,12 @@ JNI_METHOD(void, NetworkCommissioningCluster, subscribeMaxNetworksAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, NetworkCommissioningCluster, subscribeScanMaxTimeSecondsAttribute) +JNI_METHOD(void, OnOffCluster, subscribeGlobalSceneControlAttribute) (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); + 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)); @@ -15452,21 +14899,20 @@ JNI_METHOD(void, NetworkCommissioningCluster, subscribeScanMaxTimeSecondsAttribu 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); + 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)); - using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + using TypeInfo = chip::app::Clusters::OnOff::Attributes::GlobalSceneControl::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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); + CHIPBooleanAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -15474,12 +14920,12 @@ JNI_METHOD(void, NetworkCommissioningCluster, subscribeScanMaxTimeSecondsAttribu onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, NetworkCommissioningCluster, subscribeConnectMaxTimeSecondsAttribute) +JNI_METHOD(void, OnOffCluster, subscribeOnTimeAttribute) (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); + 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)); @@ -15490,21 +14936,19 @@ JNI_METHOD(void, NetworkCommissioningCluster, subscribeConnectMaxTimeSecondsAttr 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); + 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)); - using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + using TypeInfo = chip::app::Clusters::OnOff::Attributes::OnTime::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); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -15512,59 +14956,49 @@ JNI_METHOD(void, NetworkCommissioningCluster, subscribeConnectMaxTimeSecondsAttr onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, NetworkCommissioningCluster, writeInterfaceEnabledAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, OnOffCluster, subscribeOffWaitTimeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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; - NetworkCommissioningCluster * cppCluster = reinterpret_cast(clusterPtr); + 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()); + using TypeInfo = chip::app::Clusters::OnOff::Attributes::OffWaitTime::TypeInfo; + 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)); + 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(); } -JNI_METHOD(void, NetworkCommissioningCluster, subscribeInterfaceEnabledAttribute) +JNI_METHOD(void, OnOffCluster, subscribeStartUpOnOffAttribute) (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); + 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)); @@ -15575,20 +15009,20 @@ JNI_METHOD(void, NetworkCommissioningCluster, subscribeInterfaceEnabledAttribute 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); + 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)); - using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::OnOff::Attributes::StartUpOnOff::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), - CHIPBooleanAttributeCallback::OnSubscriptionEstablished); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -15596,12 +15030,12 @@ JNI_METHOD(void, NetworkCommissioningCluster, subscribeInterfaceEnabledAttribute onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, NetworkCommissioningCluster, subscribeLastNetworkingStatusAttribute) +JNI_METHOD(void, OnOffCluster, subscribeFeatureMapAttribute) (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); + 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)); @@ -15612,21 +15046,19 @@ JNI_METHOD(void, NetworkCommissioningCluster, subscribeLastNetworkingStatusAttri 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); + 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)); - using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::OnOff::Attributes::FeatureMap::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); + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -15634,12 +15066,12 @@ JNI_METHOD(void, NetworkCommissioningCluster, subscribeLastNetworkingStatusAttri onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, NetworkCommissioningCluster, subscribeLastNetworkIDAttribute) +JNI_METHOD(void, OnOffCluster, subscribeClusterRevisionAttribute) (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); + 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)); @@ -15650,20 +15082,20 @@ JNI_METHOD(void, NetworkCommissioningCluster, subscribeLastNetworkIDAttribute) 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); + 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)); - using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::OnOff::Attributes::ClusterRevision::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); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -15671,12 +15103,21 @@ JNI_METHOD(void, NetworkCommissioningCluster, subscribeLastNetworkIDAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, NetworkCommissioningCluster, subscribeLastConnectErrorValueAttribute) +JNI_METHOD(jlong, OnOffSwitchConfigurationCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + OnOffSwitchConfigurationCluster * cppCluster = new OnOffSwitchConfigurationCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, OnOffSwitchConfigurationCluster, subscribeSwitchTypeAttribute) (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); + 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)); @@ -15687,21 +15128,20 @@ JNI_METHOD(void, NetworkCommissioningCluster, subscribeLastConnectErrorValueAttr 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); + 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)); - using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchType::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), - CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -15709,12 +15149,12 @@ JNI_METHOD(void, NetworkCommissioningCluster, subscribeLastConnectErrorValueAttr onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, NetworkCommissioningCluster, subscribeFeatureMapAttribute) +JNI_METHOD(void, OnOffSwitchConfigurationCluster, subscribeSwitchActionsAttribute) (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); + 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)); @@ -15725,20 +15165,21 @@ JNI_METHOD(void, NetworkCommissioningCluster, subscribeFeatureMapAttribute) 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); + 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)); - using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::FeatureMap::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::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), - CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -15746,7 +15187,7 @@ JNI_METHOD(void, NetworkCommissioningCluster, subscribeFeatureMapAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, NetworkCommissioningCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, OnOffSwitchConfigurationCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -15762,15 +15203,16 @@ JNI_METHOD(void, NetworkCommissioningCluster, subscribeClusterRevisionAttribute) 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); + 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)); - using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::ClusterRevision::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, @@ -15783,32 +15225,38 @@ JNI_METHOD(void, NetworkCommissioningCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, OtaSoftwareUpdateProviderCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(jlong, OperationalCredentialsCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - OtaSoftwareUpdateProviderCluster * cppCluster = new OtaSoftwareUpdateProviderCluster(); + OperationalCredentialsCluster * cppCluster = new OperationalCredentialsCluster(); cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, applyUpdateRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray updateToken, jobject newVersion, - jobject timedInvokeTimeoutMs) +JNI_METHOD(void, OperationalCredentialsCluster, addNOC) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray NOCValue, jobject ICACValue, jbyteArray IPKValue, + jobject caseAdminNode, jobject adminVendorId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - OtaSoftwareUpdateProviderCluster * cppCluster; + OperationalCredentialsCluster * cppCluster; - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type request; + chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type request; - request.updateToken = chip::JniByteArray(env, static_cast(updateToken)).byteSpan(); - request.newVersion = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(newVersion)); + request.NOCValue = chip::JniByteArray(env, static_cast(NOCValue)).byteSpan(); + chip::JniReferences::GetInstance().GetOptionalValue(ICACValue, ICACValue); + request.ICACValue = chip::Optional(chip::JniByteArray(env, static_cast(ICACValue)).byteSpan()); + request.IPKValue = chip::JniByteArray(env, static_cast(IPKValue)).byteSpan(); + request.caseAdminNode = + static_cast(chip::JniReferences::GetInstance().LongToPrimitive(caseAdminNode)); + request.adminVendorId = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(adminVendorId)); - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -15818,13 +15266,13 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, applyUpdateRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -15843,19 +15291,16 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, applyUpdateRequest) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, notifyUpdateApplied) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray updateToken, jobject softwareVersion, - jobject timedInvokeTimeoutMs) +JNI_METHOD(void, OperationalCredentialsCluster, addTrustedRootCertificate) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray rootCertificate, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - OtaSoftwareUpdateProviderCluster * cppCluster; + OperationalCredentialsCluster * cppCluster; - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type request; + chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type request; - request.updateToken = chip::JniByteArray(env, static_cast(updateToken)).byteSpan(); - request.softwareVersion = - static_cast(chip::JniReferences::GetInstance().LongToPrimitive(softwareVersion)); + request.rootCertificate = chip::JniByteArray(env, static_cast(rootCertificate)).byteSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -15868,7 +15313,7 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, notifyUpdateApplied) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); @@ -15892,39 +15337,21 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, notifyUpdateApplied) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, queryImage) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject vendorId, jobject productId, jobject softwareVersion, - jobject protocolsSupported, jobject hardwareVersion, jobject location, jobject requestorCanConsent, jobject metadataForProvider, - jobject timedInvokeTimeoutMs) +JNI_METHOD(void, OperationalCredentialsCluster, attestationRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray attestationNonce, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - OtaSoftwareUpdateProviderCluster * cppCluster; + OperationalCredentialsCluster * cppCluster; - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Type request; + chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type request; - request.vendorId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(vendorId)); - request.productId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(productId)); - request.softwareVersion = - static_cast(chip::JniReferences::GetInstance().LongToPrimitive(softwareVersion)); - request.protocolsSupported = - chip::app::DataModel::List(); - chip::JniReferences::GetInstance().GetOptionalValue(hardwareVersion, hardwareVersion); - request.hardwareVersion = chip::Optional( - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(hardwareVersion))); - chip::JniReferences::GetInstance().GetOptionalValue(location, location); - request.location = chip::Optional(chip::JniUtfString(env, static_cast(location)).charSpan()); - chip::JniReferences::GetInstance().GetOptionalValue(requestorCanConsent, requestorCanConsent); - request.requestorCanConsent = chip::Optional(static_cast( - chip::JniReferences::GetInstance().BooleanToPrimitive(requestorCanConsent))); - chip::JniReferences::GetInstance().GetOptionalValue(metadataForProvider, metadataForProvider); - request.metadataForProvider = - chip::Optional(chip::JniByteArray(env, static_cast(metadataForProvider)).byteSpan()); + request.attestationNonce = chip::JniByteArray(env, static_cast(attestationNonce)).byteSpan(); - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -15934,12 +15361,12 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, queryImage) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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( + auto successFn = chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); @@ -15959,75 +15386,72 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, queryImage) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, subscribeClusterRevisionAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, OperationalCredentialsCluster, certificateChainRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject certificateType, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + OperationalCredentialsCluster * cppCluster; - 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::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type request; - CHIP_ERROR err = CHIP_NO_ERROR; - OtaSoftwareUpdateProviderCluster * cppCluster = reinterpret_cast(clusterPtr); + request.certificateType = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(certificateType)); + + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, OtaSoftwareUpdateRequestorCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - OtaSoftwareUpdateRequestorCluster * cppCluster = new OtaSoftwareUpdateRequestorCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, announceOtaProvider) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject providerNodeId, jobject vendorId, - jobject announcementReason, jobject metadataForNode, jobject endpoint, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, OperationalCredentialsCluster, opCSRRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray CSRNonce, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - OtaSoftwareUpdateRequestorCluster * cppCluster; + OperationalCredentialsCluster * cppCluster; - chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Type request; + chip::app::Clusters::OperationalCredentials::Commands::OpCSRRequest::Type request; - request.providerNodeId = - static_cast(chip::JniReferences::GetInstance().LongToPrimitive(providerNodeId)); - request.vendorId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(vendorId)); - request.announcementReason = static_cast( - chip::JniReferences::GetInstance().IntegerToPrimitive(announcementReason)); - chip::JniReferences::GetInstance().GetOptionalValue(metadataForNode, metadataForNode); - request.metadataForNode = - chip::Optional(chip::JniByteArray(env, static_cast(metadataForNode)).byteSpan()); - request.endpoint = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(endpoint)); + request.CSRNonce = chip::JniByteArray(env, static_cast(CSRNonce)).byteSpan(); - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -16037,12 +15461,13 @@ JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, announceOtaProvider) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -16061,171 +15486,204 @@ JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, announceOtaProvider) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, subscribeUpdatePossibleAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, OperationalCredentialsCluster, removeFabric) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject fabricIndex, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + OperationalCredentialsCluster * cppCluster; + + chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type request; + + request.fabricIndex = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(fabricIndex)); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - OtaSoftwareUpdateRequestorCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), - CHIPBooleanAttributeCallback::OnSubscriptionEstablished); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, subscribeUpdateStateAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, OperationalCredentialsCluster, removeTrustedRootCertificate) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray trustedRootIdentifier, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + OperationalCredentialsCluster * cppCluster; + + chip::app::Clusters::OperationalCredentials::Commands::RemoveTrustedRootCertificate::Type request; + + request.trustedRootIdentifier = chip::JniByteArray(env, static_cast(trustedRootIdentifier)).byteSpan(); + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - OtaSoftwareUpdateRequestorCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, subscribeUpdateStateProgressAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, OperationalCredentialsCluster, updateFabricLabel) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring label, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + OperationalCredentialsCluster * cppCluster; + + chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type request; + + request.label = chip::JniUtfString(env, static_cast(label)).charSpan(); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - OtaSoftwareUpdateRequestorCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), - CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback::OnSubscriptionEstablished); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, subscribeClusterRevisionAttribute) -(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)); +JNI_METHOD(void, OperationalCredentialsCluster, updateNOC) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray NOCValue, jobject ICACValue, + jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + OperationalCredentialsCluster * cppCluster; + + chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type request; + + request.NOCValue = chip::JniByteArray(env, static_cast(NOCValue)).byteSpan(); + chip::JniReferences::GetInstance().GetOptionalValue(ICACValue, ICACValue); + request.ICACValue = chip::Optional(chip::JniByteArray(env, static_cast(ICACValue)).byteSpan()); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - OtaSoftwareUpdateRequestorCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, OccupancySensingCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - OccupancySensingCluster * cppCluster = new OccupancySensingCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, OccupancySensingCluster, subscribeOccupancyAttribute) +JNI_METHOD(void, OperationalCredentialsCluster, subscribeSupportedFabricsAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -16241,15 +15699,16 @@ JNI_METHOD(void, OccupancySensingCluster, subscribeOccupancyAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + OperationalCredentialsCluster * 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::OccupancySensing::Attributes::Occupancy::TypeInfo; + using TypeInfo = chip::app::Clusters::OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -16262,7 +15721,7 @@ JNI_METHOD(void, OccupancySensingCluster, subscribeOccupancyAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OccupancySensingCluster, subscribeOccupancySensorTypeAttribute) +JNI_METHOD(void, OperationalCredentialsCluster, subscribeCommissionedFabricsAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -16278,15 +15737,16 @@ JNI_METHOD(void, OccupancySensingCluster, subscribeOccupancySensorTypeAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + OperationalCredentialsCluster * 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::OccupancySensing::Attributes::OccupancySensorType::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::OperationalCredentials::Attributes::CommissionedFabrics::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, @@ -16299,12 +15759,14 @@ JNI_METHOD(void, OccupancySensingCluster, subscribeOccupancySensorTypeAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OccupancySensingCluster, subscribeOccupancySensorTypeBitmapAttribute) +JNI_METHOD(void, OperationalCredentialsCluster, subscribeCurrentFabricIndexAttribute) (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); + 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)); @@ -16315,21 +15777,22 @@ JNI_METHOD(void, OccupancySensingCluster, subscribeOccupancySensorTypeBitmapAttr 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); + CHIP_ERROR err = CHIP_NO_ERROR; + OperationalCredentialsCluster * 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::OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; + using TypeInfo = chip::app::Clusters::OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + 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); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -16337,7 +15800,7 @@ JNI_METHOD(void, OccupancySensingCluster, subscribeOccupancySensorTypeBitmapAttr onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OccupancySensingCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, OperationalCredentialsCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -16353,15 +15816,16 @@ JNI_METHOD(void, OccupancySensingCluster, subscribeClusterRevisionAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + OperationalCredentialsCluster * 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::OccupancySensing::Attributes::ClusterRevision::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::OperationalCredentials::Attributes::ClusterRevision::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, @@ -16374,294 +15838,206 @@ JNI_METHOD(void, OccupancySensingCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, OnOffCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(jlong, PowerSourceCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - OnOffCluster * cppCluster = new OnOffCluster(); + PowerSourceCluster * cppCluster = new PowerSourceCluster(); cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, OnOffCluster, off)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, PowerSourceCluster, subscribeStatusAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - OnOffCluster * cppCluster; - - chip::app::Clusters::OnOff::Commands::Off::Type request; + 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 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + PowerSourceCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PowerSource::Attributes::Status::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OnOffCluster, offWithEffect) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject effectId, jobject effectVariant, - jobject timedInvokeTimeoutMs) +JNI_METHOD(void, PowerSourceCluster, subscribeOrderAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - OnOffCluster * cppCluster; - - chip::app::Clusters::OnOff::Commands::OffWithEffect::Type request; - - request.effectId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(effectId)); - request.effectVariant = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(effectVariant)); + 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 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + PowerSourceCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PowerSource::Attributes::Order::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OnOffCluster, on)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, PowerSourceCluster, subscribeDescriptionAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - OnOffCluster * cppCluster; - - chip::app::Clusters::OnOff::Commands::On::Type request; + 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 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + PowerSourceCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PowerSource::Attributes::Description::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPCharStringAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OnOffCluster, onWithRecallGlobalScene) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, PowerSourceCluster, subscribeBatteryVoltageAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - OnOffCluster * cppCluster; - - chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Type request; - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::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(); -} -JNI_METHOD(void, OnOffCluster, onWithTimedOff) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject onOffControl, jobject onTime, jobject offWaitTime, - jobject timedInvokeTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - OnOffCluster * cppCluster; - - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type request; - - request.onOffControl = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(onOffControl)); - request.onTime = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(onTime)); - request.offWaitTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(offWaitTime)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + PowerSourceCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PowerSource::Attributes::BatteryVoltage::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OnOffCluster, toggle)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, PowerSourceCluster, subscribeBatteryPercentRemainingAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - OnOffCluster * cppCluster; - - chip::app::Clusters::OnOff::Commands::Toggle::Type request; + 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 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + PowerSourceCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PowerSource::Attributes::BatteryPercentRemaining::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OnOffCluster, subscribeOnOffAttribute) +JNI_METHOD(void, PowerSourceCluster, subscribeBatteryTimeRemainingAttribute) (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); + 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)); @@ -16672,19 +16048,20 @@ JNI_METHOD(void, OnOffCluster, subscribeOnOffAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + PowerSourceCluster * 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::OnOff::Attributes::OnOff::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PowerSource::Attributes::BatteryTimeRemaining::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), - CHIPBooleanAttributeCallback::OnSubscriptionEstablished); + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -16692,12 +16069,12 @@ JNI_METHOD(void, OnOffCluster, subscribeOnOffAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OnOffCluster, subscribeGlobalSceneControlAttribute) +JNI_METHOD(void, PowerSourceCluster, subscribeBatteryChargeLevelAttribute) (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); + 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)); @@ -16708,20 +16085,20 @@ JNI_METHOD(void, OnOffCluster, subscribeGlobalSceneControlAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + PowerSourceCluster * 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::OnOff::Attributes::GlobalSceneControl::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PowerSource::Attributes::BatteryChargeLevel::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), - CHIPBooleanAttributeCallback::OnSubscriptionEstablished); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -16729,59 +16106,49 @@ JNI_METHOD(void, OnOffCluster, subscribeGlobalSceneControlAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, OnOffCluster, writeOnTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, PowerSourceCluster, subscribeBatteryChargeStateAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::OnOff::Attributes::OnTime::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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; - OnOffCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + PowerSourceCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PowerSource::Attributes::BatteryChargeState::TypeInfo; + 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)); + 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, OnOffCluster, subscribeOnTimeAttribute) +JNI_METHOD(void, PowerSourceCluster, subscribeFeatureMapAttribute) (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); + 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)); @@ -16792,19 +16159,20 @@ JNI_METHOD(void, OnOffCluster, subscribeOnTimeAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + PowerSourceCluster * 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::OnOff::Attributes::OnTime::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PowerSource::Attributes::FeatureMap::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); + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -16812,54 +16180,53 @@ JNI_METHOD(void, OnOffCluster, subscribeOnTimeAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, OnOffCluster, writeOffWaitTimeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, PowerSourceCluster, subscribeClusterRevisionAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::OnOff::Attributes::OffWaitTime::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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; - OnOffCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + PowerSourceCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PowerSource::Attributes::ClusterRevision::TypeInfo; + 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)); + 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(); } -JNI_METHOD(void, OnOffCluster, subscribeOffWaitTimeAttribute) +JNI_METHOD(jlong, PowerSourceConfigurationCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + PowerSourceConfigurationCluster * cppCluster = new PowerSourceConfigurationCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, PowerSourceConfigurationCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -16875,15 +16242,16 @@ JNI_METHOD(void, OnOffCluster, subscribeOffWaitTimeAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + PowerSourceConfigurationCluster * 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::OnOff::Attributes::OffWaitTime::TypeInfo; + using TypeInfo = chip::app::Clusters::PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -16896,59 +16264,58 @@ JNI_METHOD(void, OnOffCluster, subscribeOffWaitTimeAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, OnOffCluster, writeStartUpOnOffAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(jlong, PressureMeasurementCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::OnOff::Attributes::StartUpOnOff::TypeInfo; - TypeInfo::Type cppValue; + PressureMeasurementCluster * cppCluster = new PressureMeasurementCluster(); - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); +JNI_METHOD(void, PressureMeasurementCluster, subscribeMeasuredValueAttribute) +(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), Platform::Delete); + 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; - OnOffCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + PressureMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PressureMeasurement::Attributes::MeasuredValue::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OnOffCluster, subscribeStartUpOnOffAttribute) +JNI_METHOD(void, PressureMeasurementCluster, subscribeMinMeasuredValueAttribute) (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); + 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)); @@ -16959,20 +16326,20 @@ JNI_METHOD(void, OnOffCluster, subscribeStartUpOnOffAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + PressureMeasurementCluster * 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::OnOff::Attributes::StartUpOnOff::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PressureMeasurement::Attributes::MinMeasuredValue::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); + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -16980,12 +16347,12 @@ JNI_METHOD(void, OnOffCluster, subscribeStartUpOnOffAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OnOffCluster, subscribeFeatureMapAttribute) +JNI_METHOD(void, PressureMeasurementCluster, subscribeMaxMeasuredValueAttribute) (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); + 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)); @@ -16996,19 +16363,20 @@ JNI_METHOD(void, OnOffCluster, subscribeFeatureMapAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + PressureMeasurementCluster * 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::OnOff::Attributes::FeatureMap::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PressureMeasurement::Attributes::MaxMeasuredValue::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), - CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -17016,7 +16384,7 @@ JNI_METHOD(void, OnOffCluster, subscribeFeatureMapAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OnOffCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, PressureMeasurementCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -17032,15 +16400,15 @@ JNI_METHOD(void, OnOffCluster, subscribeClusterRevisionAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + PressureMeasurementCluster * 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::OnOff::Attributes::ClusterRevision::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PressureMeasurement::Attributes::ClusterRevision::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, @@ -17053,21 +16421,21 @@ JNI_METHOD(void, OnOffCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, OnOffSwitchConfigurationCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(jlong, PumpConfigurationAndControlCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - OnOffSwitchConfigurationCluster * cppCluster = new OnOffSwitchConfigurationCluster(); + PumpConfigurationAndControlCluster * cppCluster = new PumpConfigurationAndControlCluster(); cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, OnOffSwitchConfigurationCluster, subscribeSwitchTypeAttribute) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxPressureAttribute) (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); + 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)); @@ -17078,20 +16446,21 @@ JNI_METHOD(void, OnOffSwitchConfigurationCluster, subscribeSwitchTypeAttribute) 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); + 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)); - using TypeInfo = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxPressure::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); + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -17099,59 +16468,49 @@ JNI_METHOD(void, OnOffSwitchConfigurationCluster, subscribeSwitchTypeAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, OnOffSwitchConfigurationCluster, writeSwitchActionsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxSpeedAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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; - OnOffSwitchConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); + 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()); + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; + 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)); + 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(); } -JNI_METHOD(void, OnOffSwitchConfigurationCluster, subscribeSwitchActionsAttribute) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxFlowAttribute) (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); + 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)); @@ -17162,21 +16521,20 @@ JNI_METHOD(void, OnOffSwitchConfigurationCluster, subscribeSwitchActionsAttribut 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); + 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)); - using TypeInfo = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxFlow::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); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -17184,12 +16542,12 @@ JNI_METHOD(void, OnOffSwitchConfigurationCluster, subscribeSwitchActionsAttribut onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OnOffSwitchConfigurationCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMinConstPressureAttribute) (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); + 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)); @@ -17200,21 +16558,21 @@ JNI_METHOD(void, OnOffSwitchConfigurationCluster, subscribeClusterRevisionAttrib 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); + 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)); - using TypeInfo = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + 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); + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -17222,470 +16580,354 @@ JNI_METHOD(void, OnOffSwitchConfigurationCluster, subscribeClusterRevisionAttrib onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, OperationalCredentialsCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxConstPressureAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - OperationalCredentialsCluster * cppCluster = new OperationalCredentialsCluster(); + 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)); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} + 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)); -JNI_METHOD(void, OperationalCredentialsCluster, addNOC) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray NOCValue, jobject ICACValue, jbyteArray IPKValue, - jobject caseAdminNode, jobject adminVendorId, jobject timedInvokeTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - OperationalCredentialsCluster * cppCluster; - - chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type request; - - request.NOCValue = chip::JniByteArray(env, static_cast(NOCValue)).byteSpan(); - chip::JniReferences::GetInstance().GetOptionalValue(ICACValue, ICACValue); - request.ICACValue = chip::Optional(chip::JniByteArray(env, static_cast(ICACValue)).byteSpan()); - request.IPKValue = chip::JniByteArray(env, static_cast(IPKValue)).byteSpan(); - request.caseAdminNode = - static_cast(chip::JniReferences::GetInstance().LongToPrimitive(caseAdminNode)); - request.adminVendorId = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(adminVendorId)); - - 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)); + 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)); + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OperationalCredentialsCluster, addTrustedRootCertificate) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray rootCertificate, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMinCompPressureAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - OperationalCredentialsCluster * cppCluster; - - chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type request; - - request.rootCertificate = chip::JniByteArray(env, static_cast(rootCertificate)).byteSpan(); + 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 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OperationalCredentialsCluster, attestationRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray attestationNonce, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxCompPressureAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - OperationalCredentialsCluster * cppCluster; - - chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type request; - - request.attestationNonce = chip::JniByteArray(env, static_cast(attestationNonce)).byteSpan(); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OperationalCredentialsCluster, certificateChainRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject certificateType, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMinConstSpeedAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - OperationalCredentialsCluster * cppCluster; - - chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type request; - - request.certificateType = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(certificateType)); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OperationalCredentialsCluster, opCSRRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray CSRNonce, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxConstSpeedAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - OperationalCredentialsCluster * cppCluster; - - chip::app::Clusters::OperationalCredentials::Commands::OpCSRRequest::Type request; - - request.CSRNonce = chip::JniByteArray(env, static_cast(CSRNonce)).byteSpan(); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OperationalCredentialsCluster, removeFabric) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject fabricIndex, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMinConstFlowAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - OperationalCredentialsCluster * cppCluster; - - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type request; - - request.fabricIndex = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(fabricIndex)); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OperationalCredentialsCluster, removeTrustedRootCertificate) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray trustedRootIdentifier, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxConstFlowAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - OperationalCredentialsCluster * cppCluster; - - chip::app::Clusters::OperationalCredentials::Commands::RemoveTrustedRootCertificate::Type request; - - request.trustedRootIdentifier = chip::JniByteArray(env, static_cast(trustedRootIdentifier)).byteSpan(); + 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 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OperationalCredentialsCluster, updateFabricLabel) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring label, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMinConstTempAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - OperationalCredentialsCluster * cppCluster; - - chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type request; - - request.label = chip::JniUtfString(env, static_cast(label)).charSpan(); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OperationalCredentialsCluster, updateNOC) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray NOCValue, jobject ICACValue, - jobject timedInvokeTimeoutMs) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxConstTempAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - OperationalCredentialsCluster * cppCluster; - - chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type request; - - request.NOCValue = chip::JniByteArray(env, static_cast(NOCValue)).byteSpan(); - chip::JniReferences::GetInstance().GetOptionalValue(ICACValue, ICACValue); - request.ICACValue = chip::Optional(chip::JniByteArray(env, static_cast(ICACValue)).byteSpan()); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OperationalCredentialsCluster, subscribeSupportedFabricsAttribute) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribePumpStatusAttribute) (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); + 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)); @@ -17696,21 +16938,21 @@ JNI_METHOD(void, OperationalCredentialsCluster, subscribeSupportedFabricsAttribu chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - OperationalCredentialsCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + 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); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -17718,7 +16960,7 @@ JNI_METHOD(void, OperationalCredentialsCluster, subscribeSupportedFabricsAttribu onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OperationalCredentialsCluster, subscribeCommissionedFabricsAttribute) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeEffectiveOperationModeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -17734,15 +16976,15 @@ JNI_METHOD(void, OperationalCredentialsCluster, subscribeCommissionedFabricsAttr chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - OperationalCredentialsCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); @@ -17756,53 +16998,12 @@ JNI_METHOD(void, OperationalCredentialsCluster, subscribeCommissionedFabricsAttr onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OperationalCredentialsCluster, subscribeCurrentFabricIndexAttribute) -(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; - OperationalCredentialsCluster * 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::OperationalCredentials::Attributes::CurrentFabricIndex::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), - CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} -JNI_METHOD(void, OperationalCredentialsCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeEffectiveControlModeAttribute) (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); + 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)); @@ -17813,21 +17014,21 @@ JNI_METHOD(void, OperationalCredentialsCluster, subscribeClusterRevisionAttribut chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - OperationalCredentialsCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::OperationalCredentials::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + 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); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -17835,21 +17036,12 @@ JNI_METHOD(void, OperationalCredentialsCluster, subscribeClusterRevisionAttribut onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, PowerSourceCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - PowerSourceCluster * cppCluster = new PowerSourceCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, PowerSourceCluster, subscribeStatusAttribute) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeCapacityAttribute) (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); + 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)); @@ -17860,20 +17052,20 @@ JNI_METHOD(void, PowerSourceCluster, subscribeStatusAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PowerSourceCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::PowerSource::Attributes::Status::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Capacity::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); + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -17881,12 +17073,12 @@ JNI_METHOD(void, PowerSourceCluster, subscribeStatusAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PowerSourceCluster, subscribeOrderAttribute) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeSpeedAttribute) (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); + 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)); @@ -17897,20 +17089,20 @@ JNI_METHOD(void, PowerSourceCluster, subscribeOrderAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PowerSourceCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::PowerSource::Attributes::Order::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Speed::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); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -17918,12 +17110,14 @@ JNI_METHOD(void, PowerSourceCluster, subscribeOrderAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PowerSourceCluster, subscribeDescriptionAttribute) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeLifetimeRunningHoursAttribute) (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); + 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)); @@ -17934,20 +17128,22 @@ JNI_METHOD(void, PowerSourceCluster, subscribeDescriptionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PowerSourceCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::PowerSource::Attributes::Description::TypeInfo; + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPCharStringAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -17955,7 +17151,7 @@ JNI_METHOD(void, PowerSourceCluster, subscribeDescriptionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PowerSourceCluster, subscribeBatteryVoltageAttribute) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribePowerAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -17971,15 +17167,15 @@ JNI_METHOD(void, PowerSourceCluster, subscribeBatteryVoltageAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PowerSourceCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::PowerSource::Attributes::BatteryVoltage::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Power::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, @@ -17992,12 +17188,14 @@ JNI_METHOD(void, PowerSourceCluster, subscribeBatteryVoltageAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PowerSourceCluster, subscribeBatteryPercentRemainingAttribute) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeLifetimeEnergyConsumedAttribute) (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); + 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)); @@ -18008,20 +17206,22 @@ JNI_METHOD(void, PowerSourceCluster, subscribeBatteryPercentRemainingAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PowerSourceCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::PowerSource::Attributes::BatteryPercentRemaining::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::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); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -18029,12 +17229,12 @@ JNI_METHOD(void, PowerSourceCluster, subscribeBatteryPercentRemainingAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PowerSourceCluster, subscribeBatteryTimeRemainingAttribute) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeOperationModeAttribute) (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); + 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)); @@ -18045,20 +17245,21 @@ JNI_METHOD(void, PowerSourceCluster, subscribeBatteryTimeRemainingAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PowerSourceCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::PowerSource::Attributes::BatteryTimeRemaining::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::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), - CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -18066,7 +17267,7 @@ JNI_METHOD(void, PowerSourceCluster, subscribeBatteryTimeRemainingAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PowerSourceCluster, subscribeBatteryChargeLevelAttribute) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeControlModeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -18082,15 +17283,16 @@ JNI_METHOD(void, PowerSourceCluster, subscribeBatteryChargeLevelAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PowerSourceCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::PowerSource::Attributes::BatteryChargeLevel::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::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, @@ -18103,12 +17305,12 @@ JNI_METHOD(void, PowerSourceCluster, subscribeBatteryChargeLevelAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PowerSourceCluster, subscribeBatteryChargeStateAttribute) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeAlarmMaskAttribute) (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); + 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)); @@ -18119,20 +17321,20 @@ JNI_METHOD(void, PowerSourceCluster, subscribeBatteryChargeStateAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PowerSourceCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::PowerSource::Attributes::BatteryChargeState::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AlarmMask::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); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -18140,7 +17342,7 @@ JNI_METHOD(void, PowerSourceCluster, subscribeBatteryChargeStateAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PowerSourceCluster, subscribeFeatureMapAttribute) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeFeatureMapAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -18156,15 +17358,16 @@ JNI_METHOD(void, PowerSourceCluster, subscribeFeatureMapAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PowerSourceCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::PowerSource::Attributes::FeatureMap::TypeInfo; + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -18177,7 +17380,7 @@ JNI_METHOD(void, PowerSourceCluster, subscribeFeatureMapAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PowerSourceCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -18193,15 +17396,16 @@ JNI_METHOD(void, PowerSourceCluster, subscribeClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PowerSourceCluster * cppCluster = reinterpret_cast(clusterPtr); + 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)); - using TypeInfo = chip::app::Clusters::PowerSource::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -18214,16 +17418,16 @@ JNI_METHOD(void, PowerSourceCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, PowerSourceConfigurationCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(jlong, RelativeHumidityMeasurementCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - PowerSourceConfigurationCluster * cppCluster = new PowerSourceConfigurationCluster(); + RelativeHumidityMeasurementCluster * cppCluster = new RelativeHumidityMeasurementCluster(); cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, PowerSourceConfigurationCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, RelativeHumidityMeasurementCluster, subscribeMeasuredValueAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -18239,15 +17443,15 @@ JNI_METHOD(void, PowerSourceConfigurationCluster, subscribeClusterRevisionAttrib chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PowerSourceConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + RelativeHumidityMeasurementCluster * 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::PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); @@ -18261,21 +17465,12 @@ JNI_METHOD(void, PowerSourceConfigurationCluster, subscribeClusterRevisionAttrib onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, PressureMeasurementCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - PressureMeasurementCluster * cppCluster = new PressureMeasurementCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, PressureMeasurementCluster, subscribeMeasuredValueAttribute) +JNI_METHOD(void, RelativeHumidityMeasurementCluster, subscribeMinMeasuredValueAttribute) (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); + 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)); @@ -18286,20 +17481,21 @@ JNI_METHOD(void, PressureMeasurementCluster, subscribeMeasuredValueAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PressureMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + RelativeHumidityMeasurementCluster * 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::PressureMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MinMeasuredValue::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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -18307,12 +17503,12 @@ JNI_METHOD(void, PressureMeasurementCluster, subscribeMeasuredValueAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PressureMeasurementCluster, subscribeMinMeasuredValueAttribute) +JNI_METHOD(void, RelativeHumidityMeasurementCluster, subscribeMaxMeasuredValueAttribute) (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); + 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)); @@ -18323,20 +17519,21 @@ JNI_METHOD(void, PressureMeasurementCluster, subscribeMinMeasuredValueAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PressureMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + RelativeHumidityMeasurementCluster * 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::PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -18344,12 +17541,12 @@ JNI_METHOD(void, PressureMeasurementCluster, subscribeMinMeasuredValueAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PressureMeasurementCluster, subscribeMaxMeasuredValueAttribute) +JNI_METHOD(void, RelativeHumidityMeasurementCluster, subscribeToleranceAttribute) (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); + 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)); @@ -18360,20 +17557,20 @@ JNI_METHOD(void, PressureMeasurementCluster, subscribeMaxMeasuredValueAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PressureMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + RelativeHumidityMeasurementCluster * 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::PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::Tolerance::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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -18381,7 +17578,7 @@ JNI_METHOD(void, PressureMeasurementCluster, subscribeMaxMeasuredValueAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PressureMeasurementCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, RelativeHumidityMeasurementCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -18397,15 +17594,16 @@ JNI_METHOD(void, PressureMeasurementCluster, subscribeClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PressureMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + RelativeHumidityMeasurementCluster * 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::PressureMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::ClusterRevision::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, @@ -18418,247 +17616,367 @@ JNI_METHOD(void, PressureMeasurementCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, PumpConfigurationAndControlCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(jlong, ScenesCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - PumpConfigurationAndControlCluster * cppCluster = new PumpConfigurationAndControlCluster(); + ScenesCluster * cppCluster = new ScenesCluster(); cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxPressureAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, ScenesCluster, addScene) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject transitionTime, + jstring sceneName, jobject clusterId, jobject length, jobject value, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + ScenesCluster * cppCluster; + + chip::app::Clusters::Scenes::Commands::AddScene::Type request; + + request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + request.sceneId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(sceneId)); + request.transitionTime = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + request.sceneName = chip::JniUtfString(env, static_cast(sceneName)).charSpan(); + request.extensionFieldSets = + chip::app::DataModel::List(); + std::unique_ptr onSuccess( + Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxSpeedAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, ScenesCluster, getSceneMembership) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + ScenesCluster * cppCluster; + chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type request; + + request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxFlowAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, ScenesCluster, recallScene) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject transitionTime, + jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + ScenesCluster * cppCluster; + + chip::app::Clusters::Scenes::Commands::RecallScene::Type request; + + request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + request.sceneId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(sceneId)); + request.transitionTime = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMinConstPressureAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, ScenesCluster, removeAllScenes) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + ScenesCluster * cppCluster; + + chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Type request; + + request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxConstPressureAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, ScenesCluster, removeScene) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + ScenesCluster * cppCluster; + + chip::app::Clusters::Scenes::Commands::RemoveScene::Type request; + + request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + request.sceneId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(sceneId)); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMinCompPressureAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, ScenesCluster, storeScene) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + CHIP_ERROR err = CHIP_NO_ERROR; + ScenesCluster * cppCluster; + + chip::app::Clusters::Scenes::Commands::StoreScene::Type request; + + request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + request.sceneId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(sceneId)); + + std::unique_ptr onSuccess( + Platform::New(callback), + Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + 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(); +} +JNI_METHOD(void, ScenesCluster, viewScene) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + ScenesCluster * cppCluster; + + chip::app::Clusters::Scenes::Commands::ViewScene::Type request; + + request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + request.sceneId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(sceneId)); + std::unique_ptr onSuccess( + Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxCompPressureAttribute) +JNI_METHOD(void, ScenesCluster, subscribeSceneCountAttribute) (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); + 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)); @@ -18669,21 +17987,20 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxCompPressureAtt 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); + CHIP_ERROR err = CHIP_NO_ERROR; + ScenesCluster * 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::PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; + using TypeInfo = chip::app::Clusters::Scenes::Attributes::SceneCount::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -18691,12 +18008,12 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxCompPressureAtt onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMinConstSpeedAttribute) +JNI_METHOD(void, ScenesCluster, subscribeCurrentSceneAttribute) (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); + 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)); @@ -18707,21 +18024,20 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMinConstSpeedAttri 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); + CHIP_ERROR err = CHIP_NO_ERROR; + ScenesCluster * 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::PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; + using TypeInfo = chip::app::Clusters::Scenes::Attributes::CurrentScene::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -18729,7 +18045,7 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMinConstSpeedAttri onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxConstSpeedAttribute) +JNI_METHOD(void, ScenesCluster, subscribeCurrentGroupAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -18745,16 +18061,15 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxConstSpeedAttri 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); + CHIP_ERROR err = CHIP_NO_ERROR; + ScenesCluster * 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::PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; + using TypeInfo = chip::app::Clusters::Scenes::Attributes::CurrentGroup::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -18767,12 +18082,12 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxConstSpeedAttri onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMinConstFlowAttribute) +JNI_METHOD(void, ScenesCluster, subscribeSceneValidAttribute) (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); + 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)); @@ -18783,21 +18098,20 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMinConstFlowAttrib 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); + CHIP_ERROR err = CHIP_NO_ERROR; + ScenesCluster * 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::PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; + using TypeInfo = chip::app::Clusters::Scenes::Attributes::SceneValid::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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); + CHIPBooleanAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -18805,12 +18119,12 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMinConstFlowAttrib onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxConstFlowAttribute) +JNI_METHOD(void, ScenesCluster, subscribeNameSupportAttribute) (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); + 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)); @@ -18821,21 +18135,20 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxConstFlowAttrib 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); + CHIP_ERROR err = CHIP_NO_ERROR; + ScenesCluster * 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::PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; + using TypeInfo = chip::app::Clusters::Scenes::Attributes::NameSupport::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -18843,12 +18156,12 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxConstFlowAttrib onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMinConstTempAttribute) +JNI_METHOD(void, ScenesCluster, subscribeClusterRevisionAttribute) (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); + 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)); @@ -18859,21 +18172,20 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMinConstTempAttrib 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); + CHIP_ERROR err = CHIP_NO_ERROR; + ScenesCluster * 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::PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; + using TypeInfo = chip::app::Clusters::Scenes::Attributes::ClusterRevision::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -18881,50 +18193,65 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMinConstTempAttrib onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeMaxConstTempAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(jlong, SoftwareDiagnosticsCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { 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)); + SoftwareDiagnosticsCluster * cppCluster = new SoftwareDiagnosticsCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, SoftwareDiagnosticsCluster, resetWatermarks) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + SoftwareDiagnosticsCluster * cppCluster; + + chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Type request; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribePumpStatusAttribute) +JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeCurrentHeapFreeAttribute) (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); + 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)); @@ -18935,21 +18262,20 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribePumpStatusAttribut 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); + CHIP_ERROR err = CHIP_NO_ERROR; + SoftwareDiagnosticsCluster * 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::PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapFree::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); + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -18957,12 +18283,12 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribePumpStatusAttribut onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeEffectiveOperationModeAttribute) +JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeCurrentHeapUsedAttribute) (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); + 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)); @@ -18973,21 +18299,20 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeEffectiveOperation 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); + CHIP_ERROR err = CHIP_NO_ERROR; + SoftwareDiagnosticsCluster * 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::PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapUsed::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); + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -18995,12 +18320,12 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeEffectiveOperation onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeEffectiveControlModeAttribute) +JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeCurrentHeapHighWatermarkAttribute) (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); + 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)); @@ -19011,21 +18336,21 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeEffectiveControlMo 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); + CHIP_ERROR err = CHIP_NO_ERROR; + SoftwareDiagnosticsCluster * 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::PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + using TypeInfo = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + 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); + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -19033,12 +18358,12 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeEffectiveControlMo onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeCapacityAttribute) +JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeFeatureMapAttribute) (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); + 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)); @@ -19049,20 +18374,20 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeCapacityAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + SoftwareDiagnosticsCluster * 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::PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::SoftwareDiagnostics::Attributes::FeatureMap::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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -19070,7 +18395,7 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeCapacityAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeSpeedAttribute) +JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -19086,14 +18411,14 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeSpeedAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + SoftwareDiagnosticsCluster * 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::PumpConfigurationAndControl::Attributes::Speed::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); @@ -19107,66 +18432,58 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeSpeedAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeRunningHoursAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(jlong, SwitchCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - TypeInfo::Type cppValue; + SwitchCluster * cppCluster = new SwitchCluster(); - uint32_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); +JNI_METHOD(void, SwitchCluster, subscribeNumberOfPositionsAttribute) +(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), Platform::Delete); + 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; - PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + SwitchCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::Switch::Attributes::NumberOfPositions::TypeInfo; + 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)); + 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, PumpConfigurationAndControlCluster, subscribeLifetimeRunningHoursAttribute) +JNI_METHOD(void, SwitchCluster, subscribeCurrentPositionAttribute) (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); + 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)); @@ -19177,22 +18494,20 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeLifetimeRunningHou 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); + CHIP_ERROR err = CHIP_NO_ERROR; + SwitchCluster * 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::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + using TypeInfo = chip::app::Clusters::Switch::Attributes::CurrentPosition::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), - CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::OnSubscriptionEstablished); + 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)); @@ -19200,13 +18515,13 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeLifetimeRunningHou onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribePowerAttribute) +JNI_METHOD(void, SwitchCluster, subscribeMultiPressMaxAttribute) (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, + 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)); @@ -19216,20 +18531,20 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribePowerAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + SwitchCluster * 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::PumpConfigurationAndControl::Attributes::Power::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::Switch::Attributes::MultiPressMax::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), - CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -19237,66 +18552,49 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribePowerAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeEnergyConsumedAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, SwitchCluster, subscribeFeatureMapAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - TypeInfo::Type cppValue; - - uint32_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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; - PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + SwitchCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::Switch::Attributes::FeatureMap::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeLifetimeEnergyConsumedAttribute) +JNI_METHOD(void, SwitchCluster, subscribeClusterRevisionAttribute) (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); + 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)); @@ -19307,22 +18605,20 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeLifetimeEnergyCons 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); + CHIP_ERROR err = CHIP_NO_ERROR; + SwitchCluster * 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::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + using TypeInfo = chip::app::Clusters::Switch::Attributes::ClusterRevision::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), - CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback::OnSubscriptionEstablished); + 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)); @@ -19330,54 +18626,66 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeLifetimeEnergyCons onSuccess.release(); onFailure.release(); } +JNI_METHOD(jlong, TargetNavigatorCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + TargetNavigatorCluster * cppCluster = new TargetNavigatorCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} -JNI_METHOD(void, PumpConfigurationAndControlCluster, writeOperationModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, TargetNavigatorCluster, navigateTargetRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject target, jstring data, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - TypeInfo::Type cppValue; + CHIP_ERROR err = CHIP_NO_ERROR; + TargetNavigatorCluster * cppCluster; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + chip::app::Clusters::TargetNavigator::Commands::NavigateTargetRequest::Type request; - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + request.target = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(target)); + request.data = chip::JniUtfString(env, static_cast(data)).charSpan(); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - if (timedWriteTimeoutMs == nullptr) + if (timedInvokeTimeoutMs == nullptr) { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); } else { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeOperationModeAttribute) +JNI_METHOD(void, TargetNavigatorCluster, subscribeCurrentNavigatorTargetAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -19393,15 +18701,15 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeOperationModeAttri 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); + CHIP_ERROR err = CHIP_NO_ERROR; + TargetNavigatorCluster * 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::PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + using TypeInfo = chip::app::Clusters::TargetNavigator::Attributes::CurrentNavigatorTarget::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); @@ -19415,59 +18723,58 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeOperationModeAttri onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, PumpConfigurationAndControlCluster, writeControlModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, TargetNavigatorCluster, subscribeClusterRevisionAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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; - PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TargetNavigatorCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TargetNavigator::Attributes::ClusterRevision::TypeInfo; + 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)); + 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(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeControlModeAttribute) +JNI_METHOD(jlong, TemperatureMeasurementCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + TemperatureMeasurementCluster * cppCluster = new TemperatureMeasurementCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, TemperatureMeasurementCluster, subscribeMeasuredValueAttribute) (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); + 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)); @@ -19478,21 +18785,20 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeControlModeAttribu 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); + CHIP_ERROR err = CHIP_NO_ERROR; + TemperatureMeasurementCluster * 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::PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TemperatureMeasurement::Attributes::MeasuredValue::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); + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -19500,12 +18806,12 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeControlModeAttribu onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeAlarmMaskAttribute) +JNI_METHOD(void, TemperatureMeasurementCluster, subscribeMinMeasuredValueAttribute) (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); + 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)); @@ -19516,20 +18822,21 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeAlarmMaskAttribute 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); + CHIP_ERROR err = CHIP_NO_ERROR; + TemperatureMeasurementCluster * 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::PumpConfigurationAndControl::Attributes::AlarmMask::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TemperatureMeasurement::Attributes::MinMeasuredValue::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); + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -19537,12 +18844,12 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeAlarmMaskAttribute onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeFeatureMapAttribute) +JNI_METHOD(void, TemperatureMeasurementCluster, subscribeMaxMeasuredValueAttribute) (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); + 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)); @@ -19553,21 +18860,21 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeFeatureMapAttribut 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); + CHIP_ERROR err = CHIP_NO_ERROR; + TemperatureMeasurementCluster * 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::PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = chip::app::Clusters::TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + 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), - CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -19575,7 +18882,7 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeFeatureMapAttribut onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, TemperatureMeasurementCluster, subscribeToleranceAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -19591,16 +18898,15 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeClusterRevisionAtt 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); + CHIP_ERROR err = CHIP_NO_ERROR; + TemperatureMeasurementCluster * 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::PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TemperatureMeasurement::Attributes::Tolerance::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, @@ -19613,16 +18919,7 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeClusterRevisionAtt onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, RelativeHumidityMeasurementCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - RelativeHumidityMeasurementCluster * cppCluster = new RelativeHumidityMeasurementCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, RelativeHumidityMeasurementCluster, subscribeMeasuredValueAttribute) +JNI_METHOD(void, TemperatureMeasurementCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -19638,15 +18935,15 @@ JNI_METHOD(void, RelativeHumidityMeasurementCluster, subscribeMeasuredValueAttri chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - RelativeHumidityMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TemperatureMeasurementCluster * 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::RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = chip::app::Clusters::TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); @@ -19660,187 +18957,31 @@ JNI_METHOD(void, RelativeHumidityMeasurementCluster, subscribeMeasuredValueAttri onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, RelativeHumidityMeasurementCluster, subscribeMinMeasuredValueAttribute) -(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; - RelativeHumidityMeasurementCluster * 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::RelativeHumidityMeasurement::Attributes::MinMeasuredValue::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(); -} -JNI_METHOD(void, RelativeHumidityMeasurementCluster, subscribeMaxMeasuredValueAttribute) -(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; - RelativeHumidityMeasurementCluster * 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::RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::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(); -} -JNI_METHOD(void, RelativeHumidityMeasurementCluster, subscribeToleranceAttribute) -(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; - RelativeHumidityMeasurementCluster * 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::RelativeHumidityMeasurement::Attributes::Tolerance::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(); -} -JNI_METHOD(void, RelativeHumidityMeasurementCluster, subscribeClusterRevisionAttribute) -(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; - RelativeHumidityMeasurementCluster * 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::RelativeHumidityMeasurement::Attributes::ClusterRevision::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(); -} -JNI_METHOD(jlong, ScenesCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(jlong, TestClusterCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - ScenesCluster * cppCluster = new ScenesCluster(); + TestClusterCluster * cppCluster = new TestClusterCluster(); cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, ScenesCluster, addScene) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject transitionTime, - jstring sceneName, jobject clusterId, jobject length, jobject value, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, simpleStructEchoRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jbyteArray d, jstring e, + jobject f, jobject g, jobject h, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - ScenesCluster * cppCluster; + TestClusterCluster * cppCluster; - chip::app::Clusters::Scenes::Commands::AddScene::Type request; + chip::app::Clusters::TestCluster::Commands::SimpleStructEchoRequest::Type request; - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); - request.sceneId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(sceneId)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); - request.sceneName = chip::JniUtfString(env, static_cast(sceneName)).charSpan(); - request.extensionFieldSets = - chip::app::DataModel::List(); + request.arg1 = chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type(); - std::unique_ptr onSuccess( - Platform::New(callback), - Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -19850,12 +18991,13 @@ JNI_METHOD(void, ScenesCluster, addScene) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -19874,21 +19016,17 @@ JNI_METHOD(void, ScenesCluster, addScene) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ScenesCluster, getSceneMembership) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, test) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - ScenesCluster * cppCluster; - - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type request; + TestClusterCluster * cppCluster; - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + chip::app::Clusters::TestCluster::Commands::Test::Type request; - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -19898,13 +19036,12 @@ JNI_METHOD(void, ScenesCluster, getSceneMembership) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -19923,23 +19060,22 @@ JNI_METHOD(void, ScenesCluster, getSceneMembership) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ScenesCluster, recallScene) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject transitionTime, - jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, testAddArguments) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject arg2, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - ScenesCluster * cppCluster; + TestClusterCluster * cppCluster; - chip::app::Clusters::Scenes::Commands::RecallScene::Type request; + chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type request; - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); - request.sceneId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(sceneId)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + request.arg1 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg1)); + request.arg2 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg2)); - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -19949,12 +19085,13 @@ JNI_METHOD(void, ScenesCluster, recallScene) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -19973,20 +19110,24 @@ JNI_METHOD(void, ScenesCluster, recallScene) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ScenesCluster, removeAllScenes) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, testEmitTestEventRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject arg2, jobject arg3, + jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - ScenesCluster * cppCluster; + TestClusterCluster * cppCluster; - chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Type request; + chip::app::Clusters::TestCluster::Commands::TestEmitTestEventRequest::Type request; - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + request.arg1 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg1)); + request.arg2 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg2)); + request.arg3 = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(arg3)); - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -19996,13 +19137,13 @@ JNI_METHOD(void, ScenesCluster, removeAllScenes) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -20021,21 +19162,21 @@ JNI_METHOD(void, ScenesCluster, removeAllScenes) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ScenesCluster, removeScene) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, testEnumsRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject arg2, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - ScenesCluster * cppCluster; + TestClusterCluster * cppCluster; - chip::app::Clusters::Scenes::Commands::RemoveScene::Type request; + chip::app::Clusters::TestCluster::Commands::TestEnumsRequest::Type request; - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); - request.sceneId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(sceneId)); + request.arg1 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg1)); + request.arg2 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg2)); - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -20045,13 +19186,13 @@ JNI_METHOD(void, ScenesCluster, removeScene) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -20070,21 +19211,20 @@ JNI_METHOD(void, ScenesCluster, removeScene) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ScenesCluster, storeScene) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, testListInt8UArgumentRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - ScenesCluster * cppCluster; + TestClusterCluster * cppCluster; - chip::app::Clusters::Scenes::Commands::StoreScene::Type request; + chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type request; - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); - request.sceneId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(sceneId)); + request.arg1 = chip::app::DataModel::List(); - std::unique_ptr onSuccess( - Platform::New(callback), - Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -20094,12 +19234,13 @@ JNI_METHOD(void, ScenesCluster, storeScene) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -20118,21 +19259,21 @@ JNI_METHOD(void, ScenesCluster, storeScene) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ScenesCluster, viewScene) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, testListInt8UReverseRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - ScenesCluster * cppCluster; + TestClusterCluster * cppCluster; - chip::app::Clusters::Scenes::Commands::ViewScene::Type request; + chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type request; - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); - request.sceneId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(sceneId)); + request.arg1 = chip::app::DataModel::List(); - std::unique_ptr onSuccess( - Platform::New(callback), - Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -20142,12 +19283,13 @@ JNI_METHOD(void, ScenesCluster, viewScene) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + 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 successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); if (timedInvokeTimeoutMs == nullptr) @@ -20166,245 +19308,313 @@ JNI_METHOD(void, ScenesCluster, viewScene) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ScenesCluster, subscribeSceneCountAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, TestClusterCluster, testListNestedStructListArgumentRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jobject d, jobject e, + jbyteArray f, jobject g, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster; + + chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type request; + + request.arg1 = chip::app::DataModel::List(); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - ScenesCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::Scenes::Attributes::SceneCount::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ScenesCluster, subscribeCurrentSceneAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, TestClusterCluster, testListStructArgumentRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jbyteArray d, jstring e, + jobject f, jobject g, jobject h, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster; + + chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type request; + + request.arg1 = chip::app::DataModel::List(); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - ScenesCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::Scenes::Attributes::CurrentScene::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ScenesCluster, subscribeCurrentGroupAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, TestClusterCluster, testNestedStructArgumentRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster; + chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type request; + + request.arg1 = chip::app::Clusters::TestCluster::Structs::NestedStruct::Type(); + + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - ScenesCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::Scenes::Attributes::CurrentGroup::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ScenesCluster, subscribeSceneValidAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, TestClusterCluster, testNestedStructListArgumentRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jobject d, jobject e, + jbyteArray f, jobject g, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster; + + chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type request; + request.arg1 = chip::app::Clusters::TestCluster::Structs::NestedStructList::Type(); + + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - ScenesCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::Scenes::Attributes::SceneValid::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPBooleanAttributeCallback::OnSubscriptionEstablished); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ScenesCluster, subscribeNameSupportAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, TestClusterCluster, testNotHandled) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster; + + chip::app::Clusters::TestCluster::Commands::TestNotHandled::Type request; + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - ScenesCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::Scenes::Attributes::NameSupport::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ScenesCluster, subscribeClusterRevisionAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, TestClusterCluster, testNullableOptionalRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster; + + chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type request; + + chip::JniReferences::GetInstance().GetOptionalValue(arg1, arg1); + uint8_t arg1Value; + if (arg1 != nullptr) + { + arg1Value = chip::JniReferences::GetInstance().IntegerToPrimitive(arg1); + } + request.arg1 = chip::Optional>( + arg1 == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(arg1Value)); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - ScenesCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::Scenes::Attributes::ClusterRevision::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, SoftwareDiagnosticsCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - SoftwareDiagnosticsCluster * cppCluster = new SoftwareDiagnosticsCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, SoftwareDiagnosticsCluster, resetWatermarks) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, testSimpleOptionalArgumentRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; - SoftwareDiagnosticsCluster * cppCluster; + TestClusterCluster * cppCluster; - chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Type request; + chip::app::Clusters::TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type request; + + chip::JniReferences::GetInstance().GetOptionalValue(arg1, arg1); + request.arg1 = + chip::Optional(static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(arg1))); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -20417,7 +19627,7 @@ JNI_METHOD(void, SoftwareDiagnosticsCluster, resetWatermarks) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); @@ -20441,86 +19651,189 @@ JNI_METHOD(void, SoftwareDiagnosticsCluster, resetWatermarks) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeCurrentHeapFreeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, TestClusterCluster, testSpecific) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster; + chip::app::Clusters::TestCluster::Commands::TestSpecific::Type request; + + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - SoftwareDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeCurrentHeapUsedAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, TestClusterCluster, testStructArgumentRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jbyteArray d, jstring e, + jobject f, jobject g, jobject h, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster; + + chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type request; + + request.arg1 = chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type(); + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - SoftwareDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeCurrentHeapHighWatermarkAttribute) +JNI_METHOD(void, TestClusterCluster, testUnknownCommand) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster; + + chip::app::Clusters::TestCluster::Commands::TestUnknownCommand::Type request; + + 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(); +} +JNI_METHOD(void, TestClusterCluster, timedInvokeRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster; + + chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type request; + + 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()); + + 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(); +} +JNI_METHOD(void, TestClusterCluster, subscribeBooleanAttribute) (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); + 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)); @@ -20531,21 +19844,20 @@ JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeCurrentHeapHighWatermarkAt chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - SoftwareDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * 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::SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Boolean::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + CHIPBooleanAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -20553,12 +19865,12 @@ JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeCurrentHeapHighWatermarkAt onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeFeatureMapAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeBitmap8Attribute) (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); + 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)); @@ -20569,20 +19881,20 @@ JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeFeatureMapAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - SoftwareDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * 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::SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap8::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), - CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -20590,7 +19902,7 @@ JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeFeatureMapAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeBitmap16Attribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -20606,15 +19918,15 @@ JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - SoftwareDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * 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::SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap16::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, @@ -20627,21 +19939,49 @@ JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, SwitchCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(void, TestClusterCluster, subscribeBitmap32Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - SwitchCluster * cppCluster = new SwitchCluster(); + 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)); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} + 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)); -JNI_METHOD(void, SwitchCluster, subscribeNumberOfPositionsAttribute) + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * 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::TestCluster::Attributes::Bitmap32::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), + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, TestClusterCluster, subscribeBitmap64Attribute) (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); + 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)); @@ -20652,20 +19992,20 @@ JNI_METHOD(void, SwitchCluster, subscribeNumberOfPositionsAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - SwitchCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * 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::Switch::Attributes::NumberOfPositions::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap64::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -20673,7 +20013,7 @@ JNI_METHOD(void, SwitchCluster, subscribeNumberOfPositionsAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, SwitchCluster, subscribeCurrentPositionAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeInt8uAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -20689,15 +20029,15 @@ JNI_METHOD(void, SwitchCluster, subscribeCurrentPositionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - SwitchCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * 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::Switch::Attributes::CurrentPosition::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int8u::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -20710,12 +20050,12 @@ JNI_METHOD(void, SwitchCluster, subscribeCurrentPositionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, SwitchCluster, subscribeMultiPressMaxAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeInt16uAttribute) (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); + 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)); @@ -20726,20 +20066,20 @@ JNI_METHOD(void, SwitchCluster, subscribeMultiPressMaxAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - SwitchCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * 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::Switch::Attributes::MultiPressMax::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int16u::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -20747,7 +20087,7 @@ JNI_METHOD(void, SwitchCluster, subscribeMultiPressMaxAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, SwitchCluster, subscribeFeatureMapAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeInt24uAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -20763,15 +20103,15 @@ JNI_METHOD(void, SwitchCluster, subscribeFeatureMapAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - SwitchCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * 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::Switch::Attributes::FeatureMap::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int24u::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -20784,12 +20124,12 @@ JNI_METHOD(void, SwitchCluster, subscribeFeatureMapAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, SwitchCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeInt32uAttribute) (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); + 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)); @@ -20800,20 +20140,20 @@ JNI_METHOD(void, SwitchCluster, subscribeClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - SwitchCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * 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::Switch::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int32u::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -20821,71 +20161,49 @@ JNI_METHOD(void, SwitchCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, TargetNavigatorCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(void, TestClusterCluster, subscribeInt40uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - TargetNavigatorCluster * cppCluster = new TargetNavigatorCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, TargetNavigatorCluster, navigateTargetRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject target, jstring data, jobject timedInvokeTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TargetNavigatorCluster * cppCluster; - - chip::app::Clusters::TargetNavigator::Commands::NavigateTargetRequest::Type request; - - request.target = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(target)); - request.data = chip::JniUtfString(env, static_cast(data)).charSpan(); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int40u::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TargetNavigatorCluster, subscribeCurrentNavigatorTargetAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeInt48uAttribute) (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); + 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)); @@ -20896,21 +20214,20 @@ JNI_METHOD(void, TargetNavigatorCluster, subscribeCurrentNavigatorTargetAttribut chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - TargetNavigatorCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * 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::TargetNavigator::Attributes::CurrentNavigatorTarget::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int48u::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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); + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -20918,12 +20235,12 @@ JNI_METHOD(void, TargetNavigatorCluster, subscribeCurrentNavigatorTargetAttribut onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TargetNavigatorCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeInt56uAttribute) (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); + 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)); @@ -20934,20 +20251,20 @@ JNI_METHOD(void, TargetNavigatorCluster, subscribeClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - TargetNavigatorCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * 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::TargetNavigator::Attributes::ClusterRevision::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int56u::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); + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -20955,21 +20272,12 @@ JNI_METHOD(void, TargetNavigatorCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, TemperatureMeasurementCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - TemperatureMeasurementCluster * cppCluster = new TemperatureMeasurementCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, TemperatureMeasurementCluster, subscribeMeasuredValueAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeInt64uAttribute) (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); + 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)); @@ -20980,20 +20288,20 @@ JNI_METHOD(void, TemperatureMeasurementCluster, subscribeMeasuredValueAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - TemperatureMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * 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::TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int64u::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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -21001,12 +20309,12 @@ JNI_METHOD(void, TemperatureMeasurementCluster, subscribeMeasuredValueAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TemperatureMeasurementCluster, subscribeMinMeasuredValueAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeInt8sAttribute) (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); + 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)); @@ -21017,21 +20325,20 @@ JNI_METHOD(void, TemperatureMeasurementCluster, subscribeMinMeasuredValueAttribu chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - TemperatureMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * 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::TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int8s::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + CHIPInt8sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -21039,7 +20346,7 @@ JNI_METHOD(void, TemperatureMeasurementCluster, subscribeMinMeasuredValueAttribu onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TemperatureMeasurementCluster, subscribeMaxMeasuredValueAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeInt16sAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -21055,16 +20362,15 @@ JNI_METHOD(void, TemperatureMeasurementCluster, subscribeMaxMeasuredValueAttribu chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - TemperatureMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * 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::TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int16s::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -21077,12 +20383,12 @@ JNI_METHOD(void, TemperatureMeasurementCluster, subscribeMaxMeasuredValueAttribu onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TemperatureMeasurementCluster, subscribeToleranceAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeInt24sAttribute) (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); + 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)); @@ -21093,20 +20399,20 @@ JNI_METHOD(void, TemperatureMeasurementCluster, subscribeToleranceAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - TemperatureMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * 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::TemperatureMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int24s::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); + CHIPInt32sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -21114,12 +20420,12 @@ JNI_METHOD(void, TemperatureMeasurementCluster, subscribeToleranceAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TemperatureMeasurementCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeInt32sAttribute) (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); + 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)); @@ -21130,21 +20436,20 @@ JNI_METHOD(void, TemperatureMeasurementCluster, subscribeClusterRevisionAttribut chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - TemperatureMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * 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::TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int32s::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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); + CHIPInt32sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -21152,895 +20457,685 @@ JNI_METHOD(void, TemperatureMeasurementCluster, subscribeClusterRevisionAttribut onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, TestClusterCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - TestClusterCluster * cppCluster = new TestClusterCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, TestClusterCluster, simpleStructEchoRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jbyteArray d, jstring e, - jobject f, jobject g, jobject h, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeInt40sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster; - - chip::app::Clusters::TestCluster::Commands::SimpleStructEchoRequest::Type request; - - request.arg1 = chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type(); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int40s::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt64sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, test) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeInt48sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster; - - chip::app::Clusters::TestCluster::Commands::Test::Type request; - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + 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, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int48s::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt64sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, testAddArguments) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject arg2, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeInt56sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster; - - chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type request; - - request.arg1 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg1)); - request.arg2 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg2)); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int56s::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt64sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, testEmitTestEventRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject arg2, jobject arg3, - jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeInt64sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster; - - chip::app::Clusters::TestCluster::Commands::TestEmitTestEventRequest::Type request; - - request.arg1 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg1)); - request.arg2 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg2)); - request.arg3 = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(arg3)); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int64s::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt64sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, testEnumsRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject arg2, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeEnum8Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster; - - chip::app::Clusters::TestCluster::Commands::TestEnumsRequest::Type request; - - request.arg1 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg1)); - request.arg2 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg2)); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Enum8::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, testListInt8UArgumentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeEnum16Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster; - - chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type request; - - request.arg1 = chip::app::DataModel::List(); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Enum16::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); + 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(); } -JNI_METHOD(void, TestClusterCluster, testListInt8UReverseRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeFloatSingleAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster; - - chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type request; - - request.arg1 = chip::app::DataModel::List(); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::FloatSingle::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPFloatAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, testListNestedStructListArgumentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jobject d, jobject e, - jbyteArray f, jobject g, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeFloatDoubleAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster; - - chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type request; - - request.arg1 = chip::app::DataModel::List(); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::FloatDouble::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPDoubleAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, testListStructArgumentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jbyteArray d, jstring e, - jobject f, jobject g, jobject h, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeOctetStringAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster; - - chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type request; - - request.arg1 = chip::app::DataModel::List(); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::OctetString::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPOctetStringAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, testNestedStructArgumentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeLongOctetStringAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster; - - chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type request; - - request.arg1 = chip::app::Clusters::TestCluster::Structs::NestedStruct::Type(); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::LongOctetString::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPOctetStringAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, testNestedStructListArgumentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jobject d, jobject e, - jbyteArray f, jobject g, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeCharStringAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster; - - chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type request; - - request.arg1 = chip::app::Clusters::TestCluster::Structs::NestedStructList::Type(); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::CharString::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPCharStringAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, testNotHandled) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeLongCharStringAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster; - - chip::app::Clusters::TestCluster::Commands::TestNotHandled::Type request; + 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 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::LongCharString::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPCharStringAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, testNullableOptionalRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeEpochUsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster; - - chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type request; - - chip::JniReferences::GetInstance().GetOptionalValue(arg1, arg1); - uint8_t arg1Value; - if (arg1 != nullptr) - { - arg1Value = chip::JniReferences::GetInstance().IntegerToPrimitive(arg1); - } - request.arg1 = chip::Optional>( - arg1 == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(arg1Value)); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EpochUs::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, testSimpleOptionalArgumentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeEpochSAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster; - - chip::app::Clusters::TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type request; - - chip::JniReferences::GetInstance().GetOptionalValue(arg1, arg1); - request.arg1 = - chip::Optional(static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(arg1))); + 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 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EpochS::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, testSpecific) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeVendorIdAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster; - - chip::app::Clusters::TestCluster::Commands::TestSpecific::Type request; + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::VendorId::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPTestClusterVendorIdAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, testStructArgumentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jbyteArray d, jstring e, - jobject f, jobject g, jobject h, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeEnumAttrAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster; - - chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type request; - - request.arg1 = chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type(); + 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 - 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EnumAttr::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, testUnknownCommand) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeRangeRestrictedInt8uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster; - - chip::app::Clusters::TestCluster::Commands::TestUnknownCommand::Type request; + 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 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, timedInvokeRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeRangeRestrictedInt8sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster; - - chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type request; + 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 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)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt8sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, TestClusterCluster, writeBooleanAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeRangeRestrictedInt16uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Boolean::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -22051,31 +21146,27 @@ JNI_METHOD(void, TestClusterCluster, writeBooleanAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; + 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)); + 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(); } -JNI_METHOD(void, TestClusterCluster, subscribeBooleanAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeRangeRestrictedInt16sAttribute) (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); + 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)); @@ -22092,14 +21183,14 @@ JNI_METHOD(void, TestClusterCluster, subscribeBooleanAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Boolean::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt16s::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), - CHIPBooleanAttributeCallback::OnSubscriptionEstablished); + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -22107,24 +21198,18 @@ JNI_METHOD(void, TestClusterCluster, subscribeBooleanAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, TestClusterCluster, writeBitmap8Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeTimedWriteBooleanAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap8::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -22135,31 +21220,27 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap8Attribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::TimedWriteBoolean::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPBooleanAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, subscribeBitmap8Attribute) +JNI_METHOD(void, TestClusterCluster, subscribeUnsupportedAttribute) (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); + 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)); @@ -22176,14 +21257,14 @@ JNI_METHOD(void, TestClusterCluster, subscribeBitmap8Attribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap8::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Unsupported::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + CHIPBooleanAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -22191,24 +21272,19 @@ JNI_METHOD(void, TestClusterCluster, subscribeBitmap8Attribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, TestClusterCluster, writeBitmap16Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeNullableBooleanAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap16::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -22219,31 +21295,28 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap16Attribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBoolean::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPTestClusterNullableBooleanAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, subscribeBitmap16Attribute) +JNI_METHOD(void, TestClusterCluster, subscribeNullableBitmap8Attribute) (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); + 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)); @@ -22260,14 +21333,14 @@ JNI_METHOD(void, TestClusterCluster, subscribeBitmap16Attribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap16::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap8::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + CHIPTestClusterNullableBitmap8AttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -22275,24 +21348,19 @@ JNI_METHOD(void, TestClusterCluster, subscribeBitmap16Attribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, TestClusterCluster, writeBitmap32Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeNullableBitmap16Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap32::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -22303,31 +21371,28 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap32Attribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap16::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPTestClusterNullableBitmap16AttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, subscribeBitmap32Attribute) +JNI_METHOD(void, TestClusterCluster, subscribeNullableBitmap32Attribute) (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); + 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)); @@ -22344,14 +21409,14 @@ JNI_METHOD(void, TestClusterCluster, subscribeBitmap32Attribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap32::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap32::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + CHIPTestClusterNullableBitmap32AttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -22359,24 +21424,19 @@ JNI_METHOD(void, TestClusterCluster, subscribeBitmap32Attribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, TestClusterCluster, writeBitmap64Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeNullableBitmap64Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap64::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -22387,31 +21447,28 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap64Attribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap64::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPTestClusterNullableBitmap64AttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, subscribeBitmap64Attribute) +JNI_METHOD(void, TestClusterCluster, subscribeNullableInt8uAttribute) (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); + 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)); @@ -22428,14 +21485,14 @@ JNI_METHOD(void, TestClusterCluster, subscribeBitmap64Attribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap64::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt8u::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + CHIPTestClusterNullableInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -22443,24 +21500,19 @@ JNI_METHOD(void, TestClusterCluster, subscribeBitmap64Attribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, TestClusterCluster, writeInt8uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeNullableInt16uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int8u::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -22471,31 +21523,28 @@ JNI_METHOD(void, TestClusterCluster, writeInt8uAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt16u::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPTestClusterNullableInt16uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, subscribeInt8uAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeNullableInt24uAttribute) (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); + 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)); @@ -22512,14 +21561,14 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt8uAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int8u::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt24u::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + CHIPTestClusterNullableInt24uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -22527,24 +21576,19 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt8uAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, TestClusterCluster, writeInt16uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeNullableInt32uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int16u::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -22555,31 +21599,28 @@ JNI_METHOD(void, TestClusterCluster, writeInt16uAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt32u::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPTestClusterNullableInt32uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, subscribeInt16uAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeNullableInt40uAttribute) (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); + 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)); @@ -22596,14 +21637,14 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt16uAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int16u::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt40u::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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); + CHIPTestClusterNullableInt40uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -22611,24 +21652,19 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt16uAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, TestClusterCluster, writeInt24uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeNullableInt48uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int24u::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -22639,31 +21675,28 @@ JNI_METHOD(void, TestClusterCluster, writeInt24uAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt48u::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPTestClusterNullableInt48uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, subscribeInt24uAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeNullableInt56uAttribute) (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); + 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)); @@ -22680,14 +21713,14 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt24uAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int24u::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt56u::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + CHIPTestClusterNullableInt56uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -22695,24 +21728,19 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt24uAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, TestClusterCluster, writeInt32uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeNullableInt64uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int32u::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -22723,31 +21751,28 @@ JNI_METHOD(void, TestClusterCluster, writeInt32uAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt64u::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPTestClusterNullableInt64uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, subscribeInt32uAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeNullableInt8sAttribute) (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); + 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)); @@ -22764,14 +21789,14 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt32uAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int32u::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt8s::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + CHIPTestClusterNullableInt8sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -22779,24 +21804,19 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt32uAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, TestClusterCluster, writeInt40uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeNullableInt16sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int40u::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -22807,31 +21827,28 @@ JNI_METHOD(void, TestClusterCluster, writeInt40uAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt16s::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPTestClusterNullableInt16sAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, subscribeInt40uAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeNullableInt24sAttribute) (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); + 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)); @@ -22848,14 +21865,14 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt40uAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int40u::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt24s::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + CHIPTestClusterNullableInt24sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -22863,24 +21880,19 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt40uAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, TestClusterCluster, writeInt48uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeNullableInt32sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int48u::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -22891,31 +21903,28 @@ JNI_METHOD(void, TestClusterCluster, writeInt48uAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt32s::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPTestClusterNullableInt32sAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, subscribeInt48uAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeNullableInt40sAttribute) (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); + 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)); @@ -22932,14 +21941,14 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt48uAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int48u::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt40s::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + CHIPTestClusterNullableInt40sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -22947,24 +21956,19 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt48uAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, TestClusterCluster, writeInt56uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeNullableInt48sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int56u::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -22975,31 +21979,28 @@ JNI_METHOD(void, TestClusterCluster, writeInt56uAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt48s::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPTestClusterNullableInt48sAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, subscribeInt56uAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeNullableInt56sAttribute) (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); + 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)); @@ -23016,14 +22017,14 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt56uAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int56u::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt56s::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + CHIPTestClusterNullableInt56sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -23031,24 +22032,19 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt56uAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, TestClusterCluster, writeInt64uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeNullableInt64sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int64u::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -23059,31 +22055,28 @@ JNI_METHOD(void, TestClusterCluster, writeInt64uAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt64s::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPTestClusterNullableInt64sAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, subscribeInt64uAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeNullableEnum8Attribute) (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); + 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)); @@ -23100,14 +22093,14 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt64uAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int64u::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnum8::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + CHIPTestClusterNullableEnum8AttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -23115,24 +22108,19 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt64uAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, TestClusterCluster, writeInt8sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeNullableEnum16Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int8s::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -23143,31 +22131,29 @@ JNI_METHOD(void, TestClusterCluster, writeInt8sAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnum16::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPTestClusterNullableEnum16AttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, subscribeInt8sAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeNullableFloatSingleAttribute) (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); + 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)); @@ -23184,14 +22170,14 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt8sAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int8s::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableFloatSingle::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), - CHIPInt8sAttributeCallback::OnSubscriptionEstablished); + CHIPTestClusterNullableFloatSingleAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -23199,24 +22185,20 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt8sAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, TestClusterCluster, writeInt16sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeNullableFloatDoubleAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int16s::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -23227,31 +22209,29 @@ JNI_METHOD(void, TestClusterCluster, writeInt16sAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableFloatDouble::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPTestClusterNullableFloatDoubleAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, TestClusterCluster, subscribeInt16sAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeNullableOctetStringAttribute) (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); + 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)); @@ -23268,14 +22248,14 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt16sAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int16s::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableOctetString::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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + CHIPTestClusterNullableOctetStringAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -23283,24 +22263,20 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt16sAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, TestClusterCluster, writeInt24sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, TestClusterCluster, subscribeNullableCharStringAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int24s::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -23311,223 +22287,14 @@ JNI_METHOD(void, TestClusterCluster, writeInt24sAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could 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, TestClusterCluster, subscribeInt24sAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::Int24s::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), - CHIPInt32sAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeInt32sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int32s::TypeInfo; - TypeInfo::Type cppValue; - - 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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeInt32sAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::Int32s::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), - CHIPInt32sAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeInt40sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int40s::TypeInfo; - TypeInfo::Type cppValue; - - 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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeInt40sAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::Int40s::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableCharString::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), - CHIPInt64sAttributeCallback::OnSubscriptionEstablished); + CHIPTestClusterNullableCharStringAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -23535,59 +22302,13 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt40sAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, TestClusterCluster, writeInt48sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int48s::TypeInfo; - TypeInfo::Type cppValue; - - 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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeInt48sAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeNullableEnumAttrAttribute) (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); + 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)); @@ -23598,4896 +22319,35 @@ JNI_METHOD(void, TestClusterCluster, subscribeInt48sAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * 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::TestCluster::Attributes::Int48s::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), - CHIPInt64sAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeInt56sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int56s::TypeInfo; - TypeInfo::Type cppValue; - - 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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeInt56sAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::Int56s::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), - CHIPInt64sAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeInt64sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int64s::TypeInfo; - TypeInfo::Type cppValue; - - 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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeInt64sAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::Int64s::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), - CHIPInt64sAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeEnum8Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Enum8::TypeInfo; - TypeInfo::Type cppValue; - - 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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeEnum8Attribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::Enum8::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, TestClusterCluster, writeEnum16Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Enum16::TypeInfo; - TypeInfo::Type cppValue; - - 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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeEnum16Attribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::Enum16::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(); -} - -JNI_METHOD(void, TestClusterCluster, writeFloatSingleAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::FloatSingle::TypeInfo; - TypeInfo::Type cppValue; - - 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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeFloatSingleAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::FloatSingle::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), - CHIPFloatAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeFloatDoubleAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::FloatDouble::TypeInfo; - TypeInfo::Type cppValue; - - 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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeFloatDoubleAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::FloatDouble::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), - CHIPDoubleAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeOctetStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::OctetString::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = chip::JniByteArray(env, static_cast(value)).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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeOctetStringAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::OctetString::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(); -} - -JNI_METHOD(void, TestClusterCluster, writeLongOctetStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::LongOctetString::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = chip::JniByteArray(env, static_cast(value)).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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeLongOctetStringAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::LongOctetString::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(); -} - -JNI_METHOD(void, TestClusterCluster, writeCharStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::CharString::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = chip::JniUtfString(env, static_cast(value)).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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeCharStringAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::CharString::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), - CHIPCharStringAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeLongCharStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::LongCharString::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = chip::JniUtfString(env, static_cast(value)).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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeLongCharStringAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::LongCharString::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), - CHIPCharStringAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeEpochUsAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EpochUs::TypeInfo; - TypeInfo::Type cppValue; - - 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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeEpochUsAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::EpochUs::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), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeEpochSAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EpochS::TypeInfo; - TypeInfo::Type cppValue; - - 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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeEpochSAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::EpochS::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), - CHIPInt32uAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeVendorIdAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::VendorId::TypeInfo; - TypeInfo::Type cppValue; - - 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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeVendorIdAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::VendorId::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), - CHIPTestClusterVendorIdAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeEnumAttrAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EnumAttr::TypeInfo; - TypeInfo::Type cppValue; - - 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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeEnumAttrAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::EnumAttr::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, TestClusterCluster, writeRangeRestrictedInt8uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; - TypeInfo::Type cppValue; - - 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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeRangeRestrictedInt8uAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::RangeRestrictedInt8u::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, TestClusterCluster, writeRangeRestrictedInt8sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; - TypeInfo::Type cppValue; - - 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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeRangeRestrictedInt8sAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::RangeRestrictedInt8s::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), - CHIPInt8sAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt16uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; - TypeInfo::Type cppValue; - - 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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeRangeRestrictedInt16uAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::RangeRestrictedInt16u::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(); -} - -JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt16sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; - TypeInfo::Type cppValue; - - 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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeRangeRestrictedInt16sAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::RangeRestrictedInt16s::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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeTimedWriteBooleanAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::TimedWriteBoolean::TypeInfo; - TypeInfo::Type cppValue; - - 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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeTimedWriteBooleanAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::TimedWriteBoolean::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), - CHIPBooleanAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeUnsupportedAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Unsupported::TypeInfo; - TypeInfo::Type cppValue; - - 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; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeUnsupportedAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::Unsupported::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), - CHIPBooleanAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableBooleanAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBoolean::TypeInfo; - TypeInfo::Type cppValue; - - bool valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().BooleanToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableBooleanAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableBoolean::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), - CHIPTestClusterNullableBooleanAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableBitmap8Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap8::TypeInfo; - TypeInfo::Type cppValue; - - uint8_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableBitmap8Attribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableBitmap8::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), - CHIPTestClusterNullableBitmap8AttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableBitmap16Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap16::TypeInfo; - TypeInfo::Type cppValue; - - uint16_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableBitmap16Attribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableBitmap16::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), - CHIPTestClusterNullableBitmap16AttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableBitmap32Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap32::TypeInfo; - TypeInfo::Type cppValue; - - uint32_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableBitmap32Attribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableBitmap32::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), - CHIPTestClusterNullableBitmap32AttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableBitmap64Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap64::TypeInfo; - TypeInfo::Type cppValue; - - uint64_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableBitmap64Attribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableBitmap64::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), - CHIPTestClusterNullableBitmap64AttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableInt8uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt8u::TypeInfo; - TypeInfo::Type cppValue; - - uint8_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableInt8uAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableInt8u::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), - CHIPTestClusterNullableInt8uAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableInt16uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt16u::TypeInfo; - TypeInfo::Type cppValue; - - uint16_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableInt16uAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableInt16u::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), - CHIPTestClusterNullableInt16uAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableInt24uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt24u::TypeInfo; - TypeInfo::Type cppValue; - - uint32_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableInt24uAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableInt24u::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), - CHIPTestClusterNullableInt24uAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableInt32uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt32u::TypeInfo; - TypeInfo::Type cppValue; - - uint32_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableInt32uAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableInt32u::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), - CHIPTestClusterNullableInt32uAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableInt40uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt40u::TypeInfo; - TypeInfo::Type cppValue; - - uint64_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableInt40uAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableInt40u::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), - CHIPTestClusterNullableInt40uAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableInt48uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt48u::TypeInfo; - TypeInfo::Type cppValue; - - uint64_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableInt48uAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableInt48u::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), - CHIPTestClusterNullableInt48uAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableInt56uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt56u::TypeInfo; - TypeInfo::Type cppValue; - - uint64_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableInt56uAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableInt56u::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), - CHIPTestClusterNullableInt56uAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableInt64uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt64u::TypeInfo; - TypeInfo::Type cppValue; - - uint64_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableInt64uAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableInt64u::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), - CHIPTestClusterNullableInt64uAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableInt8sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt8s::TypeInfo; - TypeInfo::Type cppValue; - - int8_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableInt8sAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableInt8s::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), - CHIPTestClusterNullableInt8sAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableInt16sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt16s::TypeInfo; - TypeInfo::Type cppValue; - - int16_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableInt16sAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableInt16s::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), - CHIPTestClusterNullableInt16sAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableInt24sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt24s::TypeInfo; - TypeInfo::Type cppValue; - - int32_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableInt24sAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableInt24s::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), - CHIPTestClusterNullableInt24sAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableInt32sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt32s::TypeInfo; - TypeInfo::Type cppValue; - - int32_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableInt32sAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableInt32s::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), - CHIPTestClusterNullableInt32sAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableInt40sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt40s::TypeInfo; - TypeInfo::Type cppValue; - - int64_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableInt40sAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableInt40s::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), - CHIPTestClusterNullableInt40sAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableInt48sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt48s::TypeInfo; - TypeInfo::Type cppValue; - - int64_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableInt48sAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableInt48s::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), - CHIPTestClusterNullableInt48sAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableInt56sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt56s::TypeInfo; - TypeInfo::Type cppValue; - - int64_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableInt56sAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableInt56s::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), - CHIPTestClusterNullableInt56sAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableInt64sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt64s::TypeInfo; - TypeInfo::Type cppValue; - - int64_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableInt64sAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableInt64s::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), - CHIPTestClusterNullableInt64sAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableEnum8Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnum8::TypeInfo; - TypeInfo::Type cppValue; - - uint8_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableEnum8Attribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableEnum8::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), - CHIPTestClusterNullableEnum8AttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableEnum16Attribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnum16::TypeInfo; - TypeInfo::Type cppValue; - - uint16_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableEnum16Attribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableEnum16::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), - CHIPTestClusterNullableEnum16AttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableFloatSingleAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableFloatSingle::TypeInfo; - TypeInfo::Type cppValue; - - float valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().FloatToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableFloatSingleAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableFloatSingle::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), - CHIPTestClusterNullableFloatSingleAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableFloatDoubleAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableFloatDouble::TypeInfo; - TypeInfo::Type cppValue; - - double valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().DoubleToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableFloatDoubleAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableFloatDouble::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), - CHIPTestClusterNullableFloatDoubleAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableOctetStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableOctetString::TypeInfo; - TypeInfo::Type cppValue; - - chip::ByteSpan valueValue; - if (value != nullptr) - { - valueValue = chip::JniByteArray(env, static_cast(value)).byteSpan(); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() - : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableOctetStringAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableOctetString::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), - CHIPTestClusterNullableOctetStringAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableCharStringAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableCharString::TypeInfo; - TypeInfo::Type cppValue; - - chip::CharSpan valueValue; - if (value != nullptr) - { - valueValue = chip::JniUtfString(env, static_cast(value)).charSpan(); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() - : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableCharStringAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableCharString::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), - CHIPTestClusterNullableCharStringAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableEnumAttrAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnumAttr::TypeInfo; - TypeInfo::Type cppValue; - - decltype(cppValue)::UnderlyingType valueValue; - if (value != nullptr) - { - valueValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() - : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableEnumAttrAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableEnumAttr::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), - CHIPTestClusterNullableEnumAttrAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt8uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; - TypeInfo::Type cppValue; - - uint8_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableRangeRestrictedInt8uAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableRangeRestrictedInt8u::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), - CHIPTestClusterNullableRangeRestrictedInt8uAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt8sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; - TypeInfo::Type cppValue; - - int8_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableRangeRestrictedInt8sAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableRangeRestrictedInt8s::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), - CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt16uAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; - TypeInfo::Type cppValue; - - uint16_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableRangeRestrictedInt16uAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableRangeRestrictedInt16u::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), - CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt16sAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; - TypeInfo::Type cppValue; - - int16_t valueValue; - if (value != nullptr) - { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); - } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could 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, TestClusterCluster, subscribeNullableRangeRestrictedInt16sAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::NullableRangeRestrictedInt16s::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), - CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); - - onSuccess.release(); - onFailure.release(); -} -JNI_METHOD(void, TestClusterCluster, subscribeClusterRevisionAttribute) -(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; - TestClusterCluster * 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::TestCluster::Attributes::ClusterRevision::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(); -} -JNI_METHOD(jlong, ThermostatCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - ThermostatCluster * cppCluster = new ThermostatCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, ThermostatCluster, clearWeeklySchedule) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster; - - chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Type request; - - 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(); -} -JNI_METHOD(void, ThermostatCluster, getRelayStatusLog) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster; - - chip::app::Clusters::Thermostat::Commands::GetRelayStatusLog::Type request; - - 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(); -} -JNI_METHOD(void, ThermostatCluster, getWeeklySchedule) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject daysToReturn, jobject modeToReturn, - jobject timedInvokeTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster; - - chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type request; - - request.daysToReturn = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(daysToReturn)); - request.modeToReturn = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(modeToReturn)); - - 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(); -} -JNI_METHOD(void, ThermostatCluster, setWeeklySchedule) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject numberOfTransitionsForSequence, - jobject dayOfWeekForSequence, jobject modeForSequence, jobject payload, jobject timedInvokeTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster; - - chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type request; - - request.numberOfTransitionsForSequence = static_cast( - chip::JniReferences::GetInstance().IntegerToPrimitive(numberOfTransitionsForSequence)); - request.dayOfWeekForSequence = static_cast( - chip::JniReferences::GetInstance().IntegerToPrimitive(dayOfWeekForSequence)); - request.modeForSequence = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(modeForSequence)); - request.payload = chip::app::DataModel::List(); - - 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(); -} -JNI_METHOD(void, ThermostatCluster, setpointRaiseLower) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject mode, jobject amount, jobject timedInvokeTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster; - - chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type request; - - request.mode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(mode)); - request.amount = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(amount)); - - 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); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnumAttr::TypeInfo; + 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)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPTestClusterNullableEnumAttrAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThermostatCluster, subscribeLocalTemperatureAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeNullableRangeRestrictedInt8uAttribute) (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); + 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)); @@ -28498,20 +22358,22 @@ JNI_METHOD(void, ThermostatCluster, subscribeLocalTemperatureAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * 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::Thermostat::Attributes::LocalTemperature::TypeInfo; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + 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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPTestClusterNullableRangeRestrictedInt8uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -28519,12 +22381,14 @@ JNI_METHOD(void, ThermostatCluster, subscribeLocalTemperatureAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThermostatCluster, subscribeAbsMinHeatSetpointLimitAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeNullableRangeRestrictedInt8sAttribute) (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); + 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)); @@ -28535,20 +22399,22 @@ JNI_METHOD(void, ThermostatCluster, subscribeAbsMinHeatSetpointLimitAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * 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::Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt8s::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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -28556,12 +22422,14 @@ JNI_METHOD(void, ThermostatCluster, subscribeAbsMinHeatSetpointLimitAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThermostatCluster, subscribeAbsMaxHeatSetpointLimitAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeNullableRangeRestrictedInt16uAttribute) (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); + 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)); @@ -28572,20 +22440,22 @@ JNI_METHOD(void, ThermostatCluster, subscribeAbsMaxHeatSetpointLimitAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * 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::Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt16u::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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -28593,12 +22463,14 @@ JNI_METHOD(void, ThermostatCluster, subscribeAbsMaxHeatSetpointLimitAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThermostatCluster, subscribeAbsMinCoolSetpointLimitAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeNullableRangeRestrictedInt16sAttribute) (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); + 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)); @@ -28609,20 +22481,22 @@ JNI_METHOD(void, ThermostatCluster, subscribeAbsMinCoolSetpointLimitAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * 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::Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt16s::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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -28630,12 +22504,12 @@ JNI_METHOD(void, ThermostatCluster, subscribeAbsMinCoolSetpointLimitAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThermostatCluster, subscribeAbsMaxCoolSetpointLimitAttribute) +JNI_METHOD(void, TestClusterCluster, subscribeClusterRevisionAttribute) (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); + 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)); @@ -28646,20 +22520,20 @@ JNI_METHOD(void, ThermostatCluster, subscribeAbsMaxCoolSetpointLimitAttribute) 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); + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * 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::Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::ClusterRevision::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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -28667,138 +22541,260 @@ JNI_METHOD(void, ThermostatCluster, subscribeAbsMaxCoolSetpointLimitAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(jlong, ThermostatCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + ThermostatCluster * cppCluster = new ThermostatCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} -JNI_METHOD(void, ThermostatCluster, writeOccupiedCoolingSetpointAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ThermostatCluster, clearWeeklySchedule) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - TypeInfo::Type cppValue; + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Type request; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + 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(); +} +JNI_METHOD(void, ThermostatCluster, getRelayStatusLog) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster; + + chip::app::Clusters::Thermostat::Commands::GetRelayStatusLog::Type request; + + 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(); +} +JNI_METHOD(void, ThermostatCluster, getWeeklySchedule) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject daysToReturn, jobject modeToReturn, + jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster; + + chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type request; + + request.daysToReturn = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(daysToReturn)); + request.modeToReturn = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(modeToReturn)); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - if (timedWriteTimeoutMs == nullptr) + if (timedInvokeTimeoutMs == nullptr) { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); } else { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThermostatCluster, subscribeOccupiedCoolingSetpointAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, ThermostatCluster, setWeeklySchedule) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject numberOfTransitionsForSequence, + jobject dayOfWeekForSequence, jobject modeForSequence, jobject payload, jobject timedInvokeTimeoutMs) { 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)); + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster; + + chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type request; + + request.numberOfTransitionsForSequence = static_cast( + chip::JniReferences::GetInstance().IntegerToPrimitive(numberOfTransitionsForSequence)); + request.dayOfWeekForSequence = static_cast( + chip::JniReferences::GetInstance().IntegerToPrimitive(dayOfWeekForSequence)); + request.modeForSequence = + static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(modeForSequence)); + request.payload = chip::app::DataModel::List(); + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), chip::Platform::Delete); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + 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), - CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error subscribing to attribute", err)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ThermostatCluster, writeOccupiedHeatingSetpointAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ThermostatCluster, setpointRaiseLower) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject mode, jobject amount, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; - TypeInfo::Type cppValue; + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster; + + chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type request; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + request.mode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(mode)); + request.amount = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(amount)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - 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, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - if (timedWriteTimeoutMs == nullptr) + if (timedInvokeTimeoutMs == nullptr) { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); } else { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThermostatCluster, subscribeOccupiedHeatingSetpointAttribute) +JNI_METHOD(void, ThermostatCluster, subscribeLocalTemperatureAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -28820,9 +22816,9 @@ JNI_METHOD(void, ThermostatCluster, subscribeOccupiedHeatingSetpointAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::LocalTemperature::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, @@ -28835,54 +22831,7 @@ JNI_METHOD(void, ThermostatCluster, subscribeOccupiedHeatingSetpointAttribute) 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; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - - 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, subscribeMinHeatSetpointLimitAttribute) +JNI_METHOD(void, ThermostatCluster, subscribeAbsMinHeatSetpointLimitAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -28904,8 +22853,8 @@ JNI_METHOD(void, ThermostatCluster, subscribeMinHeatSetpointLimitAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); @@ -28919,24 +22868,18 @@ JNI_METHOD(void, ThermostatCluster, subscribeMinHeatSetpointLimitAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ThermostatCluster, writeMaxHeatSetpointLimitAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ThermostatCluster, subscribeAbsMaxHeatSetpointLimitAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -28947,26 +22890,22 @@ JNI_METHOD(void, ThermostatCluster, writeMaxHeatSetpointLimitAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThermostatCluster, subscribeMaxHeatSetpointLimitAttribute) +JNI_METHOD(void, ThermostatCluster, subscribeAbsMinCoolSetpointLimitAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -28988,8 +22927,8 @@ JNI_METHOD(void, ThermostatCluster, subscribeMaxHeatSetpointLimitAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); @@ -29003,24 +22942,18 @@ JNI_METHOD(void, ThermostatCluster, subscribeMaxHeatSetpointLimitAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ThermostatCluster, writeMinCoolSetpointLimitAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ThermostatCluster, subscribeAbsMaxCoolSetpointLimitAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -29031,26 +22964,22 @@ JNI_METHOD(void, ThermostatCluster, writeMinCoolSetpointLimitAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThermostatCluster, subscribeMinCoolSetpointLimitAttribute) +JNI_METHOD(void, ThermostatCluster, subscribeOccupiedCoolingSetpointAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -29072,8 +23001,8 @@ JNI_METHOD(void, ThermostatCluster, subscribeMinCoolSetpointLimitAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); @@ -29087,24 +23016,18 @@ JNI_METHOD(void, ThermostatCluster, subscribeMinCoolSetpointLimitAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ThermostatCluster, writeMaxCoolSetpointLimitAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ThermostatCluster, subscribeOccupiedHeatingSetpointAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -29115,26 +23038,22 @@ JNI_METHOD(void, ThermostatCluster, writeMaxCoolSetpointLimitAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThermostatCluster, subscribeMaxCoolSetpointLimitAttribute) +JNI_METHOD(void, ThermostatCluster, subscribeMinHeatSetpointLimitAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -29156,8 +23075,8 @@ JNI_METHOD(void, ThermostatCluster, subscribeMaxCoolSetpointLimitAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); @@ -29171,24 +23090,18 @@ JNI_METHOD(void, ThermostatCluster, subscribeMaxCoolSetpointLimitAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ThermostatCluster, writeMinSetpointDeadBandAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ThermostatCluster, subscribeMaxHeatSetpointLimitAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -29199,31 +23112,27 @@ JNI_METHOD(void, ThermostatCluster, writeMinSetpointDeadBandAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThermostatCluster, subscribeMinSetpointDeadBandAttribute) +JNI_METHOD(void, ThermostatCluster, subscribeMinCoolSetpointLimitAttribute) (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); + 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)); @@ -29240,14 +23149,14 @@ JNI_METHOD(void, ThermostatCluster, subscribeMinSetpointDeadBandAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::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), - CHIPInt8sAttributeCallback::OnSubscriptionEstablished); + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -29255,24 +23164,18 @@ JNI_METHOD(void, ThermostatCluster, subscribeMinSetpointDeadBandAttribute) onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ThermostatCluster, writeControlSequenceOfOperationAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ThermostatCluster, subscribeMaxCoolSetpointLimitAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -29283,31 +23186,27 @@ JNI_METHOD(void, ThermostatCluster, writeControlSequenceOfOperationAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; + 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)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16sAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThermostatCluster, subscribeControlSequenceOfOperationAttribute) +JNI_METHOD(void, ThermostatCluster, subscribeMinSetpointDeadBandAttribute) (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); + 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)); @@ -29324,14 +23223,14 @@ JNI_METHOD(void, ThermostatCluster, subscribeControlSequenceOfOperationAttribute chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::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); + CHIPInt8sAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -29339,24 +23238,18 @@ JNI_METHOD(void, ThermostatCluster, subscribeControlSequenceOfOperationAttribute onSuccess.release(); onFailure.release(); } - -JNI_METHOD(void, ThermostatCluster, writeSystemModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +JNI_METHOD(void, ThermostatCluster, subscribeControlSequenceOfOperationAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::SystemMode::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); + 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), Platform::Delete); + 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)); @@ -29367,21 +23260,17 @@ JNI_METHOD(void, ThermostatCluster, writeSystemModeAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; + 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)); + 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(); @@ -29618,53 +23507,6 @@ JNI_METHOD(jlong, ThermostatUserInterfaceConfigurationCluster, initWithDevice) return reinterpret_cast(cppCluster); } -JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeTemperatureDisplayModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; - TypeInfo::Type cppValue; - - 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, subscribeTemperatureDisplayModeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -29704,54 +23546,6 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, subscribeTemperatu 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; - using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; - TypeInfo::Type cppValue; - - 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, subscribeKeypadLockoutAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -29791,54 +23585,6 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, subscribeKeypadLoc 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; - using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; - TypeInfo::Type cppValue; - - 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, subscribeScheduleProgrammingVisibilityAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -33926,53 +27672,6 @@ JNI_METHOD(void, WindowCoveringCluster, subscribeInstalledClosedLimitTiltAttribu 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; - using TypeInfo = chip::app::Clusters::WindowCovering::Attributes::Mode::TypeInfo; - TypeInfo::Type cppValue; - - 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; - 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, WindowCoveringCluster, subscribeModeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp new file mode 100644 index 00000000000000..75cc4c525450ad --- /dev/null +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -0,0 +1,6345 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP +#include "CHIPCallbackTypes.h" +#include "CHIPInvokeCallbacks.h" +#include "CHIPReadCallbacks.h" + +#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 namespace chip::Controller; + +JNI_METHOD(void, BasicCluster, writeNodeLabelAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::Basic::Attributes::NodeLabel::TypeInfo; + TypeInfo::Type cppValue; + + cppValue = chip::JniUtfString(env, static_cast(value)).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; + BasicCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, BasicCluster, writeLocationAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::Basic::Attributes::Location::TypeInfo; + TypeInfo::Type cppValue; + + cppValue = chip::JniUtfString(env, static_cast(value)).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; + BasicCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, BasicCluster, writeLocalConfigDisabledAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::Basic::Attributes::LocalConfigDisabled::TypeInfo; + TypeInfo::Type cppValue; + + 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; + BasicCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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; + using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::OutOfService::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::PresentValue::TypeInfo; + TypeInfo::Type cppValue; + + 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, ColorControlCluster, writeColorControlOptionsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorControlOptions::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::WhitePointX::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::WhitePointY::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + TypeInfo::Type cppValue; + + 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, writeColorPointGXAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + TypeInfo::Type cppValue; + + 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, writeColorPointBXAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + TypeInfo::Type cppValue; + + 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, writeStartUpColorTemperatureMiredsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + TypeInfo::Type cppValue; + + 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, ContentLauncherCluster, writeSupportedStreamingProtocolsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + TypeInfo::Type cppValue; + + 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; + ContentLauncherCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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; + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::Language::TypeInfo; + TypeInfo::Type cppValue; + + cppValue = chip::JniUtfString(env, static_cast(value)).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, writeAutoRelockTimeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::SoundVolume::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::OperatingMode::TypeInfo; + TypeInfo::Type cppValue; + + 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, writeEnableOneTouchLockingAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + TypeInfo::Type cppValue; + + 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, writeWrongCodeEntryLimitAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; + TypeInfo::Type cppValue; + + 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, GeneralCommissioningCluster, writeBreadcrumbAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + TypeInfo::Type cppValue; + + 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, IdentifyCluster, writeIdentifyTimeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::Identify::Attributes::IdentifyTime::TypeInfo; + TypeInfo::Type cppValue; + + 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, LevelControlCluster, writeOptionsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::Options::TypeInfo; + TypeInfo::Type cppValue; + + 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, writeOnOffTransitionTimeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnOffTransitionTime::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnLevel::TypeInfo; + TypeInfo::Type cppValue; + + uint8_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(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; + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnTransitionTime::TypeInfo; + TypeInfo::Type cppValue; + + uint16_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(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; + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OffTransitionTime::TypeInfo; + TypeInfo::Type cppValue; + + uint16_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(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; + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::DefaultMoveRate::TypeInfo; + TypeInfo::Type cppValue; + + uint8_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(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; + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; + TypeInfo::Type cppValue; + + uint8_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(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, LocalizationConfigurationCluster, writeActiveLocaleAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + TypeInfo::Type cppValue; + + cppValue = chip::JniUtfString(env, static_cast(value)).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, ModeSelectCluster, writeOnModeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::ModeSelect::Attributes::OnMode::TypeInfo; + TypeInfo::Type cppValue; + + 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; + 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, NetworkCommissioningCluster, writeInterfaceEnabledAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + TypeInfo::Type cppValue; + + 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, OnOffCluster, writeOnTimeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::OnOff::Attributes::OnTime::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::OnOff::Attributes::OffWaitTime::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::OnOff::Attributes::StartUpOnOff::TypeInfo; + TypeInfo::Type cppValue; + + 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, OnOffSwitchConfigurationCluster, writeSwitchActionsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; + TypeInfo::Type cppValue; + + 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, PumpConfigurationAndControlCluster, writeLifetimeRunningHoursAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + TypeInfo::Type cppValue; + + uint32_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(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; + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + TypeInfo::Type cppValue; + + uint32_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(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; + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + TypeInfo::Type cppValue; + + 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, TestClusterCluster, writeBooleanAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Boolean::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeBitmap8Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap8::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeBitmap16Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap16::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeBitmap32Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap32::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeBitmap64Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap64::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeInt8uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int8u::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeInt16uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int16u::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeInt24uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int24u::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeInt32uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int32u::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeInt40uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int40u::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeInt48uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int48u::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeInt56uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int56u::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeInt64uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int64u::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeInt8sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int8s::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeInt16sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int16s::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeInt24sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int24s::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeInt32sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int32s::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeInt40sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int40s::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeInt48sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int48s::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeInt56sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int56s::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeInt64sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int64s::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeEnum8Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Enum8::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeEnum16Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Enum16::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeFloatSingleAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::FloatSingle::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeFloatDoubleAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::FloatDouble::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeOctetStringAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::OctetString::TypeInfo; + TypeInfo::Type cppValue; + + cppValue = chip::JniByteArray(env, static_cast(value)).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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeLongOctetStringAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::LongOctetString::TypeInfo; + TypeInfo::Type cppValue; + + cppValue = chip::JniByteArray(env, static_cast(value)).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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeCharStringAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::CharString::TypeInfo; + TypeInfo::Type cppValue; + + cppValue = chip::JniUtfString(env, static_cast(value)).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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeLongCharStringAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::LongCharString::TypeInfo; + TypeInfo::Type cppValue; + + cppValue = chip::JniUtfString(env, static_cast(value)).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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeEpochUsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EpochUs::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeEpochSAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EpochS::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeVendorIdAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::VendorId::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeEnumAttrAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EnumAttr::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeRangeRestrictedInt8uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeRangeRestrictedInt8sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeRangeRestrictedInt16uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeRangeRestrictedInt16sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeTimedWriteBooleanAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::TimedWriteBoolean::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeUnsupportedAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Unsupported::TypeInfo; + TypeInfo::Type cppValue; + + 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; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableBooleanAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBoolean::TypeInfo; + TypeInfo::Type cppValue; + + bool valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().BooleanToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableBitmap8Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap8::TypeInfo; + TypeInfo::Type cppValue; + + uint8_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableBitmap16Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap16::TypeInfo; + TypeInfo::Type cppValue; + + uint16_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableBitmap32Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap32::TypeInfo; + TypeInfo::Type cppValue; + + uint32_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableBitmap64Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap64::TypeInfo; + TypeInfo::Type cppValue; + + uint64_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableInt8uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt8u::TypeInfo; + TypeInfo::Type cppValue; + + uint8_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableInt16uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt16u::TypeInfo; + TypeInfo::Type cppValue; + + uint16_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableInt24uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt24u::TypeInfo; + TypeInfo::Type cppValue; + + uint32_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableInt32uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt32u::TypeInfo; + TypeInfo::Type cppValue; + + uint32_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableInt40uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt40u::TypeInfo; + TypeInfo::Type cppValue; + + uint64_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableInt48uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt48u::TypeInfo; + TypeInfo::Type cppValue; + + uint64_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableInt56uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt56u::TypeInfo; + TypeInfo::Type cppValue; + + uint64_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableInt64uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt64u::TypeInfo; + TypeInfo::Type cppValue; + + uint64_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableInt8sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt8s::TypeInfo; + TypeInfo::Type cppValue; + + int8_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableInt16sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt16s::TypeInfo; + TypeInfo::Type cppValue; + + int16_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableInt24sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt24s::TypeInfo; + TypeInfo::Type cppValue; + + int32_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableInt32sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt32s::TypeInfo; + TypeInfo::Type cppValue; + + int32_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableInt40sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt40s::TypeInfo; + TypeInfo::Type cppValue; + + int64_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableInt48sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt48s::TypeInfo; + TypeInfo::Type cppValue; + + int64_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableInt56sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt56s::TypeInfo; + TypeInfo::Type cppValue; + + int64_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableInt64sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt64s::TypeInfo; + TypeInfo::Type cppValue; + + int64_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableEnum8Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnum8::TypeInfo; + TypeInfo::Type cppValue; + + uint8_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableEnum16Attribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnum16::TypeInfo; + TypeInfo::Type cppValue; + + uint16_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableFloatSingleAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableFloatSingle::TypeInfo; + TypeInfo::Type cppValue; + + float valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().FloatToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableFloatDoubleAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableFloatDouble::TypeInfo; + TypeInfo::Type cppValue; + + double valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().DoubleToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableOctetStringAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableOctetString::TypeInfo; + TypeInfo::Type cppValue; + + chip::ByteSpan valueValue; + if (value != nullptr) + { + valueValue = chip::JniByteArray(env, static_cast(value)).byteSpan(); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() + : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableCharStringAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableCharString::TypeInfo; + TypeInfo::Type cppValue; + + chip::CharSpan valueValue; + if (value != nullptr) + { + valueValue = chip::JniUtfString(env, static_cast(value)).charSpan(); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() + : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableEnumAttrAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnumAttr::TypeInfo; + TypeInfo::Type cppValue; + + decltype(cppValue)::UnderlyingType valueValue; + if (value != nullptr) + { + valueValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() + : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableRangeRestrictedInt8uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; + TypeInfo::Type cppValue; + + uint8_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableRangeRestrictedInt8sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; + TypeInfo::Type cppValue; + + int8_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableRangeRestrictedInt16uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; + TypeInfo::Type cppValue; + + uint16_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, TestClusterCluster, writeNullableRangeRestrictedInt16sAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; + TypeInfo::Type cppValue; + + int16_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + TypeInfo::Type cppValue; + + 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, writeControlSequenceOfOperationAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::SystemMode::TypeInfo; + TypeInfo::Type cppValue; + + 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, ThermostatUserInterfaceConfigurationCluster, writeTemperatureDisplayModeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; + TypeInfo::Type cppValue; + + 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; + using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; + TypeInfo::Type cppValue; + + 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, WindowCoveringCluster, writeModeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::WindowCovering::Attributes::Mode::TypeInfo; + TypeInfo::Type cppValue; + + 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; + 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(); +} From 41d3a6c8bf2f776224866344f3a54ea4c0a0794b Mon Sep 17 00:00:00 2001 From: Song GUO Date: Thu, 20 Jan 2022 00:05:57 +0800 Subject: [PATCH 059/124] Fix gdb version (#13684) --- .../docker/ci-only-images/chip-cirque-device-base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/docker/ci-only-images/chip-cirque-device-base/Dockerfile b/integrations/docker/ci-only-images/chip-cirque-device-base/Dockerfile index 98e4b414a5ae87..2d04d0fffe90ff 100644 --- a/integrations/docker/ci-only-images/chip-cirque-device-base/Dockerfile +++ b/integrations/docker/ci-only-images/chip-cirque-device-base/Dockerfile @@ -19,7 +19,7 @@ RUN apt-get update \ avahi-utils=0.7-4ubuntu7.1 \ ca-certificates=20210119~20.04.2 \ dhcpcd5=7.1.0-2build1 \ - gdb=9.2-0ubuntu1~20.04 \ + gdb=9.2-0ubuntu1~20.04.1 \ git=1:2.25.1-1ubuntu3.2 \ iproute2=5.5.0-1ubuntu1 \ libavahi-client3=0.7-4ubuntu7.1 \ From 8eb0c21e2dfdfeef4504b043d9a3f36c57500de9 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Wed, 19 Jan 2022 11:43:50 -0500 Subject: [PATCH 060/124] Add failsafe timer time as a parameter. (#13674) --- src/controller/CHIPDeviceController.cpp | 4 +--- src/controller/CommissioningDelegate.h | 8 ++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 792df14307744c..9e7dad861ebfd1 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -1714,9 +1714,7 @@ void DeviceCommissioner::PerformCommissioningStep(DeviceProxy * proxy, Commissio GeneralCommissioningCluster genCom; // TODO: should get the endpoint information from the descriptor cluster. genCom.Associate(proxy, 0); - // TODO(cecille): Make this a parameter - uint16_t commissioningExpirySeconds = 60; - genCom.ArmFailSafe(mSuccess.Cancel(), mFailure.Cancel(), commissioningExpirySeconds, breadcrumb, kCommandTimeoutMs); + genCom.ArmFailSafe(mSuccess.Cancel(), mFailure.Cancel(), params.GetFailsafeTimerSeconds(), breadcrumb, kCommandTimeoutMs); } break; case CommissioningStage::kConfigRegulatory: { diff --git a/src/controller/CommissioningDelegate.h b/src/controller/CommissioningDelegate.h index 86133b9782e248..8eb6112e921651 100644 --- a/src/controller/CommissioningDelegate.h +++ b/src/controller/CommissioningDelegate.h @@ -61,11 +61,18 @@ class CommissioningParameters bool HasAttestationNonce() const { return mAttestationNonce.HasValue(); } bool HasWiFiCredentials() const { return mWiFiCreds.HasValue(); } bool HasThreadOperationalDataset() const { return mThreadOperationalDataset.HasValue(); } + uint16_t GetFailsafeTimerSeconds() const { return mFailsafeTimerSeconds; } const Optional GetCSRNonce() const { return mCSRNonce; } const Optional GetAttestationNonce() const { return mAttestationNonce; } const Optional GetWiFiCredentials() const { return mWiFiCreds; } const Optional GetThreadOperationalDataset() const { return mThreadOperationalDataset; } + CommissioningParameters & SetFailsafeTimerSeconds(uint16_t seconds) + { + mFailsafeTimerSeconds = seconds; + return *this; + } + // The lifetime of the buffer csrNonce is pointing to, should exceed the lifetime of CommissioningParameters object. CommissioningParameters & SetCSRNonce(ByteSpan csrNonce) { @@ -95,6 +102,7 @@ class CommissioningParameters CHIP_ERROR GetCompletionStatus() { return completionStatus; } private: + uint16_t mFailsafeTimerSeconds = 60; Optional mCSRNonce; ///< CSR Nonce passed by the commissioner Optional mAttestationNonce; ///< Attestation Nonce passed by the commissioner Optional mWiFiCreds; From 55e9a4720ab24d3bcaadbbc7e08fd50782ba89a9 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Wed, 19 Jan 2022 11:47:27 -0500 Subject: [PATCH 061/124] TestCluster: Add attribute resets during Test cmd. (#13673) The test assumes that we start with the default values, which means the test will fail the second time around. This fixes that. --- .../test-cluster-server.cpp | 37 +++++++++++++++++++ src/app/util/attribute-storage.cpp | 9 ++++- src/app/util/attribute-storage.h | 2 +- 3 files changed, 46 insertions(+), 2 deletions(-) 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 9ea4deaa26aef7..6ad1f767830a8a 100644 --- a/src/app/clusters/test-cluster-server/test-cluster-server.cpp +++ b/src/app/clusters/test-cluster-server/test-cluster-server.cpp @@ -411,6 +411,43 @@ CHIP_ERROR TestAttrAccess::WriteStructAttribute(AttributeValueDecoder & aDecoder bool emberAfTestClusterClusterTestCallback(app::CommandHandler *, const app::ConcreteCommandPath & commandPath, const Test::DecodableType & commandData) { + // Setup the test variables + emAfLoadAttributeDefaults(commandPath.mEndpointId, true, MakeOptional(commandPath.mClusterId)); + for (int i = 0; i < kAttributeListLength; ++i) + { + gListUint8Data[i] = 0; + gListOctetStringData[i].SetLength(0); + gListOperationalCert[i].SetLength(0); + listStructOctetStringData[i].fabricIndex = 0; + listStructOctetStringData[i].operationalCert = ByteSpan(); + gSimpleEnums[i] = SimpleEnum::kUnspecified; + } + gSimpleEnumCount = 0; + + gStructAttributeValue.a = 0; + gStructAttributeValue.b = false; + gStructAttributeValue.c = SimpleEnum::kValueA; + gStructAttributeValue.d = ByteSpan(); + gStructAttributeValue.e = CharSpan(); + gStructAttributeValue.f = BitFlags(); + gStructAttributeValue.g = 0; + gStructAttributeValue.h = 0; + + gNullableStructAttributeValue.SetNull(); + + gNullablesAndOptionalsStruct.nullableInt.SetNull(); + gNullablesAndOptionalsStruct.optionalInt = NullOptional; + gNullablesAndOptionalsStruct.nullableOptionalInt = NullOptional; + gNullablesAndOptionalsStruct.nullableString.SetNull(); + gNullablesAndOptionalsStruct.optionalString = NullOptional; + gNullablesAndOptionalsStruct.nullableOptionalString = NullOptional; + gNullablesAndOptionalsStruct.nullableStruct.SetNull(); + gNullablesAndOptionalsStruct.optionalStruct = NullOptional; + gNullablesAndOptionalsStruct.nullableOptionalStruct = NullOptional; + gNullablesAndOptionalsStruct.nullableList.SetNull(); + gNullablesAndOptionalsStruct.optionalList = NullOptional; + gNullablesAndOptionalsStruct.nullableOptionalList = NullOptional; + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_SUCCESS); return true; } diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 07b6cc9714fdfa..e621c011ee6922 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -1111,7 +1111,7 @@ void emberAfResetAttributes(EndpointId endpoint) emAfLoadAttributeDefaults(endpoint, true); } -void emAfLoadAttributeDefaults(EndpointId endpoint, bool ignoreStorage) +void emAfLoadAttributeDefaults(EndpointId endpoint, bool ignoreStorage, Optional clusterId) { uint16_t ep; uint8_t clusterI, curNetwork = 0 /* emberGetCurrentNetwork() */; @@ -1142,6 +1142,13 @@ void emAfLoadAttributeDefaults(EndpointId endpoint, bool ignoreStorage) for (clusterI = 0; clusterI < de->endpointType->clusterCount; clusterI++) { EmberAfCluster * cluster = &(de->endpointType->cluster[clusterI]); + if (clusterId.HasValue()) + { + if (clusterId.Value() != cluster->clusterId) + { + continue; + } + } // when the attributeCount is high, the loop takes too long to run and a // watchdog kicks in causing a reset. As a workaround, we'll diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index 504a6241844999..ca357c8220c4ba 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -197,7 +197,7 @@ void emberAfResetAttributes(chip::EndpointId endpoint); // Loads the attributes from built-in default and / or storage. If // ignoreStorage is true, only defaults will be read, and the storage for // non-volatile attributes will be overwritten with those defaults. -void emAfLoadAttributeDefaults(chip::EndpointId endpoint, bool ignoreStorage); +void emAfLoadAttributeDefaults(chip::EndpointId endpoint, bool ignoreStorage, chip::Optional = chip::NullOptional); // After the RAM value has changed, code should call this function. If this // attribute has been tagged as non-volatile, its value will be stored. From 527467617c7a59ba3a25dde6970d13fb7a10ad2c Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Wed, 19 Jan 2022 08:48:23 -0800 Subject: [PATCH 062/124] Remove unused configuration items from ConfigurationMgr (#13672) --- src/include/platform/ConfigurationManager.h | 4 -- .../GenericConfigurationManagerImpl.cpp | 46 ------------------- .../GenericConfigurationManagerImpl.h | 4 -- src/platform/Ameba/AmebaConfig.cpp | 2 - src/platform/Ameba/AmebaConfig.h | 2 - src/platform/Darwin/PosixConfig.cpp | 2 - src/platform/Darwin/PosixConfig.h | 2 - src/platform/EFR32/EFR32Config.h | 6 +-- src/platform/ESP32/ESP32Config.cpp | 2 - src/platform/ESP32/ESP32Config.h | 2 - src/platform/Linux/PosixConfig.cpp | 2 - src/platform/Linux/PosixConfig.h | 2 - src/platform/P6/P6Config.cpp | 2 - src/platform/P6/P6Config.h | 2 - src/platform/Tizen/PosixConfig.cpp | 2 - src/platform/Tizen/PosixConfig.h | 2 - src/platform/Zephyr/ZephyrConfig.cpp | 3 -- src/platform/Zephyr/ZephyrConfig.h | 2 - src/platform/android/AndroidConfig.cpp | 2 - src/platform/android/AndroidConfig.h | 4 +- .../chip/platform/ConfigurationManager.java | 2 - .../cc13x2_26x2/CC13X2_26X2Config.cpp | 8 +--- src/platform/cc13x2_26x2/CC13X2_26X2Config.h | 2 - src/platform/fake/ConfigurationManagerImpl.h | 4 -- src/platform/mbed/MbedConfig.cpp | 2 - src/platform/mbed/MbedConfig.h | 2 - src/platform/nxp/k32w/k32w0/K32W0Config.h | 2 - src/platform/qpg/qpgConfig.h | 2 - src/platform/tests/TestConfigurationMgr.cpp | 30 ------------ 29 files changed, 6 insertions(+), 143 deletions(-) diff --git a/src/include/platform/ConfigurationManager.h b/src/include/platform/ConfigurationManager.h index 40fa50f2fa6c05..28b044ee896e9b 100644 --- a/src/include/platform/ConfigurationManager.h +++ b/src/include/platform/ConfigurationManager.h @@ -103,8 +103,6 @@ class ConfigurationManager virtual CHIP_ERROR GetCountryCode(char * buf, size_t bufSize, size_t & codeLen) = 0; virtual CHIP_ERROR GetActiveLocale(char * buf, size_t bufSize, size_t & codeLen) = 0; virtual CHIP_ERROR GetBreadcrumb(uint64_t & breadcrumb) = 0; - virtual CHIP_ERROR GetHourFormat(uint8_t & format) = 0; - virtual CHIP_ERROR GetCalendarType(uint8_t & type) = 0; virtual CHIP_ERROR StoreSerialNumber(const char * serialNum, size_t serialNumLen) = 0; virtual CHIP_ERROR StorePrimaryWiFiMACAddress(const uint8_t * buf) = 0; virtual CHIP_ERROR StorePrimary802154MACAddress(const uint8_t * buf) = 0; @@ -116,8 +114,6 @@ class ConfigurationManager virtual CHIP_ERROR StoreCountryCode(const char * code, size_t codeLen) = 0; virtual CHIP_ERROR StoreActiveLocale(const char * code, size_t codeLen) = 0; virtual CHIP_ERROR StoreBreadcrumb(uint64_t breadcrumb) = 0; - virtual CHIP_ERROR StoreHourFormat(uint8_t format) = 0; - virtual CHIP_ERROR StoreCalendarType(uint8_t type) = 0; virtual CHIP_ERROR GetRebootCount(uint32_t & rebootCount) = 0; virtual CHIP_ERROR StoreRebootCount(uint32_t rebootCount) = 0; virtual CHIP_ERROR GetTotalOperationalHours(uint32_t & totalOperationalHours) = 0; diff --git a/src/include/platform/internal/GenericConfigurationManagerImpl.cpp b/src/include/platform/internal/GenericConfigurationManagerImpl.cpp index 11ac8979aad52d..72d5875abbe21e 100644 --- a/src/include/platform/internal/GenericConfigurationManagerImpl.cpp +++ b/src/include/platform/internal/GenericConfigurationManagerImpl.cpp @@ -321,52 +321,6 @@ CHIP_ERROR GenericConfigurationManagerImpl::StoreRegulatoryLocation return WriteConfigValue(ConfigClass::kConfigKey_RegulatoryLocation, value); } -template -CHIP_ERROR GenericConfigurationManagerImpl::GetHourFormat(uint8_t & format) -{ - uint32_t value = 0; - - CHIP_ERROR err = ReadConfigValue(ConfigClass::kConfigKey_HourFormat, value); - - if (err == CHIP_NO_ERROR) - { - VerifyOrReturnError(value <= UINT8_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); - format = static_cast(value); - } - - return err; -} - -template -CHIP_ERROR GenericConfigurationManagerImpl::StoreHourFormat(uint8_t format) -{ - uint32_t value = format; - return WriteConfigValue(ConfigClass::kConfigKey_HourFormat, value); -} - -template -CHIP_ERROR GenericConfigurationManagerImpl::GetCalendarType(uint8_t & type) -{ - uint32_t value = 0; - - CHIP_ERROR err = ReadConfigValue(ConfigClass::kConfigKey_CalendarType, value); - - if (err == CHIP_NO_ERROR) - { - VerifyOrReturnError(value <= UINT8_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); - type = static_cast(value); - } - - return err; -} - -template -CHIP_ERROR GenericConfigurationManagerImpl::StoreCalendarType(uint8_t type) -{ - uint32_t value = type; - return WriteConfigValue(ConfigClass::kConfigKey_CalendarType, value); -} - template CHIP_ERROR GenericConfigurationManagerImpl::GetCountryCode(char * buf, size_t bufSize, size_t & codeLen) { diff --git a/src/include/platform/internal/GenericConfigurationManagerImpl.h b/src/include/platform/internal/GenericConfigurationManagerImpl.h index d29a0ed2a38240..7fb9554ae0737c 100644 --- a/src/include/platform/internal/GenericConfigurationManagerImpl.h +++ b/src/include/platform/internal/GenericConfigurationManagerImpl.h @@ -110,10 +110,6 @@ class GenericConfigurationManagerImpl : public ConfigurationManager CHIP_ERROR GetLocalConfigDisabled(bool & disabled) override; CHIP_ERROR GetReachable(bool & reachable) override; CHIP_ERROR GetUniqueId(char * buf, size_t bufSize) override; - CHIP_ERROR GetHourFormat(uint8_t & format) override; - CHIP_ERROR StoreHourFormat(uint8_t format) override; - CHIP_ERROR GetCalendarType(uint8_t & type) override; - CHIP_ERROR StoreCalendarType(uint8_t type) override; CHIP_ERROR RunUnitTests(void) override; bool IsFullyProvisioned() override; void InitiateFactoryReset() override; diff --git a/src/platform/Ameba/AmebaConfig.cpp b/src/platform/Ameba/AmebaConfig.cpp index 4e23b7c115db21..56de35a1e38b9b 100644 --- a/src/platform/Ameba/AmebaConfig.cpp +++ b/src/platform/Ameba/AmebaConfig.cpp @@ -74,8 +74,6 @@ const AmebaConfig::Key AmebaConfig::kConfigKey_RegulatoryLocation = { k const AmebaConfig::Key AmebaConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const AmebaConfig::Key AmebaConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const AmebaConfig::Key AmebaConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; -const AmebaConfig::Key AmebaConfig::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; -const AmebaConfig::Key AmebaConfig::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Keys stored in the Chip-counters namespace const AmebaConfig::Key AmebaConfig::kCounterKey_RebootCount = { kConfigNamespace_ChipCounters, "reboot-count" }; diff --git a/src/platform/Ameba/AmebaConfig.h b/src/platform/Ameba/AmebaConfig.h index 1ba6bf7c37a6f8..1bc3b21aa82e02 100755 --- a/src/platform/Ameba/AmebaConfig.h +++ b/src/platform/Ameba/AmebaConfig.h @@ -68,8 +68,6 @@ class AmebaConfig static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; - static const Key kConfigKey_HourFormat; - static const Key kConfigKey_CalendarType; // Counter keys static const Key kCounterKey_RebootCount; diff --git a/src/platform/Darwin/PosixConfig.cpp b/src/platform/Darwin/PosixConfig.cpp index ea815f11832a5c..5ee3104038b4d4 100644 --- a/src/platform/Darwin/PosixConfig.cpp +++ b/src/platform/Darwin/PosixConfig.cpp @@ -67,8 +67,6 @@ const PosixConfig::Key PosixConfig::kConfigKey_RegulatoryLocation = { kConfigNam const PosixConfig::Key PosixConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const PosixConfig::Key PosixConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const PosixConfig::Key PosixConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; -const PosixConfig::Key PosixConfig::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; -const PosixConfig::Key PosixConfig::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Prefix used for NVS keys that contain Chip group encryption keys. const char PosixConfig::kGroupKeyNamePrefix[] = "gk-"; diff --git a/src/platform/Darwin/PosixConfig.h b/src/platform/Darwin/PosixConfig.h index 1d852822078c43..009433a91d4a5a 100644 --- a/src/platform/Darwin/PosixConfig.h +++ b/src/platform/Darwin/PosixConfig.h @@ -74,8 +74,6 @@ class PosixConfig static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; - static const Key kConfigKey_HourFormat; - static const Key kConfigKey_CalendarType; static const char kGroupKeyNamePrefix[]; diff --git a/src/platform/EFR32/EFR32Config.h b/src/platform/EFR32/EFR32Config.h index c008db24251489..295c6f8e08af1d 100644 --- a/src/platform/EFR32/EFR32Config.h +++ b/src/platform/EFR32/EFR32Config.h @@ -95,10 +95,8 @@ class EFR32Config static constexpr Key kConfigKey_CountryCode = EFR32ConfigKey(kChipConfig_KeyBase, 0x0A); static constexpr Key kConfigKey_Breadcrumb = EFR32ConfigKey(kChipConfig_KeyBase, 0x0B); static constexpr Key kConfigKey_ActiveLocale = EFR32ConfigKey(kChipConfig_KeyBase, 0x0C); - static constexpr Key kConfigKey_HourFormat = EFR32ConfigKey(kChipConfig_KeyBase, 0x0D); - static constexpr Key kConfigKey_CalendarType = EFR32ConfigKey(kChipConfig_KeyBase, 0x0E); - static constexpr Key kConfigKey_GroupKeyBase = EFR32ConfigKey(kChipConfig_KeyBase, 0x0F); - static constexpr Key kConfigKey_GroupKeyMax = EFR32ConfigKey(kChipConfig_KeyBase, 0x1E); // Allows 16 Group Keys to be created. + static constexpr Key kConfigKey_GroupKeyBase = EFR32ConfigKey(kChipConfig_KeyBase, 0x0D); + static constexpr Key kConfigKey_GroupKeyMax = EFR32ConfigKey(kChipConfig_KeyBase, 0x1C); // Allows 16 Group Keys to be created. // CHIP Counter Keys static constexpr Key kConfigKey_BootCount = EFR32ConfigKey(kChipCounter_KeyBase, 0x00); diff --git a/src/platform/ESP32/ESP32Config.cpp b/src/platform/ESP32/ESP32Config.cpp index a41a86c0002b15..5b2d6ea2f3073e 100644 --- a/src/platform/ESP32/ESP32Config.cpp +++ b/src/platform/ESP32/ESP32Config.cpp @@ -73,8 +73,6 @@ const ESP32Config::Key ESP32Config::kConfigKey_RegulatoryLocation = { kConfigNam const ESP32Config::Key ESP32Config::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const ESP32Config::Key ESP32Config::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const ESP32Config::Key ESP32Config::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; -const ESP32Config::Key ESP32Config::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; -const ESP32Config::Key ESP32Config::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Keys stored in the Chip-counters namespace const ESP32Config::Key ESP32Config::kCounterKey_RebootCount = { kConfigNamespace_ChipCounters, "reboot-count" }; diff --git a/src/platform/ESP32/ESP32Config.h b/src/platform/ESP32/ESP32Config.h index a16254d661579d..75ff577b28c0e6 100644 --- a/src/platform/ESP32/ESP32Config.h +++ b/src/platform/ESP32/ESP32Config.h @@ -75,8 +75,6 @@ class ESP32Config static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; - static const Key kConfigKey_HourFormat; - static const Key kConfigKey_CalendarType; // CHIP Counter keys static const Key kCounterKey_RebootCount; diff --git a/src/platform/Linux/PosixConfig.cpp b/src/platform/Linux/PosixConfig.cpp index 7187070494043a..3c09fa7b7a7808 100644 --- a/src/platform/Linux/PosixConfig.cpp +++ b/src/platform/Linux/PosixConfig.cpp @@ -73,8 +73,6 @@ const PosixConfig::Key PosixConfig::kConfigKey_CountryCode = { kConfigNam const PosixConfig::Key PosixConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const PosixConfig::Key PosixConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; const PosixConfig::Key PosixConfig::kConfigKey_LocationCapability = { kConfigNamespace_ChipConfig, "location-capability" }; -const PosixConfig::Key PosixConfig::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; -const PosixConfig::Key PosixConfig::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Keys stored in the Chip-counters namespace const PosixConfig::Key PosixConfig::kCounterKey_RebootCount = { kConfigNamespace_ChipCounters, "reboot-count" }; diff --git a/src/platform/Linux/PosixConfig.h b/src/platform/Linux/PosixConfig.h index 4b38910fb65ea5..e4361af27e216e 100644 --- a/src/platform/Linux/PosixConfig.h +++ b/src/platform/Linux/PosixConfig.h @@ -77,8 +77,6 @@ class PosixConfig static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; static const Key kConfigKey_LocationCapability; - static const Key kConfigKey_HourFormat; - static const Key kConfigKey_CalendarType; static const Key kCounterKey_RebootCount; static const Key kCounterKey_UpTime; diff --git a/src/platform/P6/P6Config.cpp b/src/platform/P6/P6Config.cpp index 6cfe10aa2f7ebd..a41e744d6eaa17 100644 --- a/src/platform/P6/P6Config.cpp +++ b/src/platform/P6/P6Config.cpp @@ -71,8 +71,6 @@ const P6Config::Key P6Config::kConfigKey_RegulatoryLocation = { kConfigNamespace const P6Config::Key P6Config::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const P6Config::Key P6Config::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const P6Config::Key P6Config::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; -const P6Config::Key P6Config::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; -const P6Config::Key P6Config::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; const P6Config::Key P6Config::kConfigKey_WiFiSSID = { kConfigNamespace_ChipConfig, "wifi-ssid" }; const P6Config::Key P6Config::kConfigKey_WiFiPassword = { kConfigNamespace_ChipConfig, "wifi-password" }; const P6Config::Key P6Config::kConfigKey_WiFiSecurity = { kConfigNamespace_ChipConfig, "wifi-security" }; diff --git a/src/platform/P6/P6Config.h b/src/platform/P6/P6Config.h index b59b57f07dd951..58981769415557 100644 --- a/src/platform/P6/P6Config.h +++ b/src/platform/P6/P6Config.h @@ -76,8 +76,6 @@ class P6Config static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; - static const Key kConfigKey_HourFormat; - static const Key kConfigKey_CalendarType; static const Key kConfigKey_WiFiSSID; static const Key kConfigKey_WiFiPassword; static const Key kConfigKey_WiFiSecurity; diff --git a/src/platform/Tizen/PosixConfig.cpp b/src/platform/Tizen/PosixConfig.cpp index fa8fce00810827..92d0009356d685 100644 --- a/src/platform/Tizen/PosixConfig.cpp +++ b/src/platform/Tizen/PosixConfig.cpp @@ -68,8 +68,6 @@ const PosixConfig::Key PosixConfig::kConfigKey_RegulatoryLocation = { kConfigNam const PosixConfig::Key PosixConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const PosixConfig::Key PosixConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; const PosixConfig::Key PosixConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; -const PosixConfig::Key PosixConfig::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; -const PosixConfig::Key PosixConfig::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Prefix used for NVS keys that contain Chip group encryption keys. const char PosixConfig::kGroupKeyNamePrefix[] = "gk-"; diff --git a/src/platform/Tizen/PosixConfig.h b/src/platform/Tizen/PosixConfig.h index 37cdbcb1aea540..e4beca4391b5b7 100644 --- a/src/platform/Tizen/PosixConfig.h +++ b/src/platform/Tizen/PosixConfig.h @@ -74,8 +74,6 @@ class PosixConfig static const Key kConfigKey_CountryCode; static const Key kConfigKey_Breadcrumb; static const Key kConfigKey_ActiveLocale; - static const Key kConfigKey_HourFormat; - static const Key kConfigKey_CalendarType; static const char kGroupKeyNamePrefix[]; diff --git a/src/platform/Zephyr/ZephyrConfig.cpp b/src/platform/Zephyr/ZephyrConfig.cpp index c151ccb23ac32a..2bf321b4582ef3 100644 --- a/src/platform/Zephyr/ZephyrConfig.cpp +++ b/src/platform/Zephyr/ZephyrConfig.cpp @@ -72,8 +72,6 @@ const ZephyrConfig::Key ZephyrConfig::kConfigKey_RegulatoryLocation = CONFIG_KEY const ZephyrConfig::Key ZephyrConfig::kConfigKey_CountryCode = CONFIG_KEY(NAMESPACE_CONFIG "country-code"); const ZephyrConfig::Key ZephyrConfig::kConfigKey_ActiveLocale = CONFIG_KEY(NAMESPACE_CONFIG "active-locale"); const ZephyrConfig::Key ZephyrConfig::kConfigKey_Breadcrumb = CONFIG_KEY(NAMESPACE_CONFIG "breadcrumb"); -const ZephyrConfig::Key ZephyrConfig::kConfigKey_HourFormat = CONFIG_KEY(NAMESPACE_CONFIG "hour-format"); -const ZephyrConfig::Key ZephyrConfig::kConfigKey_CalendarType = CONFIG_KEY(NAMESPACE_CONFIG "calendar-type"); // Keys stored in the counters namespace const ZephyrConfig::Key ZephyrConfig::kCounterKey_RebootCount = CONFIG_KEY(NAMESPACE_COUNTERS "reboot-count"); @@ -89,7 +87,6 @@ constexpr const char * sAllResettableConfigKeys[] = { ZephyrConfig::kConfigKey_LastUsedEpochKeyId, ZephyrConfig::kConfigKey_FailSafeArmed, ZephyrConfig::kConfigKey_RegulatoryLocation, ZephyrConfig::kConfigKey_CountryCode, ZephyrConfig::kConfigKey_ActiveLocale, ZephyrConfig::kConfigKey_Breadcrumb, - ZephyrConfig::kConfigKey_HourFormat, ZephyrConfig::kConfigKey_CalendarType, }; // Data structure to be passed as a parameter of Zephyr's settings_load_subtree_direct() function diff --git a/src/platform/Zephyr/ZephyrConfig.h b/src/platform/Zephyr/ZephyrConfig.h index 7afffaccbf95ad..b7e3c63f63da21 100644 --- a/src/platform/Zephyr/ZephyrConfig.h +++ b/src/platform/Zephyr/ZephyrConfig.h @@ -64,8 +64,6 @@ class ZephyrConfig static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; - static const Key kConfigKey_HourFormat; - static const Key kConfigKey_CalendarType; static const Key kCounterKey_RebootCount; static const Key kCounterKey_BootReason; diff --git a/src/platform/android/AndroidConfig.cpp b/src/platform/android/AndroidConfig.cpp index 1488c56f2715ae..cf6f4d506a9f8b 100644 --- a/src/platform/android/AndroidConfig.cpp +++ b/src/platform/android/AndroidConfig.cpp @@ -93,8 +93,6 @@ const AndroidConfig::Key AndroidConfig::kConfigKey_RegulatoryLocation = { kConfi const AndroidConfig::Key AndroidConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const AndroidConfig::Key AndroidConfig::kConfigKey_ActiveLocale = { kConfigNamespace_ChipConfig, "active-locale" }; const AndroidConfig::Key AndroidConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; -const AndroidConfig::Key AndroidConfig::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; -const AndroidConfig::Key AndroidConfig::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; // Prefix used for NVS keys that contain Chip group encryption keys. const char AndroidConfig::kGroupKeyNamePrefix[] = "gk-"; diff --git a/src/platform/android/AndroidConfig.h b/src/platform/android/AndroidConfig.h index a9db855ef49979..d1c92fe518a166 100644 --- a/src/platform/android/AndroidConfig.h +++ b/src/platform/android/AndroidConfig.h @@ -1,3 +1,5 @@ + + /* * * Copyright (c) 2020-2021 Project CHIP Authors @@ -76,8 +78,6 @@ class AndroidConfig static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; - static const Key kConfigKey_HourFormat; - static const Key kConfigKey_CalendarType; static const Key kConfigKey_ProductId; static const Key kConfigKey_ProductName; static const Key kConfigKey_SoftwareVersion; diff --git a/src/platform/android/java/chip/platform/ConfigurationManager.java b/src/platform/android/java/chip/platform/ConfigurationManager.java index cd79a0c8fd3bd0..a3aed3df257ecf 100644 --- a/src/platform/android/java/chip/platform/ConfigurationManager.java +++ b/src/platform/android/java/chip/platform/ConfigurationManager.java @@ -61,8 +61,6 @@ public interface ConfigurationManager { String kConfigKey_CountryCode = "country-code"; String kConfigKey_ActiveLocale = "active-locale"; String kConfigKey_Breadcrumb = "breadcrumb"; - String kConfigKey_HourFormat = "hour-format"; - String kConfigKey_CalendarType = "calendar-type"; // Prefix used for NVS keys that contain Chip group encryption keys. String kGroupKeyNamePrefix = "gk-"; diff --git a/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp b/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp index b379581b9252a8..c934a2e9bb35e4 100644 --- a/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp +++ b/src/platform/cc13x2_26x2/CC13X2_26X2Config.cpp @@ -89,16 +89,12 @@ const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_Breadcrumb = .itemID = 0x001c } }; const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_ActiveLocale = { { .systemID = kCC13X2_26X2ChipConfig_Sysid, .itemID = 0x001d } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_HourFormat = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, - .itemID = 0x001e } }; -const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_CalendarType = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, - .itemID = 0x001f } }; /* Internal for the KVS interface. */ const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_KVS_key = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, - .itemID = 0x0020 } }; + .itemID = 0x001e } }; const CC13X2_26X2Config::Key CC13X2_26X2Config::kConfigKey_KVS_value = { { .systemID = kCC13X2_26X2ChipFactory_Sysid, - .itemID = 0x0021 } }; + .itemID = 0x001f } }; /* Static local variables */ static NVINTF_nvFuncts_t sNvoctpFps = { 0 }; diff --git a/src/platform/cc13x2_26x2/CC13X2_26X2Config.h b/src/platform/cc13x2_26x2/CC13X2_26X2Config.h index 854a7692eaf212..034a067906fc43 100644 --- a/src/platform/cc13x2_26x2/CC13X2_26X2Config.h +++ b/src/platform/cc13x2_26x2/CC13X2_26X2Config.h @@ -67,8 +67,6 @@ class CC13X2_26X2Config static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; - static const Key kConfigKey_HourFormat; - static const Key kConfigKey_CalendarType; static const Key kConfigKey_KVS_key; // special key for KVS system, key storage static const Key kConfigKey_KVS_value; // special key for KVS system, value storage diff --git a/src/platform/fake/ConfigurationManagerImpl.h b/src/platform/fake/ConfigurationManagerImpl.h index fd9b571ee7bb9e..88d0f452618541 100644 --- a/src/platform/fake/ConfigurationManagerImpl.h +++ b/src/platform/fake/ConfigurationManagerImpl.h @@ -98,10 +98,6 @@ class ConfigurationManagerImpl : public ConfigurationManager CHIP_ERROR GetLocalConfigDisabled(bool & disabled) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR GetReachable(bool & reachable) override { return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR GetUniqueId(char * buf, size_t bufSize) override { return CHIP_ERROR_NOT_IMPLEMENTED; } - CHIP_ERROR GetHourFormat(uint8_t & format) override { return CHIP_ERROR_NOT_IMPLEMENTED; }; - CHIP_ERROR StoreHourFormat(uint8_t format) override { return CHIP_ERROR_NOT_IMPLEMENTED; }; - CHIP_ERROR GetCalendarType(uint8_t & type) override { return CHIP_ERROR_NOT_IMPLEMENTED; }; - CHIP_ERROR StoreCalendarType(uint8_t type) override { return CHIP_ERROR_NOT_IMPLEMENTED; }; #if !defined(NDEBUG) CHIP_ERROR RunUnitTests(void) override { return CHIP_ERROR_NOT_IMPLEMENTED; } #endif diff --git a/src/platform/mbed/MbedConfig.cpp b/src/platform/mbed/MbedConfig.cpp index aab9e6916ca9ed..608d732ce61425 100644 --- a/src/platform/mbed/MbedConfig.cpp +++ b/src/platform/mbed/MbedConfig.cpp @@ -82,8 +82,6 @@ const MbedConfig::Key MbedConfig::kConfigKey_RegulatoryLocation = { CONFIG_KEY(" const MbedConfig::Key MbedConfig::kConfigKey_CountryCode = { CONFIG_KEY("country-code") }; const MbedConfig::Key MbedConfig::kConfigKey_ActiveLocale = { CONFIG_KEY("active-locale") }; const MbedConfig::Key MbedConfig::kConfigKey_Breadcrumb = { CONFIG_KEY("breadcrumb") }; -const MbedConfig::Key MbedConfig::kConfigKey_HourFormat = { CONFIG_KEY("hour-format") }; -const MbedConfig::Key MbedConfig::kConfigKey_CalendarType = { CONFIG_KEY("calendar-type") }; CHIP_ERROR MbedConfig::ReadConfigValue(Key key, bool & val) { diff --git a/src/platform/mbed/MbedConfig.h b/src/platform/mbed/MbedConfig.h index 09ce576d1760d0..21d33df304e140 100644 --- a/src/platform/mbed/MbedConfig.h +++ b/src/platform/mbed/MbedConfig.h @@ -73,8 +73,6 @@ class MbedConfig static const Key kConfigKey_CountryCode; static const Key kConfigKey_ActiveLocale; static const Key kConfigKey_Breadcrumb; - static const Key kConfigKey_HourFormat; - static const Key kConfigKey_CalendarType; // Config value accessors. static CHIP_ERROR ReadConfigValue(Key key, bool & val); diff --git a/src/platform/nxp/k32w/k32w0/K32W0Config.h b/src/platform/nxp/k32w/k32w0/K32W0Config.h index da73746d4d463c..b5cf3c6e23c0c4 100644 --- a/src/platform/nxp/k32w/k32w0/K32W0Config.h +++ b/src/platform/nxp/k32w/k32w0/K32W0Config.h @@ -89,8 +89,6 @@ class K32WConfig static constexpr Key kConfigKey_CountryCode = K32WConfigKey(kPDMId_ChipConfig, 0x08); static constexpr Key kConfigKey_Breadcrumb = K32WConfigKey(kPDMId_ChipConfig, 0x09); static constexpr Key kConfigKey_ActiveLocale = K32WConfigKey(kPDMId_ChipConfig, 0x0A); - static constexpr Key kConfigKey_HourFormat = K32WConfigKey(kPDMId_ChipConfig, 0x0B); - static constexpr Key kConfigKey_CalendarType = K32WConfigKey(kPDMId_ChipConfig, 0x0C); // CHIP Counter Keys static constexpr Key kCounterKey_RebootCount = K32WConfigKey(kPDMId_ChipCounter, 0x00); diff --git a/src/platform/qpg/qpgConfig.h b/src/platform/qpg/qpgConfig.h index 9c5130537de218..7a8079c80914a4 100644 --- a/src/platform/qpg/qpgConfig.h +++ b/src/platform/qpg/qpgConfig.h @@ -86,8 +86,6 @@ class QPGConfig static constexpr Key kConfigKey_CountryCode = QorvoConfigKey(kFileId_ChipConfig, 0x0A); static constexpr Key kConfigKey_Breadcrumb = QorvoConfigKey(kFileId_ChipConfig, 0x0B); static constexpr Key kConfigKey_ActiveLocale = QorvoConfigKey(kFileId_ChipConfig, 0x0C); - static constexpr Key kConfigKey_HourFormat = QorvoConfigKey(kFileId_ChipConfig, 0x0D); - static constexpr Key kConfigKey_CalendarType = QorvoConfigKey(kFileId_ChipConfig, 0x0E); static constexpr Key kConfigKey_GroupKeyBase = QorvoConfigKey(kFileId_ChipConfig, 0x0F); static constexpr Key kConfigKey_GroupKeyMax = QorvoConfigKey(kFileId_ChipConfig, 0x1E); // Allows 16 Group Keys to be created. diff --git a/src/platform/tests/TestConfigurationMgr.cpp b/src/platform/tests/TestConfigurationMgr.cpp index 450e7a15f8bbcc..04d8998271627b 100644 --- a/src/platform/tests/TestConfigurationMgr.cpp +++ b/src/platform/tests/TestConfigurationMgr.cpp @@ -245,34 +245,6 @@ static void TestConfigurationMgr_ActiveLocale(nlTestSuite * inSuite, void * inCo NL_TEST_ASSERT(inSuite, strcmp(buf, activeLocale) == 0); } -static void TestConfigurationMgr_HourFormat(nlTestSuite * inSuite, void * inContext) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - uint8_t format = 0; - - err = ConfigurationMgr().StoreHourFormat(3); - NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - - err = ConfigurationMgr().GetHourFormat(format); - NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - - NL_TEST_ASSERT(inSuite, format == 3); -} - -static void TestConfigurationMgr_CalendarType(nlTestSuite * inSuite, void * inContext) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - uint8_t type = 0; - - err = ConfigurationMgr().StoreCalendarType(3); - NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - - err = ConfigurationMgr().GetCalendarType(type); - NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - - NL_TEST_ASSERT(inSuite, type == 3); -} - /** * Test Suite. It lists all the test functions. */ @@ -291,8 +263,6 @@ static const nlTest sTests[] = { NL_TEST_DEF("Test ConfigurationMgr::Breadcrumb", TestConfigurationMgr_Breadcrumb), NL_TEST_DEF("Test ConfigurationMgr::GetPrimaryMACAddress", TestConfigurationMgr_GetPrimaryMACAddress), NL_TEST_DEF("Test ConfigurationMgr::ActiveLocale", TestConfigurationMgr_ActiveLocale), - NL_TEST_DEF("Test ConfigurationMgr::HourFormat", TestConfigurationMgr_HourFormat), - NL_TEST_DEF("Test ConfigurationMgr::CalendarType", TestConfigurationMgr_CalendarType), NL_TEST_SENTINEL() }; From fba51b92a44ce899d0926f91538806631013a5e7 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Wed, 19 Jan 2022 18:47:32 +0100 Subject: [PATCH 063/124] [codegen] Update the header template to use 2022 instead of 2021 (#13705) * Update the header template to use 2022 instead of 2021 * Run codegen to update the date --- src/app/zap-templates/partials/header.zapt | 2 +- src/controller/java/zap-generated/CHIPCallbackTypes.h | 2 +- src/controller/java/zap-generated/CHIPClusters-JNI.cpp | 2 +- src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp | 2 +- src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp | 2 +- src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp | 2 +- src/controller/java/zap-generated/CHIPInvokeCallbacks.h | 2 +- src/controller/java/zap-generated/CHIPReadCallbacks.cpp | 2 +- src/controller/java/zap-generated/CHIPReadCallbacks.h | 2 +- .../java/zap-generated/chip/devicecontroller/ChipClusters.java | 2 +- .../zap-generated/chip/devicecontroller/ClusterInfoMapping.java | 2 +- .../zap-generated/chip/devicecontroller/ClusterReadMapping.java | 2 +- .../chip/devicecontroller/ClusterWriteMapping.java | 2 +- src/controller/python/chip/clusters/CHIPClusters.py | 2 +- src/controller/python/chip/clusters/Objects.py | 2 +- .../CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm | 2 +- src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm | 2 +- .../Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h | 2 +- src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h | 2 +- src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm | 2 +- .../Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h | 2 +- .../Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h | 2 +- .../Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm | 2 +- src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h | 2 +- src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm | 2 +- src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h | 2 +- src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm | 2 +- src/darwin/Framework/CHIPTests/CHIPClustersTests.m | 2 +- .../all-clusters-app/zap-generated/CHIPClientCallbacks.cpp | 2 +- .../all-clusters-app/zap-generated/CHIPClientCallbacks.h | 2 +- zzz_generated/all-clusters-app/zap-generated/CHIPClusters.cpp | 2 +- zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h | 2 +- .../all-clusters-app/zap-generated/IMClusterCommandHandler.cpp | 2 +- .../all-clusters-app/zap-generated/PluginApplicationCallbacks.h | 2 +- zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp | 2 +- zzz_generated/all-clusters-app/zap-generated/endpoint_config.h | 2 +- zzz_generated/all-clusters-app/zap-generated/gen_config.h | 2 +- zzz_generated/all-clusters-app/zap-generated/gen_tokens.h | 2 +- zzz_generated/app-common/app-common/zap-generated/af-structs.h | 2 +- zzz_generated/app-common/app-common/zap-generated/att-storage.h | 2 +- .../app-common/app-common/zap-generated/attribute-id.h | 2 +- .../app-common/app-common/zap-generated/attribute-size.h | 2 +- .../app-common/app-common/zap-generated/attribute-type.h | 2 +- .../app-common/zap-generated/attributes/Accessors.cpp | 2 +- .../app-common/app-common/zap-generated/attributes/Accessors.h | 2 +- zzz_generated/app-common/app-common/zap-generated/callback.h | 2 +- .../app-common/zap-generated/callbacks/PluginCallbacks.h | 2 +- zzz_generated/app-common/app-common/zap-generated/cluster-id.h | 2 +- .../app-common/app-common/zap-generated/cluster-objects.cpp | 2 +- .../app-common/app-common/zap-generated/cluster-objects.h | 2 +- zzz_generated/app-common/app-common/zap-generated/command-id.h | 2 +- zzz_generated/app-common/app-common/zap-generated/enums.h | 2 +- .../app-common/app-common/zap-generated/ids/Attributes.h | 2 +- .../app-common/app-common/zap-generated/ids/Clusters.h | 2 +- .../app-common/app-common/zap-generated/ids/Commands.h | 2 +- .../app-common/app-common/zap-generated/print-cluster.h | 2 +- zzz_generated/bridge-app/zap-generated/CHIPClientCallbacks.cpp | 2 +- zzz_generated/bridge-app/zap-generated/CHIPClientCallbacks.h | 2 +- zzz_generated/bridge-app/zap-generated/CHIPClusters.cpp | 2 +- zzz_generated/bridge-app/zap-generated/CHIPClusters.h | 2 +- .../bridge-app/zap-generated/IMClusterCommandHandler.cpp | 2 +- .../bridge-app/zap-generated/PluginApplicationCallbacks.h | 2 +- zzz_generated/bridge-app/zap-generated/callback-stub.cpp | 2 +- zzz_generated/bridge-app/zap-generated/endpoint_config.h | 2 +- zzz_generated/bridge-app/zap-generated/gen_config.h | 2 +- zzz_generated/bridge-app/zap-generated/gen_tokens.h | 2 +- zzz_generated/chip-tool/zap-generated/cluster/Commands.h | 2 +- zzz_generated/chip-tool/zap-generated/test/Commands.h | 2 +- .../controller-clusters/zap-generated/CHIPClientCallbacks.cpp | 2 +- .../controller-clusters/zap-generated/CHIPClientCallbacks.h | 2 +- .../controller-clusters/zap-generated/CHIPClusters.cpp | 2 +- zzz_generated/controller-clusters/zap-generated/CHIPClusters.h | 2 +- .../zap-generated/IMClusterCommandHandler.cpp | 2 +- .../zap-generated/PluginApplicationCallbacks.h | 2 +- .../controller-clusters/zap-generated/callback-stub.cpp | 2 +- .../controller-clusters/zap-generated/endpoint_config.h | 2 +- zzz_generated/controller-clusters/zap-generated/gen_config.h | 2 +- zzz_generated/controller-clusters/zap-generated/gen_tokens.h | 2 +- .../controller-clusters/zap-generated/tests/CHIPClustersTest.h | 2 +- .../door-lock-app/zap-generated/CHIPClientCallbacks.cpp | 2 +- zzz_generated/door-lock-app/zap-generated/CHIPClientCallbacks.h | 2 +- zzz_generated/door-lock-app/zap-generated/CHIPClusters.cpp | 2 +- zzz_generated/door-lock-app/zap-generated/CHIPClusters.h | 2 +- .../door-lock-app/zap-generated/IMClusterCommandHandler.cpp | 2 +- .../door-lock-app/zap-generated/PluginApplicationCallbacks.h | 2 +- zzz_generated/door-lock-app/zap-generated/callback-stub.cpp | 2 +- zzz_generated/door-lock-app/zap-generated/endpoint_config.h | 2 +- zzz_generated/door-lock-app/zap-generated/gen_config.h | 2 +- zzz_generated/door-lock-app/zap-generated/gen_tokens.h | 2 +- .../lighting-app/zap-generated/CHIPClientCallbacks.cpp | 2 +- zzz_generated/lighting-app/zap-generated/CHIPClientCallbacks.h | 2 +- zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp | 2 +- zzz_generated/lighting-app/zap-generated/CHIPClusters.h | 2 +- .../lighting-app/zap-generated/IMClusterCommandHandler.cpp | 2 +- .../lighting-app/zap-generated/PluginApplicationCallbacks.h | 2 +- zzz_generated/lighting-app/zap-generated/callback-stub.cpp | 2 +- zzz_generated/lighting-app/zap-generated/endpoint_config.h | 2 +- zzz_generated/lighting-app/zap-generated/gen_config.h | 2 +- zzz_generated/lighting-app/zap-generated/gen_tokens.h | 2 +- zzz_generated/lock-app/zap-generated/CHIPClientCallbacks.cpp | 2 +- zzz_generated/lock-app/zap-generated/CHIPClientCallbacks.h | 2 +- zzz_generated/lock-app/zap-generated/CHIPClusters.cpp | 2 +- zzz_generated/lock-app/zap-generated/CHIPClusters.h | 2 +- .../lock-app/zap-generated/IMClusterCommandHandler.cpp | 2 +- .../lock-app/zap-generated/PluginApplicationCallbacks.h | 2 +- zzz_generated/lock-app/zap-generated/callback-stub.cpp | 2 +- zzz_generated/lock-app/zap-generated/endpoint_config.h | 2 +- zzz_generated/lock-app/zap-generated/gen_config.h | 2 +- zzz_generated/lock-app/zap-generated/gen_tokens.h | 2 +- .../log-source-app/zap-generated/CHIPClientCallbacks.cpp | 2 +- .../log-source-app/zap-generated/CHIPClientCallbacks.h | 2 +- zzz_generated/log-source-app/zap-generated/CHIPClusters.cpp | 2 +- zzz_generated/log-source-app/zap-generated/CHIPClusters.h | 2 +- .../log-source-app/zap-generated/IMClusterCommandHandler.cpp | 2 +- .../log-source-app/zap-generated/PluginApplicationCallbacks.h | 2 +- zzz_generated/log-source-app/zap-generated/callback-stub.cpp | 2 +- zzz_generated/log-source-app/zap-generated/endpoint_config.h | 2 +- zzz_generated/log-source-app/zap-generated/gen_config.h | 2 +- zzz_generated/log-source-app/zap-generated/gen_tokens.h | 2 +- .../ota-provider-app/zap-generated/CHIPClientCallbacks.cpp | 2 +- .../ota-provider-app/zap-generated/CHIPClientCallbacks.h | 2 +- zzz_generated/ota-provider-app/zap-generated/CHIPClusters.cpp | 2 +- zzz_generated/ota-provider-app/zap-generated/CHIPClusters.h | 2 +- .../ota-provider-app/zap-generated/IMClusterCommandHandler.cpp | 2 +- .../ota-provider-app/zap-generated/PluginApplicationCallbacks.h | 2 +- zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp | 2 +- zzz_generated/ota-provider-app/zap-generated/endpoint_config.h | 2 +- zzz_generated/ota-provider-app/zap-generated/gen_config.h | 2 +- zzz_generated/ota-provider-app/zap-generated/gen_tokens.h | 2 +- .../ota-requestor-app/zap-generated/CHIPClientCallbacks.cpp | 2 +- .../ota-requestor-app/zap-generated/CHIPClientCallbacks.h | 2 +- zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.cpp | 2 +- zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.h | 2 +- .../ota-requestor-app/zap-generated/IMClusterCommandHandler.cpp | 2 +- .../zap-generated/PluginApplicationCallbacks.h | 2 +- zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp | 2 +- zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h | 2 +- zzz_generated/ota-requestor-app/zap-generated/gen_config.h | 2 +- zzz_generated/ota-requestor-app/zap-generated/gen_tokens.h | 2 +- .../placeholder/app1/zap-generated/CHIPClientCallbacks.cpp | 2 +- .../placeholder/app1/zap-generated/CHIPClientCallbacks.h | 2 +- zzz_generated/placeholder/app1/zap-generated/CHIPClusters.cpp | 2 +- zzz_generated/placeholder/app1/zap-generated/CHIPClusters.h | 2 +- .../placeholder/app1/zap-generated/IMClusterCommandHandler.cpp | 2 +- .../placeholder/app1/zap-generated/PluginApplicationCallbacks.h | 2 +- zzz_generated/placeholder/app1/zap-generated/callback-stub.cpp | 2 +- zzz_generated/placeholder/app1/zap-generated/endpoint_config.h | 2 +- zzz_generated/placeholder/app1/zap-generated/gen_config.h | 2 +- zzz_generated/placeholder/app1/zap-generated/gen_tokens.h | 2 +- zzz_generated/placeholder/app1/zap-generated/test/Commands.h | 2 +- .../placeholder/app2/zap-generated/CHIPClientCallbacks.cpp | 2 +- .../placeholder/app2/zap-generated/CHIPClientCallbacks.h | 2 +- zzz_generated/placeholder/app2/zap-generated/CHIPClusters.cpp | 2 +- zzz_generated/placeholder/app2/zap-generated/CHIPClusters.h | 2 +- .../placeholder/app2/zap-generated/IMClusterCommandHandler.cpp | 2 +- .../placeholder/app2/zap-generated/PluginApplicationCallbacks.h | 2 +- zzz_generated/placeholder/app2/zap-generated/callback-stub.cpp | 2 +- zzz_generated/placeholder/app2/zap-generated/endpoint_config.h | 2 +- zzz_generated/placeholder/app2/zap-generated/gen_config.h | 2 +- zzz_generated/placeholder/app2/zap-generated/gen_tokens.h | 2 +- zzz_generated/placeholder/app2/zap-generated/test/Commands.h | 2 +- zzz_generated/pump-app/zap-generated/CHIPClientCallbacks.cpp | 2 +- zzz_generated/pump-app/zap-generated/CHIPClientCallbacks.h | 2 +- zzz_generated/pump-app/zap-generated/CHIPClusters.cpp | 2 +- zzz_generated/pump-app/zap-generated/CHIPClusters.h | 2 +- .../pump-app/zap-generated/IMClusterCommandHandler.cpp | 2 +- .../pump-app/zap-generated/PluginApplicationCallbacks.h | 2 +- zzz_generated/pump-app/zap-generated/callback-stub.cpp | 2 +- zzz_generated/pump-app/zap-generated/endpoint_config.h | 2 +- zzz_generated/pump-app/zap-generated/gen_config.h | 2 +- zzz_generated/pump-app/zap-generated/gen_tokens.h | 2 +- .../pump-controller-app/zap-generated/CHIPClientCallbacks.cpp | 2 +- .../pump-controller-app/zap-generated/CHIPClientCallbacks.h | 2 +- .../pump-controller-app/zap-generated/CHIPClusters.cpp | 2 +- zzz_generated/pump-controller-app/zap-generated/CHIPClusters.h | 2 +- .../zap-generated/IMClusterCommandHandler.cpp | 2 +- .../zap-generated/PluginApplicationCallbacks.h | 2 +- .../pump-controller-app/zap-generated/callback-stub.cpp | 2 +- .../pump-controller-app/zap-generated/endpoint_config.h | 2 +- zzz_generated/pump-controller-app/zap-generated/gen_config.h | 2 +- zzz_generated/pump-controller-app/zap-generated/gen_tokens.h | 2 +- .../zap-generated/CHIPClientCallbacks.cpp | 2 +- .../zap-generated/CHIPClientCallbacks.h | 2 +- .../temperature-measurement-app/zap-generated/CHIPClusters.cpp | 2 +- .../temperature-measurement-app/zap-generated/CHIPClusters.h | 2 +- .../zap-generated/IMClusterCommandHandler.cpp | 2 +- .../zap-generated/PluginApplicationCallbacks.h | 2 +- .../temperature-measurement-app/zap-generated/callback-stub.cpp | 2 +- .../temperature-measurement-app/zap-generated/endpoint_config.h | 2 +- .../temperature-measurement-app/zap-generated/gen_config.h | 2 +- .../temperature-measurement-app/zap-generated/gen_tokens.h | 2 +- zzz_generated/thermostat/zap-generated/CHIPClientCallbacks.cpp | 2 +- zzz_generated/thermostat/zap-generated/CHIPClientCallbacks.h | 2 +- zzz_generated/thermostat/zap-generated/CHIPClusters.cpp | 2 +- zzz_generated/thermostat/zap-generated/CHIPClusters.h | 2 +- .../thermostat/zap-generated/IMClusterCommandHandler.cpp | 2 +- .../thermostat/zap-generated/PluginApplicationCallbacks.h | 2 +- zzz_generated/thermostat/zap-generated/callback-stub.cpp | 2 +- zzz_generated/thermostat/zap-generated/endpoint_config.h | 2 +- zzz_generated/thermostat/zap-generated/gen_config.h | 2 +- zzz_generated/thermostat/zap-generated/gen_tokens.h | 2 +- zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp | 2 +- zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.h | 2 +- zzz_generated/tv-app/zap-generated/CHIPClusters.cpp | 2 +- zzz_generated/tv-app/zap-generated/CHIPClusters.h | 2 +- zzz_generated/tv-app/zap-generated/IMClusterCommandHandler.cpp | 2 +- zzz_generated/tv-app/zap-generated/PluginApplicationCallbacks.h | 2 +- zzz_generated/tv-app/zap-generated/callback-stub.cpp | 2 +- zzz_generated/tv-app/zap-generated/endpoint_config.h | 2 +- zzz_generated/tv-app/zap-generated/gen_config.h | 2 +- zzz_generated/tv-app/zap-generated/gen_tokens.h | 2 +- .../tv-casting-app/zap-generated/CHIPClientCallbacks.cpp | 2 +- .../tv-casting-app/zap-generated/CHIPClientCallbacks.h | 2 +- zzz_generated/tv-casting-app/zap-generated/CHIPClusters.cpp | 2 +- zzz_generated/tv-casting-app/zap-generated/CHIPClusters.h | 2 +- .../tv-casting-app/zap-generated/IMClusterCommandHandler.cpp | 2 +- .../tv-casting-app/zap-generated/PluginApplicationCallbacks.h | 2 +- zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp | 2 +- zzz_generated/tv-casting-app/zap-generated/endpoint_config.h | 2 +- zzz_generated/tv-casting-app/zap-generated/gen_config.h | 2 +- zzz_generated/tv-casting-app/zap-generated/gen_tokens.h | 2 +- zzz_generated/window-app/zap-generated/CHIPClientCallbacks.cpp | 2 +- zzz_generated/window-app/zap-generated/CHIPClientCallbacks.h | 2 +- zzz_generated/window-app/zap-generated/CHIPClusters.cpp | 2 +- zzz_generated/window-app/zap-generated/CHIPClusters.h | 2 +- .../window-app/zap-generated/IMClusterCommandHandler.cpp | 2 +- .../window-app/zap-generated/PluginApplicationCallbacks.h | 2 +- zzz_generated/window-app/zap-generated/callback-stub.cpp | 2 +- zzz_generated/window-app/zap-generated/endpoint_config.h | 2 +- zzz_generated/window-app/zap-generated/gen_config.h | 2 +- zzz_generated/window-app/zap-generated/gen_tokens.h | 2 +- 231 files changed, 231 insertions(+), 231 deletions(-) diff --git a/src/app/zap-templates/partials/header.zapt b/src/app/zap-templates/partials/header.zapt index 759d13c5028d26..fbed9690c1f3da 100644 --- a/src/app/zap-templates/partials/header.zapt +++ b/src/app/zap-templates/partials/header.zapt @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h index da0ba83cbce26a..d295e248dbbdf5 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index 7d7a7c1a0394f3..37e966c18b3949 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp index 6a8542d8b23086..6a33054bc7d72e 100644 --- a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index 75cc4c525450ad..02ecd6767dffd4 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index ba3e43d7e1653e..0114899f78b617 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h index 43e6b2fb38c7d6..e1d774071d391a 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index ac6fc45a922ed1..ddf7dfa5ba8e37 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index 36c5da692ac87b..11baa808a14808 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 5fa206a49e25da..0c0a20087a6019 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 460d8fa0dbef1c..0d7e27d584b738 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index 7a7e0d8cd74d98..5ff4ce3b2470aa 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java index 9f8f7539417b79..220f7e5df0429d 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 8de36c229c3663..37d158c20d8c85 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -1,7 +1,7 @@ ''' /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index c41372e5433178..bf0b7d22cfce3a 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -1,7 +1,7 @@ ''' /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index 906bf6724999aa..de0f93cb807d52 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index ceddfbdd80ab0e..a7ea7adbf96324 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h index 86c30b46373114..620ea3a3457f9d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index cdacb751f2788a..7b2994d30fbcb4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 1bbb2c9e8732a2..badc4ce2bd589c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h index d75b3cd0ae5539..09894dfc9e469b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc_internal.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h index db45f98d666fd4..3d902cb9777117 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm index 6bcc517761272a..496f57e711a1b2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h index c0c45f64b14210..77d89dd91468fd 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm index 71ca356ef4a8a8..de4f4843d9b2d4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h index 4cc9fda6cf6978..971945764cfe7b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index 9fa13d75a158d3..228f1b8ecd1b12 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index bf5db54985a86d..e5340ef7df3223 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -3,7 +3,7 @@ // CHIPClustersTests /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.cpp index ee7d4c3d655502..b671ace166b10b 100644 --- a/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h index 506fde03a1e3d4..e391926be63b3f 100644 --- a/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.cpp b/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.cpp index 610435b71adc00..84e139b63819bf 100644 --- a/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h b/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h index 908506defd13e0..ede4e32855fc3a 100644 --- a/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp index 0a671cc2520a9b..17ba31cb50054d 100644 --- a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h index 269b9a65b20ac3..7c47113ac717db 100644 --- a/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp b/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp index c987dbd3fb4752..ebd126a20268ce 100644 --- a/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 63edca3f85d2ce..1ad211a6dff0f3 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/all-clusters-app/zap-generated/gen_config.h b/zzz_generated/all-clusters-app/zap-generated/gen_config.h index 43bf17db7efe33..6ec6b5b8765241 100644 --- a/zzz_generated/all-clusters-app/zap-generated/gen_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/all-clusters-app/zap-generated/gen_tokens.h b/zzz_generated/all-clusters-app/zap-generated/gen_tokens.h index 860bf575d35d81..dcc229f5b2c306 100644 --- a/zzz_generated/all-clusters-app/zap-generated/gen_tokens.h +++ b/zzz_generated/all-clusters-app/zap-generated/gen_tokens.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/app-common/app-common/zap-generated/af-structs.h b/zzz_generated/app-common/app-common/zap-generated/af-structs.h index 969850e80f7526..0631b180ff8857 100644 --- a/zzz_generated/app-common/app-common/zap-generated/af-structs.h +++ b/zzz_generated/app-common/app-common/zap-generated/af-structs.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/app-common/app-common/zap-generated/att-storage.h b/zzz_generated/app-common/app-common/zap-generated/att-storage.h index 91185bfe893995..bf5b779faaeafd 100644 --- a/zzz_generated/app-common/app-common/zap-generated/att-storage.h +++ b/zzz_generated/app-common/app-common/zap-generated/att-storage.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h index e57e669be51f0c..aea2d23d566967 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-size.h b/zzz_generated/app-common/app-common/zap-generated/attribute-size.h index f86621a92a8d39..1dd48e3117cf14 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-size.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-size.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-type.h b/zzz_generated/app-common/app-common/zap-generated/attribute-type.h index 1127e6492a611c..c99ef54ed32359 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-type.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-type.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. 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 7038c647ad73de..3f4fec9edaa78d 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 @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. 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 f715ef9bcc5ec6..e8861bfa925599 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 @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. 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 84c3879ff25cca..98f858a486d7fb 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/app-common/app-common/zap-generated/callbacks/PluginCallbacks.h b/zzz_generated/app-common/app-common/zap-generated/callbacks/PluginCallbacks.h index ccc825404be941..bad4d562630fec 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callbacks/PluginCallbacks.h +++ b/zzz_generated/app-common/app-common/zap-generated/callbacks/PluginCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-id.h b/zzz_generated/app-common/app-common/zap-generated/cluster-id.h index 0a0588109bd50a..72f7deb28f2767 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-id.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. 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 7e95d5d2a9690c..4afd56afd3ff67 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 @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. 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 01549823f9e6bf..04dcb3aeb59f82 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 @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/app-common/app-common/zap-generated/command-id.h b/zzz_generated/app-common/app-common/zap-generated/command-id.h index 26bfa4e6f87ffd..329dee8e31201e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/command-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/command-id.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/app-common/app-common/zap-generated/enums.h b/zzz_generated/app-common/app-common/zap-generated/enums.h index 46c60a79884f31..84a5544f03018a 100644 --- a/zzz_generated/app-common/app-common/zap-generated/enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/enums.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. 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 b162eaaaf332c6..b852d6334c9776 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 @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h index 8e8df2fa70f7c3..2f8f519f8750d9 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. 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 8d0ba7f394e092..e3099a6edcd3cd 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 @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h index a2271a5c9f719a..4723186e4dc2a0 100644 --- a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h +++ b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/bridge-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/bridge-app/zap-generated/CHIPClientCallbacks.cpp index 759d13c5028d26..fbed9690c1f3da 100644 --- a/zzz_generated/bridge-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/bridge-app/zap-generated/CHIPClientCallbacks.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/bridge-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/bridge-app/zap-generated/CHIPClientCallbacks.h index 302d36ce5d8076..4ad6af42ab6e54 100644 --- a/zzz_generated/bridge-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/bridge-app/zap-generated/CHIPClientCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/bridge-app/zap-generated/CHIPClusters.cpp b/zzz_generated/bridge-app/zap-generated/CHIPClusters.cpp index 759d13c5028d26..fbed9690c1f3da 100644 --- a/zzz_generated/bridge-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/bridge-app/zap-generated/CHIPClusters.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/bridge-app/zap-generated/CHIPClusters.h b/zzz_generated/bridge-app/zap-generated/CHIPClusters.h index 759d13c5028d26..fbed9690c1f3da 100644 --- a/zzz_generated/bridge-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/bridge-app/zap-generated/CHIPClusters.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/bridge-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/bridge-app/zap-generated/IMClusterCommandHandler.cpp index 5d900492388b1a..9da355a41e396b 100644 --- a/zzz_generated/bridge-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/bridge-app/zap-generated/IMClusterCommandHandler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/bridge-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/bridge-app/zap-generated/PluginApplicationCallbacks.h index 6433919a7732e5..2f3963dfc4188f 100644 --- a/zzz_generated/bridge-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/bridge-app/zap-generated/PluginApplicationCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/bridge-app/zap-generated/callback-stub.cpp b/zzz_generated/bridge-app/zap-generated/callback-stub.cpp index 995ab3e7539ad5..3db01874ac310c 100644 --- a/zzz_generated/bridge-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/bridge-app/zap-generated/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index 9adb525d614173..911881b9519213 100644 --- a/zzz_generated/bridge-app/zap-generated/endpoint_config.h +++ b/zzz_generated/bridge-app/zap-generated/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/bridge-app/zap-generated/gen_config.h b/zzz_generated/bridge-app/zap-generated/gen_config.h index 3bedda895a0570..c53473730cb33d 100644 --- a/zzz_generated/bridge-app/zap-generated/gen_config.h +++ b/zzz_generated/bridge-app/zap-generated/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/bridge-app/zap-generated/gen_tokens.h b/zzz_generated/bridge-app/zap-generated/gen_tokens.h index 860bf575d35d81..dcc229f5b2c306 100644 --- a/zzz_generated/bridge-app/zap-generated/gen_tokens.h +++ b/zzz_generated/bridge-app/zap-generated/gen_tokens.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 5a20477601ac5b..cc180ac9db53c4 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 40c03087c7ec0e..f0c9d3765f78f3 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp index dd20a3ee7b79d6..fecc36d4c81cda 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h index 5584bf2c23a8f5..ec54dfcb20c4bd 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp index 8d4586e2f0a1af..bc607cd6be1da2 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h index 83eb1a93a8f94c..6c95711734243f 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/controller-clusters/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/controller-clusters/zap-generated/IMClusterCommandHandler.cpp index d981635c673b23..41561218171774 100644 --- a/zzz_generated/controller-clusters/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/controller-clusters/zap-generated/IMClusterCommandHandler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h index a1db299d699aa0..3e8996439e4f41 100644 --- a/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/PluginApplicationCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp index cb7d93c74cd4c2..1e0b3bf0b3b17d 100644 --- a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp +++ b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h index d9cd693bcbd68f..9c497febb567e6 100644 --- a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h +++ b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/controller-clusters/zap-generated/gen_config.h b/zzz_generated/controller-clusters/zap-generated/gen_config.h index b434e22141f697..87994f57cb606a 100644 --- a/zzz_generated/controller-clusters/zap-generated/gen_config.h +++ b/zzz_generated/controller-clusters/zap-generated/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/controller-clusters/zap-generated/gen_tokens.h b/zzz_generated/controller-clusters/zap-generated/gen_tokens.h index 860bf575d35d81..dcc229f5b2c306 100644 --- a/zzz_generated/controller-clusters/zap-generated/gen_tokens.h +++ b/zzz_generated/controller-clusters/zap-generated/gen_tokens.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h index aa243c4170bd4d..1a97b681b02112 100644 --- a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h +++ b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/door-lock-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/door-lock-app/zap-generated/CHIPClientCallbacks.cpp index 759d13c5028d26..fbed9690c1f3da 100644 --- a/zzz_generated/door-lock-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/door-lock-app/zap-generated/CHIPClientCallbacks.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/door-lock-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/door-lock-app/zap-generated/CHIPClientCallbacks.h index 302d36ce5d8076..4ad6af42ab6e54 100644 --- a/zzz_generated/door-lock-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/door-lock-app/zap-generated/CHIPClientCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/door-lock-app/zap-generated/CHIPClusters.cpp b/zzz_generated/door-lock-app/zap-generated/CHIPClusters.cpp index 759d13c5028d26..fbed9690c1f3da 100644 --- a/zzz_generated/door-lock-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/door-lock-app/zap-generated/CHIPClusters.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/door-lock-app/zap-generated/CHIPClusters.h b/zzz_generated/door-lock-app/zap-generated/CHIPClusters.h index 759d13c5028d26..fbed9690c1f3da 100644 --- a/zzz_generated/door-lock-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/door-lock-app/zap-generated/CHIPClusters.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/door-lock-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/door-lock-app/zap-generated/IMClusterCommandHandler.cpp index 11b723acc07034..b462f579d6ad17 100644 --- a/zzz_generated/door-lock-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/door-lock-app/zap-generated/IMClusterCommandHandler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/door-lock-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/door-lock-app/zap-generated/PluginApplicationCallbacks.h index 721fcc1e447ca9..dd9006d8712ec5 100644 --- a/zzz_generated/door-lock-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/door-lock-app/zap-generated/PluginApplicationCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp b/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp index 4008ea8f60a45d..216ce0cd7ccdd6 100644 --- a/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/door-lock-app/zap-generated/endpoint_config.h b/zzz_generated/door-lock-app/zap-generated/endpoint_config.h index 4c1522a59ddfe2..9da5e48d15b657 100644 --- a/zzz_generated/door-lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/door-lock-app/zap-generated/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/door-lock-app/zap-generated/gen_config.h b/zzz_generated/door-lock-app/zap-generated/gen_config.h index e77427d0c9a328..d6d1c8f3d96375 100644 --- a/zzz_generated/door-lock-app/zap-generated/gen_config.h +++ b/zzz_generated/door-lock-app/zap-generated/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/door-lock-app/zap-generated/gen_tokens.h b/zzz_generated/door-lock-app/zap-generated/gen_tokens.h index 860bf575d35d81..dcc229f5b2c306 100644 --- a/zzz_generated/door-lock-app/zap-generated/gen_tokens.h +++ b/zzz_generated/door-lock-app/zap-generated/gen_tokens.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/lighting-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/lighting-app/zap-generated/CHIPClientCallbacks.cpp index 19dd77a3aad51f..006fc302c5615a 100644 --- a/zzz_generated/lighting-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/lighting-app/zap-generated/CHIPClientCallbacks.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/lighting-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/lighting-app/zap-generated/CHIPClientCallbacks.h index 9e7856a0222adf..d1357004d3de3a 100644 --- a/zzz_generated/lighting-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/lighting-app/zap-generated/CHIPClientCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp b/zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp index e4f1af2542fbd8..2c1cb95d59ff30 100644 --- a/zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/lighting-app/zap-generated/CHIPClusters.h b/zzz_generated/lighting-app/zap-generated/CHIPClusters.h index b676e14c0d9747..df0b4acf88ec9c 100644 --- a/zzz_generated/lighting-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/lighting-app/zap-generated/CHIPClusters.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/lighting-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/lighting-app/zap-generated/IMClusterCommandHandler.cpp index f471a3a899d02d..f3c22214531d85 100644 --- a/zzz_generated/lighting-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/lighting-app/zap-generated/IMClusterCommandHandler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/lighting-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/lighting-app/zap-generated/PluginApplicationCallbacks.h index 7ef58a6f6b5776..74409a5ea8791a 100644 --- a/zzz_generated/lighting-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/lighting-app/zap-generated/PluginApplicationCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/lighting-app/zap-generated/callback-stub.cpp b/zzz_generated/lighting-app/zap-generated/callback-stub.cpp index b5882f6177bf89..a99e534fa0f4a9 100644 --- a/zzz_generated/lighting-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/lighting-app/zap-generated/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/lighting-app/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/zap-generated/endpoint_config.h index 46a74e4fad741c..f8d02148c1edcc 100644 --- a/zzz_generated/lighting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lighting-app/zap-generated/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/lighting-app/zap-generated/gen_config.h b/zzz_generated/lighting-app/zap-generated/gen_config.h index 0107a4d822f95a..cd1e311071d4ba 100644 --- a/zzz_generated/lighting-app/zap-generated/gen_config.h +++ b/zzz_generated/lighting-app/zap-generated/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/lighting-app/zap-generated/gen_tokens.h b/zzz_generated/lighting-app/zap-generated/gen_tokens.h index 860bf575d35d81..dcc229f5b2c306 100644 --- a/zzz_generated/lighting-app/zap-generated/gen_tokens.h +++ b/zzz_generated/lighting-app/zap-generated/gen_tokens.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/lock-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/lock-app/zap-generated/CHIPClientCallbacks.cpp index 759d13c5028d26..fbed9690c1f3da 100644 --- a/zzz_generated/lock-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/lock-app/zap-generated/CHIPClientCallbacks.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/lock-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/lock-app/zap-generated/CHIPClientCallbacks.h index 302d36ce5d8076..4ad6af42ab6e54 100644 --- a/zzz_generated/lock-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/lock-app/zap-generated/CHIPClientCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/lock-app/zap-generated/CHIPClusters.cpp b/zzz_generated/lock-app/zap-generated/CHIPClusters.cpp index 759d13c5028d26..fbed9690c1f3da 100644 --- a/zzz_generated/lock-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/lock-app/zap-generated/CHIPClusters.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/lock-app/zap-generated/CHIPClusters.h b/zzz_generated/lock-app/zap-generated/CHIPClusters.h index 759d13c5028d26..fbed9690c1f3da 100644 --- a/zzz_generated/lock-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/lock-app/zap-generated/CHIPClusters.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/lock-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/lock-app/zap-generated/IMClusterCommandHandler.cpp index 719e4b434d3ba6..54e00e2fd1eeec 100644 --- a/zzz_generated/lock-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/lock-app/zap-generated/IMClusterCommandHandler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/lock-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/lock-app/zap-generated/PluginApplicationCallbacks.h index 283a0d39b2a71d..5ad9dadf390783 100644 --- a/zzz_generated/lock-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/lock-app/zap-generated/PluginApplicationCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/lock-app/zap-generated/callback-stub.cpp b/zzz_generated/lock-app/zap-generated/callback-stub.cpp index 643af9fcee2b0e..c66b2c1180399b 100644 --- a/zzz_generated/lock-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/lock-app/zap-generated/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/lock-app/zap-generated/endpoint_config.h b/zzz_generated/lock-app/zap-generated/endpoint_config.h index 42073b3fa69f29..34304e27de8bf2 100644 --- a/zzz_generated/lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lock-app/zap-generated/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/lock-app/zap-generated/gen_config.h b/zzz_generated/lock-app/zap-generated/gen_config.h index ff49f2cd25c1ad..7f162a6c5bb815 100644 --- a/zzz_generated/lock-app/zap-generated/gen_config.h +++ b/zzz_generated/lock-app/zap-generated/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/lock-app/zap-generated/gen_tokens.h b/zzz_generated/lock-app/zap-generated/gen_tokens.h index 860bf575d35d81..dcc229f5b2c306 100644 --- a/zzz_generated/lock-app/zap-generated/gen_tokens.h +++ b/zzz_generated/lock-app/zap-generated/gen_tokens.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/log-source-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/log-source-app/zap-generated/CHIPClientCallbacks.cpp index 9fa7ce3727a302..1aa6b5273b27ce 100644 --- a/zzz_generated/log-source-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/log-source-app/zap-generated/CHIPClientCallbacks.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/log-source-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/log-source-app/zap-generated/CHIPClientCallbacks.h index 3d45ea2ad67826..249491128ed06d 100644 --- a/zzz_generated/log-source-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/log-source-app/zap-generated/CHIPClientCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/log-source-app/zap-generated/CHIPClusters.cpp b/zzz_generated/log-source-app/zap-generated/CHIPClusters.cpp index a230c51a3c6f07..3254f96885db9b 100644 --- a/zzz_generated/log-source-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/log-source-app/zap-generated/CHIPClusters.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/log-source-app/zap-generated/CHIPClusters.h b/zzz_generated/log-source-app/zap-generated/CHIPClusters.h index e7e8d21f076fa6..b64b056076a492 100644 --- a/zzz_generated/log-source-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/log-source-app/zap-generated/CHIPClusters.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/log-source-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/log-source-app/zap-generated/IMClusterCommandHandler.cpp index b2c1a8ac57695c..8c1aea165cc220 100644 --- a/zzz_generated/log-source-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/log-source-app/zap-generated/IMClusterCommandHandler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/log-source-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/log-source-app/zap-generated/PluginApplicationCallbacks.h index 3af727338bdea7..8f32d28e7adeb3 100644 --- a/zzz_generated/log-source-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/log-source-app/zap-generated/PluginApplicationCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/log-source-app/zap-generated/callback-stub.cpp b/zzz_generated/log-source-app/zap-generated/callback-stub.cpp index b5715093bc6ba3..01fcf690a49f9b 100644 --- a/zzz_generated/log-source-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/log-source-app/zap-generated/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/log-source-app/zap-generated/endpoint_config.h b/zzz_generated/log-source-app/zap-generated/endpoint_config.h index 08aab1cba33285..d39030c78bcb9e 100644 --- a/zzz_generated/log-source-app/zap-generated/endpoint_config.h +++ b/zzz_generated/log-source-app/zap-generated/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/log-source-app/zap-generated/gen_config.h b/zzz_generated/log-source-app/zap-generated/gen_config.h index 0bd9bb5ff3b842..1a18a7349c6e97 100644 --- a/zzz_generated/log-source-app/zap-generated/gen_config.h +++ b/zzz_generated/log-source-app/zap-generated/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/log-source-app/zap-generated/gen_tokens.h b/zzz_generated/log-source-app/zap-generated/gen_tokens.h index 860bf575d35d81..dcc229f5b2c306 100644 --- a/zzz_generated/log-source-app/zap-generated/gen_tokens.h +++ b/zzz_generated/log-source-app/zap-generated/gen_tokens.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/ota-provider-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/ota-provider-app/zap-generated/CHIPClientCallbacks.cpp index 759d13c5028d26..fbed9690c1f3da 100644 --- a/zzz_generated/ota-provider-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/ota-provider-app/zap-generated/CHIPClientCallbacks.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/ota-provider-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/ota-provider-app/zap-generated/CHIPClientCallbacks.h index 302d36ce5d8076..4ad6af42ab6e54 100644 --- a/zzz_generated/ota-provider-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/ota-provider-app/zap-generated/CHIPClientCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/ota-provider-app/zap-generated/CHIPClusters.cpp b/zzz_generated/ota-provider-app/zap-generated/CHIPClusters.cpp index 759d13c5028d26..fbed9690c1f3da 100644 --- a/zzz_generated/ota-provider-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/ota-provider-app/zap-generated/CHIPClusters.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/ota-provider-app/zap-generated/CHIPClusters.h b/zzz_generated/ota-provider-app/zap-generated/CHIPClusters.h index 759d13c5028d26..fbed9690c1f3da 100644 --- a/zzz_generated/ota-provider-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/ota-provider-app/zap-generated/CHIPClusters.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/ota-provider-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/ota-provider-app/zap-generated/IMClusterCommandHandler.cpp index 01987f48f1f1fe..a53fb6184e8504 100644 --- a/zzz_generated/ota-provider-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/ota-provider-app/zap-generated/IMClusterCommandHandler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/ota-provider-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/ota-provider-app/zap-generated/PluginApplicationCallbacks.h index f03b2fe574ae10..94daf6e7a26b72 100644 --- a/zzz_generated/ota-provider-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/ota-provider-app/zap-generated/PluginApplicationCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp b/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp index da2554c5273ab3..a9a06c093388af 100644 --- a/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h index a579509c0b88d0..c63bd6d90f434c 100644 --- a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/ota-provider-app/zap-generated/gen_config.h b/zzz_generated/ota-provider-app/zap-generated/gen_config.h index c87b837d639c15..94207a231f3fd2 100644 --- a/zzz_generated/ota-provider-app/zap-generated/gen_config.h +++ b/zzz_generated/ota-provider-app/zap-generated/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/ota-provider-app/zap-generated/gen_tokens.h b/zzz_generated/ota-provider-app/zap-generated/gen_tokens.h index 860bf575d35d81..dcc229f5b2c306 100644 --- a/zzz_generated/ota-provider-app/zap-generated/gen_tokens.h +++ b/zzz_generated/ota-provider-app/zap-generated/gen_tokens.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/ota-requestor-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/ota-requestor-app/zap-generated/CHIPClientCallbacks.cpp index 19dd77a3aad51f..006fc302c5615a 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/ota-requestor-app/zap-generated/CHIPClientCallbacks.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/ota-requestor-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/ota-requestor-app/zap-generated/CHIPClientCallbacks.h index 9e7856a0222adf..d1357004d3de3a 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/ota-requestor-app/zap-generated/CHIPClientCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.cpp b/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.cpp index 610435b71adc00..84e139b63819bf 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.h b/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.h index 908506defd13e0..ede4e32855fc3a 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/ota-requestor-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/ota-requestor-app/zap-generated/IMClusterCommandHandler.cpp index ddf95a92a64f4c..38aaddaa25ef80 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/ota-requestor-app/zap-generated/IMClusterCommandHandler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/ota-requestor-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/ota-requestor-app/zap-generated/PluginApplicationCallbacks.h index 1755fcd9f503a4..92ca8702a57d19 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/ota-requestor-app/zap-generated/PluginApplicationCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp b/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp index 936be5c8a6c5e9..bf0e4c00ac3588 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h index 370e417762b800..43a35971b8a2b7 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/ota-requestor-app/zap-generated/gen_config.h b/zzz_generated/ota-requestor-app/zap-generated/gen_config.h index c24be940fb3941..54f8e9f01bb56d 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/gen_config.h +++ b/zzz_generated/ota-requestor-app/zap-generated/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/ota-requestor-app/zap-generated/gen_tokens.h b/zzz_generated/ota-requestor-app/zap-generated/gen_tokens.h index 860bf575d35d81..dcc229f5b2c306 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/gen_tokens.h +++ b/zzz_generated/ota-requestor-app/zap-generated/gen_tokens.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app1/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/placeholder/app1/zap-generated/CHIPClientCallbacks.cpp index 9fa7ce3727a302..1aa6b5273b27ce 100644 --- a/zzz_generated/placeholder/app1/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/placeholder/app1/zap-generated/CHIPClientCallbacks.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app1/zap-generated/CHIPClientCallbacks.h b/zzz_generated/placeholder/app1/zap-generated/CHIPClientCallbacks.h index 3d45ea2ad67826..249491128ed06d 100644 --- a/zzz_generated/placeholder/app1/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/placeholder/app1/zap-generated/CHIPClientCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.cpp b/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.cpp index 89bdb4701c23ca..e6b78e8de68b0f 100644 --- a/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.h b/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.h index e78ce7bfa4d7bf..c92f1da04b192f 100644 --- a/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.h +++ b/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app1/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/placeholder/app1/zap-generated/IMClusterCommandHandler.cpp index 72d71c002747f3..3e5964c889f695 100644 --- a/zzz_generated/placeholder/app1/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/placeholder/app1/zap-generated/IMClusterCommandHandler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app1/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/placeholder/app1/zap-generated/PluginApplicationCallbacks.h index af14aea3f6c7ce..c13fc55f449e00 100644 --- a/zzz_generated/placeholder/app1/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/placeholder/app1/zap-generated/PluginApplicationCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app1/zap-generated/callback-stub.cpp b/zzz_generated/placeholder/app1/zap-generated/callback-stub.cpp index dee07e598ee4a3..1feff357ec2105 100644 --- a/zzz_generated/placeholder/app1/zap-generated/callback-stub.cpp +++ b/zzz_generated/placeholder/app1/zap-generated/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h index 663c1bd902df46..cb09059a2f403d 100644 --- a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app1/zap-generated/gen_config.h b/zzz_generated/placeholder/app1/zap-generated/gen_config.h index 0072840d51d6ad..b20bb1ab5337a6 100644 --- a/zzz_generated/placeholder/app1/zap-generated/gen_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app1/zap-generated/gen_tokens.h b/zzz_generated/placeholder/app1/zap-generated/gen_tokens.h index 860bf575d35d81..dcc229f5b2c306 100644 --- a/zzz_generated/placeholder/app1/zap-generated/gen_tokens.h +++ b/zzz_generated/placeholder/app1/zap-generated/gen_tokens.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h index 63199726f2da29..1d4a0cffd26c00 100644 --- a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app2/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/placeholder/app2/zap-generated/CHIPClientCallbacks.cpp index 9fa7ce3727a302..1aa6b5273b27ce 100644 --- a/zzz_generated/placeholder/app2/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/placeholder/app2/zap-generated/CHIPClientCallbacks.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app2/zap-generated/CHIPClientCallbacks.h b/zzz_generated/placeholder/app2/zap-generated/CHIPClientCallbacks.h index 3d45ea2ad67826..249491128ed06d 100644 --- a/zzz_generated/placeholder/app2/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/placeholder/app2/zap-generated/CHIPClientCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app2/zap-generated/CHIPClusters.cpp b/zzz_generated/placeholder/app2/zap-generated/CHIPClusters.cpp index 89bdb4701c23ca..e6b78e8de68b0f 100644 --- a/zzz_generated/placeholder/app2/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/placeholder/app2/zap-generated/CHIPClusters.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app2/zap-generated/CHIPClusters.h b/zzz_generated/placeholder/app2/zap-generated/CHIPClusters.h index e78ce7bfa4d7bf..c92f1da04b192f 100644 --- a/zzz_generated/placeholder/app2/zap-generated/CHIPClusters.h +++ b/zzz_generated/placeholder/app2/zap-generated/CHIPClusters.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app2/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/placeholder/app2/zap-generated/IMClusterCommandHandler.cpp index 72d71c002747f3..3e5964c889f695 100644 --- a/zzz_generated/placeholder/app2/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/placeholder/app2/zap-generated/IMClusterCommandHandler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app2/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/placeholder/app2/zap-generated/PluginApplicationCallbacks.h index af14aea3f6c7ce..c13fc55f449e00 100644 --- a/zzz_generated/placeholder/app2/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/placeholder/app2/zap-generated/PluginApplicationCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app2/zap-generated/callback-stub.cpp b/zzz_generated/placeholder/app2/zap-generated/callback-stub.cpp index dee07e598ee4a3..1feff357ec2105 100644 --- a/zzz_generated/placeholder/app2/zap-generated/callback-stub.cpp +++ b/zzz_generated/placeholder/app2/zap-generated/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h index 663c1bd902df46..cb09059a2f403d 100644 --- a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app2/zap-generated/gen_config.h b/zzz_generated/placeholder/app2/zap-generated/gen_config.h index 0072840d51d6ad..b20bb1ab5337a6 100644 --- a/zzz_generated/placeholder/app2/zap-generated/gen_config.h +++ b/zzz_generated/placeholder/app2/zap-generated/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app2/zap-generated/gen_tokens.h b/zzz_generated/placeholder/app2/zap-generated/gen_tokens.h index 860bf575d35d81..dcc229f5b2c306 100644 --- a/zzz_generated/placeholder/app2/zap-generated/gen_tokens.h +++ b/zzz_generated/placeholder/app2/zap-generated/gen_tokens.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h index 63199726f2da29..1d4a0cffd26c00 100644 --- a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/pump-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/pump-app/zap-generated/CHIPClientCallbacks.cpp index 9fa7ce3727a302..1aa6b5273b27ce 100644 --- a/zzz_generated/pump-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/pump-app/zap-generated/CHIPClientCallbacks.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/pump-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/pump-app/zap-generated/CHIPClientCallbacks.h index 3d45ea2ad67826..249491128ed06d 100644 --- a/zzz_generated/pump-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/pump-app/zap-generated/CHIPClientCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/pump-app/zap-generated/CHIPClusters.cpp b/zzz_generated/pump-app/zap-generated/CHIPClusters.cpp index d9be8496dcf259..49417070cd9004 100644 --- a/zzz_generated/pump-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/pump-app/zap-generated/CHIPClusters.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/pump-app/zap-generated/CHIPClusters.h b/zzz_generated/pump-app/zap-generated/CHIPClusters.h index 2395f712efe45c..818bb4a8af1b72 100644 --- a/zzz_generated/pump-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/pump-app/zap-generated/CHIPClusters.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/pump-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/pump-app/zap-generated/IMClusterCommandHandler.cpp index 3d2e8f380b4a4a..c80f93883aa2ef 100644 --- a/zzz_generated/pump-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/pump-app/zap-generated/IMClusterCommandHandler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/pump-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/pump-app/zap-generated/PluginApplicationCallbacks.h index 1577ba5b20e53c..bd2a7cab6eee40 100644 --- a/zzz_generated/pump-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/pump-app/zap-generated/PluginApplicationCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/pump-app/zap-generated/callback-stub.cpp b/zzz_generated/pump-app/zap-generated/callback-stub.cpp index 2c9b65ab807bcd..98a5d8401935ed 100644 --- a/zzz_generated/pump-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/pump-app/zap-generated/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/pump-app/zap-generated/endpoint_config.h b/zzz_generated/pump-app/zap-generated/endpoint_config.h index 200f63cd9215b2..b2641e24ba309e 100644 --- a/zzz_generated/pump-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-app/zap-generated/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/pump-app/zap-generated/gen_config.h b/zzz_generated/pump-app/zap-generated/gen_config.h index ae1bc0f0452caf..2d9de768f76e9e 100644 --- a/zzz_generated/pump-app/zap-generated/gen_config.h +++ b/zzz_generated/pump-app/zap-generated/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/pump-app/zap-generated/gen_tokens.h b/zzz_generated/pump-app/zap-generated/gen_tokens.h index 860bf575d35d81..dcc229f5b2c306 100644 --- a/zzz_generated/pump-app/zap-generated/gen_tokens.h +++ b/zzz_generated/pump-app/zap-generated/gen_tokens.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/pump-controller-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/pump-controller-app/zap-generated/CHIPClientCallbacks.cpp index 9fa7ce3727a302..1aa6b5273b27ce 100644 --- a/zzz_generated/pump-controller-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/pump-controller-app/zap-generated/CHIPClientCallbacks.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/pump-controller-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/pump-controller-app/zap-generated/CHIPClientCallbacks.h index 3d45ea2ad67826..249491128ed06d 100644 --- a/zzz_generated/pump-controller-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/pump-controller-app/zap-generated/CHIPClientCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.cpp b/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.cpp index 5d5bc2ded1b7e5..50c43785442512 100644 --- a/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.h b/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.h index 61aace6b8b9f3f..f3ba17c7c8f2bc 100644 --- a/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/pump-controller-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/pump-controller-app/zap-generated/IMClusterCommandHandler.cpp index 85b5257c5437af..ef8e0803244df8 100644 --- a/zzz_generated/pump-controller-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/pump-controller-app/zap-generated/IMClusterCommandHandler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/pump-controller-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/pump-controller-app/zap-generated/PluginApplicationCallbacks.h index 65591bafed56d7..4de2092c5f7b00 100644 --- a/zzz_generated/pump-controller-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/pump-controller-app/zap-generated/PluginApplicationCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp b/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp index 7617906bec5971..a334f32230e92f 100644 --- a/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h index 35a93f18cdfa24..fbb98a096e6625 100644 --- a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/pump-controller-app/zap-generated/gen_config.h b/zzz_generated/pump-controller-app/zap-generated/gen_config.h index fbdad125670956..317854d79bb839 100644 --- a/zzz_generated/pump-controller-app/zap-generated/gen_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/pump-controller-app/zap-generated/gen_tokens.h b/zzz_generated/pump-controller-app/zap-generated/gen_tokens.h index 860bf575d35d81..dcc229f5b2c306 100644 --- a/zzz_generated/pump-controller-app/zap-generated/gen_tokens.h +++ b/zzz_generated/pump-controller-app/zap-generated/gen_tokens.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/temperature-measurement-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/temperature-measurement-app/zap-generated/CHIPClientCallbacks.cpp index 759d13c5028d26..fbed9690c1f3da 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/temperature-measurement-app/zap-generated/CHIPClientCallbacks.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/temperature-measurement-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/temperature-measurement-app/zap-generated/CHIPClientCallbacks.h index 302d36ce5d8076..4ad6af42ab6e54 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/CHIPClientCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/temperature-measurement-app/zap-generated/CHIPClusters.cpp b/zzz_generated/temperature-measurement-app/zap-generated/CHIPClusters.cpp index 759d13c5028d26..fbed9690c1f3da 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/temperature-measurement-app/zap-generated/CHIPClusters.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/temperature-measurement-app/zap-generated/CHIPClusters.h b/zzz_generated/temperature-measurement-app/zap-generated/CHIPClusters.h index 759d13c5028d26..fbed9690c1f3da 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/CHIPClusters.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/temperature-measurement-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/temperature-measurement-app/zap-generated/IMClusterCommandHandler.cpp index 88c8b92707be7a..e9f7c9cf436407 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/temperature-measurement-app/zap-generated/IMClusterCommandHandler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/temperature-measurement-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/temperature-measurement-app/zap-generated/PluginApplicationCallbacks.h index e23d944246c149..a42c3ffae77b19 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/PluginApplicationCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp b/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp index 3939d48c14ea98..2f495ab626703c 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h index 4197c1af68af6a..f1a8d22cd6bc1d 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/temperature-measurement-app/zap-generated/gen_config.h b/zzz_generated/temperature-measurement-app/zap-generated/gen_config.h index 4220daf57ace22..e0488c5a90cf36 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/gen_config.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/temperature-measurement-app/zap-generated/gen_tokens.h b/zzz_generated/temperature-measurement-app/zap-generated/gen_tokens.h index 860bf575d35d81..dcc229f5b2c306 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/gen_tokens.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/gen_tokens.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/thermostat/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/thermostat/zap-generated/CHIPClientCallbacks.cpp index ca33113ab4ecf9..09df8416c8d06b 100644 --- a/zzz_generated/thermostat/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/thermostat/zap-generated/CHIPClientCallbacks.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/thermostat/zap-generated/CHIPClientCallbacks.h b/zzz_generated/thermostat/zap-generated/CHIPClientCallbacks.h index 667bdbbff27e3c..88ed9dfb5f809d 100644 --- a/zzz_generated/thermostat/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/thermostat/zap-generated/CHIPClientCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/thermostat/zap-generated/CHIPClusters.cpp b/zzz_generated/thermostat/zap-generated/CHIPClusters.cpp index 3570368f8f26b7..39af91ec4d0428 100644 --- a/zzz_generated/thermostat/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/thermostat/zap-generated/CHIPClusters.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/thermostat/zap-generated/CHIPClusters.h b/zzz_generated/thermostat/zap-generated/CHIPClusters.h index 2e5cbd30f56076..ea4d0ccfe3209d 100644 --- a/zzz_generated/thermostat/zap-generated/CHIPClusters.h +++ b/zzz_generated/thermostat/zap-generated/CHIPClusters.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/thermostat/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/thermostat/zap-generated/IMClusterCommandHandler.cpp index 02c371bd5fc366..7b3bda34e0dda3 100644 --- a/zzz_generated/thermostat/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/thermostat/zap-generated/IMClusterCommandHandler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/thermostat/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/thermostat/zap-generated/PluginApplicationCallbacks.h index 0503178449e649..af89e75091b989 100644 --- a/zzz_generated/thermostat/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/thermostat/zap-generated/PluginApplicationCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/thermostat/zap-generated/callback-stub.cpp b/zzz_generated/thermostat/zap-generated/callback-stub.cpp index 7f9801076b785c..6289720414aab8 100644 --- a/zzz_generated/thermostat/zap-generated/callback-stub.cpp +++ b/zzz_generated/thermostat/zap-generated/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/thermostat/zap-generated/endpoint_config.h b/zzz_generated/thermostat/zap-generated/endpoint_config.h index f1d91899ef636d..df8b6dc86e06a3 100644 --- a/zzz_generated/thermostat/zap-generated/endpoint_config.h +++ b/zzz_generated/thermostat/zap-generated/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/thermostat/zap-generated/gen_config.h b/zzz_generated/thermostat/zap-generated/gen_config.h index 8a8c6ea2df6ca0..3d57254f3d7845 100644 --- a/zzz_generated/thermostat/zap-generated/gen_config.h +++ b/zzz_generated/thermostat/zap-generated/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/thermostat/zap-generated/gen_tokens.h b/zzz_generated/thermostat/zap-generated/gen_tokens.h index 860bf575d35d81..dcc229f5b2c306 100644 --- a/zzz_generated/thermostat/zap-generated/gen_tokens.h +++ b/zzz_generated/thermostat/zap-generated/gen_tokens.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp index 8789b5f1257eff..364d524c96cbaf 100644 --- a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.h index a04d401b5bf6e3..56c4b1679dbc74 100644 --- a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/tv-app/zap-generated/CHIPClusters.cpp b/zzz_generated/tv-app/zap-generated/CHIPClusters.cpp index efc89da4f3b172..9fe5d0a0d12c8a 100644 --- a/zzz_generated/tv-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/tv-app/zap-generated/CHIPClusters.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/tv-app/zap-generated/CHIPClusters.h b/zzz_generated/tv-app/zap-generated/CHIPClusters.h index 14189030c519d3..4ee44fb6b867b0 100644 --- a/zzz_generated/tv-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/tv-app/zap-generated/CHIPClusters.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/tv-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/tv-app/zap-generated/IMClusterCommandHandler.cpp index 35ff681fbd77eb..25111a0d48513b 100644 --- a/zzz_generated/tv-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/tv-app/zap-generated/IMClusterCommandHandler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/tv-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/tv-app/zap-generated/PluginApplicationCallbacks.h index 25f724f468dcb6..9011e1f0897bb8 100644 --- a/zzz_generated/tv-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/tv-app/zap-generated/PluginApplicationCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/tv-app/zap-generated/callback-stub.cpp b/zzz_generated/tv-app/zap-generated/callback-stub.cpp index 2df67b3ff06734..303b435f0a91e0 100644 --- a/zzz_generated/tv-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/tv-app/zap-generated/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index dcf9fca56f83dd..9547810b6c86e2 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/tv-app/zap-generated/gen_config.h b/zzz_generated/tv-app/zap-generated/gen_config.h index 0d1f199a7701fb..927ca09121dc3d 100644 --- a/zzz_generated/tv-app/zap-generated/gen_config.h +++ b/zzz_generated/tv-app/zap-generated/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/tv-app/zap-generated/gen_tokens.h b/zzz_generated/tv-app/zap-generated/gen_tokens.h index 860bf575d35d81..dcc229f5b2c306 100644 --- a/zzz_generated/tv-app/zap-generated/gen_tokens.h +++ b/zzz_generated/tv-app/zap-generated/gen_tokens.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/tv-casting-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/tv-casting-app/zap-generated/CHIPClientCallbacks.cpp index 1dd55907dc2609..7a2f98f076babf 100644 --- a/zzz_generated/tv-casting-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/tv-casting-app/zap-generated/CHIPClientCallbacks.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/tv-casting-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/tv-casting-app/zap-generated/CHIPClientCallbacks.h index dcbde910989226..3b4b83df36856b 100644 --- a/zzz_generated/tv-casting-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/tv-casting-app/zap-generated/CHIPClientCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/tv-casting-app/zap-generated/CHIPClusters.cpp b/zzz_generated/tv-casting-app/zap-generated/CHIPClusters.cpp index 2bdd88c361e647..2ab4712c4ed100 100644 --- a/zzz_generated/tv-casting-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/tv-casting-app/zap-generated/CHIPClusters.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/tv-casting-app/zap-generated/CHIPClusters.h b/zzz_generated/tv-casting-app/zap-generated/CHIPClusters.h index 1e9116df464206..0536b398a10577 100644 --- a/zzz_generated/tv-casting-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/tv-casting-app/zap-generated/CHIPClusters.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/tv-casting-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/tv-casting-app/zap-generated/IMClusterCommandHandler.cpp index f9ae2a36e6d1ae..adf21cf2be32c2 100644 --- a/zzz_generated/tv-casting-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/tv-casting-app/zap-generated/IMClusterCommandHandler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/tv-casting-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/tv-casting-app/zap-generated/PluginApplicationCallbacks.h index 750c9b932af6dc..19f29102523eef 100644 --- a/zzz_generated/tv-casting-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/tv-casting-app/zap-generated/PluginApplicationCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp b/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp index 4ceb25cb3e3425..94917f80cf9625 100644 --- a/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index b5df347029fb0d..ae9ba4770789a2 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/tv-casting-app/zap-generated/gen_config.h b/zzz_generated/tv-casting-app/zap-generated/gen_config.h index db956ac807034a..fabf4529b64f5a 100644 --- a/zzz_generated/tv-casting-app/zap-generated/gen_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/tv-casting-app/zap-generated/gen_tokens.h b/zzz_generated/tv-casting-app/zap-generated/gen_tokens.h index 860bf575d35d81..dcc229f5b2c306 100644 --- a/zzz_generated/tv-casting-app/zap-generated/gen_tokens.h +++ b/zzz_generated/tv-casting-app/zap-generated/gen_tokens.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/window-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/window-app/zap-generated/CHIPClientCallbacks.cpp index 759d13c5028d26..fbed9690c1f3da 100644 --- a/zzz_generated/window-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/window-app/zap-generated/CHIPClientCallbacks.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/window-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/window-app/zap-generated/CHIPClientCallbacks.h index 302d36ce5d8076..4ad6af42ab6e54 100644 --- a/zzz_generated/window-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/window-app/zap-generated/CHIPClientCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/window-app/zap-generated/CHIPClusters.cpp b/zzz_generated/window-app/zap-generated/CHIPClusters.cpp index 759d13c5028d26..fbed9690c1f3da 100644 --- a/zzz_generated/window-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/window-app/zap-generated/CHIPClusters.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/window-app/zap-generated/CHIPClusters.h b/zzz_generated/window-app/zap-generated/CHIPClusters.h index 759d13c5028d26..fbed9690c1f3da 100644 --- a/zzz_generated/window-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/window-app/zap-generated/CHIPClusters.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/window-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/window-app/zap-generated/IMClusterCommandHandler.cpp index d07aba1f2fad3a..bf1b6b18906e32 100644 --- a/zzz_generated/window-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/window-app/zap-generated/IMClusterCommandHandler.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/window-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/window-app/zap-generated/PluginApplicationCallbacks.h index 8eba42de88aea1..611824094d26aa 100644 --- a/zzz_generated/window-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/window-app/zap-generated/PluginApplicationCallbacks.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/window-app/zap-generated/callback-stub.cpp b/zzz_generated/window-app/zap-generated/callback-stub.cpp index 5a7ffa28d86d42..ea62b261f71538 100644 --- a/zzz_generated/window-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/window-app/zap-generated/callback-stub.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/window-app/zap-generated/endpoint_config.h b/zzz_generated/window-app/zap-generated/endpoint_config.h index e4923a8de5e910..e36c17de0d151d 100644 --- a/zzz_generated/window-app/zap-generated/endpoint_config.h +++ b/zzz_generated/window-app/zap-generated/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/window-app/zap-generated/gen_config.h b/zzz_generated/window-app/zap-generated/gen_config.h index 845f489e283cc4..57f1c15fa8afc1 100644 --- a/zzz_generated/window-app/zap-generated/gen_config.h +++ b/zzz_generated/window-app/zap-generated/gen_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. diff --git a/zzz_generated/window-app/zap-generated/gen_tokens.h b/zzz_generated/window-app/zap-generated/gen_tokens.h index 860bf575d35d81..dcc229f5b2c306 100644 --- a/zzz_generated/window-app/zap-generated/gen_tokens.h +++ b/zzz_generated/window-app/zap-generated/gen_tokens.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. From aa00176b3ac177fc479e7429e8e3f1b2e0d6796e Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 19 Jan 2022 13:51:54 -0500 Subject: [PATCH 064/124] Update ZAP to fix endpoint_config handling of manufacturer-specific ids. (#13553) We now generate full 32-bit ids, instead of dropping the top 16 bits. --- third_party/zap/repo | 2 +- .../zap-generated/endpoint_config.h | 1465 +++++++++-------- .../zap-generated/endpoint_config.h | 429 ++--- .../zap-generated/endpoint_config.h | 266 +-- .../zap-generated/endpoint_config.h | 455 ++--- .../zap-generated/endpoint_config.h | 545 +++--- .../lock-app/zap-generated/endpoint_config.h | 426 ++--- .../zap-generated/endpoint_config.h | 28 +- .../zap-generated/endpoint_config.h | 77 +- .../zap-generated/endpoint_config.h | 119 +- .../app1/zap-generated/endpoint_config.h | 229 +-- .../app2/zap-generated/endpoint_config.h | 229 +-- .../pump-app/zap-generated/endpoint_config.h | 426 ++--- .../zap-generated/endpoint_config.h | 392 ++--- .../zap-generated/endpoint_config.h | 240 +-- .../zap-generated/endpoint_config.h | 506 +++--- .../tv-app/zap-generated/endpoint_config.h | 711 ++++---- .../zap-generated/endpoint_config.h | 1000 +++++------ .../zap-generated/endpoint_config.h | 535 +++--- 19 files changed, 4125 insertions(+), 3955 deletions(-) diff --git a/third_party/zap/repo b/third_party/zap/repo index d22a17a54c0b16..9c60a2d16c3eaf 160000 --- a/third_party/zap/repo +++ b/third_party/zap/repo @@ -1 +1 @@ -Subproject commit d22a17a54c0b16379acbb31ecc6d6d8092df4218 +Subproject commit 9c60a2d16c3eaf9bbb30256bcb798b4c348446d0 diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 1ad211a6dff0f3..7a87e98863a0e6 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -1489,885 +1489,902 @@ { \ \ /* Endpoint: 0, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Groups (server) */ \ - { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Binding (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Access Control (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* ACL */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* Extension */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* Extension */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Basic (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* InteractionModelVersion */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x0002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_SIMPLE_DEFAULT(1) }, /* InteractionModelVersion */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ + { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* Location */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0) }, /* HardwareVersion */ \ - { 0x0008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ - { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ - { 0x000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_LONG_DEFAULTS_INDEX(4) }, /* ManufacturingDate */ \ - { 0x000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ - { 0x000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ - { 0x000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ - { 0x000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ - { 0x0010, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* LocalConfigDisabled */ \ - { 0x0011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ - { 0x0012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0) }, /* HardwareVersion */ \ + { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ + { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ + { 0x0000000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_LONG_DEFAULTS_INDEX(4) }, /* ManufacturingDate */ \ + { 0x0000000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ + { 0x0000000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ + { 0x0000000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ + { 0x0000000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ + { 0x00000010, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* LocalConfigDisabled */ \ + { 0x00000011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ + { 0x00000012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* DefaultOtaProviders */ \ - { 0x0001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* DefaultOtaProviders */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ - { 0x0002, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(21) }, /* SupportedLocales */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(21) }, /* SupportedLocales */ \ \ /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Sources */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Sources */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(275) }, /* Breadcrumb */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(283) }, /* BasicCommissioningInfoList */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x0003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(537) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(275) }, /* Breadcrumb */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(283) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(537) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(541) }, /* Networks */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ - { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ - { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(553) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(557) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(541) }, /* Networks */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ + { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ + { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(553) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(557) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(561) }, /* UpTime */ \ - { 0x0003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(569) }, /* TotalOperationalHours */ \ - { 0x0004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ - { 0x0005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ - { 0x0006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(561) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(569) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ + { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(573) }, /* CurrentHeapFree */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(581) }, /* CurrentHeapUsed */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(589) }, /* CurrentHeapHighWatermark */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(597) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(573) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(581) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(589) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(597) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x0002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(601) }, /* NetworkName */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(603) }, /* ExtendedPanId */ \ - { 0x0005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(611) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ - { 0x0008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* PartitionId */ \ - { 0x000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ - { 0x000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ - { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ - { 0x000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ - { 0x000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ - { 0x000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ - { 0x0010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ - { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ - { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ - { 0x0015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x0016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(623) }, /* TxTotalCount */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(627) }, /* TxUnicastCount */ \ - { 0x0018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(631) }, /* TxBroadcastCount */ \ - { 0x0019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(635) }, /* TxAckRequestedCount */ \ - { 0x001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(639) }, /* TxAckedCount */ \ - { 0x001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(643) }, /* TxNoAckRequestedCount */ \ - { 0x001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(647) }, /* TxDataCount */ \ - { 0x001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(651) }, /* TxDataPollCount */ \ - { 0x001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(655) }, /* TxBeaconCount */ \ - { 0x001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(659) }, /* TxBeaconRequestCount */ \ - { 0x0020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(663) }, /* TxOtherCount */ \ - { 0x0021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(667) }, /* TxRetryCount */ \ - { 0x0022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(671) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(675) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x0024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(679) }, /* TxErrCcaCount */ \ - { 0x0025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(683) }, /* TxErrAbortCount */ \ - { 0x0026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(687) }, /* TxErrBusyChannelCount */ \ - { 0x0027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(691) }, /* RxTotalCount */ \ - { 0x0028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(695) }, /* RxUnicastCount */ \ - { 0x0029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(699) }, /* RxBroadcastCount */ \ - { 0x002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(703) }, /* RxDataCount */ \ - { 0x002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(707) }, /* RxDataPollCount */ \ - { 0x002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(711) }, /* RxBeaconCount */ \ - { 0x002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(715) }, /* RxBeaconRequestCount */ \ - { 0x002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(719) }, /* RxOtherCount */ \ - { 0x002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(723) }, /* RxAddressFilteredCount */ \ - { 0x0030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(727) }, /* RxDestAddrFilteredCount */ \ - { 0x0031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(731) }, /* RxDuplicatedCount */ \ - { 0x0032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(735) }, /* RxErrNoFrameCount */ \ - { 0x0033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(739) }, /* RxErrUnknownNeighborCount */ \ - { 0x0034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(743) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x0035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(747) }, /* RxErrSecCount */ \ - { 0x0036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(751) }, /* RxErrFcsCount */ \ - { 0x0037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(755) }, /* RxErrOtherCount */ \ - { 0x0038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(759) }, /* ActiveTimestamp */ \ - { 0x0039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(767) }, /* PendingTimestamp */ \ - { 0x003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(775) }, /* delay */ \ - { 0x003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(779) }, /* ChannelMask */ \ - { 0x003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(601) }, /* NetworkName */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(603) }, /* ExtendedPanId */ \ + { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(611) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ + { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* PartitionId */ \ + { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ + { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ + { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ + { 0x0000000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ + { 0x0000000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ + { 0x0000000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ + { 0x00000010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ + { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ + { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ + { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(623) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(627) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(631) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(635) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(639) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(643) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(647) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(651) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(655) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(659) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(663) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(667) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(671) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(675) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(679) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(683) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(687) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(691) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(695) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(699) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(703) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(707) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(711) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(715) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(719) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(723) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(727) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(731) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(735) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(739) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(743) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(747) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(751) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(755) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(759) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(767) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(775) }, /* delay */ \ + { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(779) }, /* ChannelMask */ \ + { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ - { 0x003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(786) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(786) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ - { 0x0004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x0005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(790) }, /* BeaconLostCount */ \ - { 0x0006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(794) }, /* BeaconRxCount */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(798) }, /* PacketMulticastRxCount */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(802) }, /* PacketMulticastTxCount */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(806) }, /* PacketUnicastRxCount */ \ - { 0x000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(810) }, /* PacketUnicastTxCount */ \ - { 0x000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(814) }, /* CurrentMaxRate */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(822) }, /* OverrunCount */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(830) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ + { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(790) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(794) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(798) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(802) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(806) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(810) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(814) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(822) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(830) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x0001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(834) }, /* PacketRxCount */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(842) }, /* PacketTxCount */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(850) }, /* TxErrCount */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(858) }, /* CollisionCount */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(866) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x0008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(874) }, /* TimeSinceReset */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(882) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(834) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(842) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(850) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(858) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(866) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(874) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(882) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ - { 0x0001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ - { 0x0002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ + { 0x00000001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ + { 0x00000002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ - { 0x0004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ + { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x0005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* groupKeyMap */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* groupTable */ \ - { 0x0002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* maxGroupsPerFabric */ \ - { 0x0003, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* maxGroupKeysPerFabric */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* groupKeyMap */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* groupTable */ \ + { 0x00000002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* maxGroupsPerFabric */ \ + { 0x00000003, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* maxGroupKeysPerFabric */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: User Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* measured value */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* min measured value */ \ - { 0x0002, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* max measured value */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* measured value */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* min measured value */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* max measured value */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* identify time */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* identify time */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Groups (server) */ \ - { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Scenes (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene count */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current scene */ \ - { 0x0002, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current group */ \ - { 0x0003, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene valid */ \ - { 0x0004, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene count */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current scene */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current group */ \ + { 0x00000003, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene valid */ \ + { 0x00000004, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/Off (server) */ \ - { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ - { 0x4000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* GlobalSceneControl */ \ - { 0x4001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OnTime */ \ - { 0x4002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OffWaitTime */ \ - { 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(886) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ + { 0x00004000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* GlobalSceneControl */ \ + { 0x00004001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OnTime */ \ + { 0x00004002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OffWaitTime */ \ + { 0x00004003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(886) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* switch type */ \ - { 0x0010, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* switch actions */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* switch type */ \ + { 0x00000010, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* switch actions */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0xFE) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFE) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0xFE) }, /* current level */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFE) }, /* max level */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x00000005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x00000006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x0000000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* options */ \ - { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ - { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ - { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, \ + { 0x00004000, ZAP_TYPE(INT8U), 1, \ ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(890) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(890) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ - { 0x0051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* out of service */ \ - { 0x0055, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* present value */ \ - { 0x006F, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* status flags */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* out of service */ \ + { 0x00000055, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* present value */ \ + { 0x0000006F, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* status flags */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binding (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* action list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* endpoint list */ \ - { 0x0002, ZAP_TYPE(LONG_CHAR_STRING), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* setup url */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* action list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* endpoint list */ \ + { 0x00000002, ZAP_TYPE(LONG_CHAR_STRING), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* setup url */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Localization Configuration (server) */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* SupportedLocales */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* SupportedLocales */ \ \ /* Endpoint: 1, Cluster: Power Source (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Status */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Order */ \ - { 0x0002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* Description */ \ - { 0x000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(894) }, /* BatteryVoltage */ \ - { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryPercentRemaining */ \ - { 0x000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(898) }, /* BatteryTimeRemaining */ \ - { 0x000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ - { 0x0012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(902) }, /* ActiveBatteryFaults */ \ - { 0x001A, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeState */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(910) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Status */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Order */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* Description */ \ + { 0x0000000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(894) }, /* BatteryVoltage */ \ + { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryPercentRemaining */ \ + { 0x0000000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(898) }, /* BatteryTimeRemaining */ \ + { 0x0000000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ + { 0x00000012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(902) }, /* ActiveBatteryFaults */ \ + { 0x0000001A, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeState */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(910) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(914) }, /* Networks */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ - { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ - { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(926) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(930) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(914) }, /* Networks */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ + { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ + { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(926) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(930) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Switch (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* number of positions */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* current position */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* multi press max */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(934) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* number of positions */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* current position */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* multi press max */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(934) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(938) }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(938) }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: User Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Boolean State (server) */ \ - { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* StateValue */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* StateValue */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Mode Select (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* CurrentMode */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* SupportedModes */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnMode */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* StartUpMode */ \ - { 0x0004, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(1192) }, /* Description */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* CurrentMode */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* SupportedModes */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnMode */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* StartUpMode */ \ + { 0x00000004, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(1192) }, /* Description */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(2) }, /* LockState */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LockType */ \ - { 0x0002, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ActuatorEnabled */ \ - { 0x0003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* DoorState */ \ - { 0x0004, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1199) }, /* DoorOpenEvents */ \ - { 0x0005, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1203) }, /* DoorClosedEvents */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* OpenPeriod */ \ - { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfTotalUsersSupported */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfPINUsersSupported */ \ - { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0) }, /* NumberOfWeekDaySchedulesSupportedPerUser */ \ - { 0x0015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0) }, /* NumberOfYearDaySchedulesSupportedPerUser */ \ - { 0x0016, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0) }, /* NumberOfHolidaySchedulesSupported */ \ - { 0x0017, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MaxPINCodeLength */ \ - { 0x0018, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MinPINCodeLength */ \ - { 0x001B, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* CredentialRulesSupport */ \ - { 0x0021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1207) }, /* Language */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1210) }, /* AutoRelockTime */ \ - { 0x0024, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(2) }, /* LockState */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LockType */ \ + { 0x00000002, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ActuatorEnabled */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* DoorState */ \ + { 0x00000004, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1199) }, /* DoorOpenEvents */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(1203) }, /* DoorClosedEvents */ \ + { 0x00000006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* OpenPeriod */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfTotalUsersSupported */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfPINUsersSupported */ \ + { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0) }, /* NumberOfWeekDaySchedulesSupportedPerUser */ \ + { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0) }, /* NumberOfYearDaySchedulesSupportedPerUser */ \ + { 0x00000016, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0) }, /* NumberOfHolidaySchedulesSupported */ \ + { 0x00000017, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MaxPINCodeLength */ \ + { 0x00000018, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MinPINCodeLength */ \ + { 0x0000001B, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* CredentialRulesSupport */ \ + { 0x00000021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1207) }, /* Language */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1210) }, /* AutoRelockTime */ \ + { 0x00000024, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* SoundVolume */ \ - { 0x0025, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* OperatingMode */ \ - { 0x0026, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFF6) }, /* SupportedOperatingModes */ \ - { 0x0027, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0) }, /* DefaultConfigurationRegister */ \ - { 0x0029, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* EnableOneTouchLocking */ \ - { 0x002A, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* EnableInsideStatusLED */ \ - { 0x002B, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000025, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* OperatingMode */ \ + { 0x00000026, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFF6) }, /* SupportedOperatingModes */ \ + { 0x00000027, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0) }, /* DefaultConfigurationRegister */ \ + { 0x00000029, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x00) }, /* EnableOneTouchLocking */ \ + { 0x0000002A, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* EnableInsideStatusLED */ \ + { 0x0000002B, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x00) }, /* EnablePrivacyModeButton */ \ - { 0x0030, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000030, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* WrongCodeEntryLimit */ \ - { 0x0031, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000031, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* UserCodeTemporaryDisableTime */ \ - { 0x0033, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* RequirePINforRemoteOperation */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000033, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* RequirePINforRemoteOperation */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Type */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x7FFF) }, /* CurrentPositionLift */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x7FFF) }, /* CurrentPositionTilt */ \ - { 0x0007, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x03) }, /* ConfigStatus */ \ - { 0x0008, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Type */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0x7FFF) }, /* CurrentPositionLift */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0x7FFF) }, /* CurrentPositionTilt */ \ + { 0x00000007, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x03) }, /* ConfigStatus */ \ + { 0x00000008, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(50) }, /* CurrentPositionLiftPercentage */ \ - { 0x0009, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_SIMPLE_DEFAULT(50) }, /* CurrentPositionTiltPercentage */ \ - { 0x000A, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationalStatus */ \ - { 0x000B, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000009, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(50) }, /* CurrentPositionTiltPercentage */ \ + { 0x0000000A, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationalStatus */ \ + { 0x0000000B, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(500) }, /* TargetPositionLiftPercent100ths */ \ - { 0x000C, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_SIMPLE_DEFAULT(500) }, /* TargetPositionTiltPercent100ths */ \ - { 0x000D, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* EndProductType */ \ - { 0x000E, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x0000000C, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(500) }, /* TargetPositionTiltPercent100ths */ \ + { 0x0000000D, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* EndProductType */ \ + { 0x0000000E, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(500) }, /* CurrentPositionLiftPercent100ths */ \ - { 0x000F, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_SIMPLE_DEFAULT(500) }, /* CurrentPositionTiltPercent100ths */ \ - { 0x0010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitLift */ \ - { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ - { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* Mode */ \ - { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1214) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + { 0x0000000F, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(500) }, /* CurrentPositionTiltPercent100ths */ \ + { 0x00000010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitLift */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ + { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ + { 0x00000017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* Mode */ \ + { 0x0000001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1214) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier moving state */ \ - { 0x0002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* barrier safety status */ \ - { 0x0003, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier capabilities */ \ - { 0x000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier position */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier moving state */ \ + { 0x00000002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* barrier safety status */ \ + { 0x00000003, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier capabilities */ \ + { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier position */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ - { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxPressure */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxSpeed */ \ - { 0x0002, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxFlow */ \ - { 0x0003, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstPressure */ \ - { 0x0004, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstPressure */ \ - { 0x0005, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinCompPressure */ \ - { 0x0006, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxCompPressure */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstSpeed */ \ - { 0x0008, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstSpeed */ \ - { 0x0009, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstFlow */ \ - { 0x000A, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstFlow */ \ - { 0x000B, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstTemp */ \ - { 0x000C, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstTemp */ \ - { 0x0010, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* PumpStatus */ \ - { 0x0011, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveOperationMode */ \ - { 0x0012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ - { 0x0013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ - { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ - { 0x0015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(1218) }, /* LifetimeRunningHours */ \ - { 0x0016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(1221) }, /* Power */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxPressure */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxSpeed */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxFlow */ \ + { 0x00000003, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstPressure */ \ + { 0x00000004, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstPressure */ \ + { 0x00000005, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinCompPressure */ \ + { 0x00000006, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxCompPressure */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstSpeed */ \ + { 0x00000008, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstSpeed */ \ + { 0x00000009, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstFlow */ \ + { 0x0000000A, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstFlow */ \ + { 0x0000000B, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstTemp */ \ + { 0x0000000C, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstTemp */ \ + { 0x00000010, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* PumpStatus */ \ + { 0x00000011, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveOperationMode */ \ + { 0x00000012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ + { 0x00000013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ + { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ + { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(1218) }, /* LifetimeRunningHours */ \ + { 0x00000016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(1221) }, /* Power */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(1224) }, /* LifetimeEnergyConsumed */ \ - { 0x0020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* OperationMode */ \ - { 0x0021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* ControlMode */ \ - { 0x0022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1228) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* ControlMode */ \ + { 0x00000022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1228) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ - { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* local temperature */ \ - { 0x0003, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x02BC) }, /* abs min heat setpoint limit */ \ - { 0x0004, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0BB8) }, /* abs max heat setpoint limit */ \ - { 0x0005, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0640) }, /* abs min cool setpoint limit */ \ - { 0x0006, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0C80) }, /* abs max cool setpoint limit */ \ - { 0x0011, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* local temperature */ \ + { 0x00000003, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x02BC) }, /* abs min heat setpoint limit */ \ + { 0x00000004, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0BB8) }, /* abs max heat setpoint limit */ \ + { 0x00000005, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0640) }, /* abs min cool setpoint limit */ \ + { 0x00000006, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0C80) }, /* abs max cool setpoint limit */ \ + { 0x00000011, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x0A28) }, /* occupied cooling setpoint */ \ - { 0x0012, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000012, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x07D0) }, /* occupied heating setpoint */ \ - { 0x0015, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000015, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(12) }, /* min heat setpoint limit */ \ - { 0x0016, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000016, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(13) }, /* max heat setpoint limit */ \ - { 0x0017, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000017, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(14) }, /* min cool setpoint limit */ \ - { 0x0018, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000018, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(15) }, /* max cool setpoint limit */ \ - { 0x0019, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000019, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(16) }, /* min setpoint dead band */ \ - { 0x001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x0000001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(17) }, /* control sequence of operation */ \ - { 0x001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(18) }, /* system mode */ \ - { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ - { 0x0021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ - { 0x0022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1232) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(18) }, /* system mode */ \ + { 0x00000020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ + { 0x00000021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ + { 0x00000022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1232) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(19) }, /* temperature display mode */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(20) }, /* keypad lockout */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(21) }, /* schedule programming visibility */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(21) }, /* schedule programming visibility */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Color Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current hue */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current saturation */ \ - { 0x0002, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x616B) }, /* current x */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x607D) }, /* current y */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* drift compensation */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 255, 0, ZAP_EMPTY_DEFAULT() }, /* compensation text */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x00FA) }, /* color temperature */ \ - { 0x0008, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* color mode */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* color control options */ \ - { 0x0010, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* number of primaries */ \ - { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 1 x */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 1 y */ \ - { 0x0013, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 1 intensity */ \ - { 0x0015, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 2 x */ \ - { 0x0016, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 2 y */ \ - { 0x0017, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 2 intensity */ \ - { 0x0019, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 3 x */ \ - { 0x001A, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 3 y */ \ - { 0x001B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 3 intensity */ \ - { 0x0020, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 4 x */ \ - { 0x0021, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 4 y */ \ - { 0x0022, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 4 intensity */ \ - { 0x0024, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 5 x */ \ - { 0x0025, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 5 y */ \ - { 0x0026, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 5 intensity */ \ - { 0x0028, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 x */ \ - { 0x0029, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 y */ \ - { 0x002A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 intensity */ \ - { 0x0030, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current hue */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current saturation */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x616B) }, /* current x */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x607D) }, /* current y */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* drift compensation */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 255, 0, ZAP_EMPTY_DEFAULT() }, /* compensation text */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x00FA) }, /* color temperature */ \ + { 0x00000008, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* color mode */ \ + { 0x0000000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x00) }, /* color control options */ \ + { 0x00000010, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* number of primaries */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 1 x */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 1 y */ \ + { 0x00000013, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 1 intensity */ \ + { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 2 x */ \ + { 0x00000016, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 2 y */ \ + { 0x00000017, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 2 intensity */ \ + { 0x00000019, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 3 x */ \ + { 0x0000001A, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 3 y */ \ + { 0x0000001B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 3 intensity */ \ + { 0x00000020, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 4 x */ \ + { 0x00000021, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 4 y */ \ + { 0x00000022, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 4 intensity */ \ + { 0x00000024, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 5 x */ \ + { 0x00000025, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 5 y */ \ + { 0x00000026, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 5 intensity */ \ + { 0x00000028, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 x */ \ + { 0x00000029, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 y */ \ + { 0x0000002A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 intensity */ \ + { 0x00000030, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(22) }, /* white point x */ \ - { 0x0031, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000031, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(23) }, /* white point y */ \ - { 0x0032, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000032, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(24) }, /* color point r x */ \ - { 0x0033, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(25) }, /* color point r y */ \ - { 0x0034, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r intensity */ \ - { 0x0036, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000033, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(25) }, /* color point r y */ \ + { 0x00000034, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r intensity */ \ + { 0x00000036, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(26) }, /* color point g x */ \ - { 0x0037, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(27) }, /* color point g y */ \ - { 0x0038, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g intensity */ \ - { 0x003A, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000037, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(27) }, /* color point g y */ \ + { 0x00000038, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g intensity */ \ + { 0x0000003A, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(28) }, /* color point b x */ \ - { 0x003B, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(29) }, /* color point b y */ \ - { 0x003C, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b intensity */ \ - { 0x4000, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* enhanced current hue */ \ - { 0x4001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* enhanced color mode */ \ - { 0x4002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop active */ \ - { 0x4003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop direction */ \ - { 0x4004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0019) }, /* color loop time */ \ - { 0x4005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x2300) }, /* color loop start enhanced hue */ \ - { 0x4006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color loop stored enhanced hue */ \ - { 0x400A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color capabilities */ \ - { 0x400B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color temp physical min */ \ - { 0x400C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFEFF) }, /* color temp physical max */ \ - { 0x400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ - { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(30) }, /* start up color temperature mireds */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000003B, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(29) }, /* color point b y */ \ + { 0x0000003C, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b intensity */ \ + { 0x00004000, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* enhanced current hue */ \ + { 0x00004001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* enhanced color mode */ \ + { 0x00004002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop active */ \ + { 0x00004003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop direction */ \ + { 0x00004004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0019) }, /* color loop time */ \ + { 0x00004005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x2300) }, /* color loop start enhanced hue */ \ + { 0x00004006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color loop stored enhanced hue */ \ + { 0x0000400A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color capabilities */ \ + { 0x0000400B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color temp physical min */ \ + { 0x0000400C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFEFF) }, /* color temp physical max */ \ + { 0x0000400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ + { 0x00004010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(30) }, /* start up color temperature mireds */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* MeasuredValue */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x01) }, /* MinMeasuredValue */ \ - { 0x0002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0xFFFE) }, /* MaxMeasuredValue */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Tolerance */ \ - { 0x0004, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0xFF) }, /* LightSensorType */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* MeasuredValue */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x01) }, /* MinMeasuredValue */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0xFFFE) }, /* MaxMeasuredValue */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Tolerance */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0xFF) }, /* LightSensorType */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ - { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MeasuredValue */ \ - { 0x0001, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MinMeasuredValue */ \ - { 0x0002, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MaxMeasuredValue */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Tolerance */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MeasuredValue */ \ + { 0x00000001, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MinMeasuredValue */ \ + { 0x00000002, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MaxMeasuredValue */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Tolerance */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ - { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* MeasuredValue */ \ - { 0x0001, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinMeasuredValue */ \ - { 0x0002, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxMeasuredValue */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* MeasuredValue */ \ + { 0x00000001, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinMeasuredValue */ \ + { 0x00000002, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxMeasuredValue */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ - { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MeasuredValue */ \ - { 0x0001, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinMeasuredValue */ \ - { 0x0002, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxMeasuredValue */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0) }, /* Tolerance */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MeasuredValue */ \ + { 0x00000001, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinMeasuredValue */ \ + { 0x00000002, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxMeasuredValue */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0) }, /* Tolerance */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* measured value */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* min measured value */ \ - { 0x0002, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* max measured value */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* tolerance */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* measured value */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* min measured value */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* max measured value */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* tolerance */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ - { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy sensor type */ \ - { 0x0002, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy sensor type bitmap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy sensor type */ \ + { 0x00000002, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy sensor type bitmap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: IAS Zone (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* zone state */ \ - { 0x0001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* zone type */ \ - { 0x0002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* zone status */ \ - { 0x0010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1236) }, /* IAS CIE address */ \ - { 0x0011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* Zone ID */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* zone state */ \ + { 0x00000001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* zone type */ \ + { 0x00000002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* zone status */ \ + { 0x00000010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(1236) }, /* IAS CIE address */ \ + { 0x00000011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* Zone ID */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ - { 0x0000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* wake on lan mac address */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* wake on lan mac address */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Channel (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1244) }, /* channel list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1244) }, /* channel list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1498) }, /* target navigator list */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current navigator target */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1498) }, /* target navigator list */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current navigator target */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Playback (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ - { 0x0001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1752) }, /* start time */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1760) }, /* duration */ \ - { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1768) }, /* playback speed */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1772) }, /* seek range end */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1780) }, /* seek range start */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ + { 0x00000001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1752) }, /* start time */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1760) }, /* duration */ \ + { 0x00000004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1768) }, /* playback speed */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1772) }, /* seek range end */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1780) }, /* seek range start */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Input (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1788) }, /* media input list */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current media input */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1788) }, /* media input list */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current media input */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Low Power (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Keypad Input (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2042) }, /* accept header list */ \ - { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(2296) }, /* supported streaming protocols */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2042) }, /* accept header list */ \ + { 0x00000001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(2296) }, /* supported streaming protocols */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2300) }, /* audio output list */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current audio output */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2300) }, /* audio output list */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current audio output */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2554) }, /* application launcher list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2554) }, /* application launcher list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ - { 0x0000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* vendor name */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ - { 0x0002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application name */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ - { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2808) }, /* allowed vendor list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* vendor name */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application name */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2808) }, /* allowed vendor list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Account Login (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Test Cluster (server) */ \ - { 0x0000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) }, /* boolean */ \ - { 0x0001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap8 */ \ - { 0x0002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap16 */ \ - { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2840) }, /* bitmap32 */ \ - { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2844) }, /* bitmap64 */ \ - { 0x0005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8u */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16u */ \ - { 0x0007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2852) }, /* int24u */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2855) }, /* int32u */ \ - { 0x0009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2859) }, /* int40u */ \ - { 0x000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2864) }, /* int48u */ \ - { 0x000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2870) }, /* int56u */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2877) }, /* int64u */ \ - { 0x000D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8s */ \ - { 0x000E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16s */ \ - { 0x000F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2885) }, /* int24s */ \ - { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2888) }, /* int32s */ \ - { 0x0011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2892) }, /* int40s */ \ - { 0x0012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2897) }, /* int48s */ \ - { 0x0013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2903) }, /* int56s */ \ - { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2910) }, /* int64s */ \ - { 0x0015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum8 */ \ - { 0x0016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum16 */ \ - { 0x0017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2918) }, /* float_single */ \ - { 0x0018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2922) }, /* float_double */ \ - { 0x0019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* octet_string */ \ - { 0x001A, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) }, /* boolean */ \ + { 0x00000001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap8 */ \ + { 0x00000002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap16 */ \ + { 0x00000003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2840) }, /* bitmap32 */ \ + { 0x00000004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2844) }, /* bitmap64 */ \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8u */ \ + { 0x00000006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16u */ \ + { 0x00000007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2852) }, /* int24u */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2855) }, /* int32u */ \ + { 0x00000009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2859) }, /* int40u */ \ + { 0x0000000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2864) }, /* int48u */ \ + { 0x0000000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2870) }, /* int56u */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2877) }, /* int64u */ \ + { 0x0000000D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8s */ \ + { 0x0000000E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16s */ \ + { 0x0000000F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2885) }, /* int24s */ \ + { 0x00000010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2888) }, /* int32s */ \ + { 0x00000011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2892) }, /* int40s */ \ + { 0x00000012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2897) }, /* int48s */ \ + { 0x00000013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2903) }, /* int56s */ \ + { 0x00000014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2910) }, /* int64s */ \ + { 0x00000015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum8 */ \ + { 0x00000016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum16 */ \ + { 0x00000017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2918) }, /* float_single */ \ + { 0x00000018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2922) }, /* float_double */ \ + { 0x00000019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* octet_string */ \ + { 0x0000001A, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* list_int8u */ \ - { 0x001B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x0000001B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* list_octet_string */ \ - { 0x001C, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x0000001C, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* list_struct_octet_string */ \ - { 0x001D, ZAP_TYPE(LONG_OCTET_STRING), 1002, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* long_octet_string */ \ - { 0x001E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* char_string */ \ - { 0x001F, ZAP_TYPE(LONG_CHAR_STRING), 1002, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* long_char_string */ \ - { 0x0020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2930) }, /* epoch_us */ \ - { 0x0021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2938) }, /* epoch_s */ \ - { 0x0022, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* vendor_id */ \ - { 0x0023, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x0000001D, ZAP_TYPE(LONG_OCTET_STRING), 1002, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* long_octet_string */ \ + { 0x0000001E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* char_string */ \ + { 0x0000001F, ZAP_TYPE(LONG_CHAR_STRING), 1002, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* long_char_string */ \ + { 0x00000020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2930) }, /* epoch_us */ \ + { 0x00000021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2938) }, /* epoch_s */ \ + { 0x00000022, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* vendor_id */ \ + { 0x00000023, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* list_nullables_and_optionals_struct */ \ - { 0x0024, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* enum_attr */ \ - { 0x0025, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000024, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* enum_attr */ \ + { 0x00000025, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* struct_attr */ \ - { 0x0026, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000026, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(31) }, /* range_restricted_int8u */ \ - { 0x0027, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000027, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(32) }, /* range_restricted_int8s */ \ - { 0x0028, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000028, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(33) }, /* range_restricted_int16u */ \ - { 0x0029, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(34) }, /* range_restricted_int16s */ \ - { 0x002A, ZAP_TYPE(ARRAY), 1000, 0, ZAP_LONG_DEFAULTS_INDEX(2942) }, /* list_long_octet_string */ \ - { 0x0030, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(MUST_USE_TIMED_WRITE), \ + { 0x00000029, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(34) }, /* range_restricted_int16s */ \ + { 0x0000002A, ZAP_TYPE(ARRAY), 1000, 0, ZAP_LONG_DEFAULTS_INDEX(2942) }, /* list_long_octet_string */ \ + { 0x00000030, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(MUST_USE_TIMED_WRITE), \ ZAP_EMPTY_DEFAULT() }, /* timed_write_boolean */ \ - { 0x8000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00008000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(false) }, /* nullable_boolean */ \ - { 0x8001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00008001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_bitmap8 */ \ - { 0x8002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00008002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_bitmap16 */ \ - { 0x8003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00008003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(3942) }, /* nullable_bitmap32 */ \ - { 0x8004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00008004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(3946) }, /* nullable_bitmap64 */ \ - { 0x8005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00008005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int8u */ \ - { 0x8006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00008006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int16u */ \ - { 0x8007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00008007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(3954) }, /* nullable_int24u */ \ - { 0x8008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00008008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(3957) }, /* nullable_int32u */ \ - { 0x8009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00008009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(3961) }, /* nullable_int40u */ \ - { 0x800A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x0000800A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(3966) }, /* nullable_int48u */ \ - { 0x800B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x0000800B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(3972) }, /* nullable_int56u */ \ - { 0x800C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x0000800C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(3979) }, /* nullable_int64u */ \ - { 0x800D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x0000800D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int8s */ \ - { 0x800E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x0000800E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int16s */ \ - { 0x800F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x0000800F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(3987) }, /* nullable_int24s */ \ - { 0x8010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00008010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(3990) }, /* nullable_int32s */ \ - { 0x8011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00008011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(3994) }, /* nullable_int40s */ \ - { 0x8012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00008012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(3999) }, /* nullable_int48s */ \ - { 0x8013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00008013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(4005) }, /* nullable_int56s */ \ - { 0x8014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00008014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(4012) }, /* nullable_int64s */ \ - { 0x8015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00008015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_enum8 */ \ - { 0x8016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00008016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_enum16 */ \ - { 0x8017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00008017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(4020) }, /* nullable_float_single */ \ - { 0x8018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00008018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(4024) }, /* nullable_float_double */ \ - { 0x8019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00008019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* nullable_octet_string */ \ - { 0x801E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x0000801E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* nullable_char_string */ \ - { 0x8024, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00008024, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* nullable_enum_attr */ \ - { 0x8025, ZAP_TYPE(STRUCT), 0, \ + { 0x00008025, ZAP_TYPE(STRUCT), 0, \ ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* nullable_struct */ \ - { 0x8026, ZAP_TYPE(INT8U), 1, \ + { 0x00008026, ZAP_TYPE(INT8U), 1, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(35) }, /* nullable_range_restricted_int8u */ \ - { 0x8027, ZAP_TYPE(INT8S), 1, \ + { 0x00008027, ZAP_TYPE(INT8S), 1, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(36) }, /* nullable_range_restricted_int8s */ \ - { 0x8028, ZAP_TYPE(INT16U), 2, \ + { 0x00008028, ZAP_TYPE(INT16U), 2, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(37) }, /* nullable_range_restricted_int16u */ \ - { 0x8029, ZAP_TYPE(INT16S), 2, \ + { 0x00008029, ZAP_TYPE(INT16S), 2, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(38) }, /* nullable_range_restricted_int16s */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(38) }, /* nullable_range_restricted_int16s */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ - { 0x0000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4032) }, /* measurement type */ \ - { 0x0304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4036) }, /* total active power */ \ - { 0x0505, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms voltage */ \ - { 0x0506, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage min */ \ - { 0x0507, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage max */ \ - { 0x0508, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms current */ \ - { 0x0509, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms current min */ \ - { 0x050A, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms current max */ \ - { 0x050B, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* active power */ \ - { 0x050C, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* active power min */ \ - { 0x050D, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* active power max */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4032) }, /* measurement type */ \ + { 0x00000304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4036) }, /* total active power */ \ + { 0x00000505, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms voltage */ \ + { 0x00000506, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage min */ \ + { 0x00000507, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage max */ \ + { 0x00000508, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms current */ \ + { 0x00000509, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms current min */ \ + { 0x0000050A, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms current max */ \ + { 0x0000050B, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* active power */ \ + { 0x0000050C, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* active power min */ \ + { 0x0000050D, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* active power max */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Groups (server) */ \ - { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: On/Off (server) */ \ - { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ - { 0x4000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* GlobalSceneControl */ \ - { 0x4001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnTime */ \ - { 0x4002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OffWaitTime */ \ - { 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4040) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ + { 0x00004000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* GlobalSceneControl */ \ + { 0x00004001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnTime */ \ + { 0x00004002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OffWaitTime */ \ + { 0x00004003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4040) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Occupancy Sensing (server) */ \ - { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy sensor type */ \ - { 0x0002, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy sensor type bitmap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy sensor type */ \ + { 0x00000002, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy sensor type bitmap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -2424,160 +2441,160 @@ #define GENERATED_CLUSTER_COUNT 75 #define GENERATED_CLUSTERS \ { \ - { 0x0003, \ + { 0x00000003, \ ZAP_ATTRIBUTE_INDEX(0), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 0, Cluster: Identify (server) */ \ - { 0x0004, \ + { 0x00000004, \ ZAP_ATTRIBUTE_INDEX(3), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 0, Cluster: Groups (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(5), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(5), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ { \ - 0x001E, ZAP_ATTRIBUTE_INDEX(10), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001E, ZAP_ATTRIBUTE_INDEX(10), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Binding (server) */ \ { \ - 0x001F, ZAP_ATTRIBUTE_INDEX(11), 3, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001F, ZAP_ATTRIBUTE_INDEX(11), 3, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Access Control (server) */ \ - { 0x0028, \ + { 0x00000028, \ ZAP_ATTRIBUTE_INDEX(14), \ 20, \ 687, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x0029, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000029, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ { \ - 0x002A, ZAP_ATTRIBUTE_INDEX(35), 5, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002A, ZAP_ATTRIBUTE_INDEX(35), 5, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(40), 2, 290, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002B, ZAP_ATTRIBUTE_INDEX(40), 2, 290, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { \ - 0x002E, ZAP_ATTRIBUTE_INDEX(42), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002E, ZAP_ATTRIBUTE_INDEX(42), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(44), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(44), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(50), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(50), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(60), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000032, ZAP_ATTRIBUTE_INDEX(60), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(60), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000033, ZAP_ATTRIBUTE_INDEX(60), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(69), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000034, ZAP_ATTRIBUTE_INDEX(69), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(75), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000035, ZAP_ATTRIBUTE_INDEX(75), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(140), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000036, ZAP_ATTRIBUTE_INDEX(140), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(155), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000037, ZAP_ATTRIBUTE_INDEX(155), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(166), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003C, ZAP_ATTRIBUTE_INDEX(166), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(170), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(170), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x003F, ZAP_ATTRIBUTE_INDEX(176), 5, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003F, ZAP_ATTRIBUTE_INDEX(176), 5, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(181), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(181), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(183), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(183), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(185), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000405, ZAP_ATTRIBUTE_INDEX(185), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ - { 0x0003, \ + { 0x00000003, \ ZAP_ATTRIBUTE_INDEX(189), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0004, \ + { 0x00000004, \ ZAP_ATTRIBUTE_INDEX(192), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 1, Cluster: Groups (server) */ \ - { 0x0005, \ + { 0x00000005, \ ZAP_ATTRIBUTE_INDEX(194), \ 6, \ 8, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayScenesServer }, /* Endpoint: 1, Cluster: Scenes (server) */ \ - { 0x0006, \ + { 0x00000006, \ ZAP_ATTRIBUTE_INDEX(200), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { \ - 0x0007, ZAP_ATTRIBUTE_INDEX(207), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000007, ZAP_ATTRIBUTE_INDEX(207), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ - { 0x0008, \ + { 0x00000008, \ ZAP_ATTRIBUTE_INDEX(210), \ 16, \ 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x000F, ZAP_ATTRIBUTE_INDEX(226), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000000F, ZAP_ATTRIBUTE_INDEX(226), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(230), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(230), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x001E, ZAP_ATTRIBUTE_INDEX(235), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001E, ZAP_ATTRIBUTE_INDEX(235), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { \ - 0x0025, ZAP_ATTRIBUTE_INDEX(236), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000025, ZAP_ATTRIBUTE_INDEX(236), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(240), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002B, ZAP_ATTRIBUTE_INDEX(240), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Localization Configuration (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(242), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002F, ZAP_ATTRIBUTE_INDEX(242), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(253), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(253), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(263), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000039, ZAP_ATTRIBUTE_INDEX(263), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(264), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003B, ZAP_ATTRIBUTE_INDEX(264), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(269), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(269), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(271), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(271), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: User Label (server) */ \ { \ - 0x0045, ZAP_ATTRIBUTE_INDEX(273), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000045, ZAP_ATTRIBUTE_INDEX(273), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Boolean State (server) */ \ { \ - 0x0050, ZAP_ATTRIBUTE_INDEX(275), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000050, ZAP_ATTRIBUTE_INDEX(275), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Mode Select (server) */ \ - { 0x0101, \ + { 0x00000101, \ ZAP_ATTRIBUTE_INDEX(281), \ 28, \ 49, \ @@ -2585,61 +2602,61 @@ ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(309), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000102, ZAP_ATTRIBUTE_INDEX(309), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(329), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000103, ZAP_ATTRIBUTE_INDEX(329), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { \ - 0x0200, \ + 0x00000200, \ ZAP_ATTRIBUTE_INDEX(334), \ 26, \ 54, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayPumpConfigurationAndControlServer \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ - { 0x0201, \ + { 0x00000201, \ ZAP_ATTRIBUTE_INDEX(360), \ 19, \ 34, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayThermostatServer }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { \ - 0x0204, \ + 0x00000204, \ ZAP_ATTRIBUTE_INDEX(379), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayThermostatUserInterfaceConfigurationServer \ }, /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ - { 0x0300, \ + { 0x00000300, \ ZAP_ATTRIBUTE_INDEX(383), \ 53, \ 341, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x0400, ZAP_ATTRIBUTE_INDEX(436), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000400, ZAP_ATTRIBUTE_INDEX(436), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(442), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(442), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(447), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000403, ZAP_ATTRIBUTE_INDEX(447), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(451), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000404, ZAP_ATTRIBUTE_INDEX(451), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(456), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000405, ZAP_ATTRIBUTE_INDEX(456), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ - { 0x0406, \ + { 0x00000406, \ ZAP_ATTRIBUTE_INDEX(461), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ - { 0x0500, \ + { 0x00000500, \ ZAP_ATTRIBUTE_INDEX(465), \ 6, \ 16, \ @@ -2647,63 +2664,63 @@ ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ chipFuncArrayIasZoneServer }, /* Endpoint: 1, Cluster: IAS Zone (server) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(471), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000503, ZAP_ATTRIBUTE_INDEX(471), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(473), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000504, ZAP_ATTRIBUTE_INDEX(473), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(475), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000505, ZAP_ATTRIBUTE_INDEX(475), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(478), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000506, ZAP_ATTRIBUTE_INDEX(478), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(485), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000507, ZAP_ATTRIBUTE_INDEX(485), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(488), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000508, ZAP_ATTRIBUTE_INDEX(488), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(489), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000509, ZAP_ATTRIBUTE_INDEX(489), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(490), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050A, ZAP_ATTRIBUTE_INDEX(490), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(493), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050B, ZAP_ATTRIBUTE_INDEX(493), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(496), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050C, ZAP_ATTRIBUTE_INDEX(496), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(498), 8, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050D, ZAP_ATTRIBUTE_INDEX(498), 8, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(506), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050E, ZAP_ATTRIBUTE_INDEX(506), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(507), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050F, ZAP_ATTRIBUTE_INDEX(507), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ - 0x0B04, ZAP_ATTRIBUTE_INDEX(585), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000B04, ZAP_ATTRIBUTE_INDEX(585), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ - { 0x0004, \ + { 0x00000004, \ ZAP_ATTRIBUTE_INDEX(597), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 2, Cluster: Groups (server) */ \ - { 0x0006, \ + { 0x00000006, \ ZAP_ATTRIBUTE_INDEX(599), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(606), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(606), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ - { 0x0406, \ + { 0x00000406, \ ZAP_ATTRIBUTE_INDEX(611), \ 4, \ 5, \ diff --git a/zzz_generated/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index 911881b9519213..eb70159b55a413 100644 --- a/zzz_generated/bridge-app/zap-generated/endpoint_config.h +++ b/zzz_generated/bridge-app/zap-generated/endpoint_config.h @@ -619,244 +619,249 @@ { \ \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Basic (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* InteractionModelVersion */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x0002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* InteractionModelVersion */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ + { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* Location */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ - { 0x0008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ - { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* Location */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ + { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ + { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x0003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(266) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(266) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(270) }, /* Networks */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ - { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ - { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(270) }, /* Networks */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ + { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ + { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(290) }, /* UpTime */ \ - { 0x0003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(298) }, /* TotalOperationalHours */ \ - { 0x0004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ - { 0x0005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ - { 0x0006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(290) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(298) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ + { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(302) }, /* CurrentHeapFree */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(310) }, /* CurrentHeapUsed */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(318) }, /* CurrentHeapHighWatermark */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(326) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(302) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(310) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(318) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(326) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x0002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(330) }, /* NetworkName */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(332) }, /* ExtendedPanId */ \ - { 0x0005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(340) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ - { 0x0008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(348) }, /* PartitionId */ \ - { 0x000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ - { 0x000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ - { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ - { 0x000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ - { 0x000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ - { 0x000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ - { 0x0010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ - { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ - { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ - { 0x0015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x0016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* TxTotalCount */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* TxUnicastCount */ \ - { 0x0018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(360) }, /* TxBroadcastCount */ \ - { 0x0019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(364) }, /* TxAckRequestedCount */ \ - { 0x001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(368) }, /* TxAckedCount */ \ - { 0x001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(372) }, /* TxNoAckRequestedCount */ \ - { 0x001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(376) }, /* TxDataCount */ \ - { 0x001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(380) }, /* TxDataPollCount */ \ - { 0x001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(384) }, /* TxBeaconCount */ \ - { 0x001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(388) }, /* TxBeaconRequestCount */ \ - { 0x0020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(392) }, /* TxOtherCount */ \ - { 0x0021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(396) }, /* TxRetryCount */ \ - { 0x0022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(400) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(404) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x0024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(408) }, /* TxErrCcaCount */ \ - { 0x0025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(412) }, /* TxErrAbortCount */ \ - { 0x0026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(416) }, /* TxErrBusyChannelCount */ \ - { 0x0027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(420) }, /* RxTotalCount */ \ - { 0x0028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(424) }, /* RxUnicastCount */ \ - { 0x0029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(428) }, /* RxBroadcastCount */ \ - { 0x002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(432) }, /* RxDataCount */ \ - { 0x002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(436) }, /* RxDataPollCount */ \ - { 0x002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(440) }, /* RxBeaconCount */ \ - { 0x002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(444) }, /* RxBeaconRequestCount */ \ - { 0x002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(448) }, /* RxOtherCount */ \ - { 0x002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(452) }, /* RxAddressFilteredCount */ \ - { 0x0030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(456) }, /* RxDestAddrFilteredCount */ \ - { 0x0031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(460) }, /* RxDuplicatedCount */ \ - { 0x0032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(464) }, /* RxErrNoFrameCount */ \ - { 0x0033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(468) }, /* RxErrUnknownNeighborCount */ \ - { 0x0034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(472) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x0035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(476) }, /* RxErrSecCount */ \ - { 0x0036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(480) }, /* RxErrFcsCount */ \ - { 0x0037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(484) }, /* RxErrOtherCount */ \ - { 0x0038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(488) }, /* ActiveTimestamp */ \ - { 0x0039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(496) }, /* PendingTimestamp */ \ - { 0x003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(504) }, /* delay */ \ - { 0x003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(508) }, /* ChannelMask */ \ - { 0x003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(330) }, /* NetworkName */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(332) }, /* ExtendedPanId */ \ + { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(340) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ + { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(348) }, /* PartitionId */ \ + { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ + { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ + { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ + { 0x0000000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ + { 0x0000000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ + { 0x0000000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ + { 0x00000010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ + { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ + { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ + { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(360) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(364) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(368) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(372) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(376) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(380) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(384) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(388) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(392) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(396) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(400) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(404) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(408) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(412) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(416) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(420) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(424) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(428) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(432) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(436) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(440) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(444) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(448) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(452) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(456) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(460) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(464) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(468) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(472) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(476) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(480) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(484) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(488) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(496) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(504) }, /* delay */ \ + { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(508) }, /* ChannelMask */ \ + { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ - { 0x003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(515) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(515) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ - { 0x0004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x0005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(519) }, /* BeaconLostCount */ \ - { 0x0006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(523) }, /* BeaconRxCount */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(527) }, /* PacketMulticastRxCount */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(531) }, /* PacketMulticastTxCount */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(535) }, /* PacketUnicastRxCount */ \ - { 0x000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(539) }, /* PacketUnicastTxCount */ \ - { 0x000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(543) }, /* CurrentMaxRate */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(551) }, /* OverrunCount */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(559) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ + { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(519) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(523) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(527) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(531) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(535) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(539) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(543) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(551) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(559) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x0001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(563) }, /* PacketRxCount */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(571) }, /* PacketTxCount */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(579) }, /* TxErrCount */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(587) }, /* CollisionCount */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(595) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x0008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(603) }, /* TimeSinceReset */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(611) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(563) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(571) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(579) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(587) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(595) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(603) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(611) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ - { 0x0001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ - { 0x0002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ + { 0x00000001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ + { 0x00000002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ - { 0x0004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ + { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x0005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: User Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/Off (server) */ \ - { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFE) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFE) }, /* max level */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x00000005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x00000006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x0000000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* options */ \ - { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ - { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ - { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, \ + { 0x00004000, ZAP_TYPE(INT8U), 1, \ ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Switch (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* number of positions */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* current position */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* multi press max */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* number of positions */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* current position */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* multi press max */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(623) }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(623) }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -878,72 +883,74 @@ #define GENERATED_CLUSTER_COUNT 20 #define GENERATED_CLUSTERS \ { \ - { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0028, \ + { \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ + { 0x00000028, \ ZAP_ATTRIBUTE_INDEX(5), \ 12, \ 246, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(17), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002B, ZAP_ATTRIBUTE_INDEX(17), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(19), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(19), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(25), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(25), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(35), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000032, ZAP_ATTRIBUTE_INDEX(35), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(35), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000033, ZAP_ATTRIBUTE_INDEX(35), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(44), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000034, ZAP_ATTRIBUTE_INDEX(44), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(50), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000035, ZAP_ATTRIBUTE_INDEX(50), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(115), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000036, ZAP_ATTRIBUTE_INDEX(115), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(130), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000037, ZAP_ATTRIBUTE_INDEX(130), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(141), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003C, ZAP_ATTRIBUTE_INDEX(141), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(145), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(145), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(151), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(151), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(153), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(153), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ - { 0x0006, \ + { 0x00000006, \ ZAP_ATTRIBUTE_INDEX(155), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ - { 0x0008, \ + { 0x00000008, \ ZAP_ATTRIBUTE_INDEX(157), \ 16, \ 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(173), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(173), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(178), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003B, ZAP_ATTRIBUTE_INDEX(178), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(183), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(183), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ } diff --git a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h index 9c497febb567e6..819993b5bf4009 100644 --- a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h +++ b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h @@ -138,188 +138,188 @@ { \ \ /* Endpoint: 1, Cluster: Identify (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Groups (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Scenes (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/Off (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/off Switch Configuration (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(0) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binding (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Access Control (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(CLIENT) | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(CLIENT) | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Bridged Actions (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Basic (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT) | ZAP_ATTRIBUTE_MASK(SINGLETON), \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT) | ZAP_ATTRIBUTE_MASK(SINGLETON), \ ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: OTA Software Update Provider (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: OTA Software Update Requestor (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Power Source Configuration (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Power Source (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: General Commissioning (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(4) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(4) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Network Commissioning (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(8) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(8) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: General Diagnostics (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Software Diagnostics (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(12) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(12) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thread Network Diagnostics (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(16) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(16) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: WiFi Network Diagnostics (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Ethernet Network Diagnostics (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(20) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(20) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT) | ZAP_ATTRIBUTE_MASK(SINGLETON), \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT) | ZAP_ATTRIBUTE_MASK(SINGLETON), \ ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Switch (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: AdministratorCommissioning (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Operational Credentials (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Group Key Management (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fixed Label (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Boolean State (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Mode Select (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Door Lock (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Window Covering (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Barrier Control (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(24) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(24) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Color Control (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Illuminance Measurement (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Pressure Measurement (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Flow Measurement (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Relative Humidity Measurement (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Occupancy Sensing (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Wake on LAN (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Channel (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Playback (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Input (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Low Power (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Keypad Input (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Content Launcher (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Audio Output (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Launcher (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Basic (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Account Login (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Test Cluster (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Electrical Measurement (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -332,174 +332,188 @@ #define GENERATED_CLUSTER_COUNT 61 #define GENERATED_CLUSTERS \ { \ - { 0x0003, ZAP_ATTRIBUTE_INDEX(0), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Identify (client) */ \ - { 0x0004, ZAP_ATTRIBUTE_INDEX(1), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Groups (client) */ \ - { 0x0005, ZAP_ATTRIBUTE_INDEX(2), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Scenes (client) */ \ - { 0x0006, ZAP_ATTRIBUTE_INDEX(3), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: On/Off (client) */ \ + { \ + 0x00000003, ZAP_ATTRIBUTE_INDEX(0), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + }, /* Endpoint: 1, Cluster: Identify (client) */ \ { \ - 0x0007, ZAP_ATTRIBUTE_INDEX(4), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000004, ZAP_ATTRIBUTE_INDEX(1), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + }, /* Endpoint: 1, Cluster: Groups (client) */ \ + { \ + 0x00000005, ZAP_ATTRIBUTE_INDEX(2), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + }, /* Endpoint: 1, Cluster: Scenes (client) */ \ + { \ + 0x00000006, ZAP_ATTRIBUTE_INDEX(3), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + }, /* Endpoint: 1, Cluster: On/Off (client) */ \ + { \ + 0x00000007, ZAP_ATTRIBUTE_INDEX(4), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: On/off Switch Configuration (client) */ \ { \ - 0x0008, ZAP_ATTRIBUTE_INDEX(5), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000008, ZAP_ATTRIBUTE_INDEX(5), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Level Control (client) */ \ { \ - 0x000F, ZAP_ATTRIBUTE_INDEX(7), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000000F, ZAP_ATTRIBUTE_INDEX(7), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (client) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(8), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(8), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (client) */ \ - { 0x001E, ZAP_ATTRIBUTE_INDEX(9), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Binding (client) */ \ { \ - 0x001F, ZAP_ATTRIBUTE_INDEX(10), 1, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000001E, ZAP_ATTRIBUTE_INDEX(9), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + }, /* Endpoint: 1, Cluster: Binding (client) */ \ + { \ + 0x0000001F, ZAP_ATTRIBUTE_INDEX(10), 1, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Access Control (client) */ \ { \ - 0x0025, ZAP_ATTRIBUTE_INDEX(11), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000025, ZAP_ATTRIBUTE_INDEX(11), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Bridged Actions (client) */ \ - { 0x0028, ZAP_ATTRIBUTE_INDEX(12), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Basic (client) */ \ { \ - 0x0029, ZAP_ATTRIBUTE_INDEX(13), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000028, ZAP_ATTRIBUTE_INDEX(12), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + }, /* Endpoint: 1, Cluster: Basic (client) */ \ + { \ + 0x00000029, ZAP_ATTRIBUTE_INDEX(13), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: OTA Software Update Provider (client) */ \ { \ - 0x002A, ZAP_ATTRIBUTE_INDEX(14), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000002A, ZAP_ATTRIBUTE_INDEX(14), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: OTA Software Update Requestor (client) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(15), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000002B, ZAP_ATTRIBUTE_INDEX(15), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Localization Configuration (client) */ \ { \ - 0x002E, ZAP_ATTRIBUTE_INDEX(15), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000002E, ZAP_ATTRIBUTE_INDEX(15), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Power Source Configuration (client) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(16), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000002F, ZAP_ATTRIBUTE_INDEX(16), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Power Source (client) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(17), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(17), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: General Commissioning (client) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(19), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(19), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Network Commissioning (client) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(21), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000032, ZAP_ATTRIBUTE_INDEX(21), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Diagnostic Logs (client) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(21), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000033, ZAP_ATTRIBUTE_INDEX(21), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: General Diagnostics (client) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(22), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000034, ZAP_ATTRIBUTE_INDEX(22), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Software Diagnostics (client) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(24), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000035, ZAP_ATTRIBUTE_INDEX(24), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Thread Network Diagnostics (client) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(26), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000036, ZAP_ATTRIBUTE_INDEX(26), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: WiFi Network Diagnostics (client) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(27), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000037, ZAP_ATTRIBUTE_INDEX(27), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Ethernet Network Diagnostics (client) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(29), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000039, ZAP_ATTRIBUTE_INDEX(29), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (client) */ \ - { 0x003B, ZAP_ATTRIBUTE_INDEX(30), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Switch (client) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(31), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000003B, ZAP_ATTRIBUTE_INDEX(30), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + }, /* Endpoint: 1, Cluster: Switch (client) */ \ + { \ + 0x0000003C, ZAP_ATTRIBUTE_INDEX(31), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: AdministratorCommissioning (client) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(32), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(32), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Operational Credentials (client) */ \ { \ - 0x003F, ZAP_ATTRIBUTE_INDEX(33), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000003F, ZAP_ATTRIBUTE_INDEX(33), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Group Key Management (client) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (client) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(35), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(35), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: User Label (client) */ \ { \ - 0x0045, ZAP_ATTRIBUTE_INDEX(35), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000045, ZAP_ATTRIBUTE_INDEX(35), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Boolean State (client) */ \ { \ - 0x0050, ZAP_ATTRIBUTE_INDEX(36), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000050, ZAP_ATTRIBUTE_INDEX(36), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Mode Select (client) */ \ { \ - 0x0101, ZAP_ATTRIBUTE_INDEX(37), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000101, ZAP_ATTRIBUTE_INDEX(37), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Door Lock (client) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(38), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000102, ZAP_ATTRIBUTE_INDEX(38), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (client) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(39), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000103, ZAP_ATTRIBUTE_INDEX(39), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (client) */ \ { \ - 0x0200, ZAP_ATTRIBUTE_INDEX(40), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000200, ZAP_ATTRIBUTE_INDEX(40), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (client) */ \ { \ - 0x0201, ZAP_ATTRIBUTE_INDEX(42), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000201, ZAP_ATTRIBUTE_INDEX(42), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Thermostat (client) */ \ { \ - 0x0204, ZAP_ATTRIBUTE_INDEX(43), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000204, ZAP_ATTRIBUTE_INDEX(43), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (client) */ \ { \ - 0x0300, ZAP_ATTRIBUTE_INDEX(44), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000300, ZAP_ATTRIBUTE_INDEX(44), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Color Control (client) */ \ { \ - 0x0400, ZAP_ATTRIBUTE_INDEX(45), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000400, ZAP_ATTRIBUTE_INDEX(45), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Illuminance Measurement (client) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(46), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(46), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(47), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000403, ZAP_ATTRIBUTE_INDEX(47), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (client) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(48), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000404, ZAP_ATTRIBUTE_INDEX(48), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (client) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(49), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000405, ZAP_ATTRIBUTE_INDEX(49), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (client) */ \ { \ - 0x0406, ZAP_ATTRIBUTE_INDEX(50), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000406, ZAP_ATTRIBUTE_INDEX(50), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Occupancy Sensing (client) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(51), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000503, ZAP_ATTRIBUTE_INDEX(51), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (client) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(52), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000504, ZAP_ATTRIBUTE_INDEX(52), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Channel (client) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(53), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000505, ZAP_ATTRIBUTE_INDEX(53), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (client) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(54), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000506, ZAP_ATTRIBUTE_INDEX(54), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (client) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(55), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000507, ZAP_ATTRIBUTE_INDEX(55), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Input (client) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(56), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000508, ZAP_ATTRIBUTE_INDEX(56), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Low Power (client) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(57), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000509, ZAP_ATTRIBUTE_INDEX(57), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (client) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(58), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000050A, ZAP_ATTRIBUTE_INDEX(58), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (client) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(59), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000050B, ZAP_ATTRIBUTE_INDEX(59), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (client) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(60), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000050C, ZAP_ATTRIBUTE_INDEX(60), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (client) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(61), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000050D, ZAP_ATTRIBUTE_INDEX(61), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (client) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(62), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000050E, ZAP_ATTRIBUTE_INDEX(62), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Account Login (client) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(63), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000050F, ZAP_ATTRIBUTE_INDEX(63), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (client) */ \ { \ - 0x0B04, ZAP_ATTRIBUTE_INDEX(64), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000B04, ZAP_ATTRIBUTE_INDEX(64), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (client) */ \ } diff --git a/zzz_generated/door-lock-app/zap-generated/endpoint_config.h b/zzz_generated/door-lock-app/zap-generated/endpoint_config.h index 9da5e48d15b657..b2ed6f1aae5f7d 100644 --- a/zzz_generated/door-lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/door-lock-app/zap-generated/endpoint_config.h @@ -620,251 +620,258 @@ { \ \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Basic (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* InteractionModelVersion */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x0002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* InteractionModelVersion */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ + { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* Location */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ - { 0x0008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ - { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* Location */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ + { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ + { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ \ /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Sources */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Sources */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Power Source (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* Status */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* Order */ \ - { 0x0002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_LONG_DEFAULTS_INDEX(4) }, /* Description */ \ - { 0x0006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(8) }, /* WiredAssessedCurrent */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* Status */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* Order */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_LONG_DEFAULTS_INDEX(4) }, /* Description */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(8) }, /* WiredAssessedCurrent */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(16) }, /* Breadcrumb */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(24) }, /* BasicCommissioningInfoList */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x0003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(278) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(16) }, /* Breadcrumb */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(24) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(278) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* Networks */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ - { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ - { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(294) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(298) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* Networks */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ + { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ + { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(294) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(298) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(302) }, /* UpTime */ \ - { 0x0003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(310) }, /* TotalOperationalHours */ \ - { 0x0004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ - { 0x0005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ - { 0x0006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(302) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(310) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ + { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(314) }, /* CurrentHeapFree */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(322) }, /* CurrentHeapUsed */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(330) }, /* CurrentHeapHighWatermark */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(338) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(314) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(322) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(330) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(338) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x0002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(342) }, /* NetworkName */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(344) }, /* ExtendedPanId */ \ - { 0x0005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ - { 0x0008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(360) }, /* PartitionId */ \ - { 0x000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ - { 0x000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ - { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ - { 0x000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ - { 0x000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ - { 0x000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ - { 0x0010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ - { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ - { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ - { 0x0015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x0016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(364) }, /* TxTotalCount */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(368) }, /* TxUnicastCount */ \ - { 0x0018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(372) }, /* TxBroadcastCount */ \ - { 0x0019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(376) }, /* TxAckRequestedCount */ \ - { 0x001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(380) }, /* TxAckedCount */ \ - { 0x001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(384) }, /* TxNoAckRequestedCount */ \ - { 0x001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(388) }, /* TxDataCount */ \ - { 0x001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(392) }, /* TxDataPollCount */ \ - { 0x001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(396) }, /* TxBeaconCount */ \ - { 0x001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(400) }, /* TxBeaconRequestCount */ \ - { 0x0020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(404) }, /* TxOtherCount */ \ - { 0x0021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(408) }, /* TxRetryCount */ \ - { 0x0022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(412) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(416) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x0024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(420) }, /* TxErrCcaCount */ \ - { 0x0025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(424) }, /* TxErrAbortCount */ \ - { 0x0026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(428) }, /* TxErrBusyChannelCount */ \ - { 0x0027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(432) }, /* RxTotalCount */ \ - { 0x0028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(436) }, /* RxUnicastCount */ \ - { 0x0029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(440) }, /* RxBroadcastCount */ \ - { 0x002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(444) }, /* RxDataCount */ \ - { 0x002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(448) }, /* RxDataPollCount */ \ - { 0x002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(452) }, /* RxBeaconCount */ \ - { 0x002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(456) }, /* RxBeaconRequestCount */ \ - { 0x002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(460) }, /* RxOtherCount */ \ - { 0x002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(464) }, /* RxAddressFilteredCount */ \ - { 0x0030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(468) }, /* RxDestAddrFilteredCount */ \ - { 0x0031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(472) }, /* RxDuplicatedCount */ \ - { 0x0032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(476) }, /* RxErrNoFrameCount */ \ - { 0x0033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(480) }, /* RxErrUnknownNeighborCount */ \ - { 0x0034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(484) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x0035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(488) }, /* RxErrSecCount */ \ - { 0x0036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(492) }, /* RxErrFcsCount */ \ - { 0x0037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(496) }, /* RxErrOtherCount */ \ - { 0x0038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(500) }, /* ActiveTimestamp */ \ - { 0x0039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(508) }, /* PendingTimestamp */ \ - { 0x003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(516) }, /* delay */ \ - { 0x003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(520) }, /* ChannelMask */ \ - { 0x003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(342) }, /* NetworkName */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(344) }, /* ExtendedPanId */ \ + { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ + { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(360) }, /* PartitionId */ \ + { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ + { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ + { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ + { 0x0000000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ + { 0x0000000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ + { 0x0000000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ + { 0x00000010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ + { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ + { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ + { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(364) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(368) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(372) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(376) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(380) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(384) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(388) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(392) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(396) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(400) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(404) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(408) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(412) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(416) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(420) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(424) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(428) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(432) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(436) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(440) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(444) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(448) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(452) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(456) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(460) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(464) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(468) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(472) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(476) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(480) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(484) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(488) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(492) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(496) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(500) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(508) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(516) }, /* delay */ \ + { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(520) }, /* ChannelMask */ \ + { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ - { 0x003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(527) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(527) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ - { 0x0004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x0005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(531) }, /* BeaconLostCount */ \ - { 0x0006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(535) }, /* BeaconRxCount */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(539) }, /* PacketMulticastRxCount */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(543) }, /* PacketMulticastTxCount */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(547) }, /* PacketUnicastRxCount */ \ - { 0x000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(551) }, /* PacketUnicastTxCount */ \ - { 0x000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(555) }, /* CurrentMaxRate */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(563) }, /* OverrunCount */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(571) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ + { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(531) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(535) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(539) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(543) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(547) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(551) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(555) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(563) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(571) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x0001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(575) }, /* PacketRxCount */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(583) }, /* PacketTxCount */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(591) }, /* TxErrCount */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(599) }, /* CollisionCount */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(607) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x0008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* TimeSinceReset */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(623) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(575) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(583) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(591) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(599) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(607) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(623) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ - { 0x0001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ - { 0x0002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ + { 0x00000001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ + { 0x00000002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ - { 0x0004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ + { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x0005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: User Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Power Source (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* Status */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* Order */ \ - { 0x0002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_LONG_DEFAULTS_INDEX(627) }, /* Description */ \ - { 0x000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ - { 0x000F, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryReplacementNeeded */ \ - { 0x0010, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryReplaceability */ \ - { 0x0013, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryReplacementDescription */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(635) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* Status */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* Order */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_LONG_DEFAULTS_INDEX(627) }, /* Description */ \ + { 0x0000000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ + { 0x0000000F, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryReplacementNeeded */ \ + { 0x00000010, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryReplaceability */ \ + { 0x00000013, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryReplacementDescription */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(635) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(2) }, /* LockState */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LockType */ \ - { 0x0002, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ActuatorEnabled */ \ - { 0x0003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* DoorState */ \ - { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfTotalUsersSupported */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfPINUsersSupported */ \ - { 0x0017, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MaxPINCodeLength */ \ - { 0x0018, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MinPINCodeLength */ \ - { 0x001B, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* CredentialRulesSupport */ \ - { 0x0021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(639) }, /* Language */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(642) }, /* AutoRelockTime */ \ - { 0x0024, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(2) }, /* LockState */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LockType */ \ + { 0x00000002, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ActuatorEnabled */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* DoorState */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfTotalUsersSupported */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfPINUsersSupported */ \ + { 0x00000017, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MaxPINCodeLength */ \ + { 0x00000018, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MinPINCodeLength */ \ + { 0x0000001B, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* CredentialRulesSupport */ \ + { 0x00000021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(639) }, /* Language */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(642) }, /* AutoRelockTime */ \ + { 0x00000024, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* SoundVolume */ \ - { 0x0025, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* OperatingMode */ \ - { 0x0026, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFF6) }, /* SupportedOperatingModes */ \ - { 0x0029, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* EnableOneTouchLocking */ \ - { 0x002B, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000025, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* OperatingMode */ \ + { 0x00000026, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFF6) }, /* SupportedOperatingModes */ \ + { 0x00000029, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x00) }, /* EnableOneTouchLocking */ \ + { 0x0000002B, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x00) }, /* EnablePrivacyModeButton */ \ - { 0x0030, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000030, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* WrongCodeEntryLimit */ \ - { 0x0031, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* UserCodeTemporaryDisableTime */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000031, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* UserCodeTemporaryDisableTime */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -884,65 +891,67 @@ #define GENERATED_CLUSTER_COUNT 20 #define GENERATED_CLUSTERS \ { \ - { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0028, \ + { \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ + { 0x00000028, \ ZAP_ATTRIBUTE_INDEX(5), \ 12, \ 246, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(17), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002B, ZAP_ATTRIBUTE_INDEX(17), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { \ - 0x002E, ZAP_ATTRIBUTE_INDEX(19), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002E, ZAP_ATTRIBUTE_INDEX(19), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(21), 6, 73, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002F, ZAP_ATTRIBUTE_INDEX(21), 6, 73, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Power Source (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(27), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(27), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(33), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(33), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(43), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000032, ZAP_ATTRIBUTE_INDEX(43), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(43), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000033, ZAP_ATTRIBUTE_INDEX(43), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(52), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000034, ZAP_ATTRIBUTE_INDEX(52), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(58), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000035, ZAP_ATTRIBUTE_INDEX(58), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(123), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000036, ZAP_ATTRIBUTE_INDEX(123), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(138), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000037, ZAP_ATTRIBUTE_INDEX(138), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(149), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003C, ZAP_ATTRIBUTE_INDEX(149), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(153), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(153), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(159), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(159), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(161), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(161), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(163), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(163), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(168), 9, 133, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002F, ZAP_ATTRIBUTE_INDEX(168), 9, 133, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ - { 0x0101, \ + { 0x00000101, \ ZAP_ATTRIBUTE_INDEX(177), \ 19, \ 29, \ diff --git a/zzz_generated/lighting-app/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/zap-generated/endpoint_config.h index f8d02148c1edcc..e4d89535e5a70c 100644 --- a/zzz_generated/lighting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lighting-app/zap-generated/endpoint_config.h @@ -592,304 +592,311 @@ { \ \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Basic (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* InteractionModelVersion */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x0002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* InteractionModelVersion */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ + { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* Location */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ - { 0x0008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ - { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ - { 0x000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ManufacturingDate */ \ - { 0x000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ - { 0x000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ - { 0x000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ - { 0x000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ - { 0x0010, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* LocalConfigDisabled */ \ - { 0x0011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ - { 0x0012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* Location */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ + { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ + { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ + { 0x0000000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ManufacturingDate */ \ + { 0x0000000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ + { 0x0000000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ + { 0x0000000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ + { 0x0000000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ + { 0x00000010, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* LocalConfigDisabled */ \ + { 0x00000011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ + { 0x00000012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* DefaultOtaProviders */ \ - { 0x0001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* DefaultOtaProviders */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x0003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(266) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(266) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(270) }, /* Networks */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ - { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ - { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(270) }, /* Networks */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ + { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ + { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(290) }, /* UpTime */ \ - { 0x0003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(298) }, /* TotalOperationalHours */ \ - { 0x0004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ - { 0x0005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ - { 0x0006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(290) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(298) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ + { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(302) }, /* CurrentHeapFree */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(310) }, /* CurrentHeapUsed */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(318) }, /* CurrentHeapHighWatermark */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(326) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(302) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(310) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(318) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(326) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x0002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(330) }, /* NetworkName */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(332) }, /* ExtendedPanId */ \ - { 0x0005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(340) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ - { 0x0008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(348) }, /* PartitionId */ \ - { 0x000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ - { 0x000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ - { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ - { 0x000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ - { 0x000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ - { 0x000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ - { 0x0010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ - { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ - { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ - { 0x0015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x0016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* TxTotalCount */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* TxUnicastCount */ \ - { 0x0018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(360) }, /* TxBroadcastCount */ \ - { 0x0019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(364) }, /* TxAckRequestedCount */ \ - { 0x001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(368) }, /* TxAckedCount */ \ - { 0x001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(372) }, /* TxNoAckRequestedCount */ \ - { 0x001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(376) }, /* TxDataCount */ \ - { 0x001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(380) }, /* TxDataPollCount */ \ - { 0x001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(384) }, /* TxBeaconCount */ \ - { 0x001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(388) }, /* TxBeaconRequestCount */ \ - { 0x0020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(392) }, /* TxOtherCount */ \ - { 0x0021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(396) }, /* TxRetryCount */ \ - { 0x0022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(400) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(404) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x0024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(408) }, /* TxErrCcaCount */ \ - { 0x0025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(412) }, /* TxErrAbortCount */ \ - { 0x0026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(416) }, /* TxErrBusyChannelCount */ \ - { 0x0027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(420) }, /* RxTotalCount */ \ - { 0x0028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(424) }, /* RxUnicastCount */ \ - { 0x0029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(428) }, /* RxBroadcastCount */ \ - { 0x002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(432) }, /* RxDataCount */ \ - { 0x002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(436) }, /* RxDataPollCount */ \ - { 0x002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(440) }, /* RxBeaconCount */ \ - { 0x002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(444) }, /* RxBeaconRequestCount */ \ - { 0x002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(448) }, /* RxOtherCount */ \ - { 0x002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(452) }, /* RxAddressFilteredCount */ \ - { 0x0030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(456) }, /* RxDestAddrFilteredCount */ \ - { 0x0031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(460) }, /* RxDuplicatedCount */ \ - { 0x0032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(464) }, /* RxErrNoFrameCount */ \ - { 0x0033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(468) }, /* RxErrUnknownNeighborCount */ \ - { 0x0034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(472) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x0035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(476) }, /* RxErrSecCount */ \ - { 0x0036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(480) }, /* RxErrFcsCount */ \ - { 0x0037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(484) }, /* RxErrOtherCount */ \ - { 0x0038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(488) }, /* ActiveTimestamp */ \ - { 0x0039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(496) }, /* PendingTimestamp */ \ - { 0x003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(504) }, /* delay */ \ - { 0x003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(508) }, /* ChannelMask */ \ - { 0x003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(330) }, /* NetworkName */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(332) }, /* ExtendedPanId */ \ + { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(340) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ + { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(348) }, /* PartitionId */ \ + { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ + { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ + { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ + { 0x0000000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ + { 0x0000000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ + { 0x0000000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ + { 0x00000010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ + { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ + { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ + { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(360) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(364) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(368) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(372) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(376) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(380) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(384) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(388) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(392) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(396) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(400) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(404) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(408) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(412) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(416) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(420) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(424) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(428) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(432) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(436) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(440) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(444) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(448) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(452) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(456) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(460) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(464) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(468) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(472) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(476) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(480) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(484) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(488) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(496) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(504) }, /* delay */ \ + { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(508) }, /* ChannelMask */ \ + { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ - { 0x003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(515) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(515) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ - { 0x0004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x0005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(519) }, /* BeaconLostCount */ \ - { 0x0006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(523) }, /* BeaconRxCount */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(527) }, /* PacketMulticastRxCount */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(531) }, /* PacketMulticastTxCount */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(535) }, /* PacketUnicastRxCount */ \ - { 0x000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(539) }, /* PacketUnicastTxCount */ \ - { 0x000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(543) }, /* CurrentMaxRate */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(551) }, /* OverrunCount */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(559) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ + { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(519) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(523) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(527) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(531) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(535) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(539) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(543) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(551) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(559) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x0001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(563) }, /* PacketRxCount */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(571) }, /* PacketTxCount */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(579) }, /* TxErrCount */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(587) }, /* CollisionCount */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(595) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x0008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(603) }, /* TimeSinceReset */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(611) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(563) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(571) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(579) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(587) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(595) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(603) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(611) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ - { 0x0001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ - { 0x0002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ + { 0x00000001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ + { 0x00000002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ - { 0x0004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ + { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x0005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: User Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/Off (server) */ \ - { 0x0000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ - { 0x4000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* GlobalSceneControl */ \ - { 0x4001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OnTime */ \ - { 0x4002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OffWaitTime */ \ - { 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ + { 0x00004000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* GlobalSceneControl */ \ + { 0x00004001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OnTime */ \ + { 0x00004002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OffWaitTime */ \ + { 0x00004003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x01) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFE) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x01) }, /* current level */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFE) }, /* max level */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x00000005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x00000006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x0000000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* options */ \ - { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ - { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ - { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, \ + { 0x00004000, ZAP_TYPE(INT8U), 1, \ ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Color Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current hue */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current saturation */ \ - { 0x0002, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x616B) }, /* current x */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x607D) }, /* current y */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x00FA) }, /* color temperature */ \ - { 0x0008, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* color mode */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* color control options */ \ - { 0x0010, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* number of primaries */ \ - { 0x4000, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* enhanced current hue */ \ - { 0x4001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* enhanced color mode */ \ - { 0x4002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop active */ \ - { 0x4003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop direction */ \ - { 0x4004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0019) }, /* color loop time */ \ - { 0x4005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x2300) }, /* color loop start enhanced hue */ \ - { 0x4006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color loop stored enhanced hue */ \ - { 0x400A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color capabilities */ \ - { 0x400B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color temp physical min */ \ - { 0x400C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFEFF) }, /* color temp physical max */ \ - { 0x400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ - { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* start up color temperature mireds */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current hue */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current saturation */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x616B) }, /* current x */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x607D) }, /* current y */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x00FA) }, /* color temperature */ \ + { 0x00000008, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* color mode */ \ + { 0x0000000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x00) }, /* color control options */ \ + { 0x00000010, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* number of primaries */ \ + { 0x00004000, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* enhanced current hue */ \ + { 0x00004001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* enhanced color mode */ \ + { 0x00004002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop active */ \ + { 0x00004003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop direction */ \ + { 0x00004004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0019) }, /* color loop time */ \ + { 0x00004005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x2300) }, /* color loop start enhanced hue */ \ + { 0x00004006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color loop stored enhanced hue */ \ + { 0x0000400A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color capabilities */ \ + { 0x0000400B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color temp physical min */ \ + { 0x0000400C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFEFF) }, /* color temp physical max */ \ + { 0x0000400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ + { 0x00004010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* start up color temperature mireds */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ - { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy sensor type */ \ - { 0x0002, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy sensor type bitmap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy sensor type */ \ + { 0x00000002, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy sensor type bitmap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: On/Off (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: On/off Switch Configuration (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* switch type */ \ - { 0x0010, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* switch actions */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* switch type */ \ + { 0x00000010, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* switch actions */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -921,99 +928,101 @@ #define GENERATED_CLUSTER_COUNT 26 #define GENERATED_CLUSTERS \ { \ - { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0028, \ + { \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ + { 0x00000028, \ ZAP_ATTRIBUTE_INDEX(5), \ 20, \ 687, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x0029, ZAP_ATTRIBUTE_INDEX(25), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000029, ZAP_ATTRIBUTE_INDEX(25), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ { \ - 0x002A, ZAP_ATTRIBUTE_INDEX(26), 5, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002A, ZAP_ATTRIBUTE_INDEX(26), 5, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(31), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002B, ZAP_ATTRIBUTE_INDEX(31), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(33), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(33), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(39), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(39), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(49), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000032, ZAP_ATTRIBUTE_INDEX(49), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(49), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000033, ZAP_ATTRIBUTE_INDEX(49), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(58), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000034, ZAP_ATTRIBUTE_INDEX(58), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(64), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000035, ZAP_ATTRIBUTE_INDEX(64), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(129), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000036, ZAP_ATTRIBUTE_INDEX(129), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(144), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000037, ZAP_ATTRIBUTE_INDEX(144), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(155), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003B, ZAP_ATTRIBUTE_INDEX(155), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Switch (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(155), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003C, ZAP_ATTRIBUTE_INDEX(155), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(159), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(159), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(165), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(165), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(167), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(167), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ - { 0x0003, \ + { 0x00000003, \ ZAP_ATTRIBUTE_INDEX(169), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0006, \ + { 0x00000006, \ ZAP_ATTRIBUTE_INDEX(172), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ - { 0x0008, \ + { 0x00000008, \ ZAP_ATTRIBUTE_INDEX(179), \ 16, \ 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(195), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(195), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ - { 0x0300, \ + { 0x00000300, \ ZAP_ATTRIBUTE_INDEX(200), \ 22, \ 36, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ - { 0x0406, \ + { 0x00000406, \ ZAP_ATTRIBUTE_INDEX(222), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { \ - 0x0006, ZAP_ATTRIBUTE_INDEX(226), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000006, ZAP_ATTRIBUTE_INDEX(226), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 2, Cluster: On/Off (client) */ \ { \ - 0x0007, ZAP_ATTRIBUTE_INDEX(227), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000007, ZAP_ATTRIBUTE_INDEX(227), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: On/off Switch Configuration (server) */ \ } diff --git a/zzz_generated/lock-app/zap-generated/endpoint_config.h b/zzz_generated/lock-app/zap-generated/endpoint_config.h index 34304e27de8bf2..940cd4d5f04bc2 100644 --- a/zzz_generated/lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lock-app/zap-generated/endpoint_config.h @@ -606,234 +606,240 @@ { \ \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Basic (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* InteractionModelVersion */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x0002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* InteractionModelVersion */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ + { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* Location */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ - { 0x0008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ - { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* Location */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ + { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ + { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ \ /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Sources */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Sources */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Power Source (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* Status */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* Order */ \ - { 0x0002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_LONG_DEFAULTS_INDEX(4) }, /* Description */ \ - { 0x0006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(8) }, /* WiredAssessedCurrent */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* Status */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* Order */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_LONG_DEFAULTS_INDEX(4) }, /* Description */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(8) }, /* WiredAssessedCurrent */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(16) }, /* Breadcrumb */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(24) }, /* BasicCommissioningInfoList */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x0003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(278) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(16) }, /* Breadcrumb */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(24) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(278) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* Networks */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ - { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ - { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(294) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(298) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* Networks */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ + { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ + { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(294) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(298) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(302) }, /* UpTime */ \ - { 0x0003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(310) }, /* TotalOperationalHours */ \ - { 0x0004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ - { 0x0005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ - { 0x0006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(302) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(310) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ + { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(314) }, /* CurrentHeapFree */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(322) }, /* CurrentHeapUsed */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(330) }, /* CurrentHeapHighWatermark */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(338) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(314) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(322) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(330) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(338) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x0002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(342) }, /* NetworkName */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(344) }, /* ExtendedPanId */ \ - { 0x0005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ - { 0x0008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(360) }, /* PartitionId */ \ - { 0x000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ - { 0x000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ - { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ - { 0x000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ - { 0x000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ - { 0x000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ - { 0x0010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ - { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ - { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ - { 0x0015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x0016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(364) }, /* TxTotalCount */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(368) }, /* TxUnicastCount */ \ - { 0x0018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(372) }, /* TxBroadcastCount */ \ - { 0x0019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(376) }, /* TxAckRequestedCount */ \ - { 0x001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(380) }, /* TxAckedCount */ \ - { 0x001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(384) }, /* TxNoAckRequestedCount */ \ - { 0x001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(388) }, /* TxDataCount */ \ - { 0x001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(392) }, /* TxDataPollCount */ \ - { 0x001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(396) }, /* TxBeaconCount */ \ - { 0x001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(400) }, /* TxBeaconRequestCount */ \ - { 0x0020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(404) }, /* TxOtherCount */ \ - { 0x0021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(408) }, /* TxRetryCount */ \ - { 0x0022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(412) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(416) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x0024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(420) }, /* TxErrCcaCount */ \ - { 0x0025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(424) }, /* TxErrAbortCount */ \ - { 0x0026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(428) }, /* TxErrBusyChannelCount */ \ - { 0x0027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(432) }, /* RxTotalCount */ \ - { 0x0028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(436) }, /* RxUnicastCount */ \ - { 0x0029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(440) }, /* RxBroadcastCount */ \ - { 0x002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(444) }, /* RxDataCount */ \ - { 0x002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(448) }, /* RxDataPollCount */ \ - { 0x002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(452) }, /* RxBeaconCount */ \ - { 0x002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(456) }, /* RxBeaconRequestCount */ \ - { 0x002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(460) }, /* RxOtherCount */ \ - { 0x002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(464) }, /* RxAddressFilteredCount */ \ - { 0x0030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(468) }, /* RxDestAddrFilteredCount */ \ - { 0x0031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(472) }, /* RxDuplicatedCount */ \ - { 0x0032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(476) }, /* RxErrNoFrameCount */ \ - { 0x0033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(480) }, /* RxErrUnknownNeighborCount */ \ - { 0x0034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(484) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x0035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(488) }, /* RxErrSecCount */ \ - { 0x0036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(492) }, /* RxErrFcsCount */ \ - { 0x0037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(496) }, /* RxErrOtherCount */ \ - { 0x0038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(500) }, /* ActiveTimestamp */ \ - { 0x0039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(508) }, /* PendingTimestamp */ \ - { 0x003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(516) }, /* delay */ \ - { 0x003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(520) }, /* ChannelMask */ \ - { 0x003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(342) }, /* NetworkName */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(344) }, /* ExtendedPanId */ \ + { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ + { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(360) }, /* PartitionId */ \ + { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ + { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ + { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ + { 0x0000000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ + { 0x0000000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ + { 0x0000000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ + { 0x00000010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ + { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ + { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ + { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(364) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(368) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(372) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(376) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(380) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(384) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(388) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(392) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(396) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(400) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(404) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(408) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(412) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(416) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(420) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(424) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(428) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(432) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(436) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(440) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(444) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(448) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(452) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(456) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(460) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(464) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(468) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(472) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(476) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(480) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(484) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(488) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(492) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(496) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(500) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(508) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(516) }, /* delay */ \ + { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(520) }, /* ChannelMask */ \ + { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ - { 0x003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(527) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(527) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ - { 0x0004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x0005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(531) }, /* BeaconLostCount */ \ - { 0x0006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(535) }, /* BeaconRxCount */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(539) }, /* PacketMulticastRxCount */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(543) }, /* PacketMulticastTxCount */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(547) }, /* PacketUnicastRxCount */ \ - { 0x000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(551) }, /* PacketUnicastTxCount */ \ - { 0x000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(555) }, /* CurrentMaxRate */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(563) }, /* OverrunCount */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(571) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ + { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(531) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(535) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(539) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(543) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(547) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(551) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(555) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(563) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(571) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x0001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(575) }, /* PacketRxCount */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(583) }, /* PacketTxCount */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(591) }, /* TxErrCount */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(599) }, /* CollisionCount */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(607) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x0008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* TimeSinceReset */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(623) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(575) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(583) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(591) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(599) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(607) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(623) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ - { 0x0001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ - { 0x0002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ + { 0x00000001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ + { 0x00000002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ - { 0x0004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ + { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x0005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: User Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/Off (server) */ \ - { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ - { 0x4000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* GlobalSceneControl */ \ - { 0x4001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnTime */ \ - { 0x4002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OffWaitTime */ \ - { 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(627) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ + { 0x00004000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* GlobalSceneControl */ \ + { 0x00004001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnTime */ \ + { 0x00004002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OffWaitTime */ \ + { 0x00004003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(627) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Power Source (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* Status */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* Order */ \ - { 0x0002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_LONG_DEFAULTS_INDEX(631) }, /* Description */ \ - { 0x000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ - { 0x000F, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryReplacementNeeded */ \ - { 0x0010, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryReplaceability */ \ - { 0x0013, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryReplacementDescription */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(639) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* Status */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* Order */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_LONG_DEFAULTS_INDEX(631) }, /* Description */ \ + { 0x0000000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ + { 0x0000000F, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryReplacementNeeded */ \ + { 0x00000010, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryReplaceability */ \ + { 0x00000013, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryReplacementDescription */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(639) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -852,69 +858,71 @@ #define GENERATED_CLUSTER_COUNT 20 #define GENERATED_CLUSTERS \ { \ - { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0028, \ + { \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ + { 0x00000028, \ ZAP_ATTRIBUTE_INDEX(5), \ 12, \ 246, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(17), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002B, ZAP_ATTRIBUTE_INDEX(17), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { \ - 0x002E, ZAP_ATTRIBUTE_INDEX(19), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002E, ZAP_ATTRIBUTE_INDEX(19), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(21), 6, 73, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002F, ZAP_ATTRIBUTE_INDEX(21), 6, 73, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Power Source (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(27), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(27), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(33), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(33), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(43), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000032, ZAP_ATTRIBUTE_INDEX(43), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(43), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000033, ZAP_ATTRIBUTE_INDEX(43), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(52), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000034, ZAP_ATTRIBUTE_INDEX(52), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(58), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000035, ZAP_ATTRIBUTE_INDEX(58), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(123), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000036, ZAP_ATTRIBUTE_INDEX(123), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(138), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000037, ZAP_ATTRIBUTE_INDEX(138), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(149), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003C, ZAP_ATTRIBUTE_INDEX(149), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(153), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(153), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(159), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(159), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(161), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(161), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ - { 0x0006, \ + { 0x00000006, \ ZAP_ATTRIBUTE_INDEX(163), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(170), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(170), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(175), 9, 133, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002F, ZAP_ATTRIBUTE_INDEX(175), 9, 133, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ } diff --git a/zzz_generated/log-source-app/zap-generated/endpoint_config.h b/zzz_generated/log-source-app/zap-generated/endpoint_config.h index d39030c78bcb9e..8d4532d56d1215 100644 --- a/zzz_generated/log-source-app/zap-generated/endpoint_config.h +++ b/zzz_generated/log-source-app/zap-generated/endpoint_config.h @@ -200,19 +200,19 @@ { \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(0) }, /* Breadcrumb */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(8) }, /* BasicCommissioningInfoList */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(0) }, /* Breadcrumb */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(8) }, /* BasicCommissioningInfoList */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ - { 0x0001, ZAP_TYPE(ARRAY), 320, 0, ZAP_LONG_DEFAULTS_INDEX(262) }, /* fabrics list */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ - { 0x0004, ZAP_TYPE(ARRAY), 400, 0, ZAP_LONG_DEFAULTS_INDEX(582) }, /* TrustedRootCertificates */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 320, 0, ZAP_LONG_DEFAULTS_INDEX(262) }, /* fabrics list */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ + { 0x00000004, ZAP_TYPE(ARRAY), 400, 0, ZAP_LONG_DEFAULTS_INDEX(582) }, /* TrustedRootCertificates */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -226,19 +226,19 @@ #define GENERATED_CLUSTERS \ { \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(0), 3, 264, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(0), 3, 264, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(3), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(3), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(4), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000032, ZAP_ATTRIBUTE_INDEX(4), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (client) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(4), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000032, ZAP_ATTRIBUTE_INDEX(4), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(4), 5, 724, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(4), 5, 724, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ } diff --git a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h index c63bd6d90f434c..0f0dec8d2fdaed 100644 --- a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h @@ -138,50 +138,51 @@ { \ \ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* SupportedLocales */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* SupportedLocales */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(0) }, /* Breadcrumb */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(8) }, /* BasicCommissioningInfoList */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x0003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(262) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(0) }, /* Breadcrumb */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(8) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(262) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(266) }, /* Networks */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ - { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ - { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(278) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(266) }, /* Networks */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ + { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ + { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(278) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ - { 0x0004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ + { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x0005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: User Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -195,25 +196,25 @@ #define GENERATED_CLUSTERS \ { \ { \ - 0x0029, ZAP_ATTRIBUTE_INDEX(0), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000029, ZAP_ATTRIBUTE_INDEX(0), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(1), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002B, ZAP_ATTRIBUTE_INDEX(1), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(3), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(3), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(9), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(9), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(19), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(19), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(25), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(25), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(27), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(27), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ } diff --git a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h index 43a35971b8a2b7..b6ff7cb435d086 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h @@ -148,74 +148,77 @@ { \ \ /* Endpoint: 0, Cluster: Basic (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* InteractionModelVersion */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x0002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* InteractionModelVersion */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ + { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* Location */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0) }, /* HardwareVersion */ \ - { 0x0008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ - { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0) }, /* HardwareVersion */ \ + { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ + { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* DefaultOtaProviders */ \ - { 0x0001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* DefaultOtaProviders */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* SupportedLocales */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* SupportedLocales */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x0003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(266) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(266) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(270) }, /* Networks */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ - { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ - { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(270) }, /* Networks */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ + { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ + { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ - { 0x0004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ + { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x0005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: User Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -231,35 +234,35 @@ #define GENERATED_CLUSTER_COUNT 9 #define GENERATED_CLUSTERS \ { \ - { 0x0028, \ + { 0x00000028, \ ZAP_ATTRIBUTE_INDEX(0), \ 12, \ 246, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x0029, ZAP_ATTRIBUTE_INDEX(12), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000029, ZAP_ATTRIBUTE_INDEX(12), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ { \ - 0x002A, ZAP_ATTRIBUTE_INDEX(13), 5, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002A, ZAP_ATTRIBUTE_INDEX(13), 5, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(18), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002B, ZAP_ATTRIBUTE_INDEX(18), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(20), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(20), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(26), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(26), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(36), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(36), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(42), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(42), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(44), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(44), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ } diff --git a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h index cb09059a2f403d..1d1ff20f683692 100644 --- a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h @@ -202,132 +202,141 @@ { \ \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Basic (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* InteractionModelVersion */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x0002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_SIMPLE_DEFAULT(1) }, /* InteractionModelVersion */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ + { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* Location */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0) }, /* HardwareVersion */ \ - { 0x0008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ - { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ - { 0x000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ManufacturingDate */ \ - { 0x000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ - { 0x000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ - { 0x000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ - { 0x000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ - { 0x0010, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* LocalConfigDisabled */ \ - { 0x0011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ - { 0x0012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0) }, /* HardwareVersion */ \ + { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ + { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ + { 0x0000000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ManufacturingDate */ \ + { 0x0000000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ + { 0x0000000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ + { 0x0000000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ + { 0x0000000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ + { 0x00000010, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* LocalConfigDisabled */ \ + { 0x00000011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ + { 0x00000012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(266) }, /* Networks */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ - { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ - { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(278) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(266) }, /* Networks */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ + { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ + { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(278) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ - { 0x0001, ZAP_TYPE(ARRAY), 320, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* fabrics list */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ - { 0x0004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000001, ZAP_TYPE(ARRAY), 320, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* fabrics list */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ + { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x0005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Temperature Measurement (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Temperature Measurement (server) */ \ - { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MeasuredValue */ \ - { 0x0001, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MinMeasuredValue */ \ - { 0x0002, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MaxMeasuredValue */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MeasuredValue */ \ + { 0x00000001, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MinMeasuredValue */ \ + { 0x00000002, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MaxMeasuredValue */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Groups (server) */ \ - { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Scenes (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene count */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current scene */ \ - { 0x0002, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current group */ \ - { 0x0003, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene valid */ \ - { 0x0004, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene count */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current scene */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current group */ \ + { 0x00000003, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene valid */ \ + { 0x00000004, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/Off (server) */ \ - { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* OnOff */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* OnOff */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Basic (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* InteractionModelVersion */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x0002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_SIMPLE_DEFAULT(1) }, /* InteractionModelVersion */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ + { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* Location */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0) }, /* HardwareVersion */ \ - { 0x0008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(606) }, /* SoftwareVersion */ \ - { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ - { 0x000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ManufacturingDate */ \ - { 0x000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ - { 0x000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ - { 0x000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ - { 0x000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ - { 0x0010, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* LocalConfigDisabled */ \ - { 0x0011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ - { 0x0012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0) }, /* HardwareVersion */ \ + { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_LONG_DEFAULTS_INDEX(606) }, /* SoftwareVersion */ \ + { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ + { 0x0000000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ManufacturingDate */ \ + { 0x0000000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ + { 0x0000000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ + { 0x0000000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ + { 0x0000000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ + { 0x00000010, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* LocalConfigDisabled */ \ + { 0x00000011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ + { 0x00000012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Color Control (server) */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x616B) }, /* current x */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x607D) }, /* current y */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* color control options */ \ - { 0x400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ - { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* start up color temperature mireds */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x616B) }, /* current x */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x607D) }, /* current y */ \ + { 0x0000000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x00) }, /* color control options */ \ + { 0x0000400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ + { 0x00004010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* start up color temperature mireds */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -362,65 +371,67 @@ #define GENERATED_CLUSTER_COUNT 14 #define GENERATED_CLUSTERS \ { \ - { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0028, \ + { \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ + { 0x00000028, \ ZAP_ATTRIBUTE_INDEX(5), \ 20, \ 687, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(25), 3, 264, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(25), 3, 264, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(28), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(28), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(38), 6, 324, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(38), 6, 324, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(44), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(44), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: Temperature Measurement (client) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(45), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(45), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Temperature Measurement (server) */ \ - { 0x0003, \ + { 0x00000003, \ ZAP_ATTRIBUTE_INDEX(49), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0004, \ + { 0x00000004, \ ZAP_ATTRIBUTE_INDEX(52), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 1, Cluster: Groups (server) */ \ - { 0x0005, \ + { 0x00000005, \ ZAP_ATTRIBUTE_INDEX(54), \ 6, \ 8, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayScenesServer }, /* Endpoint: 1, Cluster: Scenes (server) */ \ - { 0x0006, \ + { 0x00000006, \ ZAP_ATTRIBUTE_INDEX(60), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ - { 0x0008, \ + { 0x00000008, \ ZAP_ATTRIBUTE_INDEX(62), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0028, \ + { 0x00000028, \ ZAP_ATTRIBUTE_INDEX(64), \ 20, \ 687, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 1, Cluster: Basic (server) */ \ - { 0x0300, \ + { 0x00000300, \ ZAP_ATTRIBUTE_INDEX(84), \ 6, \ 11, \ diff --git a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h index cb09059a2f403d..1d1ff20f683692 100644 --- a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h @@ -202,132 +202,141 @@ { \ \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Basic (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* InteractionModelVersion */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x0002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_SIMPLE_DEFAULT(1) }, /* InteractionModelVersion */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ + { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* Location */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0) }, /* HardwareVersion */ \ - { 0x0008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ - { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ - { 0x000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ManufacturingDate */ \ - { 0x000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ - { 0x000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ - { 0x000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ - { 0x000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ - { 0x0010, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* LocalConfigDisabled */ \ - { 0x0011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ - { 0x0012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0) }, /* HardwareVersion */ \ + { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ + { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ + { 0x0000000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ManufacturingDate */ \ + { 0x0000000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ + { 0x0000000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ + { 0x0000000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ + { 0x0000000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ + { 0x00000010, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* LocalConfigDisabled */ \ + { 0x00000011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ + { 0x00000012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(266) }, /* Networks */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ - { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ - { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(278) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(266) }, /* Networks */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ + { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ + { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(278) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ - { 0x0001, ZAP_TYPE(ARRAY), 320, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* fabrics list */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ - { 0x0004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000001, ZAP_TYPE(ARRAY), 320, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* fabrics list */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ + { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x0005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Temperature Measurement (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Temperature Measurement (server) */ \ - { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MeasuredValue */ \ - { 0x0001, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MinMeasuredValue */ \ - { 0x0002, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MaxMeasuredValue */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MeasuredValue */ \ + { 0x00000001, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MinMeasuredValue */ \ + { 0x00000002, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MaxMeasuredValue */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Groups (server) */ \ - { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Scenes (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene count */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current scene */ \ - { 0x0002, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current group */ \ - { 0x0003, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene valid */ \ - { 0x0004, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene count */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current scene */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current group */ \ + { 0x00000003, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene valid */ \ + { 0x00000004, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/Off (server) */ \ - { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* OnOff */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* OnOff */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Basic (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* InteractionModelVersion */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x0002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_SIMPLE_DEFAULT(1) }, /* InteractionModelVersion */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ + { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* Location */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0) }, /* HardwareVersion */ \ - { 0x0008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(606) }, /* SoftwareVersion */ \ - { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ - { 0x000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ManufacturingDate */ \ - { 0x000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ - { 0x000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ - { 0x000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ - { 0x000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ - { 0x0010, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* LocalConfigDisabled */ \ - { 0x0011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ - { 0x0012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0) }, /* HardwareVersion */ \ + { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_LONG_DEFAULTS_INDEX(606) }, /* SoftwareVersion */ \ + { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ + { 0x0000000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ManufacturingDate */ \ + { 0x0000000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ + { 0x0000000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ + { 0x0000000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ + { 0x0000000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ + { 0x00000010, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* LocalConfigDisabled */ \ + { 0x00000011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ + { 0x00000012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Color Control (server) */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x616B) }, /* current x */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x607D) }, /* current y */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* color control options */ \ - { 0x400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ - { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* start up color temperature mireds */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x616B) }, /* current x */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x607D) }, /* current y */ \ + { 0x0000000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x00) }, /* color control options */ \ + { 0x0000400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ + { 0x00004010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* start up color temperature mireds */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -362,65 +371,67 @@ #define GENERATED_CLUSTER_COUNT 14 #define GENERATED_CLUSTERS \ { \ - { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0028, \ + { \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ + { 0x00000028, \ ZAP_ATTRIBUTE_INDEX(5), \ 20, \ 687, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(25), 3, 264, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(25), 3, 264, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(28), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(28), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(38), 6, 324, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(38), 6, 324, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(44), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(44), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: Temperature Measurement (client) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(45), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(45), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Temperature Measurement (server) */ \ - { 0x0003, \ + { 0x00000003, \ ZAP_ATTRIBUTE_INDEX(49), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0004, \ + { 0x00000004, \ ZAP_ATTRIBUTE_INDEX(52), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 1, Cluster: Groups (server) */ \ - { 0x0005, \ + { 0x00000005, \ ZAP_ATTRIBUTE_INDEX(54), \ 6, \ 8, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayScenesServer }, /* Endpoint: 1, Cluster: Scenes (server) */ \ - { 0x0006, \ + { 0x00000006, \ ZAP_ATTRIBUTE_INDEX(60), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ - { 0x0008, \ + { 0x00000008, \ ZAP_ATTRIBUTE_INDEX(62), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0028, \ + { 0x00000028, \ ZAP_ATTRIBUTE_INDEX(64), \ 20, \ 687, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 1, Cluster: Basic (server) */ \ - { 0x0300, \ + { 0x00000300, \ ZAP_ATTRIBUTE_INDEX(84), \ 6, \ 11, \ diff --git a/zzz_generated/pump-app/zap-generated/endpoint_config.h b/zzz_generated/pump-app/zap-generated/endpoint_config.h index b2641e24ba309e..104762c2e4798d 100644 --- a/zzz_generated/pump-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-app/zap-generated/endpoint_config.h @@ -488,239 +488,245 @@ { \ \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Basic (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* InteractionModelVersion */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x0002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* InteractionModelVersion */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ + { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* Location */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ - { 0x0008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ - { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* Location */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ + { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ + { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x0003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(266) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(266) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(270) }, /* Networks */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ - { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ - { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(270) }, /* Networks */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ + { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ + { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(290) }, /* UpTime */ \ - { 0x0003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(298) }, /* TotalOperationalHours */ \ - { 0x0004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ - { 0x0005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ - { 0x0006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(290) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(298) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ + { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(302) }, /* CurrentHeapFree */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(310) }, /* CurrentHeapUsed */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(318) }, /* CurrentHeapHighWatermark */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(326) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(302) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(310) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(318) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(326) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x0002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(330) }, /* NetworkName */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(332) }, /* ExtendedPanId */ \ - { 0x0005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(340) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ - { 0x0008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(348) }, /* PartitionId */ \ - { 0x000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ - { 0x000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ - { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ - { 0x000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ - { 0x000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ - { 0x000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ - { 0x0010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ - { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ - { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ - { 0x0015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x0016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* TxTotalCount */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* TxUnicastCount */ \ - { 0x0018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(360) }, /* TxBroadcastCount */ \ - { 0x0019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(364) }, /* TxAckRequestedCount */ \ - { 0x001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(368) }, /* TxAckedCount */ \ - { 0x001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(372) }, /* TxNoAckRequestedCount */ \ - { 0x001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(376) }, /* TxDataCount */ \ - { 0x001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(380) }, /* TxDataPollCount */ \ - { 0x001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(384) }, /* TxBeaconCount */ \ - { 0x001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(388) }, /* TxBeaconRequestCount */ \ - { 0x0020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(392) }, /* TxOtherCount */ \ - { 0x0021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(396) }, /* TxRetryCount */ \ - { 0x0022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(400) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(404) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x0024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(408) }, /* TxErrCcaCount */ \ - { 0x0025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(412) }, /* TxErrAbortCount */ \ - { 0x0026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(416) }, /* TxErrBusyChannelCount */ \ - { 0x0027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(420) }, /* RxTotalCount */ \ - { 0x0028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(424) }, /* RxUnicastCount */ \ - { 0x0029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(428) }, /* RxBroadcastCount */ \ - { 0x002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(432) }, /* RxDataCount */ \ - { 0x002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(436) }, /* RxDataPollCount */ \ - { 0x002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(440) }, /* RxBeaconCount */ \ - { 0x002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(444) }, /* RxBeaconRequestCount */ \ - { 0x002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(448) }, /* RxOtherCount */ \ - { 0x002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(452) }, /* RxAddressFilteredCount */ \ - { 0x0030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(456) }, /* RxDestAddrFilteredCount */ \ - { 0x0031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(460) }, /* RxDuplicatedCount */ \ - { 0x0032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(464) }, /* RxErrNoFrameCount */ \ - { 0x0033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(468) }, /* RxErrUnknownNeighborCount */ \ - { 0x0034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(472) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x0035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(476) }, /* RxErrSecCount */ \ - { 0x0036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(480) }, /* RxErrFcsCount */ \ - { 0x0037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(484) }, /* RxErrOtherCount */ \ - { 0x0038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(488) }, /* ActiveTimestamp */ \ - { 0x0039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(496) }, /* PendingTimestamp */ \ - { 0x003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(504) }, /* delay */ \ - { 0x003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(508) }, /* ChannelMask */ \ - { 0x003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(330) }, /* NetworkName */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(332) }, /* ExtendedPanId */ \ + { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(340) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ + { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(348) }, /* PartitionId */ \ + { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ + { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ + { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ + { 0x0000000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ + { 0x0000000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ + { 0x0000000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ + { 0x00000010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ + { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ + { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ + { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(360) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(364) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(368) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(372) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(376) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(380) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(384) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(388) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(392) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(396) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(400) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(404) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(408) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(412) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(416) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(420) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(424) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(428) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(432) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(436) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(440) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(444) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(448) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(452) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(456) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(460) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(464) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(468) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(472) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(476) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(480) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(484) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(488) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(496) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(504) }, /* delay */ \ + { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(508) }, /* ChannelMask */ \ + { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ - { 0x003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(515) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(515) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ - { 0x0001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ - { 0x0002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ + { 0x00000001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ + { 0x00000002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ - { 0x0004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ + { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x0005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: User Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/Off (server) */ \ - { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ - { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxPressure */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxSpeed */ \ - { 0x0002, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxFlow */ \ - { 0x0003, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstPressure */ \ - { 0x0004, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstPressure */ \ - { 0x0005, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinCompPressure */ \ - { 0x0006, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxCompPressure */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstSpeed */ \ - { 0x0008, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstSpeed */ \ - { 0x0009, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstFlow */ \ - { 0x000A, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstFlow */ \ - { 0x000B, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstTemp */ \ - { 0x000C, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstTemp */ \ - { 0x0010, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* PumpStatus */ \ - { 0x0011, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveOperationMode */ \ - { 0x0012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ - { 0x0013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ - { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ - { 0x0015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(519) }, /* LifetimeRunningHours */ \ - { 0x0016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(522) }, /* Power */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxPressure */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxSpeed */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxFlow */ \ + { 0x00000003, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstPressure */ \ + { 0x00000004, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstPressure */ \ + { 0x00000005, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinCompPressure */ \ + { 0x00000006, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxCompPressure */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstSpeed */ \ + { 0x00000008, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstSpeed */ \ + { 0x00000009, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstFlow */ \ + { 0x0000000A, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstFlow */ \ + { 0x0000000B, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstTemp */ \ + { 0x0000000C, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstTemp */ \ + { 0x00000010, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* PumpStatus */ \ + { 0x00000011, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveOperationMode */ \ + { 0x00000012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ + { 0x00000013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ + { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ + { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(519) }, /* LifetimeRunningHours */ \ + { 0x00000016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(522) }, /* Power */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_LONG_DEFAULTS_INDEX(525) }, /* LifetimeEnergyConsumed */ \ - { 0x0020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* OperationMode */ \ - { 0x0021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* ControlMode */ \ - { 0x0022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(529) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* ControlMode */ \ + { 0x00000022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(529) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ - { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MeasuredValue */ \ - { 0x0001, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MinMeasuredValue */ \ - { 0x0002, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MaxMeasuredValue */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MeasuredValue */ \ + { 0x00000001, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MinMeasuredValue */ \ + { 0x00000002, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MaxMeasuredValue */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Pressure Measurement (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ - { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* MeasuredValue */ \ - { 0x0001, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinMeasuredValue */ \ - { 0x0002, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxMeasuredValue */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* MeasuredValue */ \ + { 0x00000001, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinMeasuredValue */ \ + { 0x00000002, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxMeasuredValue */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Flow Measurement (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ - { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* MeasuredValue */ \ - { 0x0001, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinMeasuredValue */ \ - { 0x0002, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxMeasuredValue */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* MeasuredValue */ \ + { 0x00000001, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinMeasuredValue */ \ + { 0x00000002, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxMeasuredValue */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -746,63 +752,65 @@ #define GENERATED_CLUSTER_COUNT 23 #define GENERATED_CLUSTERS \ { \ - { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0028, \ + { \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ + { 0x00000028, \ ZAP_ATTRIBUTE_INDEX(5), \ 12, \ 246, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(17), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002B, ZAP_ATTRIBUTE_INDEX(17), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(19), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(19), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(25), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(25), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(35), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000032, ZAP_ATTRIBUTE_INDEX(35), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(35), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000033, ZAP_ATTRIBUTE_INDEX(35), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(44), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000034, ZAP_ATTRIBUTE_INDEX(44), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(50), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000035, ZAP_ATTRIBUTE_INDEX(50), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(115), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003C, ZAP_ATTRIBUTE_INDEX(115), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(119), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(119), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(125), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(125), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(127), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(127), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ - { 0x0006, \ + { 0x00000006, \ ZAP_ATTRIBUTE_INDEX(129), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ - { 0x0008, \ + { 0x00000008, \ ZAP_ATTRIBUTE_INDEX(131), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(133), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(133), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0200, \ + 0x00000200, \ ZAP_ATTRIBUTE_INDEX(138), \ 26, \ 54, \ @@ -810,22 +818,22 @@ chipFuncArrayPumpConfigurationAndControlServer \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(164), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(164), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(165), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(165), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(169), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000403, ZAP_ATTRIBUTE_INDEX(169), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (client) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(170), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000403, ZAP_ATTRIBUTE_INDEX(170), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(174), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000404, ZAP_ATTRIBUTE_INDEX(174), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (client) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(175), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000404, ZAP_ATTRIBUTE_INDEX(175), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ } diff --git a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h index fbb98a096e6625..afa75ebd00f201 100644 --- a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h @@ -558,220 +558,226 @@ { \ \ /* Endpoint: 0, Cluster: Level Control (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Basic (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* InteractionModelVersion */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x0002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* InteractionModelVersion */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ + { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* Location */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ - { 0x0008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ - { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* Location */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ + { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ + { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x0003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(266) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(266) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(270) }, /* Networks */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ - { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ - { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(270) }, /* Networks */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ + { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ + { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(290) }, /* UpTime */ \ - { 0x0003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(298) }, /* TotalOperationalHours */ \ - { 0x0004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ - { 0x0005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ - { 0x0006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(290) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(298) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ + { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(302) }, /* CurrentHeapFree */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(310) }, /* CurrentHeapUsed */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(318) }, /* CurrentHeapHighWatermark */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(326) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(302) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(310) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(318) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(326) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x0002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(330) }, /* NetworkName */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(332) }, /* ExtendedPanId */ \ - { 0x0005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(340) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ - { 0x0008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(348) }, /* PartitionId */ \ - { 0x000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ - { 0x000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ - { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ - { 0x000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ - { 0x000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ - { 0x000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ - { 0x0010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ - { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ - { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ - { 0x0015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x0016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* TxTotalCount */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* TxUnicastCount */ \ - { 0x0018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(360) }, /* TxBroadcastCount */ \ - { 0x0019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(364) }, /* TxAckRequestedCount */ \ - { 0x001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(368) }, /* TxAckedCount */ \ - { 0x001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(372) }, /* TxNoAckRequestedCount */ \ - { 0x001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(376) }, /* TxDataCount */ \ - { 0x001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(380) }, /* TxDataPollCount */ \ - { 0x001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(384) }, /* TxBeaconCount */ \ - { 0x001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(388) }, /* TxBeaconRequestCount */ \ - { 0x0020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(392) }, /* TxOtherCount */ \ - { 0x0021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(396) }, /* TxRetryCount */ \ - { 0x0022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(400) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(404) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x0024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(408) }, /* TxErrCcaCount */ \ - { 0x0025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(412) }, /* TxErrAbortCount */ \ - { 0x0026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(416) }, /* TxErrBusyChannelCount */ \ - { 0x0027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(420) }, /* RxTotalCount */ \ - { 0x0028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(424) }, /* RxUnicastCount */ \ - { 0x0029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(428) }, /* RxBroadcastCount */ \ - { 0x002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(432) }, /* RxDataCount */ \ - { 0x002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(436) }, /* RxDataPollCount */ \ - { 0x002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(440) }, /* RxBeaconCount */ \ - { 0x002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(444) }, /* RxBeaconRequestCount */ \ - { 0x002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(448) }, /* RxOtherCount */ \ - { 0x002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(452) }, /* RxAddressFilteredCount */ \ - { 0x0030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(456) }, /* RxDestAddrFilteredCount */ \ - { 0x0031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(460) }, /* RxDuplicatedCount */ \ - { 0x0032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(464) }, /* RxErrNoFrameCount */ \ - { 0x0033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(468) }, /* RxErrUnknownNeighborCount */ \ - { 0x0034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(472) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x0035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(476) }, /* RxErrSecCount */ \ - { 0x0036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(480) }, /* RxErrFcsCount */ \ - { 0x0037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(484) }, /* RxErrOtherCount */ \ - { 0x0038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(488) }, /* ActiveTimestamp */ \ - { 0x0039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(496) }, /* PendingTimestamp */ \ - { 0x003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(504) }, /* delay */ \ - { 0x003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(508) }, /* ChannelMask */ \ - { 0x003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(330) }, /* NetworkName */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(332) }, /* ExtendedPanId */ \ + { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(340) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ + { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(348) }, /* PartitionId */ \ + { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ + { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ + { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ + { 0x0000000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ + { 0x0000000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ + { 0x0000000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ + { 0x00000010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ + { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ + { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ + { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(360) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(364) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(368) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(372) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(376) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(380) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(384) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(388) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(392) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(396) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(400) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(404) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(408) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(412) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(416) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(420) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(424) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(428) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(432) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(436) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(440) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(444) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(448) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(452) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(456) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(460) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(464) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(468) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(472) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(476) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(480) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(484) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(488) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(496) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(504) }, /* delay */ \ + { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(508) }, /* ChannelMask */ \ + { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ - { 0x003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(515) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(515) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ - { 0x0004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x0005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(519) }, /* BeaconLostCount */ \ - { 0x0006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(523) }, /* BeaconRxCount */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(527) }, /* PacketMulticastRxCount */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(531) }, /* PacketMulticastTxCount */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(535) }, /* PacketUnicastRxCount */ \ - { 0x000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(539) }, /* PacketUnicastTxCount */ \ - { 0x000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(543) }, /* CurrentMaxRate */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(551) }, /* OverrunCount */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(559) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ + { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(519) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(523) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(527) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(531) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(535) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(539) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(543) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(551) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(559) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x0001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(563) }, /* PacketRxCount */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(571) }, /* PacketTxCount */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(579) }, /* TxErrCount */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(587) }, /* CollisionCount */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(595) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x0008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(603) }, /* TimeSinceReset */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(611) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(563) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(571) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(579) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(587) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(595) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(603) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(611) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ - { 0x0001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ - { 0x0002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ + { 0x00000001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ + { 0x00000002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ - { 0x0004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ + { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x0005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: User Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/Off (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Pressure Measurement (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Flow Measurement (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -788,73 +794,73 @@ #define GENERATED_CLUSTERS \ { \ { \ - 0x0008, ZAP_ATTRIBUTE_INDEX(0), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000008, ZAP_ATTRIBUTE_INDEX(0), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: Level Control (client) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(1), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(1), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0028, \ + { 0x00000028, \ ZAP_ATTRIBUTE_INDEX(6), \ 12, \ 246, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(18), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002B, ZAP_ATTRIBUTE_INDEX(18), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(20), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(20), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(26), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(26), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(36), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000032, ZAP_ATTRIBUTE_INDEX(36), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(36), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000033, ZAP_ATTRIBUTE_INDEX(36), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(45), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000034, ZAP_ATTRIBUTE_INDEX(45), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(51), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000035, ZAP_ATTRIBUTE_INDEX(51), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(116), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000036, ZAP_ATTRIBUTE_INDEX(116), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(131), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000037, ZAP_ATTRIBUTE_INDEX(131), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(142), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003C, ZAP_ATTRIBUTE_INDEX(142), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(146), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(146), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(152), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(152), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(154), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(154), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x0006, ZAP_ATTRIBUTE_INDEX(156), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000006, ZAP_ATTRIBUTE_INDEX(156), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: On/Off (client) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(157), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(157), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0200, ZAP_ATTRIBUTE_INDEX(162), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000200, ZAP_ATTRIBUTE_INDEX(162), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (client) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(163), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(163), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(164), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000403, ZAP_ATTRIBUTE_INDEX(164), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (client) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(165), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000404, ZAP_ATTRIBUTE_INDEX(165), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (client) */ \ } diff --git a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h index f1a8d22cd6bc1d..4ecaf943a36fda 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h @@ -284,136 +284,142 @@ { \ \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Basic (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* InteractionModelVersion */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x0002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* InteractionModelVersion */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ + { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* Location */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ - { 0x0008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ - { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* Location */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ + { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ + { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x0003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(266) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(266) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(270) }, /* Networks */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ - { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ - { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(270) }, /* Networks */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ + { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ + { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(290) }, /* UpTime */ \ - { 0x0003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(298) }, /* TotalOperationalHours */ \ - { 0x0004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ - { 0x0005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ - { 0x0006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(290) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(298) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ + { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(302) }, /* CurrentHeapHighWatermark */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(310) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(302) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(310) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ - { 0x0004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x0005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(314) }, /* BeaconLostCount */ \ - { 0x0006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(318) }, /* BeaconRxCount */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(322) }, /* PacketMulticastRxCount */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(326) }, /* PacketMulticastTxCount */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(330) }, /* PacketUnicastRxCount */ \ - { 0x000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(334) }, /* PacketUnicastTxCount */ \ - { 0x000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(338) }, /* CurrentMaxRate */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(346) }, /* OverrunCount */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(354) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ + { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(314) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(318) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(322) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(326) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(330) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(334) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(338) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(346) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(354) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x0001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(358) }, /* PacketRxCount */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(366) }, /* PacketTxCount */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(374) }, /* TxErrCount */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(382) }, /* CollisionCount */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(390) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x0008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(398) }, /* TimeSinceReset */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(406) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(358) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(366) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(374) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(382) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(390) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(398) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(406) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ - { 0x0001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ - { 0x0002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ + { 0x00000001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ + { 0x00000002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ - { 0x0004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ + { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x0005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: User Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ - { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MeasuredValue */ \ - { 0x0001, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MinMeasuredValue */ \ - { 0x0002, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MaxMeasuredValue */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MeasuredValue */ \ + { 0x00000001, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MinMeasuredValue */ \ + { 0x00000002, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MaxMeasuredValue */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -429,54 +435,56 @@ #define GENERATED_CLUSTER_COUNT 16 #define GENERATED_CLUSTERS \ { \ - { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0028, \ + { \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ + { 0x00000028, \ ZAP_ATTRIBUTE_INDEX(5), \ 12, \ 246, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(17), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002B, ZAP_ATTRIBUTE_INDEX(17), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(19), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(19), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(25), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(25), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(35), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000032, ZAP_ATTRIBUTE_INDEX(35), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(35), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000033, ZAP_ATTRIBUTE_INDEX(35), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(44), 3, 14, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000034, ZAP_ATTRIBUTE_INDEX(44), 3, 14, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(47), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000036, ZAP_ATTRIBUTE_INDEX(47), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(62), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000037, ZAP_ATTRIBUTE_INDEX(62), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(73), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003C, ZAP_ATTRIBUTE_INDEX(73), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(77), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(77), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(83), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(83), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(85), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(85), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(87), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(87), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(92), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(92), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ } diff --git a/zzz_generated/thermostat/zap-generated/endpoint_config.h b/zzz_generated/thermostat/zap-generated/endpoint_config.h index df8b6dc86e06a3..e2cb98a185e315 100644 --- a/zzz_generated/thermostat/zap-generated/endpoint_config.h +++ b/zzz_generated/thermostat/zap-generated/endpoint_config.h @@ -669,289 +669,297 @@ { \ \ /* Endpoint: 0, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Binding (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Basic (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* InteractionModelVersion */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x0002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_SIMPLE_DEFAULT(1) }, /* InteractionModelVersion */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ + { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* Location */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0) }, /* HardwareVersion */ \ - { 0x0008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ - { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ - { 0x000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_LONG_DEFAULTS_INDEX(4) }, /* ManufacturingDate */ \ - { 0x000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ - { 0x000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ - { 0x000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ - { 0x000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ - { 0x0010, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* LocalConfigDisabled */ \ - { 0x0011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ - { 0x0012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0) }, /* HardwareVersion */ \ + { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ + { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ + { 0x0000000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_LONG_DEFAULTS_INDEX(4) }, /* ManufacturingDate */ \ + { 0x0000000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ + { 0x0000000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ + { 0x0000000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ + { 0x0000000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ + { 0x00000010, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* LocalConfigDisabled */ \ + { 0x00000011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ + { 0x00000012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(21) }, /* Breadcrumb */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(29) }, /* BasicCommissioningInfoList */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x0003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(283) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(21) }, /* Breadcrumb */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(29) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(283) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(287) }, /* Networks */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ - { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ - { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(299) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(303) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(287) }, /* Networks */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ + { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ + { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(299) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(303) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(307) }, /* UpTime */ \ - { 0x0003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* TotalOperationalHours */ \ - { 0x0004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ - { 0x0005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ - { 0x0006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(307) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ + { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(319) }, /* CurrentHeapFree */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(327) }, /* CurrentHeapUsed */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(335) }, /* CurrentHeapHighWatermark */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(343) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(319) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(327) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(335) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(343) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x0002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* NetworkName */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(349) }, /* ExtendedPanId */ \ - { 0x0005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(357) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ - { 0x0008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(365) }, /* PartitionId */ \ - { 0x000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ - { 0x000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ - { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ - { 0x000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ - { 0x000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ - { 0x000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ - { 0x0010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ - { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ - { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ - { 0x0015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x0016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(369) }, /* TxTotalCount */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(373) }, /* TxUnicastCount */ \ - { 0x0018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(377) }, /* TxBroadcastCount */ \ - { 0x0019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(381) }, /* TxAckRequestedCount */ \ - { 0x001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(385) }, /* TxAckedCount */ \ - { 0x001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(389) }, /* TxNoAckRequestedCount */ \ - { 0x001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(393) }, /* TxDataCount */ \ - { 0x001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(397) }, /* TxDataPollCount */ \ - { 0x001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(401) }, /* TxBeaconCount */ \ - { 0x001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(405) }, /* TxBeaconRequestCount */ \ - { 0x0020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(409) }, /* TxOtherCount */ \ - { 0x0021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(413) }, /* TxRetryCount */ \ - { 0x0022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(417) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(421) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x0024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(425) }, /* TxErrCcaCount */ \ - { 0x0025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(429) }, /* TxErrAbortCount */ \ - { 0x0026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(433) }, /* TxErrBusyChannelCount */ \ - { 0x0027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(437) }, /* RxTotalCount */ \ - { 0x0028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(441) }, /* RxUnicastCount */ \ - { 0x0029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(445) }, /* RxBroadcastCount */ \ - { 0x002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(449) }, /* RxDataCount */ \ - { 0x002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(453) }, /* RxDataPollCount */ \ - { 0x002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(457) }, /* RxBeaconCount */ \ - { 0x002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(461) }, /* RxBeaconRequestCount */ \ - { 0x002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(465) }, /* RxOtherCount */ \ - { 0x002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(469) }, /* RxAddressFilteredCount */ \ - { 0x0030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(473) }, /* RxDestAddrFilteredCount */ \ - { 0x0031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(477) }, /* RxDuplicatedCount */ \ - { 0x0032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(481) }, /* RxErrNoFrameCount */ \ - { 0x0033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(485) }, /* RxErrUnknownNeighborCount */ \ - { 0x0034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(489) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x0035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(493) }, /* RxErrSecCount */ \ - { 0x0036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(497) }, /* RxErrFcsCount */ \ - { 0x0037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(501) }, /* RxErrOtherCount */ \ - { 0x0038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(505) }, /* ActiveTimestamp */ \ - { 0x0039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(513) }, /* PendingTimestamp */ \ - { 0x003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(521) }, /* delay */ \ - { 0x003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(525) }, /* ChannelMask */ \ - { 0x003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* NetworkName */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(349) }, /* ExtendedPanId */ \ + { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(357) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ + { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(365) }, /* PartitionId */ \ + { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ + { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ + { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ + { 0x0000000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ + { 0x0000000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ + { 0x0000000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ + { 0x00000010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ + { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ + { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ + { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(369) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(373) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(377) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(381) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(385) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(389) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(393) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(397) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(401) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(405) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(409) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(413) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(417) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(421) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(425) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(429) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(433) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(437) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(441) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(445) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(449) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(453) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(457) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(461) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(465) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(469) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(473) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(477) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(481) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(485) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(489) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(493) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(497) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(501) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(505) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(513) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(521) }, /* delay */ \ + { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(525) }, /* ChannelMask */ \ + { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ - { 0x003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(532) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(532) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ - { 0x0004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x0005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(536) }, /* BeaconLostCount */ \ - { 0x0006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(540) }, /* BeaconRxCount */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(544) }, /* PacketMulticastRxCount */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(548) }, /* PacketMulticastTxCount */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(552) }, /* PacketUnicastRxCount */ \ - { 0x000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(556) }, /* PacketUnicastTxCount */ \ - { 0x000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(560) }, /* CurrentMaxRate */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(568) }, /* OverrunCount */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(576) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ + { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(536) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(540) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(544) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(548) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(552) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(556) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(560) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(568) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(576) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x0001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(580) }, /* PacketRxCount */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(588) }, /* PacketTxCount */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(596) }, /* TxErrCount */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(604) }, /* CollisionCount */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(612) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x0008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(620) }, /* TimeSinceReset */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(628) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(580) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(588) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(596) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(604) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(612) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(620) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(628) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ - { 0x0001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ - { 0x0002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ + { 0x00000001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ + { 0x00000002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ - { 0x0004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ + { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x0005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(632) }, /* groupKeyMap */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(886) }, /* groupTable */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(632) }, /* groupKeyMap */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(886) }, /* groupTable */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: User Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* identify time */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* identify time */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Groups (server) */ \ - { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Scenes (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene count */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current scene */ \ - { 0x0002, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current group */ \ - { 0x0003, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene valid */ \ - { 0x0004, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene count */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current scene */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current group */ \ + { 0x00000003, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene valid */ \ + { 0x00000004, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Basic (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* InteractionModelVersion */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x0002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* InteractionModelVersion */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ + { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* Location */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ - { 0x0008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(1140) }, /* SoftwareVersion */ \ - { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* Location */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ + { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_LONG_DEFAULTS_INDEX(1140) }, /* SoftwareVersion */ \ + { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ - { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* local temperature */ \ - { 0x0003, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(700) }, /* abs min heat setpoint limit */ \ - { 0x0004, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(3000) }, /* abs max heat setpoint limit */ \ - { 0x0005, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(1600) }, /* abs min cool setpoint limit */ \ - { 0x0006, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(3200) }, /* abs max cool setpoint limit */ \ - { 0x0011, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* local temperature */ \ + { 0x00000003, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(700) }, /* abs min heat setpoint limit */ \ + { 0x00000004, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(3000) }, /* abs max heat setpoint limit */ \ + { 0x00000005, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(1600) }, /* abs min cool setpoint limit */ \ + { 0x00000006, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(3200) }, /* abs max cool setpoint limit */ \ + { 0x00000011, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x0A28) }, /* occupied cooling setpoint */ \ - { 0x0012, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000012, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x07D0) }, /* occupied heating setpoint */ \ - { 0x0015, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000015, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* min heat setpoint limit */ \ - { 0x0016, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000016, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* max heat setpoint limit */ \ - { 0x0017, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000017, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* min cool setpoint limit */ \ - { 0x0018, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000018, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* max cool setpoint limit */ \ - { 0x0019, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000019, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* min setpoint dead band */ \ - { 0x001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x0000001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* control sequence of operation */ \ - { 0x001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* system mode */ \ - { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ - { 0x0021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ - { 0x0022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1144) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + { 0x0000001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* system mode */ \ + { 0x00000020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ + { 0x00000021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ + { 0x00000022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1144) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -980,95 +988,97 @@ #define GENERATED_CLUSTER_COUNT 25 #define GENERATED_CLUSTERS \ { \ - { 0x0003, \ + { 0x00000003, \ ZAP_ATTRIBUTE_INDEX(0), \ 2, \ 4, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 0, Cluster: Identify (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(2), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(2), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x001E, ZAP_ATTRIBUTE_INDEX(7), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Binding (server) */ \ - { 0x0028, \ + { \ + 0x0000001E, ZAP_ATTRIBUTE_INDEX(7), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Binding (server) */ \ + { 0x00000028, \ ZAP_ATTRIBUTE_INDEX(8), \ 20, \ 687, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x0029, ZAP_ATTRIBUTE_INDEX(28), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000029, ZAP_ATTRIBUTE_INDEX(28), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(29), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002B, ZAP_ATTRIBUTE_INDEX(29), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(31), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(31), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(37), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(37), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(47), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000032, ZAP_ATTRIBUTE_INDEX(47), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(47), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000033, ZAP_ATTRIBUTE_INDEX(47), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(56), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000034, ZAP_ATTRIBUTE_INDEX(56), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(62), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000035, ZAP_ATTRIBUTE_INDEX(62), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(127), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000036, ZAP_ATTRIBUTE_INDEX(127), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(142), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000037, ZAP_ATTRIBUTE_INDEX(142), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(153), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003C, ZAP_ATTRIBUTE_INDEX(153), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(157), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(157), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x003F, ZAP_ATTRIBUTE_INDEX(163), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003F, ZAP_ATTRIBUTE_INDEX(163), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(166), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(166), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(168), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(168), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x0003, ZAP_ATTRIBUTE_INDEX(170), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000003, ZAP_ATTRIBUTE_INDEX(170), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Identify (client) */ \ - { 0x0003, \ + { 0x00000003, \ ZAP_ATTRIBUTE_INDEX(171), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0004, \ + { 0x00000004, \ ZAP_ATTRIBUTE_INDEX(174), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 1, Cluster: Groups (server) */ \ - { 0x0005, \ + { 0x00000005, \ ZAP_ATTRIBUTE_INDEX(176), \ 6, \ 8, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayScenesServer }, /* Endpoint: 1, Cluster: Scenes (server) */ \ - { 0x0028, \ + { 0x00000028, \ ZAP_ATTRIBUTE_INDEX(182), \ 12, \ 246, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 1, Cluster: Basic (server) */ \ - { 0x0201, \ + { 0x00000201, \ ZAP_ATTRIBUTE_INDEX(194), \ 19, \ 34, \ diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index 9547810b6c86e2..0cdf900844b192 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -1015,409 +1015,418 @@ { \ \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Binding (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Binding (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Basic (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* InteractionModelVersion */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x0002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* InteractionModelVersion */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ + { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* Location */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ - { 0x0008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ - { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ - { 0x000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ManufacturingDate */ \ - { 0x000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ - { 0x000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ - { 0x000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ - { 0x000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ - { 0x0010, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x00) }, /* LocalConfigDisabled */ \ - { 0x0012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* Location */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ + { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ + { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ + { 0x0000000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ManufacturingDate */ \ + { 0x0000000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ + { 0x0000000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ + { 0x0000000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ + { 0x0000000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ + { 0x00000010, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x00) }, /* LocalConfigDisabled */ \ + { 0x00000012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ \ /* Endpoint: 0, Cluster: General Commissioning (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x0003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(266) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(266) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(270) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(270) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(274) }, /* Networks */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ - { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ - { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(290) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(274) }, /* Networks */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ + { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ + { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(290) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(294) }, /* UpTime */ \ - { 0x0003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(302) }, /* TotalOperationalHours */ \ - { 0x0004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ - { 0x0005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ - { 0x0006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(294) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(302) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ + { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(306) }, /* CurrentHeapFree */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(314) }, /* CurrentHeapUsed */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(322) }, /* CurrentHeapHighWatermark */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(330) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(306) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(314) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(322) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(330) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x0002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(334) }, /* NetworkName */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(336) }, /* ExtendedPanId */ \ - { 0x0005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(344) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ - { 0x0008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* PartitionId */ \ - { 0x000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ - { 0x000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ - { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ - { 0x000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ - { 0x000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ - { 0x000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ - { 0x0010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ - { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ - { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ - { 0x0015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x0016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* TxTotalCount */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(360) }, /* TxUnicastCount */ \ - { 0x0018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(364) }, /* TxBroadcastCount */ \ - { 0x0019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(368) }, /* TxAckRequestedCount */ \ - { 0x001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(372) }, /* TxAckedCount */ \ - { 0x001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(376) }, /* TxNoAckRequestedCount */ \ - { 0x001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(380) }, /* TxDataCount */ \ - { 0x001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(384) }, /* TxDataPollCount */ \ - { 0x001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(388) }, /* TxBeaconCount */ \ - { 0x001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(392) }, /* TxBeaconRequestCount */ \ - { 0x0020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(396) }, /* TxOtherCount */ \ - { 0x0021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(400) }, /* TxRetryCount */ \ - { 0x0022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(404) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(408) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x0024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(412) }, /* TxErrCcaCount */ \ - { 0x0025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(416) }, /* TxErrAbortCount */ \ - { 0x0026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(420) }, /* TxErrBusyChannelCount */ \ - { 0x0027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(424) }, /* RxTotalCount */ \ - { 0x0028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(428) }, /* RxUnicastCount */ \ - { 0x0029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(432) }, /* RxBroadcastCount */ \ - { 0x002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(436) }, /* RxDataCount */ \ - { 0x002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(440) }, /* RxDataPollCount */ \ - { 0x002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(444) }, /* RxBeaconCount */ \ - { 0x002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(448) }, /* RxBeaconRequestCount */ \ - { 0x002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(452) }, /* RxOtherCount */ \ - { 0x002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(456) }, /* RxAddressFilteredCount */ \ - { 0x0030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(460) }, /* RxDestAddrFilteredCount */ \ - { 0x0031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(464) }, /* RxDuplicatedCount */ \ - { 0x0032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(468) }, /* RxErrNoFrameCount */ \ - { 0x0033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(472) }, /* RxErrUnknownNeighborCount */ \ - { 0x0034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(476) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x0035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(480) }, /* RxErrSecCount */ \ - { 0x0036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(484) }, /* RxErrFcsCount */ \ - { 0x0037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(488) }, /* RxErrOtherCount */ \ - { 0x0038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(492) }, /* ActiveTimestamp */ \ - { 0x0039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(500) }, /* PendingTimestamp */ \ - { 0x003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(508) }, /* delay */ \ - { 0x003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(512) }, /* ChannelMask */ \ - { 0x003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(334) }, /* NetworkName */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(336) }, /* ExtendedPanId */ \ + { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(344) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ + { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* PartitionId */ \ + { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ + { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ + { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ + { 0x0000000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ + { 0x0000000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ + { 0x0000000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ + { 0x00000010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ + { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ + { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ + { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(360) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(364) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(368) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(372) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(376) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(380) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(384) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(388) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(392) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(396) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(400) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(404) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(408) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(412) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(416) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(420) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(424) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(428) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(432) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(436) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(440) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(444) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(448) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(452) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(456) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(460) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(464) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(468) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(472) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(476) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(480) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(484) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(488) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(492) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(500) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(508) }, /* delay */ \ + { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(512) }, /* ChannelMask */ \ + { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ - { 0x003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(519) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(519) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ - { 0x0004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x0005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(523) }, /* BeaconLostCount */ \ - { 0x0006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(527) }, /* BeaconRxCount */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(531) }, /* PacketMulticastRxCount */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(535) }, /* PacketMulticastTxCount */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(539) }, /* PacketUnicastRxCount */ \ - { 0x000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(543) }, /* PacketUnicastTxCount */ \ - { 0x000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(547) }, /* CurrentMaxRate */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(555) }, /* OverrunCount */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(563) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ + { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(523) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(527) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(531) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(535) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(539) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(543) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(547) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(555) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(563) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x0001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(567) }, /* PacketRxCount */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(575) }, /* PacketTxCount */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(583) }, /* TxErrCount */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(591) }, /* CollisionCount */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(599) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x0008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(607) }, /* TimeSinceReset */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(567) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(575) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(583) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(591) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(599) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(607) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ - { 0x0001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ - { 0x0002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ + { 0x00000001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ + { 0x00000002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ - { 0x0004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ + { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x0005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* groupKeyMap */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(873) }, /* groupTable */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* groupKeyMap */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(873) }, /* groupTable */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: User Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* measured value */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* min measured value */ \ - { 0x0002, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* max measured value */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* measured value */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* min measured value */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* max measured value */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/Off (server) */ \ - { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ - { 0x0000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* wake on lan mac address */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* wake on lan mac address */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Channel (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1127) }, /* channel list */ \ - { 0x0001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1127) }, /* channel list */ \ + { 0x00000001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* channel lineup */ \ - { 0x0002, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* current channel */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000002, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* current channel */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1381) }, /* target navigator list */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* current navigator target */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1381) }, /* target navigator list */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* current navigator target */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Input (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1635) }, /* media input list */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current media input */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1635) }, /* media input list */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current media input */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Low Power (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Keypad Input (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1889) }, /* accept header list */ \ - { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(2143) }, /* supported streaming protocols */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1889) }, /* accept header list */ \ + { 0x00000001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(2143) }, /* supported streaming protocols */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2147) }, /* application launcher list */ \ - { 0x0001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x00) }, /* application launcher app */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2147) }, /* application launcher list */ \ + { 0x00000001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x00) }, /* application launcher app */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: On/Off (server) */ \ - { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x00000005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x00000006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x0000000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* options */ \ - { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ - { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ - { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, \ + { 0x00004000, ZAP_TYPE(INT8U), 1, \ ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(2401) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(2401) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Audio Output (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2405) }, /* audio output list */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current audio output */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2405) }, /* audio output list */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current audio output */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Media Playback (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ - { 0x0001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2659) }, /* start time */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2667) }, /* duration */ \ - { 0x0003, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* position */ \ - { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(2675) }, /* playback speed */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2679) }, /* seek range end */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2687) }, /* seek range start */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ + { 0x00000001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2659) }, /* start time */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2667) }, /* duration */ \ + { 0x00000003, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* position */ \ + { 0x00000004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(2675) }, /* playback speed */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2679) }, /* seek range end */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2687) }, /* seek range start */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Content Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2695) }, /* accept header list */ \ - { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(2949) }, /* supported streaming protocols */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2695) }, /* accept header list */ \ + { 0x00000001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(2949) }, /* supported streaming protocols */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Application Basic (server) */ \ - { 0x0000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* vendor name */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ - { 0x0002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application name */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* product id */ \ - { 0x0004, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* application app */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ - { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2953) }, /* allowed vendor list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* vendor name */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application name */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* product id */ \ + { 0x00000004, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* application app */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2953) }, /* allowed vendor list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Account Login (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 4, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 4, Cluster: Content Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2985) }, /* accept header list */ \ - { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3239) }, /* supported streaming protocols */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2985) }, /* accept header list */ \ + { 0x00000001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(3239) }, /* supported streaming protocols */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 4, Cluster: Application Basic (server) */ \ - { 0x0000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* vendor name */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ - { 0x0002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application name */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ - { 0x0004, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* application app */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ - { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(3243) }, /* allowed vendor list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* vendor name */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application name */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ + { 0x00000004, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* application app */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(3243) }, /* allowed vendor list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 5, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 5, Cluster: Application Basic (server) */ \ - { 0x0000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* vendor name */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ - { 0x0002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application name */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ - { 0x0004, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x00) }, /* application app */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* vendor name */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application name */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ + { 0x00000004, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x00) }, /* application app */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -1439,152 +1448,158 @@ #define GENERATED_CLUSTER_COUNT 47 #define GENERATED_CLUSTERS \ { \ - { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x001E, ZAP_ATTRIBUTE_INDEX(5), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 0, Cluster: Binding (client) */ \ - { 0x001E, ZAP_ATTRIBUTE_INDEX(6), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Binding (server) */ \ - { 0x0028, \ + { \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ + { \ + 0x0000001E, ZAP_ATTRIBUTE_INDEX(5), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + }, /* Endpoint: 0, Cluster: Binding (client) */ \ + { \ + 0x0000001E, ZAP_ATTRIBUTE_INDEX(6), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Binding (server) */ \ + { 0x00000028, \ ZAP_ATTRIBUTE_INDEX(7), \ 19, \ 686, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x0029, ZAP_ATTRIBUTE_INDEX(26), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000029, ZAP_ATTRIBUTE_INDEX(26), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(27), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002B, ZAP_ATTRIBUTE_INDEX(27), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(29), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(29), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (client) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(30), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(30), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(36), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(36), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (client) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(38), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(38), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(48), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000032, ZAP_ATTRIBUTE_INDEX(48), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(48), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000033, ZAP_ATTRIBUTE_INDEX(48), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(57), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000034, ZAP_ATTRIBUTE_INDEX(57), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(63), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000035, ZAP_ATTRIBUTE_INDEX(63), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(128), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000036, ZAP_ATTRIBUTE_INDEX(128), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(143), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000037, ZAP_ATTRIBUTE_INDEX(143), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(154), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003C, ZAP_ATTRIBUTE_INDEX(154), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(158), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(158), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (client) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(159), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(159), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x003F, ZAP_ATTRIBUTE_INDEX(165), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003F, ZAP_ATTRIBUTE_INDEX(165), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(168), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(168), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(170), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(170), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(172), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000405, ZAP_ATTRIBUTE_INDEX(172), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ - { 0x0006, \ + { 0x00000006, \ ZAP_ATTRIBUTE_INDEX(176), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(178), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(178), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(183), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000503, ZAP_ATTRIBUTE_INDEX(183), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(185), 4, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000504, ZAP_ATTRIBUTE_INDEX(185), 4, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(189), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000505, ZAP_ATTRIBUTE_INDEX(189), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(192), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000507, ZAP_ATTRIBUTE_INDEX(192), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(195), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000508, ZAP_ATTRIBUTE_INDEX(195), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(196), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000509, ZAP_ATTRIBUTE_INDEX(196), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(197), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050A, ZAP_ATTRIBUTE_INDEX(197), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(200), 3, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050C, ZAP_ATTRIBUTE_INDEX(200), 3, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ - { 0x0006, \ + { 0x00000006, \ ZAP_ATTRIBUTE_INDEX(203), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ - { 0x0008, \ + { 0x00000008, \ ZAP_ATTRIBUTE_INDEX(205), \ 16, \ 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 2, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(221), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(221), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(226), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050B, ZAP_ATTRIBUTE_INDEX(226), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Audio Output (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(229), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(229), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Descriptor (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(234), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000506, ZAP_ATTRIBUTE_INDEX(234), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Media Playback (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(242), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050A, ZAP_ATTRIBUTE_INDEX(242), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Content Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(245), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050D, ZAP_ATTRIBUTE_INDEX(245), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(254), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050E, ZAP_ATTRIBUTE_INDEX(254), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Account Login (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(255), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(255), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Descriptor (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(260), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050A, ZAP_ATTRIBUTE_INDEX(260), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Content Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(263), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050D, ZAP_ATTRIBUTE_INDEX(263), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Application Basic (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(272), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(272), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Descriptor (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(277), 8, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050D, ZAP_ATTRIBUTE_INDEX(277), 8, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Application Basic (server) */ \ } diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index ae9ba4770789a2..40e6a557093dd6 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -881,576 +881,592 @@ { \ \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Binding (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Basic (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* InteractionModelVersion */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x0002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_SIMPLE_DEFAULT(1) }, /* InteractionModelVersion */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ + { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* Location */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0) }, /* HardwareVersion */ \ - { 0x0008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ - { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ - { 0x000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_LONG_DEFAULTS_INDEX(4) }, /* ManufacturingDate */ \ - { 0x000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ - { 0x000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ - { 0x000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ - { 0x000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ - { 0x0010, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* LocalConfigDisabled */ \ - { 0x0011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ - { 0x0012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0) }, /* HardwareVersion */ \ + { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ + { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ + { 0x0000000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_LONG_DEFAULTS_INDEX(4) }, /* ManufacturingDate */ \ + { 0x0000000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ + { 0x0000000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ + { 0x0000000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ + { 0x0000000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ + { 0x00000010, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* LocalConfigDisabled */ \ + { 0x00000011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ + { 0x00000012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(21) }, /* Breadcrumb */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(29) }, /* BasicCommissioningInfoList */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x0003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(283) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(21) }, /* Breadcrumb */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(29) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(283) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(287) }, /* Networks */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ - { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ - { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(299) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(303) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(287) }, /* Networks */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ + { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ + { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(299) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(303) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(307) }, /* UpTime */ \ - { 0x0003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* TotalOperationalHours */ \ - { 0x0004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ - { 0x0005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ - { 0x0006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(307) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ + { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(319) }, /* CurrentHeapFree */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(327) }, /* CurrentHeapUsed */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(335) }, /* CurrentHeapHighWatermark */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(343) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(319) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(327) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(335) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(343) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x0002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* NetworkName */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(349) }, /* ExtendedPanId */ \ - { 0x0005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(357) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ - { 0x0008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(365) }, /* PartitionId */ \ - { 0x000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ - { 0x000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ - { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ - { 0x000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ - { 0x000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ - { 0x000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ - { 0x0010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ - { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ - { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ - { 0x0015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x0016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(369) }, /* TxTotalCount */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(373) }, /* TxUnicastCount */ \ - { 0x0018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(377) }, /* TxBroadcastCount */ \ - { 0x0019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(381) }, /* TxAckRequestedCount */ \ - { 0x001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(385) }, /* TxAckedCount */ \ - { 0x001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(389) }, /* TxNoAckRequestedCount */ \ - { 0x001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(393) }, /* TxDataCount */ \ - { 0x001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(397) }, /* TxDataPollCount */ \ - { 0x001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(401) }, /* TxBeaconCount */ \ - { 0x001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(405) }, /* TxBeaconRequestCount */ \ - { 0x0020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(409) }, /* TxOtherCount */ \ - { 0x0021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(413) }, /* TxRetryCount */ \ - { 0x0022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(417) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(421) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x0024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(425) }, /* TxErrCcaCount */ \ - { 0x0025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(429) }, /* TxErrAbortCount */ \ - { 0x0026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(433) }, /* TxErrBusyChannelCount */ \ - { 0x0027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(437) }, /* RxTotalCount */ \ - { 0x0028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(441) }, /* RxUnicastCount */ \ - { 0x0029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(445) }, /* RxBroadcastCount */ \ - { 0x002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(449) }, /* RxDataCount */ \ - { 0x002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(453) }, /* RxDataPollCount */ \ - { 0x002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(457) }, /* RxBeaconCount */ \ - { 0x002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(461) }, /* RxBeaconRequestCount */ \ - { 0x002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(465) }, /* RxOtherCount */ \ - { 0x002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(469) }, /* RxAddressFilteredCount */ \ - { 0x0030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(473) }, /* RxDestAddrFilteredCount */ \ - { 0x0031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(477) }, /* RxDuplicatedCount */ \ - { 0x0032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(481) }, /* RxErrNoFrameCount */ \ - { 0x0033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(485) }, /* RxErrUnknownNeighborCount */ \ - { 0x0034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(489) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x0035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(493) }, /* RxErrSecCount */ \ - { 0x0036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(497) }, /* RxErrFcsCount */ \ - { 0x0037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(501) }, /* RxErrOtherCount */ \ - { 0x0038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(505) }, /* ActiveTimestamp */ \ - { 0x0039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(513) }, /* PendingTimestamp */ \ - { 0x003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(521) }, /* delay */ \ - { 0x003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(525) }, /* ChannelMask */ \ - { 0x003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* NetworkName */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(349) }, /* ExtendedPanId */ \ + { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(357) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ + { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(365) }, /* PartitionId */ \ + { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ + { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ + { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ + { 0x0000000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ + { 0x0000000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ + { 0x0000000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ + { 0x00000010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ + { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ + { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ + { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(369) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(373) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(377) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(381) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(385) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(389) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(393) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(397) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(401) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(405) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(409) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(413) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(417) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(421) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(425) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(429) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(433) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(437) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(441) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(445) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(449) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(453) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(457) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(461) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(465) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(469) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(473) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(477) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(481) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(485) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(489) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(493) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(497) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(501) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(505) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(513) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(521) }, /* delay */ \ + { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(525) }, /* ChannelMask */ \ + { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ - { 0x003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(532) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(532) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ - { 0x0004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x0005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(536) }, /* BeaconLostCount */ \ - { 0x0006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(540) }, /* BeaconRxCount */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(544) }, /* PacketMulticastRxCount */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(548) }, /* PacketMulticastTxCount */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(552) }, /* PacketUnicastRxCount */ \ - { 0x000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(556) }, /* PacketUnicastTxCount */ \ - { 0x000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(560) }, /* CurrentMaxRate */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(568) }, /* OverrunCount */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(576) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ + { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(536) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(540) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(544) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(548) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(552) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(556) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(560) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(568) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(576) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x0001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(580) }, /* PacketRxCount */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(588) }, /* PacketTxCount */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(596) }, /* TxErrCount */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(604) }, /* CollisionCount */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(612) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x0008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(620) }, /* TimeSinceReset */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(628) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(580) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(588) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(596) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(604) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(612) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(620) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(628) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ - { 0x0001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ - { 0x0002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ + { 0x00000001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ + { 0x00000002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ - { 0x0004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ + { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x0005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(632) }, /* groupKeyMap */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(886) }, /* groupTable */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(632) }, /* groupKeyMap */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(886) }, /* groupTable */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: User Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* measured value */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* min measured value */ \ - { 0x0002, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* max measured value */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* measured value */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* min measured value */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* max measured value */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Groups (server) */ \ - { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Scenes (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene count */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current scene */ \ - { 0x0002, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current group */ \ - { 0x0003, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene valid */ \ - { 0x0004, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene count */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current scene */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current group */ \ + { 0x00000003, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene valid */ \ + { 0x00000004, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/Off (server) */ \ - { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ - { 0x4000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* GlobalSceneControl */ \ - { 0x4001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OnTime */ \ - { 0x4002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OffWaitTime */ \ - { 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1140) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ + { 0x00004000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* GlobalSceneControl */ \ + { 0x00004001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OnTime */ \ + { 0x00004002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OffWaitTime */ \ + { 0x00004003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1140) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x00000005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x00000006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x0000000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* options */ \ - { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ - { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ - { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, \ + { 0x00004000, ZAP_TYPE(INT8U), 1, \ ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ - { 0x0051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* out of service */ \ - { 0x0055, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* present value */ \ - { 0x006F, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* status flags */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* out of service */ \ + { 0x00000055, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* present value */ \ + { 0x0000006F, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* status flags */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binding (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x0002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ - { 0x0008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(1144) }, /* SoftwareVersion */ \ - { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ - { 0x000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ManufacturingDate */ \ - { 0x000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ - { 0x000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ - { 0x000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ - { 0x000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ - { 0x0011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* Reachable */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ + { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ + { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_LONG_DEFAULTS_INDEX(1144) }, /* SoftwareVersion */ \ + { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ + { 0x0000000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ManufacturingDate */ \ + { 0x0000000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ + { 0x0000000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ + { 0x0000000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ + { 0x0000000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ + { 0x00000011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* Reachable */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Switch (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* number of positions */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* current position */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* number of positions */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* current position */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1148) }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1148) }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(2) }, /* LockState */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LockType */ \ - { 0x0002, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ActuatorEnabled */ \ - { 0x0003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* DoorState */ \ - { 0x0004, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1402) }, /* DoorOpenEvents */ \ - { 0x0005, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1406) }, /* DoorClosedEvents */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* OpenPeriod */ \ - { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfTotalUsersSupported */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfPINUsersSupported */ \ - { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0) }, /* NumberOfWeekDaySchedulesSupportedPerUser */ \ - { 0x0015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0) }, /* NumberOfYearDaySchedulesSupportedPerUser */ \ - { 0x0016, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0) }, /* NumberOfHolidaySchedulesSupported */ \ - { 0x0017, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MaxPINCodeLength */ \ - { 0x0018, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MinPINCodeLength */ \ - { 0x001B, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* CredentialRulesSupport */ \ - { 0x0021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1410) }, /* Language */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1413) }, /* AutoRelockTime */ \ - { 0x0024, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(2) }, /* LockState */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LockType */ \ + { 0x00000002, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ActuatorEnabled */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* DoorState */ \ + { 0x00000004, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1402) }, /* DoorOpenEvents */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(1406) }, /* DoorClosedEvents */ \ + { 0x00000006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* OpenPeriod */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfTotalUsersSupported */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfPINUsersSupported */ \ + { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0) }, /* NumberOfWeekDaySchedulesSupportedPerUser */ \ + { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0) }, /* NumberOfYearDaySchedulesSupportedPerUser */ \ + { 0x00000016, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0) }, /* NumberOfHolidaySchedulesSupported */ \ + { 0x00000017, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MaxPINCodeLength */ \ + { 0x00000018, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MinPINCodeLength */ \ + { 0x0000001B, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* CredentialRulesSupport */ \ + { 0x00000021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1410) }, /* Language */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1413) }, /* AutoRelockTime */ \ + { 0x00000024, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* SoundVolume */ \ - { 0x0025, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* OperatingMode */ \ - { 0x0026, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFF6) }, /* SupportedOperatingModes */ \ - { 0x0027, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0) }, /* DefaultConfigurationRegister */ \ - { 0x0029, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* EnableOneTouchLocking */ \ - { 0x002A, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* EnableInsideStatusLED */ \ - { 0x002B, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000025, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* OperatingMode */ \ + { 0x00000026, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFF6) }, /* SupportedOperatingModes */ \ + { 0x00000027, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0) }, /* DefaultConfigurationRegister */ \ + { 0x00000029, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x00) }, /* EnableOneTouchLocking */ \ + { 0x0000002A, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* EnableInsideStatusLED */ \ + { 0x0000002B, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x00) }, /* EnablePrivacyModeButton */ \ - { 0x0030, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000030, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* WrongCodeEntryLimit */ \ - { 0x0031, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000031, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* UserCodeTemporaryDisableTime */ \ - { 0x0033, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* RequirePINforRemoteOperation */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000033, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* RequirePINforRemoteOperation */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Type */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionLift */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionTilt */ \ - { 0x0007, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x03) }, /* ConfigStatus */ \ - { 0x0008, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Type */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionLift */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionTilt */ \ + { 0x00000007, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x03) }, /* ConfigStatus */ \ + { 0x00000008, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionLiftPercentage */ \ - { 0x0009, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercentage */ \ - { 0x000A, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationalStatus */ \ - { 0x000B, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000009, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercentage */ \ + { 0x0000000A, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationalStatus */ \ + { 0x0000000B, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0xFF) }, /* TargetPositionLiftPercent100ths */ \ - { 0x000C, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* TargetPositionTiltPercent100ths */ \ - { 0x000D, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* EndProductType */ \ - { 0x000E, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x0000000C, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* TargetPositionTiltPercent100ths */ \ + { 0x0000000D, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* EndProductType */ \ + { 0x0000000E, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionLiftPercent100ths */ \ - { 0x000F, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercent100ths */ \ - { 0x0010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitLift */ \ - { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ - { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* Mode */ \ - { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000000F, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercent100ths */ \ + { 0x00000010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitLift */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ + { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ + { 0x00000017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* Mode */ \ + { 0x0000001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier moving state */ \ - { 0x0002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* barrier safety status */ \ - { 0x0003, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier capabilities */ \ - { 0x000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier position */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier moving state */ \ + { 0x00000002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* barrier safety status */ \ + { 0x00000003, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier capabilities */ \ + { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier position */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ - { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* local temperature */ \ - { 0x0011, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* local temperature */ \ + { 0x00000011, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x0A28) }, /* occupied cooling setpoint */ \ - { 0x0012, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000012, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x07D0) }, /* occupied heating setpoint */ \ - { 0x001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x0000001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* control sequence of operation */ \ - { 0x001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* system mode */ \ - { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ - { 0x0021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ - { 0x0022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1417) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* system mode */ \ + { 0x00000020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ + { 0x00000021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ + { 0x00000022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1417) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Color Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current hue */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current saturation */ \ - { 0x0002, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x616B) }, /* current x */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x607D) }, /* current y */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* drift compensation */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 255, 0, ZAP_EMPTY_DEFAULT() }, /* compensation text */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x00FA) }, /* color temperature */ \ - { 0x0008, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* color mode */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* color control options */ \ - { 0x0010, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* number of primaries */ \ - { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 1 x */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 1 y */ \ - { 0x0013, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 1 intensity */ \ - { 0x0015, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 2 x */ \ - { 0x0016, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 2 y */ \ - { 0x0017, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 2 intensity */ \ - { 0x0019, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 3 x */ \ - { 0x001A, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 3 y */ \ - { 0x001B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 3 intensity */ \ - { 0x0020, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 4 x */ \ - { 0x0021, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 4 y */ \ - { 0x0022, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 4 intensity */ \ - { 0x0024, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 5 x */ \ - { 0x0025, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 5 y */ \ - { 0x0026, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 5 intensity */ \ - { 0x0028, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 x */ \ - { 0x0029, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 y */ \ - { 0x002A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 intensity */ \ - { 0x0030, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current hue */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current saturation */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x616B) }, /* current x */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x607D) }, /* current y */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* drift compensation */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 255, 0, ZAP_EMPTY_DEFAULT() }, /* compensation text */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x00FA) }, /* color temperature */ \ + { 0x00000008, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* color mode */ \ + { 0x0000000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x00) }, /* color control options */ \ + { 0x00000010, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* number of primaries */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 1 x */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 1 y */ \ + { 0x00000013, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 1 intensity */ \ + { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 2 x */ \ + { 0x00000016, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 2 y */ \ + { 0x00000017, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 2 intensity */ \ + { 0x00000019, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 3 x */ \ + { 0x0000001A, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 3 y */ \ + { 0x0000001B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 3 intensity */ \ + { 0x00000020, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 4 x */ \ + { 0x00000021, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 4 y */ \ + { 0x00000022, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 4 intensity */ \ + { 0x00000024, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 5 x */ \ + { 0x00000025, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 5 y */ \ + { 0x00000026, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 5 intensity */ \ + { 0x00000028, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 x */ \ + { 0x00000029, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 y */ \ + { 0x0000002A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 intensity */ \ + { 0x00000030, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* white point x */ \ - { 0x0031, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000031, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* white point y */ \ - { 0x0032, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000032, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(12) }, /* color point r x */ \ - { 0x0033, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(13) }, /* color point r y */ \ - { 0x0034, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r intensity */ \ - { 0x0036, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000033, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(13) }, /* color point r y */ \ + { 0x00000034, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r intensity */ \ + { 0x00000036, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(14) }, /* color point g x */ \ - { 0x0037, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(15) }, /* color point g y */ \ - { 0x0038, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g intensity */ \ - { 0x003A, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000037, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(15) }, /* color point g y */ \ + { 0x00000038, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g intensity */ \ + { 0x0000003A, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(16) }, /* color point b x */ \ - { 0x003B, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(17) }, /* color point b y */ \ - { 0x003C, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b intensity */ \ - { 0x4000, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* enhanced current hue */ \ - { 0x4001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* enhanced color mode */ \ - { 0x4002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop active */ \ - { 0x4003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop direction */ \ - { 0x4004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0019) }, /* color loop time */ \ - { 0x400A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color capabilities */ \ - { 0x400B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color temp physical min */ \ - { 0x400C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFEFF) }, /* color temp physical max */ \ - { 0x400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ - { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(18) }, /* start up color temperature mireds */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0000003B, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(17) }, /* color point b y */ \ + { 0x0000003C, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b intensity */ \ + { 0x00004000, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* enhanced current hue */ \ + { 0x00004001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* enhanced color mode */ \ + { 0x00004002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop active */ \ + { 0x00004003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop direction */ \ + { 0x00004004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0019) }, /* color loop time */ \ + { 0x0000400A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color capabilities */ \ + { 0x0000400B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color temp physical min */ \ + { 0x0000400C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFEFF) }, /* color temp physical max */ \ + { 0x0000400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ + { 0x00004010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(18) }, /* start up color temperature mireds */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ - { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MeasuredValue */ \ - { 0x0001, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MinMeasuredValue */ \ - { 0x0002, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MaxMeasuredValue */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MeasuredValue */ \ + { 0x00000001, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MinMeasuredValue */ \ + { 0x00000002, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* MaxMeasuredValue */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ - { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* MeasuredValue */ \ - { 0x0001, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinMeasuredValue */ \ - { 0x0002, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxMeasuredValue */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* MeasuredValue */ \ + { 0x00000001, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinMeasuredValue */ \ + { 0x00000002, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxMeasuredValue */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ - { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MeasuredValue */ \ - { 0x0001, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinMeasuredValue */ \ - { 0x0002, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxMeasuredValue */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MeasuredValue */ \ + { 0x00000001, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinMeasuredValue */ \ + { 0x00000002, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxMeasuredValue */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* measured value */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* min measured value */ \ - { 0x0002, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* max measured value */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* measured value */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* min measured value */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* max measured value */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: IAS Zone (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* zone state */ \ - { 0x0001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* zone type */ \ - { 0x0002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* zone status */ \ - { 0x0010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1421) }, /* IAS CIE address */ \ - { 0x0011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* Zone ID */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* zone state */ \ + { 0x00000001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* zone type */ \ + { 0x00000002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* zone status */ \ + { 0x00000010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(1421) }, /* IAS CIE address */ \ + { 0x00000011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* Zone ID */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ - { 0x0000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* wake on lan mac address */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* wake on lan mac address */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Channel (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Playback (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Input (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Keypad Input (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Content Launcher (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Audio Output (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Launcher (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Basic (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Account Login (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Test Cluster (server) */ \ - { 0x0000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) }, /* boolean */ \ - { 0x0001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap8 */ \ - { 0x0002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap16 */ \ - { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1429) }, /* bitmap32 */ \ - { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1433) }, /* bitmap64 */ \ - { 0x0005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8u */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16u */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1441) }, /* int32u */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1445) }, /* int64u */ \ - { 0x000D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8s */ \ - { 0x000E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16s */ \ - { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1453) }, /* int32s */ \ - { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1457) }, /* int64s */ \ - { 0x0015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum8 */ \ - { 0x0016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum16 */ \ - { 0x0019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* octet_string */ \ - { 0x001A, ZAP_TYPE(ARRAY), 10, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1465) }, /* list_int8u */ \ - { 0x001B, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1475) }, /* list_octet_string */ \ - { 0x001C, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) }, /* boolean */ \ + { 0x00000001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap8 */ \ + { 0x00000002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap16 */ \ + { 0x00000003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1429) }, /* bitmap32 */ \ + { 0x00000004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1433) }, /* bitmap64 */ \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8u */ \ + { 0x00000006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16u */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1441) }, /* int32u */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1445) }, /* int64u */ \ + { 0x0000000D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8s */ \ + { 0x0000000E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16s */ \ + { 0x00000010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1453) }, /* int32s */ \ + { 0x00000014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1457) }, /* int64s */ \ + { 0x00000015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum8 */ \ + { 0x00000016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum16 */ \ + { 0x00000019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* octet_string */ \ + { 0x0000001A, ZAP_TYPE(ARRAY), 10, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1465) }, /* list_int8u */ \ + { 0x0000001B, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(1475) }, /* list_octet_string */ \ + { 0x0000001C, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_LONG_DEFAULTS_INDEX(1729) }, /* list_struct_octet_string */ \ - { 0x001D, ZAP_TYPE(LONG_OCTET_STRING), 1002, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* long_octet_string */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000001D, ZAP_TYPE(LONG_OCTET_STRING), 1002, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* long_octet_string */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: On/Off (server) */ \ - { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Occupancy Sensing (server) */ \ - { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy sensor type */ \ - { 0x0002, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy sensor type bitmap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy sensor type */ \ + { 0x00000002, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* occupancy sensor type bitmap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -1500,111 +1516,115 @@ #define GENERATED_CLUSTER_COUNT 55 #define GENERATED_CLUSTERS \ { \ - { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x001E, ZAP_ATTRIBUTE_INDEX(5), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Binding (server) */ \ - { 0x0028, \ + { \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ + { \ + 0x0000001E, ZAP_ATTRIBUTE_INDEX(5), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Binding (server) */ \ + { 0x00000028, \ ZAP_ATTRIBUTE_INDEX(6), \ 20, \ 687, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x0029, ZAP_ATTRIBUTE_INDEX(26), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000029, ZAP_ATTRIBUTE_INDEX(26), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(27), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002B, ZAP_ATTRIBUTE_INDEX(27), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(29), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(29), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(35), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(35), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(45), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000032, ZAP_ATTRIBUTE_INDEX(45), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(45), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000033, ZAP_ATTRIBUTE_INDEX(45), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(54), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000034, ZAP_ATTRIBUTE_INDEX(54), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(60), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000035, ZAP_ATTRIBUTE_INDEX(60), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(125), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000036, ZAP_ATTRIBUTE_INDEX(125), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(140), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000037, ZAP_ATTRIBUTE_INDEX(140), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(151), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003C, ZAP_ATTRIBUTE_INDEX(151), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(155), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(155), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x003F, ZAP_ATTRIBUTE_INDEX(161), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003F, ZAP_ATTRIBUTE_INDEX(161), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(164), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(164), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(166), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(166), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(168), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000405, ZAP_ATTRIBUTE_INDEX(168), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ - { 0x0003, \ + { 0x00000003, \ ZAP_ATTRIBUTE_INDEX(172), \ 2, \ 4, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0004, \ + { 0x00000004, \ ZAP_ATTRIBUTE_INDEX(174), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 1, Cluster: Groups (server) */ \ - { 0x0005, \ + { 0x00000005, \ ZAP_ATTRIBUTE_INDEX(176), \ 6, \ 8, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayScenesServer }, /* Endpoint: 1, Cluster: Scenes (server) */ \ - { 0x0006, \ + { 0x00000006, \ ZAP_ATTRIBUTE_INDEX(182), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ - { 0x0008, \ + { 0x00000008, \ ZAP_ATTRIBUTE_INDEX(189), \ 15, \ 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x000F, ZAP_ATTRIBUTE_INDEX(204), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000000F, ZAP_ATTRIBUTE_INDEX(204), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(208), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(208), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x001E, ZAP_ATTRIBUTE_INDEX(213), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001E, ZAP_ATTRIBUTE_INDEX(213), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(214), 15, 646, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000039, ZAP_ATTRIBUTE_INDEX(214), 15, 646, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(229), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003B, ZAP_ATTRIBUTE_INDEX(229), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(232), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(232), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ - { 0x0101, \ + { 0x00000101, \ ZAP_ATTRIBUTE_INDEX(234), \ 28, \ 49, \ @@ -1612,36 +1632,36 @@ ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(262), 19, 31, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000102, ZAP_ATTRIBUTE_INDEX(262), 19, 31, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(281), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000103, ZAP_ATTRIBUTE_INDEX(281), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ - { 0x0201, \ + { 0x00000201, \ ZAP_ATTRIBUTE_INDEX(286), \ 10, \ 17, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayThermostatServer }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ - { 0x0300, \ + { 0x00000300, \ ZAP_ATTRIBUTE_INDEX(296), \ 51, \ 337, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(347), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(347), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(351), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000403, ZAP_ATTRIBUTE_INDEX(351), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(355), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000404, ZAP_ATTRIBUTE_INDEX(355), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(359), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000405, ZAP_ATTRIBUTE_INDEX(359), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ - { 0x0500, \ + { 0x00000500, \ ZAP_ATTRIBUTE_INDEX(363), \ 6, \ 16, \ @@ -1649,51 +1669,51 @@ ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ chipFuncArrayIasZoneServer }, /* Endpoint: 1, Cluster: IAS Zone (server) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(369), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000503, ZAP_ATTRIBUTE_INDEX(369), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(371), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000504, ZAP_ATTRIBUTE_INDEX(371), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Channel (client) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(372), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000505, ZAP_ATTRIBUTE_INDEX(372), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (client) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(373), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000506, ZAP_ATTRIBUTE_INDEX(373), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (client) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(374), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000507, ZAP_ATTRIBUTE_INDEX(374), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Input (client) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(375), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000509, ZAP_ATTRIBUTE_INDEX(375), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (client) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(376), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000050A, ZAP_ATTRIBUTE_INDEX(376), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (client) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(377), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000050B, ZAP_ATTRIBUTE_INDEX(377), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (client) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(378), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000050C, ZAP_ATTRIBUTE_INDEX(378), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (client) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(379), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000050D, ZAP_ATTRIBUTE_INDEX(379), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (client) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(380), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000050E, ZAP_ATTRIBUTE_INDEX(380), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Account Login (client) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(381), 21, 1582, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050F, ZAP_ATTRIBUTE_INDEX(381), 21, 1582, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ - { 0x0006, \ + { 0x00000006, \ ZAP_ATTRIBUTE_INDEX(402), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(404), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(404), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ - { 0x0406, \ + { 0x00000406, \ ZAP_ATTRIBUTE_INDEX(409), \ 4, \ 5, \ diff --git a/zzz_generated/window-app/zap-generated/endpoint_config.h b/zzz_generated/window-app/zap-generated/endpoint_config.h index e36c17de0d151d..02a0ad09110f03 100644 --- a/zzz_generated/window-app/zap-generated/endpoint_config.h +++ b/zzz_generated/window-app/zap-generated/endpoint_config.h @@ -614,294 +614,305 @@ { \ \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Basic (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* InteractionModelVersion */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x0002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* InteractionModelVersion */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ + { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* Location */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ - { 0x0008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ - { 0x000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ - { 0x000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ManufacturingDate */ \ - { 0x000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ - { 0x000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ - { 0x000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ - { 0x000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ - { 0x0010, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* LocalConfigDisabled */ \ - { 0x0011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* Location */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ + { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* SoftwareVersion */ \ + { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ + { 0x0000000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ManufacturingDate */ \ + { 0x0000000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ + { 0x0000000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ + { 0x0000000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ + { 0x0000000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ + { 0x00000010, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0) }, /* LocalConfigDisabled */ \ + { 0x00000011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ - { 0x0001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ActiveLocale */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ \ /* Endpoint: 0, Cluster: Power Source (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Status */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Order */ \ - { 0x0002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* Description */ \ - { 0x000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4) }, /* BatteryVoltage */ \ - { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryPercentRemaining */ \ - { 0x000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(8) }, /* BatteryTimeRemaining */ \ - { 0x000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ - { 0x0012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* ActiveBatteryFaults */ \ - { 0x001A, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeState */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(20) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Status */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Order */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* Description */ \ + { 0x0000000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4) }, /* BatteryVoltage */ \ + { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryPercentRemaining */ \ + { 0x0000000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(8) }, /* BatteryTimeRemaining */ \ + { 0x0000000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ + { 0x00000012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* ActiveBatteryFaults */ \ + { 0x0000001A, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeState */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(20) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(24) }, /* Breadcrumb */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(32) }, /* BasicCommissioningInfoList */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x0003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(24) }, /* Breadcrumb */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(32) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(290) }, /* Networks */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ - { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ - { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(302) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(306) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(290) }, /* Networks */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ + { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ + { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(302) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(306) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(310) }, /* UpTime */ \ - { 0x0003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(318) }, /* TotalOperationalHours */ \ - { 0x0004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ - { 0x0005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ - { 0x0006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(310) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(318) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ + { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(322) }, /* CurrentHeapFree */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(330) }, /* CurrentHeapUsed */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(338) }, /* CurrentHeapHighWatermark */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(346) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(322) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(330) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(338) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(346) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x0002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(350) }, /* NetworkName */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* ExtendedPanId */ \ - { 0x0005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(360) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ - { 0x0008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(368) }, /* PartitionId */ \ - { 0x000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ - { 0x000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ - { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ - { 0x000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ - { 0x000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ - { 0x000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ - { 0x0010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ - { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ - { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ - { 0x0015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x0016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(372) }, /* TxTotalCount */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(376) }, /* TxUnicastCount */ \ - { 0x0018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(380) }, /* TxBroadcastCount */ \ - { 0x0019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(384) }, /* TxAckRequestedCount */ \ - { 0x001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(388) }, /* TxAckedCount */ \ - { 0x001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(392) }, /* TxNoAckRequestedCount */ \ - { 0x001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(396) }, /* TxDataCount */ \ - { 0x001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(400) }, /* TxDataPollCount */ \ - { 0x001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(404) }, /* TxBeaconCount */ \ - { 0x001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(408) }, /* TxBeaconRequestCount */ \ - { 0x0020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(412) }, /* TxOtherCount */ \ - { 0x0021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(416) }, /* TxRetryCount */ \ - { 0x0022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(420) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(424) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x0024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(428) }, /* TxErrCcaCount */ \ - { 0x0025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(432) }, /* TxErrAbortCount */ \ - { 0x0026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(436) }, /* TxErrBusyChannelCount */ \ - { 0x0027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(440) }, /* RxTotalCount */ \ - { 0x0028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(444) }, /* RxUnicastCount */ \ - { 0x0029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(448) }, /* RxBroadcastCount */ \ - { 0x002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(452) }, /* RxDataCount */ \ - { 0x002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(456) }, /* RxDataPollCount */ \ - { 0x002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(460) }, /* RxBeaconCount */ \ - { 0x002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(464) }, /* RxBeaconRequestCount */ \ - { 0x002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(468) }, /* RxOtherCount */ \ - { 0x002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(472) }, /* RxAddressFilteredCount */ \ - { 0x0030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(476) }, /* RxDestAddrFilteredCount */ \ - { 0x0031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(480) }, /* RxDuplicatedCount */ \ - { 0x0032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(484) }, /* RxErrNoFrameCount */ \ - { 0x0033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(488) }, /* RxErrUnknownNeighborCount */ \ - { 0x0034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(492) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x0035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(496) }, /* RxErrSecCount */ \ - { 0x0036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(500) }, /* RxErrFcsCount */ \ - { 0x0037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(504) }, /* RxErrOtherCount */ \ - { 0x0038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(508) }, /* ActiveTimestamp */ \ - { 0x0039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(516) }, /* PendingTimestamp */ \ - { 0x003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(524) }, /* delay */ \ - { 0x003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(528) }, /* ChannelMask */ \ - { 0x003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(350) }, /* NetworkName */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* ExtendedPanId */ \ + { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(360) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ + { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(368) }, /* PartitionId */ \ + { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ + { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ + { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ + { 0x0000000D, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LeaderRouterId */ \ + { 0x0000000E, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* DetachedRoleCount */ \ + { 0x0000000F, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChildRoleCount */ \ + { 0x00000010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RouterRoleCount */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* LeaderRoleCount */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* AttachAttemptCount */ \ + { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ + { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ + { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(372) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(376) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(380) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(384) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(388) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(392) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(396) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(400) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(404) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(408) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(412) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(416) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(420) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(424) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(428) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(432) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(436) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(440) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(444) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(448) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(452) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(456) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(460) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(464) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(468) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(472) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(476) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(480) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(484) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(488) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(492) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(496) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(500) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(504) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(508) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(516) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(524) }, /* delay */ \ + { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(528) }, /* ChannelMask */ \ + { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ - { 0x003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(535) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(535) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ - { 0x0004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x0005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(539) }, /* BeaconLostCount */ \ - { 0x0006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(543) }, /* BeaconRxCount */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(547) }, /* PacketMulticastRxCount */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(551) }, /* PacketMulticastTxCount */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(555) }, /* PacketUnicastRxCount */ \ - { 0x000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(559) }, /* PacketUnicastTxCount */ \ - { 0x000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(563) }, /* CurrentMaxRate */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(571) }, /* OverrunCount */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(579) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ + { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(539) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(543) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(547) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(551) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(555) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(559) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(563) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(571) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(579) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x0001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(583) }, /* PacketRxCount */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(591) }, /* PacketTxCount */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(599) }, /* TxErrCount */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(607) }, /* CollisionCount */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x0008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(623) }, /* TimeSinceReset */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(631) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(583) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(591) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(599) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(607) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(623) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(631) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ - { 0x0001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ - { 0x0002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* WindowStatus */ \ + { 0x00000001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* AdminFabricIndex */ \ + { 0x00000002, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* AdminVendorId */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ - { 0x0004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ + { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x0005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: User Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Type */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionLift */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionTilt */ \ - { 0x0007, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x03) }, /* ConfigStatus */ \ - { 0x0008, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Type */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionLift */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionTilt */ \ + { 0x00000007, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x03) }, /* ConfigStatus */ \ + { 0x00000008, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionLiftPercentage */ \ - { 0x0009, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercentage */ \ - { 0x000A, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationalStatus */ \ - { 0x000B, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000009, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercentage */ \ + { 0x0000000A, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationalStatus */ \ + { 0x0000000B, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0xFF) }, /* TargetPositionLiftPercent100ths */ \ - { 0x000C, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_SIMPLE_DEFAULT(0xFF) }, /* TargetPositionTiltPercent100ths */ \ - { 0x000D, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* EndProductType */ \ - { 0x000E, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x0000000C, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* TargetPositionTiltPercent100ths */ \ + { 0x0000000D, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* EndProductType */ \ + { 0x0000000E, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionLiftPercent100ths */ \ - { 0x000F, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercent100ths */ \ - { 0x0010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitLift */ \ - { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ - { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* Mode */ \ - { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* SafetyStatus */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(635) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + { 0x0000000F, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercent100ths */ \ + { 0x00000010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitLift */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ + { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ + { 0x00000017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* Mode */ \ + { 0x0000001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* SafetyStatus */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(635) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Window Covering (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Type */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionLift */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionTilt */ \ - { 0x0007, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x03) }, /* ConfigStatus */ \ - { 0x0008, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Type */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionLift */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentPositionTilt */ \ + { 0x00000007, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x03) }, /* ConfigStatus */ \ + { 0x00000008, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionLiftPercentage */ \ - { 0x0009, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercentage */ \ - { 0x000A, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationalStatus */ \ - { 0x000B, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x00000009, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercentage */ \ + { 0x0000000A, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationalStatus */ \ + { 0x0000000B, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0xFF) }, /* TargetPositionLiftPercent100ths */ \ - { 0x000C, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_SIMPLE_DEFAULT(0xFF) }, /* TargetPositionTiltPercent100ths */ \ - { 0x000D, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* EndProductType */ \ - { 0x000E, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + { 0x0000000C, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* TargetPositionTiltPercent100ths */ \ + { 0x0000000D, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* EndProductType */ \ + { 0x0000000E, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionLiftPercent100ths */ \ - { 0x000F, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercent100ths */ \ - { 0x0010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitLift */ \ - { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ - { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* Mode */ \ - { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* SafetyStatus */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(639) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + { 0x0000000F, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFF) }, /* CurrentPositionTiltPercent100ths */ \ + { 0x00000010, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitLift */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ + { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ + { 0x00000017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* Mode */ \ + { 0x0000001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* SafetyStatus */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(639) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -921,69 +932,71 @@ #define GENERATED_CLUSTER_COUNT 20 #define GENERATED_CLUSTERS \ { \ - { 0x001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x0028, \ + { \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(0), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Descriptor (server) */ \ + { 0x00000028, \ ZAP_ATTRIBUTE_INDEX(5), \ 19, \ 654, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(24), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002B, ZAP_ATTRIBUTE_INDEX(24), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(26), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002F, ZAP_ATTRIBUTE_INDEX(26), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Power Source (server) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(37), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(37), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(43), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(43), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(53), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000033, ZAP_ATTRIBUTE_INDEX(53), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(62), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000034, ZAP_ATTRIBUTE_INDEX(62), 6, 30, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(68), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000035, ZAP_ATTRIBUTE_INDEX(68), 65, 247, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(133), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000036, ZAP_ATTRIBUTE_INDEX(133), 15, 58, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(148), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000037, ZAP_ATTRIBUTE_INDEX(148), 11, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(159), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003C, ZAP_ATTRIBUTE_INDEX(159), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(163), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(163), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(169), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(169), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(171), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(171), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ - { 0x0003, \ + { 0x00000003, \ ZAP_ATTRIBUTE_INDEX(173), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(176), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(176), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(181), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000102, ZAP_ATTRIBUTE_INDEX(181), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(201), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(201), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(206), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000102, ZAP_ATTRIBUTE_INDEX(206), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Window Covering (server) */ \ } From ffd25d85468375e7442385a53e1627d95cbd31b2 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Wed, 19 Jan 2022 14:07:12 -0500 Subject: [PATCH 065/124] Fix sizing on thread data set (#13662) --- src/controller/AutoCommissioner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller/AutoCommissioner.cpp b/src/controller/AutoCommissioner.cpp index 78daa9e8218966..8c86730d8bddde 100644 --- a/src/controller/AutoCommissioner.cpp +++ b/src/controller/AutoCommissioner.cpp @@ -29,7 +29,7 @@ CHIP_ERROR AutoCommissioner::SetCommissioningParameters(const CommissioningParam if (params.HasThreadOperationalDataset()) { ByteSpan dataset = params.GetThreadOperationalDataset().Value(); - if (dataset.size() > CommissioningParameters::kMaxCredentialsLen) + if (dataset.size() > CommissioningParameters::kMaxThreadDatasetLen) { return CHIP_ERROR_INVALID_ARGUMENT; } From 79983840d9bff084b77e6103c451aa7b8ff2a208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Wed, 19 Jan 2022 22:00:09 +0100 Subject: [PATCH 066/124] [ota] After-merge review comments to ota_image_tool.py (#13706) * [ota] After-merge review comments to ota_image_tool.py Address code-review comments added after mergin the previous PR. * Apply suggestions from code review Co-authored-by: Tennessee Carmel-Veilleux Co-authored-by: Tennessee Carmel-Veilleux --- src/app/ota_image_tool.py | 54 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 4 deletions(-) diff --git a/src/app/ota_image_tool.py b/src/app/ota_image_tool.py index 45fbe6bac9dddb..7e14ed19c97759 100755 --- a/src/app/ota_image_tool.py +++ b/src/app/ota_image_tool.py @@ -60,6 +60,8 @@ DIGEST_ALL_ALGORITHMS = hashlib.algorithms_available.intersection( DIGEST_ALGORITHM_ID.keys()) +# Buffer size used for file reads to ensure large files do not need to be loaded +# into memory fully before processing. PAYLOAD_BUFFER_SIZE = 16 * 1024 @@ -76,6 +78,46 @@ class HeaderTag(IntEnum): DIGEST = 9 +def warn(message: str): + sys.stderr.write(f'warning: {message}\n') + + +def error(message: str): + sys.stderr.write(f'error: {message}\n') + sys.exit(1) + + +def validate_header_attributes(args: object): + """ + Validate attributes to be stored in OTA image header + """ + + if args.vendor_id == 0: + error('Vendor ID is zero') + + if args.product_id == 0: + error('Product ID is zero') + + if not 1 <= len(args.version_str) <= 64: + error('Software version string is not of length 1-64') + + if args.min_version is not None and args.min_version >= args.version: + error('Minimum applicable version is greater or equal to software version') + + if args.max_version is not None and args.max_version >= args.version: + error('Maximum applicable version is greater or equal to software version') + + if args.min_version is not None and args.max_version is not None and args.max_version < args.min_version: + error('Minimum applicable version is greater than maximum applicable version') + + if args.release_notes is not None: + if not 1 <= len(args.release_notes) <= 256: + error('Release notes URL must be of length 1-256') + + if not args.release_notes.startswith('https://'): + warn('Release notes URL does not start with "https://"') + + def generate_payload_summary(args: object): """ Calculate total size and hash of all concatenated input payload files @@ -84,6 +126,9 @@ def generate_payload_summary(args: object): total_size = 0 digest = hashlib.new(args.digest_algorithm) + if digest.digest_size < (256 // 8): + warn('Using digest length below 256 bits is not recommended') + for path in args.input_files: with open(path, 'rb') as file: while True: @@ -111,14 +156,14 @@ def generate_header_tlv(args: object, payload_size: int, payload_digest: bytes): HeaderTag.DIGEST: payload_digest, } - if args.min_version: + if args.min_version is not None: fields.update({HeaderTag.MIN_VERSION: uint(args.min_version)}) - if args.max_version: + if args.max_version is not None: fields.update({HeaderTag.MAX_VERSION: uint(args.max_version)}) - if args.release_notes: - fields.append({HeaderTag.RELEASE_NOTES_URL: args.release_notes}) + if args.release_notes is not None: + fields.update({HeaderTag.RELEASE_NOTES_URL: args.release_notes}) writer = TLVWriter() writer.put(None, fields) @@ -242,6 +287,7 @@ def any_base_int(s): return int(s, 0) args = parser.parse_args() if args.subcommand == 'create': + validate_header_attributes(args) generate_image(args) elif args.subcommand == 'show': show_header(args) From e3aa71b57b8dcfeac57f3b911840056529b6c1e1 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Wed, 19 Jan 2022 16:50:18 -0500 Subject: [PATCH 067/124] Enable building tracing in chip-tool by default (#13702) * Enable building tracing in chip-tool by default - Tracing now works enough that it's generally useful - Tracing is already gated by command-line args, so not running by default. - This PR enables the build to always include tracing feature enabled in chip-tool since it's generally useful. Testing done: - Unit tests and integration pass with no change - chip-tool now always has --trace_log/--trace_file enabled Issue #11552 * Restyled by prettier-markdown Co-authored-by: Restyled.io --- examples/chip-tool/README.md | 13 ++++--------- examples/chip-tool/args.gni | 1 + 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/examples/chip-tool/README.md b/examples/chip-tool/README.md index b0a8a513e204e9..e39c0859f3c583 100644 --- a/examples/chip-tool/README.md +++ b/examples/chip-tool/README.md @@ -29,21 +29,16 @@ scripts/examples/gn_build_example.sh examples/chip-tool SOME-PATH/ which puts the binary at `SOME-PATH/chip-tool`. -### Building with message tracing +### Using message tracing Message tracing allows capture of the secure messages which can be used for test automation. -``` -gn gen out/with_trace/ --args='import("//with_pw_trace.gni")' -ninja -C out/with_trace chip-tool -``` - -This enables tracing and adds additional flags to chip-tool to control where the -traces should go: +There are additional flags to chip-tool to control where the traces should go: - --trace_file Outputs trace data to the specified file. -- --trace_log Outputs trace data to the chip log stream. +- --trace_log <0/1> Outputs trace data to the console with automation logs if + set to 1 For example: diff --git a/examples/chip-tool/args.gni b/examples/chip-tool/args.gni index a76f3e8996ce3c..32852e06139527 100644 --- a/examples/chip-tool/args.gni +++ b/examples/chip-tool/args.gni @@ -15,6 +15,7 @@ import("//build_overrides/chip.gni") import("${chip_root}/config/standalone/args.gni") +import("${chip_root}/examples/chip-tool/with_pw_trace.gni") chip_device_project_config_include = "" chip_project_config_include = "" From bb9ac689e272f2f6138b3c0763d4f7524a206135 Mon Sep 17 00:00:00 2001 From: Michael Sandstedt Date: Wed, 19 Jan 2022 16:02:32 -0600 Subject: [PATCH 068/124] Fix src/lib/support/StateMachine pattern matching (#13664) The Enter method can rewrite the state objects during pattern matching traversal. We need a one-shot bool to ensure we only execute Enter once. And although state changes from Exit, LogTransition and GetName aren't expected, we should check in these too. In all cases, the pattern match should only execute once. This commit adds the necessary check and a test case to verify this is working correctly. --- src/lib/support/StateMachine.h | 32 +++++++----- src/lib/support/tests/TestStateMachine.cpp | 61 ++++++++++++++++++++-- 2 files changed, 77 insertions(+), 16 deletions(-) diff --git a/src/lib/support/StateMachine.h b/src/lib/support/StateMachine.h index b9b5152512e032..7a9e255b440719 100644 --- a/src/lib/support/StateMachine.h +++ b/src/lib/support/StateMachine.h @@ -48,19 +48,21 @@ struct VariantState : Variant private: template - void Enter() + void Enter(bool & ever) { - if (chip::Variant::template Is()) + if (!ever && chip::Variant::template Is()) { + ever = true; chip::Variant::template Get().Enter(); } } template - void Exit() + void Exit(bool & ever) { - if (chip::Variant::template Is()) + if (!ever && chip::Variant::template Is()) { + ever = true; chip::Variant::template Get().Exit(); } } @@ -68,17 +70,18 @@ struct VariantState : Variant template void GetName(const char ** name) { - if (name && chip::Variant::template Is()) + if (name && !*name && chip::Variant::template Is()) { *name = chip::Variant::template Get().GetName(); } } template - void LogTransition(const char * previous) + void LogTransition(bool & ever, const char * previous) { - if (chip::Variant::template Is()) + if (!ever && chip::Variant::template Is()) { + ever = true; chip::Variant::template Get().LogTransition(previous); } } @@ -94,12 +97,14 @@ struct VariantState : Variant void Enter() { - [](...) {}((this->template Enter(), 0)...); + bool ever = false; + [](...) {}((this->template Enter(ever), 0)...); } void Exit() { - [](...) {}((this->template Exit(), 0)...); + bool ever = false; + [](...) {}((this->template Exit(ever), 0)...); } const char * GetName() @@ -111,7 +116,8 @@ struct VariantState : Variant void LogTransition(const char * previous) { - [](...) {}((this->template LogTransition(previous), 0)...); + bool ever = false; + [](...) {}((this->template LogTransition(ever, previous), 0)...); } }; @@ -215,10 +221,10 @@ class StateMachine : public Context auto newState = mTransitions(mCurrentState, evt); if (newState.HasValue()) { - auto oldState = mCurrentState; - oldState.Exit(); + auto oldState = mCurrentState.GetName(); + mCurrentState.Exit(); mCurrentState = newState.Value(); - mCurrentState.LogTransition(oldState.GetName()); + mCurrentState.LogTransition(oldState); // It is impermissible to dispatch events from Exit() or // LogTransition(), or from the transitions table when a transition // has also been returned. Verify that this hasn't occurred. diff --git a/src/lib/support/tests/TestStateMachine.cpp b/src/lib/support/tests/TestStateMachine.cpp index 37433dd64a0b9d..47baef33737049 100644 --- a/src/lib/support/tests/TestStateMachine.cpp +++ b/src/lib/support/tests/TestStateMachine.cpp @@ -34,8 +34,11 @@ struct Event3 struct Event4 { }; +struct Event5 +{ +}; -using Event = chip::Variant; +using Event = chip::Variant; using Context = chip::StateMachine::Context; struct MockState @@ -76,19 +79,32 @@ struct State2 : public BaseState State2(Context & ctx, MockState & mock) : BaseState{ ctx, "State2", mock } {} }; -using State = chip::StateMachine::VariantState; +struct State3 : public BaseState +{ + State3(Context & ctx, MockState & mock) : BaseState{ ctx, "State3", mock } {} + void Enter() + { + BaseState::Enter(); + this->mCtx.Dispatch(Event::Create()); + } +}; + +// Place State3 first in the variant. This can evoke the behavior that +// TestNestedDispatch is looking for. +using State = chip::StateMachine::VariantState; struct StateFactory { Context & mCtx; MockState ms1{ 0, 0, 0, nullptr }; MockState ms2{ 0, 0, 0, nullptr }; + MockState ms3{ 0, 0, 0, nullptr }; StateFactory(Context & ctx) : mCtx(ctx) {} auto CreateState1() { return State::Create(mCtx, ms1); } - auto CreateState2() { return State::Create(mCtx, ms2); } + auto CreateState3() { return State::Create(mCtx, ms3); } }; struct Transitions @@ -120,6 +136,14 @@ struct Transitions // mCtx.Dispatch(Event::Create()); // dsipatching an event and returning a transition would be illegal return mFactory.CreateState1(); } + else if (state.Is() && event.Is()) + { + return mFactory.CreateState3(); + } + else if (state.Is() && event.Is()) + { + return mFactory.CreateState2(); + } else { return {}; @@ -190,6 +214,36 @@ void TestTransitionsDispatch(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, fsm.mStateMachine.GetState().Is()); } +void TestNestedDispatch(nlTestSuite * inSuite, void * inContext) +{ + // in State1 + SimpleStateMachine fsm; + // Dispatch Event5, which places us into State3, which will dispatch + // Event5 again from its Enter method to place us into State2. + fsm.mStateMachine.Dispatch(Event::Create()); + NL_TEST_ASSERT(inSuite, fsm.mStateMachine.GetState().Is()); + // Make sure that Enter methods execute the correct number of times. + // This helps verify that pattern matching is working correctly. + // Specifically, we need to verify this case: State3 creates State2 + // by dispatching Event5 from its Enter method. This means that the + // Dispatch call from State3 also destructs State3. If the State3 + // Enter method pattern matching triggers Enter more than once, this + // is use-after-destruction. What can appear to happen is that the + // State2 Enter method will execute twice, as State2 will already have + // been constructed when the State3 Enter method executes a second + // time. The state machine pattern matching has code to explicitly + // prevent this double-execution. This is testing that. + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms1.mEntered == 0); + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms1.mExited == 1); + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms1.mLogged == 0); + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms2.mEntered == 1); + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms2.mExited == 0); + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms2.mLogged == 1); + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms3.mEntered == 1); + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms3.mExited == 1); + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms3.mLogged == 1); +} + void TestMethodExec(nlTestSuite * inSuite, void * inContext) { // in State1 @@ -237,6 +291,7 @@ static const nlTest sTests[] = { NL_TEST_DEF("TestIgnoredEvents", TestIgnoredEvents), NL_TEST_DEF("TestTransitions", TestTransitions), NL_TEST_DEF("TestTransitionsDispatch", TestTransitionsDispatch), + NL_TEST_DEF("TestNestedDispatch", TestNestedDispatch), NL_TEST_DEF("TestMethodExec", TestMethodExec), NL_TEST_SENTINEL(), }; From d33251b686d58f78011229115673b37d3d6ed28b Mon Sep 17 00:00:00 2001 From: Jerry Johns Date: Wed, 19 Jan 2022 14:04:56 -0800 Subject: [PATCH 069/124] Catch errors retrieving certs (#13724) Problem: We're not catching errors when calling `GetRootPubkey` and `GetTrustedRootId`. This results in failures happening a fair bit later in non-obvious ways in some of the Cirque runs. Fix: Catch the error so that we can at least log where the error is happening in CI. --- .../operational-credentials-server.cpp | 7 +++++-- src/credentials/FabricTable.cpp | 13 +++++++++++-- src/credentials/FabricTable.h | 12 ++++-------- src/protocols/secure_channel/CASESession.cpp | 4 ++-- 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp index b95982e6d2a729..aa4f268b21604c 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -103,8 +103,11 @@ CHIP_ERROR OperationalCredentialsAttrAccess::ReadFabricsList(EndpointId endpoint fabricDescriptor.vendorId = fabricInfo.GetVendorId(); fabricDescriptor.fabricId = fabricInfo.GetFabricId(); - fabricDescriptor.label = fabricInfo.GetFabricLabel(); - fabricDescriptor.rootPublicKey = fabricInfo.GetRootPubkey(); + fabricDescriptor.label = fabricInfo.GetFabricLabel(); + + Credentials::P256PublicKeySpan pubKey; + ReturnErrorOnFailure(fabricInfo.GetRootPubkey(pubKey)); + fabricDescriptor.rootPublicKey = pubKey; ReturnErrorOnFailure(encoder.Encode(fabricDescriptor)); } diff --git a/src/credentials/FabricTable.cpp b/src/credentials/FabricTable.cpp index ae19040827457a..06fb786e4c2467 100644 --- a/src/credentials/FabricTable.cpp +++ b/src/credentials/FabricTable.cpp @@ -192,7 +192,14 @@ CHIP_ERROR FabricInfo::GetCompressedId(FabricId fabricId, NodeId nodeId, PeerId ReturnErrorCodeIf(compressedPeerId == nullptr, CHIP_ERROR_INVALID_ARGUMENT); uint8_t compressedFabricIdBuf[sizeof(uint64_t)]; MutableByteSpan compressedFabricIdSpan(compressedFabricIdBuf); - P256PublicKey rootPubkey(GetRootPubkey()); + P256PublicKey rootPubkey; + + { + P256PublicKeySpan rootPubkeySpan; + ReturnErrorOnFailure(GetRootPubkey(rootPubkeySpan)); + rootPubkey = rootPubkeySpan; + } + ChipLogDetail(Inet, "Generating compressed fabric ID using uncompressed fabric ID 0x" ChipLogFormatX64 " and root pubkey", ChipLogValueX64(fabricId)); ChipLogByteSpan(Inet, ByteSpan(rootPubkey.ConstBytes(), rootPubkey.Length())); @@ -332,7 +339,9 @@ CHIP_ERROR FabricInfo::GenerateDestinationID(const ByteSpan & ipk, const ByteSpa kSigmaParamRandomNumberSize + kP256_PublicKey_Length + sizeof(FabricId) + sizeof(NodeId); HMAC_sha hmac; uint8_t destinationMessage[kDestinationMessageLen]; - P256PublicKeySpan rootPubkeySpan = GetRootPubkey(); + P256PublicKeySpan rootPubkeySpan; + + ReturnErrorOnFailure(GetRootPubkey(rootPubkeySpan)); Encoding::LittleEndian::BufferWriter bbuf(destinationMessage, sizeof(destinationMessage)); diff --git a/src/credentials/FabricTable.h b/src/credentials/FabricTable.h index 0f3a3b9730bd7c..7457b2f4b28e55 100644 --- a/src/credentials/FabricTable.h +++ b/src/credentials/FabricTable.h @@ -213,18 +213,14 @@ class DLL_EXPORT FabricInfo return CHIP_NO_ERROR; } - Credentials::CertificateKeyId GetTrustedRootId() const + CHIP_ERROR GetTrustedRootId(Credentials::CertificateKeyId & skid) const { - Credentials::CertificateKeyId skid; - Credentials::ExtractSKIDFromChipCert(mRootCert, skid); - return skid; + return Credentials::ExtractSKIDFromChipCert(mRootCert, skid); } - Credentials::P256PublicKeySpan GetRootPubkey() const + CHIP_ERROR GetRootPubkey(Credentials::P256PublicKeySpan & publicKey) const { - Credentials::P256PublicKeySpan publicKey; - Credentials::ExtractPublicKeyFromChipCert(mRootCert, publicKey); - return publicKey; + return Credentials::ExtractPublicKeyFromChipCert(mRootCert, publicKey); } CHIP_ERROR VerifyCredentials(const ByteSpan & noc, const ByteSpan & icac, Credentials::ValidationContext & context, diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index 15df65fa573855..e88980435c9eef 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -534,7 +534,7 @@ CHIP_ERROR CASESession::SendSigma2() ByteSpan nocCert; ReturnErrorOnFailure(mFabricInfo->GetNOCCert(nocCert)); - mTrustedRootId = mFabricInfo->GetTrustedRootId(); + ReturnErrorOnFailure(mFabricInfo->GetTrustedRootId(mTrustedRootId)); VerifyOrReturnError(!mTrustedRootId.empty(), CHIP_ERROR_INTERNAL); // Fill in the random value @@ -915,7 +915,7 @@ CHIP_ERROR CASESession::SendSigma3() SuccessOrExit(err = mFabricInfo->GetICACert(icaCert)); SuccessOrExit(err = mFabricInfo->GetNOCCert(nocCert)); - mTrustedRootId = mFabricInfo->GetTrustedRootId(); + SuccessOrExit(err = mFabricInfo->GetTrustedRootId(mTrustedRootId)); VerifyOrExit(!mTrustedRootId.empty(), err = CHIP_ERROR_INTERNAL); // Prepare Sigma3 TBS Data Blob From d5e7431647d6191e744eec1145671851540dcd2d Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 19 Jan 2022 17:06:40 -0500 Subject: [PATCH 070/124] Assume readwrite is the default for attributes, make readonly the only special case. Reduce bracketing (#13707) --- .../all-clusters-app.matter | 1132 +++++++-------- .../bridge-common/bridge-app.matter | 356 ++--- .../door-lock-common/door-lock-app.matter | 372 ++--- .../lighting-common/lighting-app.matter | 462 +++---- examples/lock-app/lock-common/lock-app.matter | 348 ++--- .../log-source-common/log-source-app.matter | 18 +- .../ota-provider-app.matter | 58 +- .../ota-requestor-app.matter | 92 +- .../placeholder/linux/apps/app1/config.matter | 146 +- .../placeholder/linux/apps/app2/config.matter | 146 +- examples/pump-app/pump-common/pump-app.matter | 366 ++--- .../pump-controller-app.matter | 358 ++--- .../esp32/main/temperature-measurement.matter | 182 +-- .../thermostat-common/thermostat.matter | 402 +++--- examples/tv-app/tv-common/tv-app.matter | 506 +++---- .../tv-casting-common/tv-casting-app.matter | 818 +++++------ examples/window-app/common/window-app.matter | 392 +++--- .../templates/app/MatterIDL.zapt | 18 +- .../data_model/controller-clusters.matter | 1216 ++++++++--------- 19 files changed, 3693 insertions(+), 3695 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 8bc60ce732b015..fe24dc6be7d331 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 @@ -62,13 +62,13 @@ server cluster AccessControl = 31 { ExtensionEntry latestValue = 4; } - attribute(writable) AccessControlEntry acl[] = 0; - attribute(writable) ExtensionEntry extension[] = 1; - attribute(readonly) int16u clusterRevision = 65533; + attribute AccessControlEntry acl[] = 0; + attribute ExtensionEntry extension[] = 1; + readonly attribute int16u clusterRevision = 65533; } server cluster AccountLogin = 1294 { - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; } server cluster AdministratorCommissioning = 60 { @@ -84,10 +84,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u windowStatus = 0; + readonly attribute fabric_idx adminFabricIndex = 1; + readonly attribute int16u adminVendorId = 2; + readonly attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -115,14 +115,14 @@ server cluster ApplicationBasic = 1293 { kActiveVisibleNotFocus = 3; } - attribute(readonly) char_string vendorName = 0; - attribute(readonly) int16u vendorId = 1; - attribute(readonly) char_string applicationName = 2; - attribute(readonly) int16u productId = 3; - attribute(readonly) ApplicationStatusEnum applicationStatus = 5; - attribute(readonly) char_string applicationVersion = 6; - attribute(readonly) vendor_id allowedVendorList[] = 7; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute char_string vendorName = 0; + readonly attribute int16u vendorId = 1; + readonly attribute char_string applicationName = 2; + readonly attribute int16u productId = 3; + readonly attribute ApplicationStatusEnum applicationStatus = 5; + readonly attribute char_string applicationVersion = 6; + readonly attribute vendor_id allowedVendorList[] = 7; + readonly attribute int16u clusterRevision = 65533; } server cluster ApplicationLauncher = 1292 { @@ -137,8 +137,8 @@ server cluster ApplicationLauncher = 1292 { CHAR_STRING applicationId = 2; } - attribute(readonly) INT16U applicationLauncherList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute INT16U applicationLauncherList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster AudioOutput = 1291 { @@ -157,17 +157,17 @@ server cluster AudioOutput = 1291 { CHAR_STRING name = 3; } - attribute(readonly) OutputInfo audioOutputList[] = 0; - attribute(readonly) int8u currentAudioOutput = 1; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute OutputInfo audioOutputList[] = 0; + readonly attribute int8u currentAudioOutput = 1; + readonly attribute int16u clusterRevision = 65533; } server cluster BarrierControl = 259 { - attribute(readonly) enum8 barrierMovingState = 1; - attribute(readonly) bitmap16 barrierSafetyStatus = 2; - attribute(readonly) bitmap8 barrierCapabilities = 3; - attribute(readonly) int8u barrierPosition = 10; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 barrierMovingState = 1; + readonly attribute bitmap16 barrierSafetyStatus = 2; + readonly attribute bitmap8 barrierCapabilities = 3; + readonly attribute int8u barrierPosition = 10; + readonly attribute int16u clusterRevision = 65533; request struct BarrierControlGoToPercentRequest { INT8U percentOpen = 0; @@ -192,39 +192,39 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly) int16u interactionModelVersion = 0; - attribute(readonly) char_string vendorName = 1; - attribute(readonly) vendor_id vendorID = 2; - attribute(readonly) char_string productName = 3; - attribute(readonly) int16u productID = 4; - attribute(writable) char_string nodeLabel = 5; - attribute(writable) char_string location = 6; - attribute(readonly) int16u hardwareVersion = 7; - attribute(readonly) char_string hardwareVersionString = 8; - attribute(readonly) int32u softwareVersion = 9; - attribute(readonly) char_string softwareVersionString = 10; - attribute(readonly) char_string manufacturingDate = 11; - attribute(readonly) char_string partNumber = 12; - attribute(readonly) long_char_string productURL = 13; - attribute(readonly) char_string productLabel = 14; - attribute(readonly) char_string serialNumber = 15; - attribute(writable) boolean localConfigDisabled = 16; - attribute(readonly) boolean reachable = 17; - attribute(readonly) char_string uniqueID = 18; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u interactionModelVersion = 0; + readonly attribute char_string vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string productName = 3; + readonly attribute int16u productID = 4; + attribute char_string nodeLabel = 5; + attribute char_string location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string softwareVersionString = 10; + readonly attribute char_string manufacturingDate = 11; + readonly attribute char_string partNumber = 12; + readonly attribute long_char_string productURL = 13; + readonly attribute char_string productLabel = 14; + readonly attribute char_string serialNumber = 15; + attribute boolean localConfigDisabled = 16; + readonly attribute boolean reachable = 17; + readonly attribute char_string uniqueID = 18; + readonly attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } server cluster BinaryInputBasic = 15 { - attribute(writable) boolean outOfService = 81; - attribute(writable) boolean presentValue = 85; - attribute(readonly) bitmap8 statusFlags = 111; - attribute(readonly) int16u clusterRevision = 65533; + attribute boolean outOfService = 81; + attribute boolean presentValue = 85; + readonly attribute bitmap8 statusFlags = 111; + readonly attribute int16u clusterRevision = 65533; } server cluster Binding = 30 { - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; request struct BindRequest { NODE_ID nodeId = 0; @@ -249,8 +249,8 @@ server cluster BooleanState = 69 { boolean stateValue = 0; } - attribute(readonly) boolean stateValue = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute boolean stateValue = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster BridgedActions = 37 { @@ -311,14 +311,14 @@ server cluster BridgedActions = 37 { ActionErrorEnum error = 3; } - attribute(readonly) ActionStruct actionList[] = 0; - attribute(readonly) EndpointListStruct endpointList[] = 1; - attribute(readonly) long_char_string setupUrl = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute ActionStruct actionList[] = 0; + readonly attribute EndpointListStruct endpointList[] = 1; + readonly attribute long_char_string setupUrl = 2; + readonly attribute int16u clusterRevision = 65533; } server cluster BridgedDeviceBasic = 57 { - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; } server cluster Channel = 1284 { @@ -339,8 +339,8 @@ server cluster Channel = 1284 { CHAR_STRING affiliateCallSign = 5; } - attribute(readonly) ChannelInfo channelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute ChannelInfo channelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster ColorControl = 768 { @@ -390,59 +390,59 @@ server cluster ColorControl = 768 { kDown = 3; } - attribute(readonly) int8u currentHue = 0; - attribute(readonly) int8u currentSaturation = 1; - attribute(readonly) int16u remainingTime = 2; - attribute(readonly) int16u currentX = 3; - attribute(readonly) int16u currentY = 4; - attribute(readonly) enum8 driftCompensation = 5; - attribute(readonly) char_string compensationText = 6; - attribute(readonly) int16u colorTemperature = 7; - attribute(readonly) enum8 colorMode = 8; - attribute(writable) bitmap8 colorControlOptions = 15; - attribute(readonly) int8u numberOfPrimaries = 16; - attribute(readonly) int16u primary1X = 17; - attribute(readonly) int16u primary1Y = 18; - attribute(readonly) int8u primary1Intensity = 19; - attribute(readonly) int16u primary2X = 21; - attribute(readonly) int16u primary2Y = 22; - attribute(readonly) int8u primary2Intensity = 23; - attribute(readonly) int16u primary3X = 25; - attribute(readonly) int16u primary3Y = 26; - attribute(readonly) int8u primary3Intensity = 27; - attribute(readonly) int16u primary4X = 32; - attribute(readonly) int16u primary4Y = 33; - attribute(readonly) int8u primary4Intensity = 34; - attribute(readonly) int16u primary5X = 36; - attribute(readonly) int16u primary5Y = 37; - attribute(readonly) int8u primary5Intensity = 38; - attribute(readonly) int16u primary6X = 40; - attribute(readonly) int16u primary6Y = 41; - attribute(readonly) int8u primary6Intensity = 42; - attribute(writable) int16u whitePointX = 48; - attribute(writable) int16u whitePointY = 49; - attribute(writable) int16u colorPointRX = 50; - attribute(writable) int16u colorPointRY = 51; - attribute(writable) int8u colorPointRIntensity = 52; - attribute(writable) int16u colorPointGX = 54; - attribute(writable) int16u colorPointGY = 55; - attribute(writable) int8u colorPointGIntensity = 56; - attribute(writable) int16u colorPointBX = 58; - attribute(writable) int16u colorPointBY = 59; - attribute(writable) int8u colorPointBIntensity = 60; - attribute(readonly) int16u enhancedCurrentHue = 16384; - attribute(readonly) enum8 enhancedColorMode = 16385; - attribute(readonly) int8u colorLoopActive = 16386; - attribute(readonly) int8u colorLoopDirection = 16387; - attribute(readonly) int16u colorLoopTime = 16388; - attribute(readonly) int16u colorLoopStartEnhancedHue = 16389; - attribute(readonly) int16u colorLoopStoredEnhancedHue = 16390; - attribute(readonly) bitmap16 colorCapabilities = 16394; - attribute(readonly) int16u colorTempPhysicalMin = 16395; - attribute(readonly) int16u colorTempPhysicalMax = 16396; - attribute(readonly) int16u coupleColorTempToLevelMinMireds = 16397; - attribute(writable) int16u startUpColorTemperatureMireds = 16400; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u currentHue = 0; + readonly attribute int8u currentSaturation = 1; + readonly attribute int16u remainingTime = 2; + readonly attribute int16u currentX = 3; + readonly attribute int16u currentY = 4; + readonly attribute enum8 driftCompensation = 5; + readonly attribute char_string compensationText = 6; + readonly attribute int16u colorTemperature = 7; + readonly attribute enum8 colorMode = 8; + attribute bitmap8 colorControlOptions = 15; + readonly attribute int8u numberOfPrimaries = 16; + readonly attribute int16u primary1X = 17; + readonly attribute int16u primary1Y = 18; + readonly attribute int8u primary1Intensity = 19; + readonly attribute int16u primary2X = 21; + readonly attribute int16u primary2Y = 22; + readonly attribute int8u primary2Intensity = 23; + readonly attribute int16u primary3X = 25; + readonly attribute int16u primary3Y = 26; + readonly attribute int8u primary3Intensity = 27; + readonly attribute int16u primary4X = 32; + readonly attribute int16u primary4Y = 33; + readonly attribute int8u primary4Intensity = 34; + readonly attribute int16u primary5X = 36; + readonly attribute int16u primary5Y = 37; + readonly attribute int8u primary5Intensity = 38; + readonly attribute int16u primary6X = 40; + readonly attribute int16u primary6Y = 41; + readonly attribute int8u primary6Intensity = 42; + attribute int16u whitePointX = 48; + attribute int16u whitePointY = 49; + attribute int16u colorPointRX = 50; + attribute int16u colorPointRY = 51; + attribute int8u colorPointRIntensity = 52; + attribute int16u colorPointGX = 54; + attribute int16u colorPointGY = 55; + attribute int8u colorPointGIntensity = 56; + attribute int16u colorPointBX = 58; + attribute int16u colorPointBY = 59; + attribute int8u colorPointBIntensity = 60; + readonly attribute int16u enhancedCurrentHue = 16384; + readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute int8u colorLoopActive = 16386; + readonly attribute int8u colorLoopDirection = 16387; + readonly attribute int16u colorLoopTime = 16388; + readonly attribute int16u colorLoopStartEnhancedHue = 16389; + readonly attribute int16u colorLoopStoredEnhancedHue = 16390; + readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute int16u colorTempPhysicalMin = 16395; + readonly attribute int16u colorTempPhysicalMax = 16396; + readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; + attribute int16u startUpColorTemperatureMireds = 16400; + readonly attribute int16u clusterRevision = 65533; request struct ColorLoopSetRequest { ColorLoopUpdateFlags updateFlags = 0; @@ -677,9 +677,9 @@ server cluster ContentLauncher = 1290 { MetricTypeEnum metric = 3; } - attribute(readonly) CHAR_STRING acceptHeaderList[] = 0; - attribute(writable) bitmap32 supportedStreamingProtocols = 1; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute CHAR_STRING acceptHeaderList[] = 0; + attribute bitmap32 supportedStreamingProtocols = 1; + readonly attribute int16u clusterRevision = 65533; } server cluster Descriptor = 29 { @@ -688,11 +688,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly) DeviceType deviceList[] = 0; - attribute(readonly) CLUSTER_ID serverList[] = 1; - attribute(readonly) CLUSTER_ID clientList[] = 2; - attribute(readonly) ENDPOINT_NO partsList[] = 3; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute DeviceType deviceList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -961,34 +961,34 @@ server cluster DoorLock = 257 { nullable INT16U dataIndex = 6; } - attribute(readonly) DlLockState lockState = 0; - attribute(readonly) DlLockType lockType = 1; - attribute(readonly) boolean actuatorEnabled = 2; - attribute(readonly) DlDoorState doorState = 3; - attribute(writable) int32u doorOpenEvents = 4; - attribute(writable) int32u doorClosedEvents = 5; - attribute(writable) int16u openPeriod = 6; - attribute(readonly) int16u numberOfTotalUsersSupported = 17; - attribute(readonly) int16u numberOfPINUsersSupported = 18; - attribute(readonly) int16u numberOfWeekDaySchedulesSupportedPerUser = 20; - attribute(readonly) int16u numberOfYearDaySchedulesSupportedPerUser = 21; - attribute(readonly) int16u numberOfHolidaySchedulesSupported = 22; - attribute(readonly) int8u maxPINCodeLength = 23; - attribute(readonly) int8u minPINCodeLength = 24; - attribute(readonly) bitmap8 credentialRulesSupport = 27; - attribute(writable) char_string language = 33; - attribute(writable) int32u autoRelockTime = 35; - attribute(writable) int8u soundVolume = 36; - attribute(writable) DlOperatingMode operatingMode = 37; - attribute(readonly) bitmap16 supportedOperatingModes = 38; - attribute(readonly) bitmap16 defaultConfigurationRegister = 39; - attribute(writable) boolean enableOneTouchLocking = 41; - attribute(writable) boolean enableInsideStatusLED = 42; - attribute(writable) boolean enablePrivacyModeButton = 43; - attribute(writable) int8u wrongCodeEntryLimit = 48; - attribute(writable) int8u userCodeTemporaryDisableTime = 49; - attribute(writable) boolean requirePINforRemoteOperation = 51; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute DlLockState lockState = 0; + readonly attribute DlLockType lockType = 1; + readonly attribute boolean actuatorEnabled = 2; + readonly attribute DlDoorState doorState = 3; + attribute int32u doorOpenEvents = 4; + attribute int32u doorClosedEvents = 5; + attribute int16u openPeriod = 6; + readonly attribute int16u numberOfTotalUsersSupported = 17; + readonly attribute int16u numberOfPINUsersSupported = 18; + readonly attribute int16u numberOfWeekDaySchedulesSupportedPerUser = 20; + readonly attribute int16u numberOfYearDaySchedulesSupportedPerUser = 21; + readonly attribute int16u numberOfHolidaySchedulesSupported = 22; + readonly attribute int8u maxPINCodeLength = 23; + readonly attribute int8u minPINCodeLength = 24; + readonly attribute bitmap8 credentialRulesSupport = 27; + attribute char_string language = 33; + attribute int32u autoRelockTime = 35; + attribute int8u soundVolume = 36; + attribute DlOperatingMode operatingMode = 37; + readonly attribute bitmap16 supportedOperatingModes = 38; + readonly attribute bitmap16 defaultConfigurationRegister = 39; + attribute boolean enableOneTouchLocking = 41; + attribute boolean enableInsideStatusLED = 42; + attribute boolean enablePrivacyModeButton = 43; + attribute int8u wrongCodeEntryLimit = 48; + attribute int8u userCodeTemporaryDisableTime = 49; + attribute boolean requirePINforRemoteOperation = 51; + readonly attribute int16u clusterRevision = 65533; request struct ClearCredentialRequest { DlCredential credential = 0; @@ -1068,18 +1068,18 @@ server cluster DoorLock = 257 { } server cluster ElectricalMeasurement = 2820 { - attribute(readonly) bitmap32 measurementType = 0; - attribute(readonly) int32s totalActivePower = 772; - attribute(readonly) int16u rmsVoltage = 1285; - attribute(readonly) int16u rmsVoltageMin = 1286; - attribute(readonly) int16u rmsVoltageMax = 1287; - attribute(readonly) int16u rmsCurrent = 1288; - attribute(readonly) int16u rmsCurrentMin = 1289; - attribute(readonly) int16u rmsCurrentMax = 1290; - attribute(readonly) int16s activePower = 1291; - attribute(readonly) int16s activePowerMin = 1292; - attribute(readonly) int16s activePowerMax = 1293; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute bitmap32 measurementType = 0; + readonly attribute int32s totalActivePower = 772; + readonly attribute int16u rmsVoltage = 1285; + readonly attribute int16u rmsVoltageMin = 1286; + readonly attribute int16u rmsVoltageMax = 1287; + readonly attribute int16u rmsCurrent = 1288; + readonly attribute int16u rmsCurrentMin = 1289; + readonly attribute int16u rmsCurrentMax = 1290; + readonly attribute int16s activePower = 1291; + readonly attribute int16s activePowerMin = 1292; + readonly attribute int16s activePowerMax = 1293; + readonly attribute int16u clusterRevision = 65533; } server cluster EthernetNetworkDiagnostics = 55 { @@ -1096,32 +1096,32 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly) enum8 PHYRate = 0; - attribute(readonly) boolean fullDuplex = 1; - attribute(readonly) int64u packetRxCount = 2; - attribute(readonly) int64u packetTxCount = 3; - attribute(readonly) int64u txErrCount = 4; - attribute(readonly) int64u collisionCount = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) boolean carrierDetect = 7; - attribute(readonly) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 PHYRate = 0; + readonly attribute boolean fullDuplex = 1; + readonly attribute int64u packetRxCount = 2; + readonly attribute int64u packetTxCount = 3; + readonly attribute int64u txErrCount = 4; + readonly attribute int64u collisionCount = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute boolean carrierDetect = 7; + readonly attribute int64u timeSinceReset = 8; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster FlowMeasurement = 1028 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u tolerance = 3; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u tolerance = 3; + readonly attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -1142,12 +1142,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable) int64u breadcrumb = 0; - attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + attribute int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + readonly attribute enum8 regulatoryConfig = 2; + readonly attribute enum8 locationCapability = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -1260,15 +1260,15 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly) int16u rebootCount = 1; - attribute(readonly) int64u upTime = 2; - attribute(readonly) int32u totalOperationalHours = 3; - attribute(readonly) enum8 bootReasons = 4; - attribute(readonly) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly) ENUM8 activeRadioFaults[] = 6; - attribute(readonly) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute enum8 bootReasons = 4; + readonly attribute ENUM8 activeHardwareFaults[] = 5; + readonly attribute ENUM8 activeRadioFaults[] = 6; + readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute int16u clusterRevision = 65533; } server cluster GroupKeyManagement = 63 { @@ -1301,11 +1301,11 @@ server cluster GroupKeyManagement = 63 { INT64U epochStartTime2 = 7; } - attribute(readonly) GroupKey groupKeyMap[] = 0; - attribute(readonly) GroupInfo groupTable[] = 1; - attribute(readonly) int16u maxGroupsPerFabric = 2; - attribute(readonly) int16u maxGroupKeysPerFabric = 3; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute GroupKey groupKeyMap[] = 0; + readonly attribute GroupInfo groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute int16u clusterRevision = 65533; request struct KeySetReadRequest { INT16U groupKeySetID = 0; @@ -1338,8 +1338,8 @@ server cluster GroupKeyManagement = 63 { } server cluster Groups = 4 { - attribute(readonly) bitmap8 nameSupport = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute bitmap8 nameSupport = 0; + readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { INT16U groupId = 0; @@ -1419,12 +1419,12 @@ server cluster IasZone = 1280 { kInvalidZoneType = 65535; } - attribute(readonly) enum8 zoneState = 0; - attribute(readonly) enum16 zoneType = 1; - attribute(readonly) bitmap16 zoneStatus = 2; - attribute(writable) node_id iasCieAddress = 16; - attribute(readonly) int8u zoneId = 17; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 zoneState = 0; + readonly attribute enum16 zoneType = 1; + readonly attribute bitmap16 zoneStatus = 2; + attribute node_id iasCieAddress = 16; + readonly attribute int8u zoneId = 17; + readonly attribute int16u clusterRevision = 65533; request struct ZoneEnrollRequestRequest { IasZoneType zoneType = 0; @@ -1470,9 +1470,9 @@ server cluster Identify = 3 { kActuator = 5; } - attribute(writable) int16u identifyTime = 0; - attribute(readonly) enum8 identifyType = 1; - attribute(readonly) int16u clusterRevision = 65533; + attribute int16u identifyTime = 0; + readonly attribute enum8 identifyType = 1; + readonly attribute int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -1498,12 +1498,12 @@ server cluster IlluminanceMeasurement = 1024 { kCmos = 1; } - attribute(readonly) int16u measuredValue = 0; - attribute(readonly) int16u minMeasuredValue = 1; - attribute(readonly) int16u maxMeasuredValue = 2; - attribute(readonly) int16u tolerance = 3; - attribute(readonly) enum8 lightSensorType = 4; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u measuredValue = 0; + readonly attribute int16u minMeasuredValue = 1; + readonly attribute int16u maxMeasuredValue = 2; + readonly attribute int16u tolerance = 3; + readonly attribute enum8 lightSensorType = 4; + readonly attribute int16u clusterRevision = 65533; } server cluster KeypadInput = 1289 { @@ -1602,7 +1602,7 @@ server cluster KeypadInput = 1289 { kInvalidKeyInCurrentState = 2; } - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; } server cluster LevelControl = 8 { @@ -1616,22 +1616,22 @@ server cluster LevelControl = 8 { kDown = 1; } - attribute(readonly) int8u currentLevel = 0; - attribute(readonly) int16u remainingTime = 1; - attribute(readonly) int8u minLevel = 2; - attribute(readonly) int8u maxLevel = 3; - attribute(readonly) int16u currentFrequency = 4; - attribute(readonly) int16u minFrequency = 5; - attribute(readonly) int16u maxFrequency = 6; - attribute(writable) bitmap8 options = 15; - attribute(writable) int16u onOffTransitionTime = 16; - attribute(writable) int8u onLevel = 17; - attribute(writable) int16u onTransitionTime = 18; - attribute(writable) int16u offTransitionTime = 19; - attribute(writable) int8u defaultMoveRate = 20; - attribute(writable) int8u startUpCurrentLevel = 16384; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u currentLevel = 0; + readonly attribute int16u remainingTime = 1; + readonly attribute int8u minLevel = 2; + readonly attribute int8u maxLevel = 3; + readonly attribute int16u currentFrequency = 4; + readonly attribute int16u minFrequency = 5; + readonly attribute int16u maxFrequency = 6; + attribute bitmap8 options = 15; + attribute int16u onOffTransitionTime = 16; + attribute int8u onLevel = 17; + attribute int16u onTransitionTime = 18; + attribute int16u offTransitionTime = 19; + attribute int8u defaultMoveRate = 20; + attribute int8u startUpCurrentLevel = 16384; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -1687,12 +1687,12 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute char_string activeLocale = 1; + readonly attribute CHAR_STRING supportedLocales[] = 2; } server cluster LowPower = 1288 { - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; command Sleep(): DefaultSuccess = 0; } @@ -1720,9 +1720,9 @@ server cluster MediaInput = 1287 { CHAR_STRING description = 4; } - attribute(readonly) InputInfo mediaInputList[] = 0; - attribute(readonly) int8u currentMediaInput = 1; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute InputInfo mediaInputList[] = 0; + readonly attribute int8u currentMediaInput = 1; + readonly attribute int16u clusterRevision = 65533; } server cluster MediaPlayback = 1286 { @@ -1742,13 +1742,13 @@ server cluster MediaPlayback = 1286 { kSeekOutOfRange = 5; } - attribute(readonly) PlaybackStateEnum playbackState = 0; - attribute(readonly) epoch_us startTime = 1; - attribute(readonly) int64u duration = 2; - attribute(readonly) single playbackSpeed = 4; - attribute(readonly) int64u seekRangeEnd = 5; - attribute(readonly) int64u seekRangeStart = 6; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute PlaybackStateEnum playbackState = 0; + readonly attribute epoch_us startTime = 1; + readonly attribute int64u duration = 2; + readonly attribute single playbackSpeed = 4; + readonly attribute int64u seekRangeEnd = 5; + readonly attribute int64u seekRangeStart = 6; + readonly attribute int16u clusterRevision = 65533; } server cluster ModeSelect = 80 { @@ -1758,12 +1758,12 @@ server cluster ModeSelect = 80 { INT32U semanticTag = 3; } - attribute(readonly) int8u currentMode = 0; - attribute(readonly) ModeOptionStruct supportedModes[] = 1; - attribute(writable) int8u onMode = 2; - attribute(readonly) int8u startUpMode = 3; - attribute(readonly) char_string description = 4; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u currentMode = 0; + readonly attribute ModeOptionStruct supportedModes[] = 1; + attribute int8u onMode = 2; + readonly attribute int8u startUpMode = 3; + readonly attribute char_string description = 4; + readonly attribute int16u clusterRevision = 65533; request struct ChangeToModeRequest { INT8U newMode = 0; @@ -1822,16 +1822,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u maxNetworks = 0; + readonly attribute NetworkInfo networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute boolean interfaceEnabled = 4; + readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; + readonly attribute octet_string lastNetworkID = 6; + readonly attribute int32u lastConnectErrorValue = 7; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -1912,7 +1912,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -1997,11 +1997,11 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute(writable) ProviderLocation defaultOtaProviders[] = 0; - attribute(readonly) boolean updatePossible = 1; - attribute(readonly) OTAUpdateStateEnum updateState = 2; - attribute(readonly) int8u updateStateProgress = 3; - attribute(readonly) int16u clusterRevision = 65533; + attribute ProviderLocation defaultOtaProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute OTAUpdateStateEnum updateState = 2; + readonly attribute int8u updateStateProgress = 3; + readonly attribute int16u clusterRevision = 65533; request struct AnnounceOtaProviderRequest { node_id providerNodeId = 0; @@ -2015,10 +2015,10 @@ server cluster OtaSoftwareUpdateRequestor = 42 { } server cluster OccupancySensing = 1030 { - attribute(readonly) bitmap8 occupancy = 0; - attribute(readonly) enum8 occupancySensorType = 1; - attribute(readonly) bitmap8 occupancySensorTypeBitmap = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute bitmap8 occupancy = 0; + readonly attribute enum8 occupancySensorType = 1; + readonly attribute bitmap8 occupancySensorTypeBitmap = 2; + readonly attribute int16u clusterRevision = 65533; } server cluster OnOff = 6 { @@ -2037,13 +2037,13 @@ server cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly) boolean onOff = 0; - attribute(readonly) boolean globalSceneControl = 16384; - attribute(writable) int16u onTime = 16385; - attribute(writable) int16u offWaitTime = 16386; - attribute(writable) enum8 startUpOnOff = 16387; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute boolean onOff = 0; + readonly attribute boolean globalSceneControl = 16384; + attribute int16u onTime = 16385; + attribute int16u offWaitTime = 16386; + attribute enum8 startUpOnOff = 16387; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct OffWithEffectRequest { OnOffEffectIdentifier effectId = 0; @@ -2065,9 +2065,9 @@ server cluster OnOff = 6 { } server cluster OnOffSwitchConfiguration = 7 { - attribute(readonly) enum8 switchType = 0; - attribute(writable) enum8 switchActions = 16; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 switchType = 0; + attribute enum8 switchActions = 16; + readonly attribute int16u clusterRevision = 65533; } server cluster OperationalCredentials = 62 { @@ -2093,12 +2093,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly) FabricDescriptor fabricsList[] = 1; - attribute(readonly) int8u supportedFabrics = 2; - attribute(readonly) int8u commissionedFabrics = 3; - attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly) fabric_idx currentFabricIndex = 5; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute FabricDescriptor fabricsList[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -2173,29 +2173,29 @@ server cluster OperationalCredentials = 62 { } server cluster PowerSource = 47 { - attribute(readonly) enum8 status = 0; - attribute(readonly) int8u order = 1; - attribute(readonly) char_string description = 2; - attribute(readonly) int32u batteryVoltage = 11; - attribute(readonly) int8u batteryPercentRemaining = 12; - attribute(readonly) int32u batteryTimeRemaining = 13; - attribute(readonly) enum8 batteryChargeLevel = 14; - attribute(readonly) ENUM8 activeBatteryFaults[] = 18; - attribute(readonly) enum8 batteryChargeState = 26; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 status = 0; + readonly attribute int8u order = 1; + readonly attribute char_string description = 2; + readonly attribute int32u batteryVoltage = 11; + readonly attribute int8u batteryPercentRemaining = 12; + readonly attribute int32u batteryTimeRemaining = 13; + readonly attribute enum8 batteryChargeLevel = 14; + readonly attribute ENUM8 activeBatteryFaults[] = 18; + readonly attribute enum8 batteryChargeState = 26; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster PowerSourceConfiguration = 46 { - attribute(readonly) INT8U sources[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute INT8U sources[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster PressureMeasurement = 1027 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u clusterRevision = 65533; } server cluster PumpConfigurationAndControl = 512 { @@ -2266,40 +2266,40 @@ server cluster PumpConfigurationAndControl = 512 { info event TurbineOperation = 16 { } - attribute(readonly) int16s maxPressure = 0; - attribute(readonly) int16u maxSpeed = 1; - attribute(readonly) int16u maxFlow = 2; - attribute(readonly) int16s minConstPressure = 3; - attribute(readonly) int16s maxConstPressure = 4; - attribute(readonly) int16s minCompPressure = 5; - attribute(readonly) int16s maxCompPressure = 6; - attribute(readonly) int16u minConstSpeed = 7; - attribute(readonly) int16u maxConstSpeed = 8; - attribute(readonly) int16u minConstFlow = 9; - attribute(readonly) int16u maxConstFlow = 10; - attribute(readonly) int16s minConstTemp = 11; - attribute(readonly) int16s maxConstTemp = 12; - attribute(readonly) bitmap16 pumpStatus = 16; - attribute(readonly) enum8 effectiveOperationMode = 17; - attribute(readonly) enum8 effectiveControlMode = 18; - attribute(readonly) int16s capacity = 19; - attribute(readonly) int16u speed = 20; - attribute(writable) int24u lifetimeRunningHours = 21; - attribute(readonly) int24u power = 22; - attribute(writable) int32u lifetimeEnergyConsumed = 23; - attribute(writable) enum8 operationMode = 32; - attribute(writable) enum8 controlMode = 33; - attribute(readonly) bitmap16 alarmMask = 34; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s maxPressure = 0; + readonly attribute int16u maxSpeed = 1; + readonly attribute int16u maxFlow = 2; + readonly attribute int16s minConstPressure = 3; + readonly attribute int16s maxConstPressure = 4; + readonly attribute int16s minCompPressure = 5; + readonly attribute int16s maxCompPressure = 6; + readonly attribute int16u minConstSpeed = 7; + readonly attribute int16u maxConstSpeed = 8; + readonly attribute int16u minConstFlow = 9; + readonly attribute int16u maxConstFlow = 10; + readonly attribute int16s minConstTemp = 11; + readonly attribute int16s maxConstTemp = 12; + readonly attribute bitmap16 pumpStatus = 16; + readonly attribute enum8 effectiveOperationMode = 17; + readonly attribute enum8 effectiveControlMode = 18; + readonly attribute int16s capacity = 19; + readonly attribute int16u speed = 20; + attribute int24u lifetimeRunningHours = 21; + readonly attribute int24u power = 22; + attribute int32u lifetimeEnergyConsumed = 23; + attribute enum8 operationMode = 32; + attribute enum8 controlMode = 33; + readonly attribute bitmap16 alarmMask = 34; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster RelativeHumidityMeasurement = 1029 { - attribute(readonly) int16u measuredValue = 0; - attribute(readonly) int16u minMeasuredValue = 1; - attribute(readonly) int16u maxMeasuredValue = 2; - attribute(readonly) int16u tolerance = 3; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u measuredValue = 0; + readonly attribute int16u minMeasuredValue = 1; + readonly attribute int16u maxMeasuredValue = 2; + readonly attribute int16u tolerance = 3; + readonly attribute int16u clusterRevision = 65533; } server cluster Scenes = 5 { @@ -2309,12 +2309,12 @@ server cluster Scenes = 5 { INT8U value = 3; } - attribute(readonly) int8u sceneCount = 0; - attribute(readonly) int8u currentScene = 1; - attribute(readonly) int16u currentGroup = 2; - attribute(readonly) boolean sceneValid = 3; - attribute(readonly) bitmap8 nameSupport = 4; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u sceneCount = 0; + readonly attribute int8u currentScene = 1; + readonly attribute int16u currentGroup = 2; + readonly attribute boolean sceneValid = 3; + readonly attribute bitmap8 nameSupport = 4; + readonly attribute int16u clusterRevision = 65533; request struct AddSceneRequest { INT16U groupId = 0; @@ -2415,12 +2415,12 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly) ThreadMetrics threadMetrics[] = 0; - attribute(readonly) int64u currentHeapFree = 1; - attribute(readonly) int64u currentHeapUsed = 2; - attribute(readonly) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute ThreadMetrics threadMetrics[] = 0; + readonly attribute int64u currentHeapFree = 1; + readonly attribute int64u currentHeapUsed = 2; + readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; command ResetWatermarks(): DefaultSuccess = 0; } @@ -2456,11 +2456,11 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } - attribute(readonly) int8u numberOfPositions = 0; - attribute(readonly) int8u currentPosition = 1; - attribute(readonly) int8u multiPressMax = 2; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; + readonly attribute int8u multiPressMax = 2; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster TargetNavigator = 1285 { @@ -2475,17 +2475,17 @@ server cluster TargetNavigator = 1285 { CHAR_STRING name = 2; } - attribute(readonly) TargetInfo targetNavigatorList[] = 0; - attribute(readonly) int8u currentNavigatorTarget = 1; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute TargetInfo targetNavigatorList[] = 0; + readonly attribute int8u currentNavigatorTarget = 1; + readonly attribute int16u clusterRevision = 65533; } server cluster TemperatureMeasurement = 1026 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u tolerance = 3; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u tolerance = 3; + readonly attribute int16u clusterRevision = 65533; } server cluster TestCluster = 1295 { @@ -2552,84 +2552,84 @@ server cluster TestCluster = 1295 { SimpleEnum arg6[] = 6; } - attribute(writable) boolean boolean = 0; - attribute(writable) bitmap8 bitmap8 = 1; - attribute(writable) bitmap16 bitmap16 = 2; - attribute(writable) bitmap32 bitmap32 = 3; - attribute(writable) bitmap64 bitmap64 = 4; - attribute(writable) int8u int8u = 5; - attribute(writable) int16u int16u = 6; - attribute(writable) int24u int24u = 7; - attribute(writable) int32u int32u = 8; - attribute(writable) int40u int40u = 9; - attribute(writable) int48u int48u = 10; - attribute(writable) int56u int56u = 11; - attribute(writable) int64u int64u = 12; - attribute(writable) int8s int8s = 13; - attribute(writable) int16s int16s = 14; - attribute(writable) int24s int24s = 15; - attribute(writable) int32s int32s = 16; - attribute(writable) int40s int40s = 17; - attribute(writable) int48s int48s = 18; - attribute(writable) int56s int56s = 19; - attribute(writable) int64s int64s = 20; - attribute(writable) enum8 enum8 = 21; - attribute(writable) enum16 enum16 = 22; - attribute(writable) single floatSingle = 23; - attribute(writable) double floatDouble = 24; - attribute(writable) octet_string octetString = 25; - attribute(writable) INT8U listInt8u[] = 26; - attribute(writable) OCTET_STRING listOctetString[] = 27; - attribute(writable) TestListStructOctet listStructOctetString[] = 28; - attribute(writable) long_octet_string longOctetString = 29; - attribute(writable) char_string charString = 30; - attribute(writable) long_char_string longCharString = 31; - attribute(writable) epoch_us epochUs = 32; - attribute(writable) epoch_s epochS = 33; - attribute(writable) vendor_id vendorId = 34; - attribute(writable) NullablesAndOptionalsStruct listNullablesAndOptionalsStruct[] = 35; - attribute(writable) SimpleEnum enumAttr = 36; - attribute(writable) SimpleStruct structAttr = 37; - attribute(writable) int8u rangeRestrictedInt8u = 38; - attribute(writable) int8s rangeRestrictedInt8s = 39; - attribute(writable) int16u rangeRestrictedInt16u = 40; - attribute(writable) int16s rangeRestrictedInt16s = 41; - attribute(readonly) LONG_OCTET_STRING listLongOctetString[] = 42; - attribute(writable) boolean timedWriteBoolean = 48; - attribute(writable) boolean nullableBoolean = 32768; - attribute(writable) bitmap8 nullableBitmap8 = 32769; - attribute(writable) bitmap16 nullableBitmap16 = 32770; - attribute(writable) bitmap32 nullableBitmap32 = 32771; - attribute(writable) bitmap64 nullableBitmap64 = 32772; - attribute(writable) int8u nullableInt8u = 32773; - attribute(writable) int16u nullableInt16u = 32774; - attribute(writable) int24u nullableInt24u = 32775; - attribute(writable) int32u nullableInt32u = 32776; - attribute(writable) int40u nullableInt40u = 32777; - attribute(writable) int48u nullableInt48u = 32778; - attribute(writable) int56u nullableInt56u = 32779; - attribute(writable) int64u nullableInt64u = 32780; - attribute(writable) int8s nullableInt8s = 32781; - attribute(writable) int16s nullableInt16s = 32782; - attribute(writable) int24s nullableInt24s = 32783; - attribute(writable) int32s nullableInt32s = 32784; - attribute(writable) int40s nullableInt40s = 32785; - attribute(writable) int48s nullableInt48s = 32786; - attribute(writable) int56s nullableInt56s = 32787; - attribute(writable) int64s nullableInt64s = 32788; - attribute(writable) enum8 nullableEnum8 = 32789; - attribute(writable) enum16 nullableEnum16 = 32790; - attribute(writable) single nullableFloatSingle = 32791; - attribute(writable) double nullableFloatDouble = 32792; - attribute(writable) octet_string nullableOctetString = 32793; - attribute(writable) char_string nullableCharString = 32798; - attribute(writable) SimpleEnum nullableEnumAttr = 32804; - attribute(writable) SimpleStruct nullableStruct = 32805; - attribute(writable) int8u nullableRangeRestrictedInt8u = 32806; - attribute(writable) int8s nullableRangeRestrictedInt8s = 32807; - attribute(writable) int16u nullableRangeRestrictedInt16u = 32808; - attribute(writable) int16s nullableRangeRestrictedInt16s = 32809; - attribute(readonly) int16u clusterRevision = 65533; + attribute boolean boolean = 0; + attribute bitmap8 bitmap8 = 1; + attribute bitmap16 bitmap16 = 2; + attribute bitmap32 bitmap32 = 3; + attribute bitmap64 bitmap64 = 4; + attribute int8u int8u = 5; + attribute int16u int16u = 6; + attribute int24u int24u = 7; + attribute int32u int32u = 8; + attribute int40u int40u = 9; + attribute int48u int48u = 10; + attribute int56u int56u = 11; + attribute int64u int64u = 12; + attribute int8s int8s = 13; + attribute int16s int16s = 14; + attribute int24s int24s = 15; + attribute int32s int32s = 16; + attribute int40s int40s = 17; + attribute int48s int48s = 18; + attribute int56s int56s = 19; + attribute int64s int64s = 20; + attribute enum8 enum8 = 21; + attribute enum16 enum16 = 22; + attribute single floatSingle = 23; + attribute double floatDouble = 24; + attribute octet_string octetString = 25; + attribute INT8U listInt8u[] = 26; + attribute OCTET_STRING listOctetString[] = 27; + attribute TestListStructOctet listStructOctetString[] = 28; + attribute long_octet_string longOctetString = 29; + attribute char_string charString = 30; + attribute long_char_string longCharString = 31; + attribute epoch_us epochUs = 32; + attribute epoch_s epochS = 33; + attribute vendor_id vendorId = 34; + attribute NullablesAndOptionalsStruct listNullablesAndOptionalsStruct[] = 35; + attribute SimpleEnum enumAttr = 36; + attribute SimpleStruct structAttr = 37; + attribute int8u rangeRestrictedInt8u = 38; + attribute int8s rangeRestrictedInt8s = 39; + attribute int16u rangeRestrictedInt16u = 40; + attribute int16s rangeRestrictedInt16s = 41; + readonly attribute LONG_OCTET_STRING listLongOctetString[] = 42; + attribute boolean timedWriteBoolean = 48; + attribute boolean nullableBoolean = 32768; + attribute bitmap8 nullableBitmap8 = 32769; + attribute bitmap16 nullableBitmap16 = 32770; + attribute bitmap32 nullableBitmap32 = 32771; + attribute bitmap64 nullableBitmap64 = 32772; + attribute int8u nullableInt8u = 32773; + attribute int16u nullableInt16u = 32774; + attribute int24u nullableInt24u = 32775; + attribute int32u nullableInt32u = 32776; + attribute int40u nullableInt40u = 32777; + attribute int48u nullableInt48u = 32778; + attribute int56u nullableInt56u = 32779; + attribute int64u nullableInt64u = 32780; + attribute int8s nullableInt8s = 32781; + attribute int16s nullableInt16s = 32782; + attribute int24s nullableInt24s = 32783; + attribute int32s nullableInt32s = 32784; + attribute int40s nullableInt40s = 32785; + attribute int48s nullableInt48s = 32786; + attribute int56s nullableInt56s = 32787; + attribute int64s nullableInt64s = 32788; + attribute enum8 nullableEnum8 = 32789; + attribute enum16 nullableEnum16 = 32790; + attribute single nullableFloatSingle = 32791; + attribute double nullableFloatDouble = 32792; + attribute octet_string nullableOctetString = 32793; + attribute char_string nullableCharString = 32798; + attribute SimpleEnum nullableEnumAttr = 32804; + attribute SimpleStruct nullableStruct = 32805; + attribute int8u nullableRangeRestrictedInt8u = 32806; + attribute int8s nullableRangeRestrictedInt8s = 32807; + attribute int16u nullableRangeRestrictedInt16u = 32808; + attribute int16s nullableRangeRestrictedInt16s = 32809; + readonly attribute int16u clusterRevision = 65533; request struct SimpleStructEchoRequestRequest { SimpleStruct arg1 = 0; @@ -2745,32 +2745,32 @@ server cluster Thermostat = 513 { kHeatAndCoolSetpoints = 2; } - attribute(readonly) int16s localTemperature = 0; - attribute(readonly) int16s absMinHeatSetpointLimit = 3; - attribute(readonly) int16s absMaxHeatSetpointLimit = 4; - attribute(readonly) int16s absMinCoolSetpointLimit = 5; - attribute(readonly) int16s absMaxCoolSetpointLimit = 6; - attribute(writable) int16s occupiedCoolingSetpoint = 17; - attribute(writable) int16s occupiedHeatingSetpoint = 18; - attribute(writable) int16s minHeatSetpointLimit = 21; - attribute(writable) int16s maxHeatSetpointLimit = 22; - attribute(writable) int16s minCoolSetpointLimit = 23; - attribute(writable) int16s maxCoolSetpointLimit = 24; - attribute(writable) int8s minSetpointDeadBand = 25; - attribute(writable) enum8 controlSequenceOfOperation = 27; - attribute(writable) enum8 systemMode = 28; - attribute(readonly) enum8 startOfWeek = 32; - attribute(readonly) int8u numberOfWeeklyTransitions = 33; - attribute(readonly) int8u numberOfDailyTransitions = 34; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s localTemperature = 0; + readonly attribute int16s absMinHeatSetpointLimit = 3; + readonly attribute int16s absMaxHeatSetpointLimit = 4; + readonly attribute int16s absMinCoolSetpointLimit = 5; + readonly attribute int16s absMaxCoolSetpointLimit = 6; + attribute int16s occupiedCoolingSetpoint = 17; + attribute int16s occupiedHeatingSetpoint = 18; + attribute int16s minHeatSetpointLimit = 21; + attribute int16s maxHeatSetpointLimit = 22; + attribute int16s minCoolSetpointLimit = 23; + attribute int16s maxCoolSetpointLimit = 24; + attribute int8s minSetpointDeadBand = 25; + attribute enum8 controlSequenceOfOperation = 27; + attribute enum8 systemMode = 28; + readonly attribute enum8 startOfWeek = 32; + readonly attribute int8u numberOfWeeklyTransitions = 33; + readonly attribute int8u numberOfDailyTransitions = 34; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster ThermostatUserInterfaceConfiguration = 516 { - attribute(writable) enum8 temperatureDisplayMode = 0; - attribute(writable) enum8 keypadLockout = 1; - attribute(writable) enum8 scheduleProgrammingVisibility = 2; - attribute(readonly) int16u clusterRevision = 65533; + attribute enum8 temperatureDisplayMode = 0; + attribute enum8 keypadLockout = 1; + attribute enum8 scheduleProgrammingVisibility = 2; + readonly attribute int16u clusterRevision = 65533; } server cluster ThreadNetworkDiagnostics = 53 { @@ -2850,83 +2850,83 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly) int16u channel = 0; - attribute(readonly) enum8 routingRole = 1; - attribute(readonly) octet_string networkName = 2; - attribute(readonly) int16u panId = 3; - attribute(readonly) int64u extendedPanId = 4; - attribute(readonly) octet_string meshLocalPrefix = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) NeighborTable neighborTableList[] = 7; - attribute(readonly) RouteTable routeTableList[] = 8; - attribute(readonly) int32u partitionId = 9; - attribute(readonly) int8u weighting = 10; - attribute(readonly) int8u dataVersion = 11; - attribute(readonly) int8u stableDataVersion = 12; - attribute(readonly) int8u leaderRouterId = 13; - attribute(readonly) int16u detachedRoleCount = 14; - attribute(readonly) int16u childRoleCount = 15; - attribute(readonly) int16u routerRoleCount = 16; - attribute(readonly) int16u leaderRoleCount = 17; - attribute(readonly) int16u attachAttemptCount = 18; - attribute(readonly) int16u partitionIdChangeCount = 19; - attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly) int16u parentChangeCount = 21; - attribute(readonly) int32u txTotalCount = 22; - attribute(readonly) int32u txUnicastCount = 23; - attribute(readonly) int32u txBroadcastCount = 24; - attribute(readonly) int32u txAckRequestedCount = 25; - attribute(readonly) int32u txAckedCount = 26; - attribute(readonly) int32u txNoAckRequestedCount = 27; - attribute(readonly) int32u txDataCount = 28; - attribute(readonly) int32u txDataPollCount = 29; - attribute(readonly) int32u txBeaconCount = 30; - attribute(readonly) int32u txBeaconRequestCount = 31; - attribute(readonly) int32u txOtherCount = 32; - attribute(readonly) int32u txRetryCount = 33; - attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly) int32u txErrCcaCount = 36; - attribute(readonly) int32u txErrAbortCount = 37; - attribute(readonly) int32u txErrBusyChannelCount = 38; - attribute(readonly) int32u rxTotalCount = 39; - attribute(readonly) int32u rxUnicastCount = 40; - attribute(readonly) int32u rxBroadcastCount = 41; - attribute(readonly) int32u rxDataCount = 42; - attribute(readonly) int32u rxDataPollCount = 43; - attribute(readonly) int32u rxBeaconCount = 44; - attribute(readonly) int32u rxBeaconRequestCount = 45; - attribute(readonly) int32u rxOtherCount = 46; - attribute(readonly) int32u rxAddressFilteredCount = 47; - attribute(readonly) int32u rxDestAddrFilteredCount = 48; - attribute(readonly) int32u rxDuplicatedCount = 49; - attribute(readonly) int32u rxErrNoFrameCount = 50; - attribute(readonly) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly) int32u rxErrSecCount = 53; - attribute(readonly) int32u rxErrFcsCount = 54; - attribute(readonly) int32u rxErrOtherCount = 55; - attribute(readonly) int64u activeTimestamp = 56; - attribute(readonly) int64u pendingTimestamp = 57; - attribute(readonly) int32u delay = 58; - attribute(readonly) SecurityPolicy securityPolicy[] = 59; - attribute(readonly) octet_string channelMask = 60; - attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u channel = 0; + readonly attribute enum8 routingRole = 1; + readonly attribute octet_string networkName = 2; + readonly attribute int16u panId = 3; + readonly attribute int64u extendedPanId = 4; + readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute NeighborTable neighborTableList[] = 7; + readonly attribute RouteTable routeTableList[] = 8; + readonly attribute int32u partitionId = 9; + readonly attribute int8u weighting = 10; + readonly attribute int8u dataVersion = 11; + readonly attribute int8u stableDataVersion = 12; + readonly attribute int8u leaderRouterId = 13; + readonly attribute int16u detachedRoleCount = 14; + readonly attribute int16u childRoleCount = 15; + readonly attribute int16u routerRoleCount = 16; + readonly attribute int16u leaderRoleCount = 17; + readonly attribute int16u attachAttemptCount = 18; + readonly attribute int16u partitionIdChangeCount = 19; + readonly attribute int16u betterPartitionAttachAttemptCount = 20; + readonly attribute int16u parentChangeCount = 21; + readonly attribute int32u txTotalCount = 22; + readonly attribute int32u txUnicastCount = 23; + readonly attribute int32u txBroadcastCount = 24; + readonly attribute int32u txAckRequestedCount = 25; + readonly attribute int32u txAckedCount = 26; + readonly attribute int32u txNoAckRequestedCount = 27; + readonly attribute int32u txDataCount = 28; + readonly attribute int32u txDataPollCount = 29; + readonly attribute int32u txBeaconCount = 30; + readonly attribute int32u txBeaconRequestCount = 31; + readonly attribute int32u txOtherCount = 32; + readonly attribute int32u txRetryCount = 33; + readonly attribute int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute int32u txErrCcaCount = 36; + readonly attribute int32u txErrAbortCount = 37; + readonly attribute int32u txErrBusyChannelCount = 38; + readonly attribute int32u rxTotalCount = 39; + readonly attribute int32u rxUnicastCount = 40; + readonly attribute int32u rxBroadcastCount = 41; + readonly attribute int32u rxDataCount = 42; + readonly attribute int32u rxDataPollCount = 43; + readonly attribute int32u rxBeaconCount = 44; + readonly attribute int32u rxBeaconRequestCount = 45; + readonly attribute int32u rxOtherCount = 46; + readonly attribute int32u rxAddressFilteredCount = 47; + readonly attribute int32u rxDestAddrFilteredCount = 48; + readonly attribute int32u rxDuplicatedCount = 49; + readonly attribute int32u rxErrNoFrameCount = 50; + readonly attribute int32u rxErrUnknownNeighborCount = 51; + readonly attribute int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute int32u rxErrSecCount = 53; + readonly attribute int32u rxErrFcsCount = 54; + readonly attribute int32u rxErrOtherCount = 55; + readonly attribute int64u activeTimestamp = 56; + readonly attribute int64u pendingTimestamp = 57; + readonly attribute int32u delay = 58; + readonly attribute SecurityPolicy securityPolicy[] = 59; + readonly attribute octet_string channelMask = 60; + readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; + readonly attribute NetworkFault activeNetworkFaultsList[] = 62; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster WakeOnLan = 1283 { - attribute(readonly) char_string wakeOnLanMacAddress = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute char_string wakeOnLanMacAddress = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -2973,46 +2973,46 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly) octet_string bssid = 0; - attribute(readonly) enum8 securityType = 1; - attribute(readonly) enum8 wiFiVersion = 2; - attribute(readonly) int16u channelNumber = 3; - attribute(readonly) int8s rssi = 4; - attribute(readonly) int32u beaconLostCount = 5; - attribute(readonly) int32u beaconRxCount = 6; - attribute(readonly) int32u packetMulticastRxCount = 7; - attribute(readonly) int32u packetMulticastTxCount = 8; - attribute(readonly) int32u packetUnicastRxCount = 9; - attribute(readonly) int32u packetUnicastTxCount = 10; - attribute(readonly) int64u currentMaxRate = 11; - attribute(readonly) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute octet_string bssid = 0; + readonly attribute enum8 securityType = 1; + readonly attribute enum8 wiFiVersion = 2; + readonly attribute int16u channelNumber = 3; + readonly attribute int8s rssi = 4; + readonly attribute int32u beaconLostCount = 5; + readonly attribute int32u beaconRxCount = 6; + readonly attribute int32u packetMulticastRxCount = 7; + readonly attribute int32u packetMulticastTxCount = 8; + readonly attribute int32u packetUnicastRxCount = 9; + readonly attribute int32u packetUnicastTxCount = 10; + readonly attribute int64u currentMaxRate = 11; + readonly attribute int64u overrunCount = 12; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } server cluster WindowCovering = 258 { - attribute(readonly) enum8 type = 0; - attribute(readonly) int16u currentPositionLift = 3; - attribute(readonly) int16u currentPositionTilt = 4; - attribute(readonly) bitmap8 configStatus = 7; - attribute(readonly) Percent currentPositionLiftPercentage = 8; - attribute(readonly) Percent currentPositionTiltPercentage = 9; - attribute(readonly) bitmap8 operationalStatus = 10; - attribute(readonly) Percent100ths targetPositionLiftPercent100ths = 11; - attribute(readonly) Percent100ths targetPositionTiltPercent100ths = 12; - attribute(readonly) enum8 endProductType = 13; - attribute(readonly) Percent100ths currentPositionLiftPercent100ths = 14; - attribute(readonly) Percent100ths currentPositionTiltPercent100ths = 15; - attribute(readonly) int16u installedOpenLimitLift = 16; - attribute(readonly) int16u installedClosedLimitLift = 17; - attribute(readonly) int16u installedOpenLimitTilt = 18; - attribute(readonly) int16u installedClosedLimitTilt = 19; - attribute(writable) bitmap8 mode = 23; - attribute(readonly) bitmap16 safetyStatus = 26; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 type = 0; + readonly attribute int16u currentPositionLift = 3; + readonly attribute int16u currentPositionTilt = 4; + readonly attribute bitmap8 configStatus = 7; + readonly attribute Percent currentPositionLiftPercentage = 8; + readonly attribute Percent currentPositionTiltPercentage = 9; + readonly attribute bitmap8 operationalStatus = 10; + readonly attribute Percent100ths targetPositionLiftPercent100ths = 11; + readonly attribute Percent100ths targetPositionTiltPercent100ths = 12; + readonly attribute enum8 endProductType = 13; + readonly attribute Percent100ths currentPositionLiftPercent100ths = 14; + readonly attribute Percent100ths currentPositionTiltPercent100ths = 15; + readonly attribute int16u installedOpenLimitLift = 16; + readonly attribute int16u installedClosedLimitLift = 17; + readonly attribute int16u installedOpenLimitTilt = 18; + readonly attribute int16u installedClosedLimitTilt = 19; + attribute bitmap8 mode = 23; + readonly attribute bitmap16 safetyStatus = 26; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; command DownOrClose(): DefaultSuccess = 1; command StopMotion(): DefaultSuccess = 2; diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 5b96c72fc46520..3961b050530505 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -19,10 +19,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u windowStatus = 0; + readonly attribute fabric_idx adminFabricIndex = 1; + readonly attribute int16u adminVendorId = 2; + readonly attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -57,18 +57,18 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly) int16u interactionModelVersion = 0; - attribute(readonly) char_string vendorName = 1; - attribute(readonly) vendor_id vendorID = 2; - attribute(readonly) char_string productName = 3; - attribute(readonly) int16u productID = 4; - attribute(writable) char_string nodeLabel = 5; - attribute(writable) char_string location = 6; - attribute(readonly) int16u hardwareVersion = 7; - attribute(readonly) char_string hardwareVersionString = 8; - attribute(readonly) int32u softwareVersion = 9; - attribute(readonly) char_string softwareVersionString = 10; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u interactionModelVersion = 0; + readonly attribute char_string vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string productName = 3; + readonly attribute int16u productID = 4; + attribute char_string nodeLabel = 5; + attribute char_string location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string softwareVersionString = 10; + readonly attribute int16u clusterRevision = 65533; } server cluster Descriptor = 29 { @@ -77,11 +77,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly) DeviceType deviceList[] = 0; - attribute(readonly) CLUSTER_ID serverList[] = 1; - attribute(readonly) CLUSTER_ID clientList[] = 2; - attribute(readonly) ENDPOINT_NO partsList[] = 3; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute DeviceType deviceList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -128,22 +128,22 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly) enum8 PHYRate = 0; - attribute(readonly) boolean fullDuplex = 1; - attribute(readonly) int64u packetRxCount = 2; - attribute(readonly) int64u packetTxCount = 3; - attribute(readonly) int64u txErrCount = 4; - attribute(readonly) int64u collisionCount = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) boolean carrierDetect = 7; - attribute(readonly) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 PHYRate = 0; + readonly attribute boolean fullDuplex = 1; + readonly attribute int64u packetRxCount = 2; + readonly attribute int64u packetTxCount = 3; + readonly attribute int64u txErrCount = 4; + readonly attribute int64u collisionCount = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute boolean carrierDetect = 7; + readonly attribute int64u timeSinceReset = 8; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -164,12 +164,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable) int64u breadcrumb = 0; - attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + attribute int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + readonly attribute enum8 regulatoryConfig = 2; + readonly attribute enum8 locationCapability = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -282,15 +282,15 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly) int16u rebootCount = 1; - attribute(readonly) int64u upTime = 2; - attribute(readonly) int32u totalOperationalHours = 3; - attribute(readonly) enum8 bootReasons = 4; - attribute(readonly) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly) ENUM8 activeRadioFaults[] = 6; - attribute(readonly) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute enum8 bootReasons = 4; + readonly attribute ENUM8 activeHardwareFaults[] = 5; + readonly attribute ENUM8 activeRadioFaults[] = 6; + readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute int16u clusterRevision = 65533; } server cluster LevelControl = 8 { @@ -304,22 +304,22 @@ server cluster LevelControl = 8 { kDown = 1; } - attribute(readonly) int8u currentLevel = 0; - attribute(readonly) int16u remainingTime = 1; - attribute(readonly) int8u minLevel = 2; - attribute(readonly) int8u maxLevel = 3; - attribute(readonly) int16u currentFrequency = 4; - attribute(readonly) int16u minFrequency = 5; - attribute(readonly) int16u maxFrequency = 6; - attribute(writable) bitmap8 options = 15; - attribute(writable) int16u onOffTransitionTime = 16; - attribute(writable) int8u onLevel = 17; - attribute(writable) int16u onTransitionTime = 18; - attribute(writable) int16u offTransitionTime = 19; - attribute(writable) int8u defaultMoveRate = 20; - attribute(writable) int8u startUpCurrentLevel = 16384; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u currentLevel = 0; + readonly attribute int16u remainingTime = 1; + readonly attribute int8u minLevel = 2; + readonly attribute int8u maxLevel = 3; + readonly attribute int16u currentFrequency = 4; + readonly attribute int16u minFrequency = 5; + readonly attribute int16u maxFrequency = 6; + attribute bitmap8 options = 15; + attribute int16u onOffTransitionTime = 16; + attribute int8u onLevel = 17; + attribute int16u onTransitionTime = 18; + attribute int16u offTransitionTime = 19; + attribute int8u defaultMoveRate = 20; + attribute int8u startUpCurrentLevel = 16384; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -375,8 +375,8 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute char_string activeLocale = 1; + readonly attribute CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -429,16 +429,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u maxNetworks = 0; + readonly attribute NetworkInfo networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute boolean interfaceEnabled = 4; + readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; + readonly attribute octet_string lastNetworkID = 6; + readonly attribute int32u lastConnectErrorValue = 7; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -514,8 +514,8 @@ server cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly) boolean onOff = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute boolean onOff = 0; + readonly attribute int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -545,12 +545,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly) FabricDescriptor fabricsList[] = 1; - attribute(readonly) int8u supportedFabrics = 2; - attribute(readonly) int8u commissionedFabrics = 3; - attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly) fabric_idx currentFabricIndex = 5; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute FabricDescriptor fabricsList[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -637,12 +637,12 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly) ThreadMetrics threadMetrics[] = 0; - attribute(readonly) int64u currentHeapFree = 1; - attribute(readonly) int64u currentHeapUsed = 2; - attribute(readonly) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute ThreadMetrics threadMetrics[] = 0; + readonly attribute int64u currentHeapFree = 1; + readonly attribute int64u currentHeapUsed = 2; + readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster Switch = 59 { @@ -676,11 +676,11 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } - attribute(readonly) int8u numberOfPositions = 0; - attribute(readonly) int8u currentPosition = 1; - attribute(readonly) int8u multiPressMax = 2; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; + readonly attribute int8u multiPressMax = 2; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster ThreadNetworkDiagnostics = 53 { @@ -760,76 +760,76 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly) int16u channel = 0; - attribute(readonly) enum8 routingRole = 1; - attribute(readonly) octet_string networkName = 2; - attribute(readonly) int16u panId = 3; - attribute(readonly) int64u extendedPanId = 4; - attribute(readonly) octet_string meshLocalPrefix = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) NeighborTable neighborTableList[] = 7; - attribute(readonly) RouteTable routeTableList[] = 8; - attribute(readonly) int32u partitionId = 9; - attribute(readonly) int8u weighting = 10; - attribute(readonly) int8u dataVersion = 11; - attribute(readonly) int8u stableDataVersion = 12; - attribute(readonly) int8u leaderRouterId = 13; - attribute(readonly) int16u detachedRoleCount = 14; - attribute(readonly) int16u childRoleCount = 15; - attribute(readonly) int16u routerRoleCount = 16; - attribute(readonly) int16u leaderRoleCount = 17; - attribute(readonly) int16u attachAttemptCount = 18; - attribute(readonly) int16u partitionIdChangeCount = 19; - attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly) int16u parentChangeCount = 21; - attribute(readonly) int32u txTotalCount = 22; - attribute(readonly) int32u txUnicastCount = 23; - attribute(readonly) int32u txBroadcastCount = 24; - attribute(readonly) int32u txAckRequestedCount = 25; - attribute(readonly) int32u txAckedCount = 26; - attribute(readonly) int32u txNoAckRequestedCount = 27; - attribute(readonly) int32u txDataCount = 28; - attribute(readonly) int32u txDataPollCount = 29; - attribute(readonly) int32u txBeaconCount = 30; - attribute(readonly) int32u txBeaconRequestCount = 31; - attribute(readonly) int32u txOtherCount = 32; - attribute(readonly) int32u txRetryCount = 33; - attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly) int32u txErrCcaCount = 36; - attribute(readonly) int32u txErrAbortCount = 37; - attribute(readonly) int32u txErrBusyChannelCount = 38; - attribute(readonly) int32u rxTotalCount = 39; - attribute(readonly) int32u rxUnicastCount = 40; - attribute(readonly) int32u rxBroadcastCount = 41; - attribute(readonly) int32u rxDataCount = 42; - attribute(readonly) int32u rxDataPollCount = 43; - attribute(readonly) int32u rxBeaconCount = 44; - attribute(readonly) int32u rxBeaconRequestCount = 45; - attribute(readonly) int32u rxOtherCount = 46; - attribute(readonly) int32u rxAddressFilteredCount = 47; - attribute(readonly) int32u rxDestAddrFilteredCount = 48; - attribute(readonly) int32u rxDuplicatedCount = 49; - attribute(readonly) int32u rxErrNoFrameCount = 50; - attribute(readonly) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly) int32u rxErrSecCount = 53; - attribute(readonly) int32u rxErrFcsCount = 54; - attribute(readonly) int32u rxErrOtherCount = 55; - attribute(readonly) int64u activeTimestamp = 56; - attribute(readonly) int64u pendingTimestamp = 57; - attribute(readonly) int32u delay = 58; - attribute(readonly) SecurityPolicy securityPolicy[] = 59; - attribute(readonly) octet_string channelMask = 60; - attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u channel = 0; + readonly attribute enum8 routingRole = 1; + readonly attribute octet_string networkName = 2; + readonly attribute int16u panId = 3; + readonly attribute int64u extendedPanId = 4; + readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute NeighborTable neighborTableList[] = 7; + readonly attribute RouteTable routeTableList[] = 8; + readonly attribute int32u partitionId = 9; + readonly attribute int8u weighting = 10; + readonly attribute int8u dataVersion = 11; + readonly attribute int8u stableDataVersion = 12; + readonly attribute int8u leaderRouterId = 13; + readonly attribute int16u detachedRoleCount = 14; + readonly attribute int16u childRoleCount = 15; + readonly attribute int16u routerRoleCount = 16; + readonly attribute int16u leaderRoleCount = 17; + readonly attribute int16u attachAttemptCount = 18; + readonly attribute int16u partitionIdChangeCount = 19; + readonly attribute int16u betterPartitionAttachAttemptCount = 20; + readonly attribute int16u parentChangeCount = 21; + readonly attribute int32u txTotalCount = 22; + readonly attribute int32u txUnicastCount = 23; + readonly attribute int32u txBroadcastCount = 24; + readonly attribute int32u txAckRequestedCount = 25; + readonly attribute int32u txAckedCount = 26; + readonly attribute int32u txNoAckRequestedCount = 27; + readonly attribute int32u txDataCount = 28; + readonly attribute int32u txDataPollCount = 29; + readonly attribute int32u txBeaconCount = 30; + readonly attribute int32u txBeaconRequestCount = 31; + readonly attribute int32u txOtherCount = 32; + readonly attribute int32u txRetryCount = 33; + readonly attribute int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute int32u txErrCcaCount = 36; + readonly attribute int32u txErrAbortCount = 37; + readonly attribute int32u txErrBusyChannelCount = 38; + readonly attribute int32u rxTotalCount = 39; + readonly attribute int32u rxUnicastCount = 40; + readonly attribute int32u rxBroadcastCount = 41; + readonly attribute int32u rxDataCount = 42; + readonly attribute int32u rxDataPollCount = 43; + readonly attribute int32u rxBeaconCount = 44; + readonly attribute int32u rxBeaconRequestCount = 45; + readonly attribute int32u rxOtherCount = 46; + readonly attribute int32u rxAddressFilteredCount = 47; + readonly attribute int32u rxDestAddrFilteredCount = 48; + readonly attribute int32u rxDuplicatedCount = 49; + readonly attribute int32u rxErrNoFrameCount = 50; + readonly attribute int32u rxErrUnknownNeighborCount = 51; + readonly attribute int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute int32u rxErrSecCount = 53; + readonly attribute int32u rxErrFcsCount = 54; + readonly attribute int32u rxErrOtherCount = 55; + readonly attribute int64u activeTimestamp = 56; + readonly attribute int64u pendingTimestamp = 57; + readonly attribute int32u delay = 58; + readonly attribute SecurityPolicy securityPolicy[] = 59; + readonly attribute octet_string channelMask = 60; + readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; + readonly attribute NetworkFault activeNetworkFaultsList[] = 62; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -876,21 +876,21 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly) octet_string bssid = 0; - attribute(readonly) enum8 securityType = 1; - attribute(readonly) enum8 wiFiVersion = 2; - attribute(readonly) int16u channelNumber = 3; - attribute(readonly) int8s rssi = 4; - attribute(readonly) int32u beaconLostCount = 5; - attribute(readonly) int32u beaconRxCount = 6; - attribute(readonly) int32u packetMulticastRxCount = 7; - attribute(readonly) int32u packetMulticastTxCount = 8; - attribute(readonly) int32u packetUnicastRxCount = 9; - attribute(readonly) int32u packetUnicastTxCount = 10; - attribute(readonly) int64u currentMaxRate = 11; - attribute(readonly) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute octet_string bssid = 0; + readonly attribute enum8 securityType = 1; + readonly attribute enum8 wiFiVersion = 2; + readonly attribute int16u channelNumber = 3; + readonly attribute int8s rssi = 4; + readonly attribute int32u beaconLostCount = 5; + readonly attribute int32u beaconRxCount = 6; + readonly attribute int32u packetMulticastRxCount = 7; + readonly attribute int32u packetMulticastTxCount = 8; + readonly attribute int32u packetUnicastRxCount = 9; + readonly attribute int32u packetUnicastTxCount = 10; + readonly attribute int64u currentMaxRate = 11; + readonly attribute int64u overrunCount = 12; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } diff --git a/examples/door-lock-app/door-lock-common/door-lock-app.matter b/examples/door-lock-app/door-lock-common/door-lock-app.matter index 16b9b8c2c6ae9c..c84c60cd4242e8 100644 --- a/examples/door-lock-app/door-lock-common/door-lock-app.matter +++ b/examples/door-lock-app/door-lock-common/door-lock-app.matter @@ -19,10 +19,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u windowStatus = 0; + readonly attribute fabric_idx adminFabricIndex = 1; + readonly attribute int16u adminVendorId = 2; + readonly attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -57,18 +57,18 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly) int16u interactionModelVersion = 0; - attribute(readonly) char_string vendorName = 1; - attribute(readonly) vendor_id vendorID = 2; - attribute(readonly) char_string productName = 3; - attribute(readonly) int16u productID = 4; - attribute(writable) char_string nodeLabel = 5; - attribute(writable) char_string location = 6; - attribute(readonly) int16u hardwareVersion = 7; - attribute(readonly) char_string hardwareVersionString = 8; - attribute(readonly) int32u softwareVersion = 9; - attribute(readonly) char_string softwareVersionString = 10; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u interactionModelVersion = 0; + readonly attribute char_string vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string productName = 3; + readonly attribute int16u productID = 4; + attribute char_string nodeLabel = 5; + attribute char_string location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string softwareVersionString = 10; + readonly attribute int16u clusterRevision = 65533; } server cluster Descriptor = 29 { @@ -77,11 +77,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly) DeviceType deviceList[] = 0; - attribute(readonly) CLUSTER_ID serverList[] = 1; - attribute(readonly) CLUSTER_ID clientList[] = 2; - attribute(readonly) ENDPOINT_NO partsList[] = 3; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute DeviceType deviceList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -350,25 +350,25 @@ server cluster DoorLock = 257 { nullable INT16U dataIndex = 6; } - attribute(readonly) DlLockState lockState = 0; - attribute(readonly) DlLockType lockType = 1; - attribute(readonly) boolean actuatorEnabled = 2; - attribute(readonly) DlDoorState doorState = 3; - attribute(readonly) int16u numberOfTotalUsersSupported = 17; - attribute(readonly) int16u numberOfPINUsersSupported = 18; - attribute(readonly) int8u maxPINCodeLength = 23; - attribute(readonly) int8u minPINCodeLength = 24; - attribute(readonly) bitmap8 credentialRulesSupport = 27; - attribute(writable) char_string language = 33; - attribute(writable) int32u autoRelockTime = 35; - attribute(writable) int8u soundVolume = 36; - attribute(writable) DlOperatingMode operatingMode = 37; - attribute(readonly) bitmap16 supportedOperatingModes = 38; - attribute(writable) boolean enableOneTouchLocking = 41; - attribute(writable) boolean enablePrivacyModeButton = 43; - attribute(writable) int8u wrongCodeEntryLimit = 48; - attribute(writable) int8u userCodeTemporaryDisableTime = 49; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute DlLockState lockState = 0; + readonly attribute DlLockType lockType = 1; + readonly attribute boolean actuatorEnabled = 2; + readonly attribute DlDoorState doorState = 3; + readonly attribute int16u numberOfTotalUsersSupported = 17; + readonly attribute int16u numberOfPINUsersSupported = 18; + readonly attribute int8u maxPINCodeLength = 23; + readonly attribute int8u minPINCodeLength = 24; + readonly attribute bitmap8 credentialRulesSupport = 27; + attribute char_string language = 33; + attribute int32u autoRelockTime = 35; + attribute int8u soundVolume = 36; + attribute DlOperatingMode operatingMode = 37; + readonly attribute bitmap16 supportedOperatingModes = 38; + attribute boolean enableOneTouchLocking = 41; + attribute boolean enablePrivacyModeButton = 43; + attribute int8u wrongCodeEntryLimit = 48; + attribute int8u userCodeTemporaryDisableTime = 49; + readonly attribute int16u clusterRevision = 65533; request struct ClearCredentialRequest { DlCredential credential = 0; @@ -461,22 +461,22 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly) enum8 PHYRate = 0; - attribute(readonly) boolean fullDuplex = 1; - attribute(readonly) int64u packetRxCount = 2; - attribute(readonly) int64u packetTxCount = 3; - attribute(readonly) int64u txErrCount = 4; - attribute(readonly) int64u collisionCount = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) boolean carrierDetect = 7; - attribute(readonly) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 PHYRate = 0; + readonly attribute boolean fullDuplex = 1; + readonly attribute int64u packetRxCount = 2; + readonly attribute int64u packetTxCount = 3; + readonly attribute int64u txErrCount = 4; + readonly attribute int64u collisionCount = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute boolean carrierDetect = 7; + readonly attribute int64u timeSinceReset = 8; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -497,12 +497,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable) int64u breadcrumb = 0; - attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + attribute int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + readonly attribute enum8 regulatoryConfig = 2; + readonly attribute enum8 locationCapability = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -615,20 +615,20 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly) int16u rebootCount = 1; - attribute(readonly) int64u upTime = 2; - attribute(readonly) int32u totalOperationalHours = 3; - attribute(readonly) enum8 bootReasons = 4; - attribute(readonly) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly) ENUM8 activeRadioFaults[] = 6; - attribute(readonly) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute enum8 bootReasons = 4; + readonly attribute ENUM8 activeHardwareFaults[] = 5; + readonly attribute ENUM8 activeRadioFaults[] = 6; + readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute int16u clusterRevision = 65533; } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute char_string activeLocale = 1; + readonly attribute CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -681,16 +681,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u maxNetworks = 0; + readonly attribute NetworkInfo networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute boolean interfaceEnabled = 4; + readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; + readonly attribute octet_string lastNetworkID = 6; + readonly attribute int32u lastConnectErrorValue = 7; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -773,12 +773,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly) FabricDescriptor fabricsList[] = 1; - attribute(readonly) int8u supportedFabrics = 2; - attribute(readonly) int8u commissionedFabrics = 3; - attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly) fabric_idx currentFabricIndex = 5; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute FabricDescriptor fabricsList[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -853,21 +853,21 @@ server cluster OperationalCredentials = 62 { } server cluster PowerSource = 47 { - attribute(readonly) enum8 status = 0; - attribute(readonly) int8u order = 1; - attribute(readonly) char_string description = 2; - attribute(readonly) int32u wiredAssessedCurrent = 6; - attribute(readonly) enum8 batteryChargeLevel = 14; - attribute(readonly) boolean batteryReplacementNeeded = 15; - attribute(readonly) enum8 batteryReplaceability = 16; - attribute(readonly) char_string batteryReplacementDescription = 19; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 status = 0; + readonly attribute int8u order = 1; + readonly attribute char_string description = 2; + readonly attribute int32u wiredAssessedCurrent = 6; + readonly attribute enum8 batteryChargeLevel = 14; + readonly attribute boolean batteryReplacementNeeded = 15; + readonly attribute enum8 batteryReplaceability = 16; + readonly attribute char_string batteryReplacementDescription = 19; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster PowerSourceConfiguration = 46 { - attribute(readonly) INT8U sources[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute INT8U sources[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster SoftwareDiagnostics = 52 { @@ -883,12 +883,12 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly) ThreadMetrics threadMetrics[] = 0; - attribute(readonly) int64u currentHeapFree = 1; - attribute(readonly) int64u currentHeapUsed = 2; - attribute(readonly) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute ThreadMetrics threadMetrics[] = 0; + readonly attribute int64u currentHeapFree = 1; + readonly attribute int64u currentHeapUsed = 2; + readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster ThreadNetworkDiagnostics = 53 { @@ -968,76 +968,76 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly) int16u channel = 0; - attribute(readonly) enum8 routingRole = 1; - attribute(readonly) octet_string networkName = 2; - attribute(readonly) int16u panId = 3; - attribute(readonly) int64u extendedPanId = 4; - attribute(readonly) octet_string meshLocalPrefix = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) NeighborTable neighborTableList[] = 7; - attribute(readonly) RouteTable routeTableList[] = 8; - attribute(readonly) int32u partitionId = 9; - attribute(readonly) int8u weighting = 10; - attribute(readonly) int8u dataVersion = 11; - attribute(readonly) int8u stableDataVersion = 12; - attribute(readonly) int8u leaderRouterId = 13; - attribute(readonly) int16u detachedRoleCount = 14; - attribute(readonly) int16u childRoleCount = 15; - attribute(readonly) int16u routerRoleCount = 16; - attribute(readonly) int16u leaderRoleCount = 17; - attribute(readonly) int16u attachAttemptCount = 18; - attribute(readonly) int16u partitionIdChangeCount = 19; - attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly) int16u parentChangeCount = 21; - attribute(readonly) int32u txTotalCount = 22; - attribute(readonly) int32u txUnicastCount = 23; - attribute(readonly) int32u txBroadcastCount = 24; - attribute(readonly) int32u txAckRequestedCount = 25; - attribute(readonly) int32u txAckedCount = 26; - attribute(readonly) int32u txNoAckRequestedCount = 27; - attribute(readonly) int32u txDataCount = 28; - attribute(readonly) int32u txDataPollCount = 29; - attribute(readonly) int32u txBeaconCount = 30; - attribute(readonly) int32u txBeaconRequestCount = 31; - attribute(readonly) int32u txOtherCount = 32; - attribute(readonly) int32u txRetryCount = 33; - attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly) int32u txErrCcaCount = 36; - attribute(readonly) int32u txErrAbortCount = 37; - attribute(readonly) int32u txErrBusyChannelCount = 38; - attribute(readonly) int32u rxTotalCount = 39; - attribute(readonly) int32u rxUnicastCount = 40; - attribute(readonly) int32u rxBroadcastCount = 41; - attribute(readonly) int32u rxDataCount = 42; - attribute(readonly) int32u rxDataPollCount = 43; - attribute(readonly) int32u rxBeaconCount = 44; - attribute(readonly) int32u rxBeaconRequestCount = 45; - attribute(readonly) int32u rxOtherCount = 46; - attribute(readonly) int32u rxAddressFilteredCount = 47; - attribute(readonly) int32u rxDestAddrFilteredCount = 48; - attribute(readonly) int32u rxDuplicatedCount = 49; - attribute(readonly) int32u rxErrNoFrameCount = 50; - attribute(readonly) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly) int32u rxErrSecCount = 53; - attribute(readonly) int32u rxErrFcsCount = 54; - attribute(readonly) int32u rxErrOtherCount = 55; - attribute(readonly) int64u activeTimestamp = 56; - attribute(readonly) int64u pendingTimestamp = 57; - attribute(readonly) int32u delay = 58; - attribute(readonly) SecurityPolicy securityPolicy[] = 59; - attribute(readonly) octet_string channelMask = 60; - attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u channel = 0; + readonly attribute enum8 routingRole = 1; + readonly attribute octet_string networkName = 2; + readonly attribute int16u panId = 3; + readonly attribute int64u extendedPanId = 4; + readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute NeighborTable neighborTableList[] = 7; + readonly attribute RouteTable routeTableList[] = 8; + readonly attribute int32u partitionId = 9; + readonly attribute int8u weighting = 10; + readonly attribute int8u dataVersion = 11; + readonly attribute int8u stableDataVersion = 12; + readonly attribute int8u leaderRouterId = 13; + readonly attribute int16u detachedRoleCount = 14; + readonly attribute int16u childRoleCount = 15; + readonly attribute int16u routerRoleCount = 16; + readonly attribute int16u leaderRoleCount = 17; + readonly attribute int16u attachAttemptCount = 18; + readonly attribute int16u partitionIdChangeCount = 19; + readonly attribute int16u betterPartitionAttachAttemptCount = 20; + readonly attribute int16u parentChangeCount = 21; + readonly attribute int32u txTotalCount = 22; + readonly attribute int32u txUnicastCount = 23; + readonly attribute int32u txBroadcastCount = 24; + readonly attribute int32u txAckRequestedCount = 25; + readonly attribute int32u txAckedCount = 26; + readonly attribute int32u txNoAckRequestedCount = 27; + readonly attribute int32u txDataCount = 28; + readonly attribute int32u txDataPollCount = 29; + readonly attribute int32u txBeaconCount = 30; + readonly attribute int32u txBeaconRequestCount = 31; + readonly attribute int32u txOtherCount = 32; + readonly attribute int32u txRetryCount = 33; + readonly attribute int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute int32u txErrCcaCount = 36; + readonly attribute int32u txErrAbortCount = 37; + readonly attribute int32u txErrBusyChannelCount = 38; + readonly attribute int32u rxTotalCount = 39; + readonly attribute int32u rxUnicastCount = 40; + readonly attribute int32u rxBroadcastCount = 41; + readonly attribute int32u rxDataCount = 42; + readonly attribute int32u rxDataPollCount = 43; + readonly attribute int32u rxBeaconCount = 44; + readonly attribute int32u rxBeaconRequestCount = 45; + readonly attribute int32u rxOtherCount = 46; + readonly attribute int32u rxAddressFilteredCount = 47; + readonly attribute int32u rxDestAddrFilteredCount = 48; + readonly attribute int32u rxDuplicatedCount = 49; + readonly attribute int32u rxErrNoFrameCount = 50; + readonly attribute int32u rxErrUnknownNeighborCount = 51; + readonly attribute int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute int32u rxErrSecCount = 53; + readonly attribute int32u rxErrFcsCount = 54; + readonly attribute int32u rxErrOtherCount = 55; + readonly attribute int64u activeTimestamp = 56; + readonly attribute int64u pendingTimestamp = 57; + readonly attribute int32u delay = 58; + readonly attribute SecurityPolicy securityPolicy[] = 59; + readonly attribute octet_string channelMask = 60; + readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; + readonly attribute NetworkFault activeNetworkFaultsList[] = 62; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -1084,21 +1084,21 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly) octet_string bssid = 0; - attribute(readonly) enum8 securityType = 1; - attribute(readonly) enum8 wiFiVersion = 2; - attribute(readonly) int16u channelNumber = 3; - attribute(readonly) int8s rssi = 4; - attribute(readonly) int32u beaconLostCount = 5; - attribute(readonly) int32u beaconRxCount = 6; - attribute(readonly) int32u packetMulticastRxCount = 7; - attribute(readonly) int32u packetMulticastTxCount = 8; - attribute(readonly) int32u packetUnicastRxCount = 9; - attribute(readonly) int32u packetUnicastTxCount = 10; - attribute(readonly) int64u currentMaxRate = 11; - attribute(readonly) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute octet_string bssid = 0; + readonly attribute enum8 securityType = 1; + readonly attribute enum8 wiFiVersion = 2; + readonly attribute int16u channelNumber = 3; + readonly attribute int8s rssi = 4; + readonly attribute int32u beaconLostCount = 5; + readonly attribute int32u beaconRxCount = 6; + readonly attribute int32u packetMulticastRxCount = 7; + readonly attribute int32u packetMulticastTxCount = 8; + readonly attribute int32u packetUnicastRxCount = 9; + readonly attribute int32u packetUnicastTxCount = 10; + readonly attribute int64u currentMaxRate = 11; + readonly attribute int64u overrunCount = 12; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 256b639135c43c..2567e30773641b 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -19,10 +19,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u windowStatus = 0; + readonly attribute fabric_idx adminFabricIndex = 1; + readonly attribute int16u adminVendorId = 2; + readonly attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -57,26 +57,26 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly) int16u interactionModelVersion = 0; - attribute(readonly) char_string vendorName = 1; - attribute(readonly) vendor_id vendorID = 2; - attribute(readonly) char_string productName = 3; - attribute(readonly) int16u productID = 4; - attribute(writable) char_string nodeLabel = 5; - attribute(writable) char_string location = 6; - attribute(readonly) int16u hardwareVersion = 7; - attribute(readonly) char_string hardwareVersionString = 8; - attribute(readonly) int32u softwareVersion = 9; - attribute(readonly) char_string softwareVersionString = 10; - attribute(readonly) char_string manufacturingDate = 11; - attribute(readonly) char_string partNumber = 12; - attribute(readonly) long_char_string productURL = 13; - attribute(readonly) char_string productLabel = 14; - attribute(readonly) char_string serialNumber = 15; - attribute(writable) boolean localConfigDisabled = 16; - attribute(readonly) boolean reachable = 17; - attribute(readonly) char_string uniqueID = 18; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u interactionModelVersion = 0; + readonly attribute char_string vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string productName = 3; + readonly attribute int16u productID = 4; + attribute char_string nodeLabel = 5; + attribute char_string location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string softwareVersionString = 10; + readonly attribute char_string manufacturingDate = 11; + readonly attribute char_string partNumber = 12; + readonly attribute long_char_string productURL = 13; + readonly attribute char_string productLabel = 14; + readonly attribute char_string serialNumber = 15; + attribute boolean localConfigDisabled = 16; + readonly attribute boolean reachable = 17; + readonly attribute char_string uniqueID = 18; + readonly attribute int16u clusterRevision = 65533; } server cluster ColorControl = 768 { @@ -126,28 +126,28 @@ server cluster ColorControl = 768 { kDown = 3; } - attribute(readonly) int8u currentHue = 0; - attribute(readonly) int8u currentSaturation = 1; - attribute(readonly) int16u remainingTime = 2; - attribute(readonly) int16u currentX = 3; - attribute(readonly) int16u currentY = 4; - attribute(readonly) int16u colorTemperature = 7; - attribute(readonly) enum8 colorMode = 8; - attribute(writable) bitmap8 colorControlOptions = 15; - attribute(readonly) int8u numberOfPrimaries = 16; - attribute(readonly) int16u enhancedCurrentHue = 16384; - attribute(readonly) enum8 enhancedColorMode = 16385; - attribute(readonly) int8u colorLoopActive = 16386; - attribute(readonly) int8u colorLoopDirection = 16387; - attribute(readonly) int16u colorLoopTime = 16388; - attribute(readonly) int16u colorLoopStartEnhancedHue = 16389; - attribute(readonly) int16u colorLoopStoredEnhancedHue = 16390; - attribute(readonly) bitmap16 colorCapabilities = 16394; - attribute(readonly) int16u colorTempPhysicalMin = 16395; - attribute(readonly) int16u colorTempPhysicalMax = 16396; - attribute(readonly) int16u coupleColorTempToLevelMinMireds = 16397; - attribute(writable) int16u startUpColorTemperatureMireds = 16400; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u currentHue = 0; + readonly attribute int8u currentSaturation = 1; + readonly attribute int16u remainingTime = 2; + readonly attribute int16u currentX = 3; + readonly attribute int16u currentY = 4; + readonly attribute int16u colorTemperature = 7; + readonly attribute enum8 colorMode = 8; + attribute bitmap8 colorControlOptions = 15; + readonly attribute int8u numberOfPrimaries = 16; + readonly attribute int16u enhancedCurrentHue = 16384; + readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute int8u colorLoopActive = 16386; + readonly attribute int8u colorLoopDirection = 16387; + readonly attribute int16u colorLoopTime = 16388; + readonly attribute int16u colorLoopStartEnhancedHue = 16389; + readonly attribute int16u colorLoopStoredEnhancedHue = 16390; + readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute int16u colorTempPhysicalMin = 16395; + readonly attribute int16u colorTempPhysicalMax = 16396; + readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; + attribute int16u startUpColorTemperatureMireds = 16400; + readonly attribute int16u clusterRevision = 65533; request struct ColorLoopSetRequest { ColorLoopUpdateFlags updateFlags = 0; @@ -324,11 +324,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly) DeviceType deviceList[] = 0; - attribute(readonly) CLUSTER_ID serverList[] = 1; - attribute(readonly) CLUSTER_ID clientList[] = 2; - attribute(readonly) ENDPOINT_NO partsList[] = 3; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute DeviceType deviceList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -375,24 +375,24 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly) enum8 PHYRate = 0; - attribute(readonly) boolean fullDuplex = 1; - attribute(readonly) int64u packetRxCount = 2; - attribute(readonly) int64u packetTxCount = 3; - attribute(readonly) int64u txErrCount = 4; - attribute(readonly) int64u collisionCount = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) boolean carrierDetect = 7; - attribute(readonly) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 PHYRate = 0; + readonly attribute boolean fullDuplex = 1; + readonly attribute int64u packetRxCount = 2; + readonly attribute int64u packetTxCount = 3; + readonly attribute int64u txErrCount = 4; + readonly attribute int64u collisionCount = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute boolean carrierDetect = 7; + readonly attribute int64u timeSinceReset = 8; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -413,12 +413,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable) int64u breadcrumb = 0; - attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + attribute int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + readonly attribute enum8 regulatoryConfig = 2; + readonly attribute enum8 locationCapability = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -531,15 +531,15 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly) int16u rebootCount = 1; - attribute(readonly) int64u upTime = 2; - attribute(readonly) int32u totalOperationalHours = 3; - attribute(readonly) enum8 bootReasons = 4; - attribute(readonly) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly) ENUM8 activeRadioFaults[] = 6; - attribute(readonly) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute enum8 bootReasons = 4; + readonly attribute ENUM8 activeHardwareFaults[] = 5; + readonly attribute ENUM8 activeRadioFaults[] = 6; + readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute int16u clusterRevision = 65533; } server cluster Identify = 3 { @@ -565,9 +565,9 @@ server cluster Identify = 3 { kActuator = 5; } - attribute(writable) int16u identifyTime = 0; - attribute(readonly) enum8 identifyType = 1; - attribute(readonly) int16u clusterRevision = 65533; + attribute int16u identifyTime = 0; + readonly attribute enum8 identifyType = 1; + readonly attribute int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -598,22 +598,22 @@ server cluster LevelControl = 8 { kDown = 1; } - attribute(readonly) int8u currentLevel = 0; - attribute(readonly) int16u remainingTime = 1; - attribute(readonly) int8u minLevel = 2; - attribute(readonly) int8u maxLevel = 3; - attribute(readonly) int16u currentFrequency = 4; - attribute(readonly) int16u minFrequency = 5; - attribute(readonly) int16u maxFrequency = 6; - attribute(writable) bitmap8 options = 15; - attribute(writable) int16u onOffTransitionTime = 16; - attribute(writable) int8u onLevel = 17; - attribute(writable) int16u onTransitionTime = 18; - attribute(writable) int16u offTransitionTime = 19; - attribute(writable) int8u defaultMoveRate = 20; - attribute(writable) int8u startUpCurrentLevel = 16384; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u currentLevel = 0; + readonly attribute int16u remainingTime = 1; + readonly attribute int8u minLevel = 2; + readonly attribute int8u maxLevel = 3; + readonly attribute int16u currentFrequency = 4; + readonly attribute int16u minFrequency = 5; + readonly attribute int16u maxFrequency = 6; + attribute bitmap8 options = 15; + attribute int16u onOffTransitionTime = 16; + attribute int8u onLevel = 17; + attribute int16u onTransitionTime = 18; + attribute int16u offTransitionTime = 19; + attribute int8u defaultMoveRate = 20; + attribute int8u startUpCurrentLevel = 16384; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -669,8 +669,8 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute char_string activeLocale = 1; + readonly attribute CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -723,16 +723,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u maxNetworks = 0; + readonly attribute NetworkInfo networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute boolean interfaceEnabled = 4; + readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; + readonly attribute octet_string lastNetworkID = 6; + readonly attribute int32u lastConnectErrorValue = 7; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -813,7 +813,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -909,11 +909,11 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute(writable) ProviderLocation defaultOtaProviders[] = 0; - attribute(readonly) boolean updatePossible = 1; - attribute(readonly) OTAUpdateStateEnum updateState = 2; - attribute(readonly) int8u updateStateProgress = 3; - attribute(readonly) int16u clusterRevision = 65533; + attribute ProviderLocation defaultOtaProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute OTAUpdateStateEnum updateState = 2; + readonly attribute int8u updateStateProgress = 3; + readonly attribute int16u clusterRevision = 65533; request struct AnnounceOtaProviderRequest { node_id providerNodeId = 0; @@ -927,10 +927,10 @@ server cluster OtaSoftwareUpdateRequestor = 42 { } server cluster OccupancySensing = 1030 { - attribute(readonly) bitmap8 occupancy = 0; - attribute(readonly) enum8 occupancySensorType = 1; - attribute(readonly) bitmap8 occupancySensorTypeBitmap = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute bitmap8 occupancy = 0; + readonly attribute enum8 occupancySensorType = 1; + readonly attribute bitmap8 occupancySensorTypeBitmap = 2; + readonly attribute int16u clusterRevision = 65533; } client cluster OnOff = 6 { @@ -949,13 +949,13 @@ client cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly) boolean onOff = 0; - attribute(readonly) boolean globalSceneControl = 16384; - attribute(writable) int16u onTime = 16385; - attribute(writable) int16u offWaitTime = 16386; - attribute(writable) enum8 startUpOnOff = 16387; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute boolean onOff = 0; + readonly attribute boolean globalSceneControl = 16384; + attribute int16u onTime = 16385; + attribute int16u offWaitTime = 16386; + attribute enum8 startUpOnOff = 16387; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster OnOff = 6 { @@ -974,13 +974,13 @@ server cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly) boolean onOff = 0; - attribute(readonly) boolean globalSceneControl = 16384; - attribute(writable) int16u onTime = 16385; - attribute(writable) int16u offWaitTime = 16386; - attribute(writable) enum8 startUpOnOff = 16387; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute boolean onOff = 0; + readonly attribute boolean globalSceneControl = 16384; + attribute int16u onTime = 16385; + attribute int16u offWaitTime = 16386; + attribute enum8 startUpOnOff = 16387; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct OffWithEffectRequest { OnOffEffectIdentifier effectId = 0; @@ -1002,9 +1002,9 @@ server cluster OnOff = 6 { } server cluster OnOffSwitchConfiguration = 7 { - attribute(readonly) enum8 switchType = 0; - attribute(writable) enum8 switchActions = 16; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 switchType = 0; + attribute enum8 switchActions = 16; + readonly attribute int16u clusterRevision = 65533; } server cluster OperationalCredentials = 62 { @@ -1030,12 +1030,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly) FabricDescriptor fabricsList[] = 1; - attribute(readonly) int8u supportedFabrics = 2; - attribute(readonly) int8u commissionedFabrics = 3; - attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly) fabric_idx currentFabricIndex = 5; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute FabricDescriptor fabricsList[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -1122,12 +1122,12 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly) ThreadMetrics threadMetrics[] = 0; - attribute(readonly) int64u currentHeapFree = 1; - attribute(readonly) int64u currentHeapUsed = 2; - attribute(readonly) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute ThreadMetrics threadMetrics[] = 0; + readonly attribute int64u currentHeapFree = 1; + readonly attribute int64u currentHeapUsed = 2; + readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; command ResetWatermarks(): DefaultSuccess = 0; } @@ -1242,78 +1242,78 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly) int16u channel = 0; - attribute(readonly) enum8 routingRole = 1; - attribute(readonly) octet_string networkName = 2; - attribute(readonly) int16u panId = 3; - attribute(readonly) int64u extendedPanId = 4; - attribute(readonly) octet_string meshLocalPrefix = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) NeighborTable neighborTableList[] = 7; - attribute(readonly) RouteTable routeTableList[] = 8; - attribute(readonly) int32u partitionId = 9; - attribute(readonly) int8u weighting = 10; - attribute(readonly) int8u dataVersion = 11; - attribute(readonly) int8u stableDataVersion = 12; - attribute(readonly) int8u leaderRouterId = 13; - attribute(readonly) int16u detachedRoleCount = 14; - attribute(readonly) int16u childRoleCount = 15; - attribute(readonly) int16u routerRoleCount = 16; - attribute(readonly) int16u leaderRoleCount = 17; - attribute(readonly) int16u attachAttemptCount = 18; - attribute(readonly) int16u partitionIdChangeCount = 19; - attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly) int16u parentChangeCount = 21; - attribute(readonly) int32u txTotalCount = 22; - attribute(readonly) int32u txUnicastCount = 23; - attribute(readonly) int32u txBroadcastCount = 24; - attribute(readonly) int32u txAckRequestedCount = 25; - attribute(readonly) int32u txAckedCount = 26; - attribute(readonly) int32u txNoAckRequestedCount = 27; - attribute(readonly) int32u txDataCount = 28; - attribute(readonly) int32u txDataPollCount = 29; - attribute(readonly) int32u txBeaconCount = 30; - attribute(readonly) int32u txBeaconRequestCount = 31; - attribute(readonly) int32u txOtherCount = 32; - attribute(readonly) int32u txRetryCount = 33; - attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly) int32u txErrCcaCount = 36; - attribute(readonly) int32u txErrAbortCount = 37; - attribute(readonly) int32u txErrBusyChannelCount = 38; - attribute(readonly) int32u rxTotalCount = 39; - attribute(readonly) int32u rxUnicastCount = 40; - attribute(readonly) int32u rxBroadcastCount = 41; - attribute(readonly) int32u rxDataCount = 42; - attribute(readonly) int32u rxDataPollCount = 43; - attribute(readonly) int32u rxBeaconCount = 44; - attribute(readonly) int32u rxBeaconRequestCount = 45; - attribute(readonly) int32u rxOtherCount = 46; - attribute(readonly) int32u rxAddressFilteredCount = 47; - attribute(readonly) int32u rxDestAddrFilteredCount = 48; - attribute(readonly) int32u rxDuplicatedCount = 49; - attribute(readonly) int32u rxErrNoFrameCount = 50; - attribute(readonly) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly) int32u rxErrSecCount = 53; - attribute(readonly) int32u rxErrFcsCount = 54; - attribute(readonly) int32u rxErrOtherCount = 55; - attribute(readonly) int64u activeTimestamp = 56; - attribute(readonly) int64u pendingTimestamp = 57; - attribute(readonly) int32u delay = 58; - attribute(readonly) SecurityPolicy securityPolicy[] = 59; - attribute(readonly) octet_string channelMask = 60; - attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u channel = 0; + readonly attribute enum8 routingRole = 1; + readonly attribute octet_string networkName = 2; + readonly attribute int16u panId = 3; + readonly attribute int64u extendedPanId = 4; + readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute NeighborTable neighborTableList[] = 7; + readonly attribute RouteTable routeTableList[] = 8; + readonly attribute int32u partitionId = 9; + readonly attribute int8u weighting = 10; + readonly attribute int8u dataVersion = 11; + readonly attribute int8u stableDataVersion = 12; + readonly attribute int8u leaderRouterId = 13; + readonly attribute int16u detachedRoleCount = 14; + readonly attribute int16u childRoleCount = 15; + readonly attribute int16u routerRoleCount = 16; + readonly attribute int16u leaderRoleCount = 17; + readonly attribute int16u attachAttemptCount = 18; + readonly attribute int16u partitionIdChangeCount = 19; + readonly attribute int16u betterPartitionAttachAttemptCount = 20; + readonly attribute int16u parentChangeCount = 21; + readonly attribute int32u txTotalCount = 22; + readonly attribute int32u txUnicastCount = 23; + readonly attribute int32u txBroadcastCount = 24; + readonly attribute int32u txAckRequestedCount = 25; + readonly attribute int32u txAckedCount = 26; + readonly attribute int32u txNoAckRequestedCount = 27; + readonly attribute int32u txDataCount = 28; + readonly attribute int32u txDataPollCount = 29; + readonly attribute int32u txBeaconCount = 30; + readonly attribute int32u txBeaconRequestCount = 31; + readonly attribute int32u txOtherCount = 32; + readonly attribute int32u txRetryCount = 33; + readonly attribute int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute int32u txErrCcaCount = 36; + readonly attribute int32u txErrAbortCount = 37; + readonly attribute int32u txErrBusyChannelCount = 38; + readonly attribute int32u rxTotalCount = 39; + readonly attribute int32u rxUnicastCount = 40; + readonly attribute int32u rxBroadcastCount = 41; + readonly attribute int32u rxDataCount = 42; + readonly attribute int32u rxDataPollCount = 43; + readonly attribute int32u rxBeaconCount = 44; + readonly attribute int32u rxBeaconRequestCount = 45; + readonly attribute int32u rxOtherCount = 46; + readonly attribute int32u rxAddressFilteredCount = 47; + readonly attribute int32u rxDestAddrFilteredCount = 48; + readonly attribute int32u rxDuplicatedCount = 49; + readonly attribute int32u rxErrNoFrameCount = 50; + readonly attribute int32u rxErrUnknownNeighborCount = 51; + readonly attribute int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute int32u rxErrSecCount = 53; + readonly attribute int32u rxErrFcsCount = 54; + readonly attribute int32u rxErrOtherCount = 55; + readonly attribute int64u activeTimestamp = 56; + readonly attribute int64u pendingTimestamp = 57; + readonly attribute int32u delay = 58; + readonly attribute SecurityPolicy securityPolicy[] = 59; + readonly attribute octet_string channelMask = 60; + readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; + readonly attribute NetworkFault activeNetworkFaultsList[] = 62; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -1360,21 +1360,21 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly) octet_string bssid = 0; - attribute(readonly) enum8 securityType = 1; - attribute(readonly) enum8 wiFiVersion = 2; - attribute(readonly) int16u channelNumber = 3; - attribute(readonly) int8s rssi = 4; - attribute(readonly) int32u beaconLostCount = 5; - attribute(readonly) int32u beaconRxCount = 6; - attribute(readonly) int32u packetMulticastRxCount = 7; - attribute(readonly) int32u packetMulticastTxCount = 8; - attribute(readonly) int32u packetUnicastRxCount = 9; - attribute(readonly) int32u packetUnicastTxCount = 10; - attribute(readonly) int64u currentMaxRate = 11; - attribute(readonly) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute octet_string bssid = 0; + readonly attribute enum8 securityType = 1; + readonly attribute enum8 wiFiVersion = 2; + readonly attribute int16u channelNumber = 3; + readonly attribute int8s rssi = 4; + readonly attribute int32u beaconLostCount = 5; + readonly attribute int32u beaconRxCount = 6; + readonly attribute int32u packetMulticastRxCount = 7; + readonly attribute int32u packetMulticastTxCount = 8; + readonly attribute int32u packetUnicastRxCount = 9; + readonly attribute int32u packetUnicastTxCount = 10; + readonly attribute int64u currentMaxRate = 11; + readonly attribute int64u overrunCount = 12; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index f1a12df7a4f63c..1e4cc77e0a03ea 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -19,10 +19,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u windowStatus = 0; + readonly attribute fabric_idx adminFabricIndex = 1; + readonly attribute int16u adminVendorId = 2; + readonly attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -57,18 +57,18 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly) int16u interactionModelVersion = 0; - attribute(readonly) char_string vendorName = 1; - attribute(readonly) vendor_id vendorID = 2; - attribute(readonly) char_string productName = 3; - attribute(readonly) int16u productID = 4; - attribute(writable) char_string nodeLabel = 5; - attribute(writable) char_string location = 6; - attribute(readonly) int16u hardwareVersion = 7; - attribute(readonly) char_string hardwareVersionString = 8; - attribute(readonly) int32u softwareVersion = 9; - attribute(readonly) char_string softwareVersionString = 10; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u interactionModelVersion = 0; + readonly attribute char_string vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string productName = 3; + readonly attribute int16u productID = 4; + attribute char_string nodeLabel = 5; + attribute char_string location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string softwareVersionString = 10; + readonly attribute int16u clusterRevision = 65533; } server cluster Descriptor = 29 { @@ -77,11 +77,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly) DeviceType deviceList[] = 0; - attribute(readonly) CLUSTER_ID serverList[] = 1; - attribute(readonly) CLUSTER_ID clientList[] = 2; - attribute(readonly) ENDPOINT_NO partsList[] = 3; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute DeviceType deviceList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -128,22 +128,22 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly) enum8 PHYRate = 0; - attribute(readonly) boolean fullDuplex = 1; - attribute(readonly) int64u packetRxCount = 2; - attribute(readonly) int64u packetTxCount = 3; - attribute(readonly) int64u txErrCount = 4; - attribute(readonly) int64u collisionCount = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) boolean carrierDetect = 7; - attribute(readonly) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 PHYRate = 0; + readonly attribute boolean fullDuplex = 1; + readonly attribute int64u packetRxCount = 2; + readonly attribute int64u packetTxCount = 3; + readonly attribute int64u txErrCount = 4; + readonly attribute int64u collisionCount = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute boolean carrierDetect = 7; + readonly attribute int64u timeSinceReset = 8; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -164,12 +164,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable) int64u breadcrumb = 0; - attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + attribute int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + readonly attribute enum8 regulatoryConfig = 2; + readonly attribute enum8 locationCapability = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -282,20 +282,20 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly) int16u rebootCount = 1; - attribute(readonly) int64u upTime = 2; - attribute(readonly) int32u totalOperationalHours = 3; - attribute(readonly) enum8 bootReasons = 4; - attribute(readonly) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly) ENUM8 activeRadioFaults[] = 6; - attribute(readonly) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute enum8 bootReasons = 4; + readonly attribute ENUM8 activeHardwareFaults[] = 5; + readonly attribute ENUM8 activeRadioFaults[] = 6; + readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute int16u clusterRevision = 65533; } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute char_string activeLocale = 1; + readonly attribute CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -348,16 +348,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u maxNetworks = 0; + readonly attribute NetworkInfo networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute boolean interfaceEnabled = 4; + readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; + readonly attribute octet_string lastNetworkID = 6; + readonly attribute int32u lastConnectErrorValue = 7; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -433,13 +433,13 @@ server cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly) boolean onOff = 0; - attribute(readonly) boolean globalSceneControl = 16384; - attribute(writable) int16u onTime = 16385; - attribute(writable) int16u offWaitTime = 16386; - attribute(writable) enum8 startUpOnOff = 16387; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute boolean onOff = 0; + readonly attribute boolean globalSceneControl = 16384; + attribute int16u onTime = 16385; + attribute int16u offWaitTime = 16386; + attribute enum8 startUpOnOff = 16387; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -469,12 +469,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly) FabricDescriptor fabricsList[] = 1; - attribute(readonly) int8u supportedFabrics = 2; - attribute(readonly) int8u commissionedFabrics = 3; - attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly) fabric_idx currentFabricIndex = 5; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute FabricDescriptor fabricsList[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -549,21 +549,21 @@ server cluster OperationalCredentials = 62 { } server cluster PowerSource = 47 { - attribute(readonly) enum8 status = 0; - attribute(readonly) int8u order = 1; - attribute(readonly) char_string description = 2; - attribute(readonly) int32u wiredAssessedCurrent = 6; - attribute(readonly) enum8 batteryChargeLevel = 14; - attribute(readonly) boolean batteryReplacementNeeded = 15; - attribute(readonly) enum8 batteryReplaceability = 16; - attribute(readonly) char_string batteryReplacementDescription = 19; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 status = 0; + readonly attribute int8u order = 1; + readonly attribute char_string description = 2; + readonly attribute int32u wiredAssessedCurrent = 6; + readonly attribute enum8 batteryChargeLevel = 14; + readonly attribute boolean batteryReplacementNeeded = 15; + readonly attribute enum8 batteryReplaceability = 16; + readonly attribute char_string batteryReplacementDescription = 19; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster PowerSourceConfiguration = 46 { - attribute(readonly) INT8U sources[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute INT8U sources[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster SoftwareDiagnostics = 52 { @@ -579,12 +579,12 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly) ThreadMetrics threadMetrics[] = 0; - attribute(readonly) int64u currentHeapFree = 1; - attribute(readonly) int64u currentHeapUsed = 2; - attribute(readonly) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute ThreadMetrics threadMetrics[] = 0; + readonly attribute int64u currentHeapFree = 1; + readonly attribute int64u currentHeapUsed = 2; + readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster ThreadNetworkDiagnostics = 53 { @@ -664,76 +664,76 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly) int16u channel = 0; - attribute(readonly) enum8 routingRole = 1; - attribute(readonly) octet_string networkName = 2; - attribute(readonly) int16u panId = 3; - attribute(readonly) int64u extendedPanId = 4; - attribute(readonly) octet_string meshLocalPrefix = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) NeighborTable neighborTableList[] = 7; - attribute(readonly) RouteTable routeTableList[] = 8; - attribute(readonly) int32u partitionId = 9; - attribute(readonly) int8u weighting = 10; - attribute(readonly) int8u dataVersion = 11; - attribute(readonly) int8u stableDataVersion = 12; - attribute(readonly) int8u leaderRouterId = 13; - attribute(readonly) int16u detachedRoleCount = 14; - attribute(readonly) int16u childRoleCount = 15; - attribute(readonly) int16u routerRoleCount = 16; - attribute(readonly) int16u leaderRoleCount = 17; - attribute(readonly) int16u attachAttemptCount = 18; - attribute(readonly) int16u partitionIdChangeCount = 19; - attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly) int16u parentChangeCount = 21; - attribute(readonly) int32u txTotalCount = 22; - attribute(readonly) int32u txUnicastCount = 23; - attribute(readonly) int32u txBroadcastCount = 24; - attribute(readonly) int32u txAckRequestedCount = 25; - attribute(readonly) int32u txAckedCount = 26; - attribute(readonly) int32u txNoAckRequestedCount = 27; - attribute(readonly) int32u txDataCount = 28; - attribute(readonly) int32u txDataPollCount = 29; - attribute(readonly) int32u txBeaconCount = 30; - attribute(readonly) int32u txBeaconRequestCount = 31; - attribute(readonly) int32u txOtherCount = 32; - attribute(readonly) int32u txRetryCount = 33; - attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly) int32u txErrCcaCount = 36; - attribute(readonly) int32u txErrAbortCount = 37; - attribute(readonly) int32u txErrBusyChannelCount = 38; - attribute(readonly) int32u rxTotalCount = 39; - attribute(readonly) int32u rxUnicastCount = 40; - attribute(readonly) int32u rxBroadcastCount = 41; - attribute(readonly) int32u rxDataCount = 42; - attribute(readonly) int32u rxDataPollCount = 43; - attribute(readonly) int32u rxBeaconCount = 44; - attribute(readonly) int32u rxBeaconRequestCount = 45; - attribute(readonly) int32u rxOtherCount = 46; - attribute(readonly) int32u rxAddressFilteredCount = 47; - attribute(readonly) int32u rxDestAddrFilteredCount = 48; - attribute(readonly) int32u rxDuplicatedCount = 49; - attribute(readonly) int32u rxErrNoFrameCount = 50; - attribute(readonly) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly) int32u rxErrSecCount = 53; - attribute(readonly) int32u rxErrFcsCount = 54; - attribute(readonly) int32u rxErrOtherCount = 55; - attribute(readonly) int64u activeTimestamp = 56; - attribute(readonly) int64u pendingTimestamp = 57; - attribute(readonly) int32u delay = 58; - attribute(readonly) SecurityPolicy securityPolicy[] = 59; - attribute(readonly) octet_string channelMask = 60; - attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u channel = 0; + readonly attribute enum8 routingRole = 1; + readonly attribute octet_string networkName = 2; + readonly attribute int16u panId = 3; + readonly attribute int64u extendedPanId = 4; + readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute NeighborTable neighborTableList[] = 7; + readonly attribute RouteTable routeTableList[] = 8; + readonly attribute int32u partitionId = 9; + readonly attribute int8u weighting = 10; + readonly attribute int8u dataVersion = 11; + readonly attribute int8u stableDataVersion = 12; + readonly attribute int8u leaderRouterId = 13; + readonly attribute int16u detachedRoleCount = 14; + readonly attribute int16u childRoleCount = 15; + readonly attribute int16u routerRoleCount = 16; + readonly attribute int16u leaderRoleCount = 17; + readonly attribute int16u attachAttemptCount = 18; + readonly attribute int16u partitionIdChangeCount = 19; + readonly attribute int16u betterPartitionAttachAttemptCount = 20; + readonly attribute int16u parentChangeCount = 21; + readonly attribute int32u txTotalCount = 22; + readonly attribute int32u txUnicastCount = 23; + readonly attribute int32u txBroadcastCount = 24; + readonly attribute int32u txAckRequestedCount = 25; + readonly attribute int32u txAckedCount = 26; + readonly attribute int32u txNoAckRequestedCount = 27; + readonly attribute int32u txDataCount = 28; + readonly attribute int32u txDataPollCount = 29; + readonly attribute int32u txBeaconCount = 30; + readonly attribute int32u txBeaconRequestCount = 31; + readonly attribute int32u txOtherCount = 32; + readonly attribute int32u txRetryCount = 33; + readonly attribute int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute int32u txErrCcaCount = 36; + readonly attribute int32u txErrAbortCount = 37; + readonly attribute int32u txErrBusyChannelCount = 38; + readonly attribute int32u rxTotalCount = 39; + readonly attribute int32u rxUnicastCount = 40; + readonly attribute int32u rxBroadcastCount = 41; + readonly attribute int32u rxDataCount = 42; + readonly attribute int32u rxDataPollCount = 43; + readonly attribute int32u rxBeaconCount = 44; + readonly attribute int32u rxBeaconRequestCount = 45; + readonly attribute int32u rxOtherCount = 46; + readonly attribute int32u rxAddressFilteredCount = 47; + readonly attribute int32u rxDestAddrFilteredCount = 48; + readonly attribute int32u rxDuplicatedCount = 49; + readonly attribute int32u rxErrNoFrameCount = 50; + readonly attribute int32u rxErrUnknownNeighborCount = 51; + readonly attribute int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute int32u rxErrSecCount = 53; + readonly attribute int32u rxErrFcsCount = 54; + readonly attribute int32u rxErrOtherCount = 55; + readonly attribute int64u activeTimestamp = 56; + readonly attribute int64u pendingTimestamp = 57; + readonly attribute int32u delay = 58; + readonly attribute SecurityPolicy securityPolicy[] = 59; + readonly attribute octet_string channelMask = 60; + readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; + readonly attribute NetworkFault activeNetworkFaultsList[] = 62; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -780,21 +780,21 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly) octet_string bssid = 0; - attribute(readonly) enum8 securityType = 1; - attribute(readonly) enum8 wiFiVersion = 2; - attribute(readonly) int16u channelNumber = 3; - attribute(readonly) int8s rssi = 4; - attribute(readonly) int32u beaconLostCount = 5; - attribute(readonly) int32u beaconRxCount = 6; - attribute(readonly) int32u packetMulticastRxCount = 7; - attribute(readonly) int32u packetMulticastTxCount = 8; - attribute(readonly) int32u packetUnicastRxCount = 9; - attribute(readonly) int32u packetUnicastTxCount = 10; - attribute(readonly) int64u currentMaxRate = 11; - attribute(readonly) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute octet_string bssid = 0; + readonly attribute enum8 securityType = 1; + readonly attribute enum8 wiFiVersion = 2; + readonly attribute int16u channelNumber = 3; + readonly attribute int8s rssi = 4; + readonly attribute int32u beaconLostCount = 5; + readonly attribute int32u beaconRxCount = 6; + readonly attribute int32u packetMulticastRxCount = 7; + readonly attribute int32u packetMulticastTxCount = 8; + readonly attribute int32u packetUnicastRxCount = 9; + readonly attribute int32u packetUnicastTxCount = 10; + readonly attribute int64u currentMaxRate = 11; + readonly attribute int64u overrunCount = 12; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index 3f3fd8dbb038a9..cb0ab78e63bfda 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -78,9 +78,9 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable) int64u breadcrumb = 0; - attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) int16u clusterRevision = 65533; + attribute int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + readonly attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -160,7 +160,7 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -243,11 +243,11 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly) FabricDescriptor fabricsList[] = 1; - attribute(readonly) int8u supportedFabrics = 2; - attribute(readonly) int8u commissionedFabrics = 3; - attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute FabricDescriptor fabricsList[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; 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 163b3d30469b86..127426ee77ade9 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 @@ -7,8 +7,8 @@ struct LabelStruct { } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -29,12 +29,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable) int64u breadcrumb = 0; - attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + attribute int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + readonly attribute enum8 regulatoryConfig = 2; + readonly attribute enum8 locationCapability = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -70,8 +70,8 @@ server cluster GeneralCommissioning = 48 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute char_string activeLocale = 1; + readonly attribute CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -124,16 +124,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u maxNetworks = 0; + readonly attribute NetworkInfo networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute boolean interfaceEnabled = 4; + readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; + readonly attribute octet_string lastNetworkID = 6; + readonly attribute int32u lastConnectErrorValue = 7; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -214,7 +214,7 @@ server cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -281,12 +281,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly) FabricDescriptor fabricsList[] = 1; - attribute(readonly) int8u supportedFabrics = 2; - attribute(readonly) int8u commissionedFabrics = 3; - attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly) fabric_idx currentFabricIndex = 5; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute FabricDescriptor fabricsList[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -350,8 +350,8 @@ server cluster OperationalCredentials = 62 { } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } 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 b7e711ba8ba50c..35533af4a4838a 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 @@ -21,25 +21,25 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly) int16u interactionModelVersion = 0; - attribute(readonly) char_string vendorName = 1; - attribute(readonly) vendor_id vendorID = 2; - attribute(readonly) char_string productName = 3; - attribute(readonly) int16u productID = 4; - attribute(writable) char_string nodeLabel = 5; - attribute(writable) char_string location = 6; - attribute(readonly) int16u hardwareVersion = 7; - attribute(readonly) char_string hardwareVersionString = 8; - attribute(readonly) int32u softwareVersion = 9; - attribute(readonly) char_string softwareVersionString = 10; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u interactionModelVersion = 0; + readonly attribute char_string vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string productName = 3; + readonly attribute int16u productID = 4; + attribute char_string nodeLabel = 5; + attribute char_string location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string softwareVersionString = 10; + readonly attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -60,12 +60,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable) int64u breadcrumb = 0; - attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + attribute int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + readonly attribute enum8 regulatoryConfig = 2; + readonly attribute enum8 locationCapability = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -101,8 +101,8 @@ server cluster GeneralCommissioning = 48 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute char_string activeLocale = 1; + readonly attribute CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -155,16 +155,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u maxNetworks = 0; + readonly attribute NetworkInfo networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute boolean interfaceEnabled = 4; + readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; + readonly attribute octet_string lastNetworkID = 6; + readonly attribute int32u lastConnectErrorValue = 7; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -245,7 +245,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -341,11 +341,11 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute(writable) ProviderLocation defaultOtaProviders[] = 0; - attribute(readonly) boolean updatePossible = 1; - attribute(readonly) OTAUpdateStateEnum updateState = 2; - attribute(readonly) int8u updateStateProgress = 3; - attribute(readonly) int16u clusterRevision = 65533; + attribute ProviderLocation defaultOtaProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute OTAUpdateStateEnum updateState = 2; + readonly attribute int8u updateStateProgress = 3; + readonly attribute int16u clusterRevision = 65533; request struct AnnounceOtaProviderRequest { node_id providerNodeId = 0; @@ -381,12 +381,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly) FabricDescriptor fabricsList[] = 1; - attribute(readonly) int8u supportedFabrics = 2; - attribute(readonly) int8u commissionedFabrics = 3; - attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly) fabric_idx currentFabricIndex = 5; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute FabricDescriptor fabricsList[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -461,8 +461,8 @@ server cluster OperationalCredentials = 62 { } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 4be14a2d022122..67d215fd083f47 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -16,26 +16,26 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly) int16u interactionModelVersion = 0; - attribute(readonly) char_string vendorName = 1; - attribute(readonly) vendor_id vendorID = 2; - attribute(readonly) char_string productName = 3; - attribute(readonly) int16u productID = 4; - attribute(writable) char_string nodeLabel = 5; - attribute(writable) char_string location = 6; - attribute(readonly) int16u hardwareVersion = 7; - attribute(readonly) char_string hardwareVersionString = 8; - attribute(readonly) int32u softwareVersion = 9; - attribute(readonly) char_string softwareVersionString = 10; - attribute(readonly) char_string manufacturingDate = 11; - attribute(readonly) char_string partNumber = 12; - attribute(readonly) long_char_string productURL = 13; - attribute(readonly) char_string productLabel = 14; - attribute(readonly) char_string serialNumber = 15; - attribute(writable) boolean localConfigDisabled = 16; - attribute(readonly) boolean reachable = 17; - attribute(readonly) char_string uniqueID = 18; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u interactionModelVersion = 0; + readonly attribute char_string vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string productName = 3; + readonly attribute int16u productID = 4; + attribute char_string nodeLabel = 5; + attribute char_string location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string softwareVersionString = 10; + readonly attribute char_string manufacturingDate = 11; + readonly attribute char_string partNumber = 12; + readonly attribute long_char_string productURL = 13; + readonly attribute char_string productLabel = 14; + readonly attribute char_string serialNumber = 15; + attribute boolean localConfigDisabled = 16; + readonly attribute boolean reachable = 17; + readonly attribute char_string uniqueID = 18; + readonly attribute int16u clusterRevision = 65533; } server cluster ColorControl = 768 { @@ -85,12 +85,12 @@ server cluster ColorControl = 768 { kDown = 3; } - attribute(readonly) int16u currentX = 3; - attribute(readonly) int16u currentY = 4; - attribute(writable) bitmap8 colorControlOptions = 15; - attribute(readonly) int16u coupleColorTempToLevelMinMireds = 16397; - attribute(writable) int16u startUpColorTemperatureMireds = 16400; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u currentX = 3; + readonly attribute int16u currentY = 4; + attribute bitmap8 colorControlOptions = 15; + readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; + attribute int16u startUpColorTemperatureMireds = 16400; + readonly attribute int16u clusterRevision = 65533; request struct MoveColorRequest { INT16S rateX = 0; @@ -126,11 +126,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly) DeviceType deviceList[] = 0; - attribute(readonly) CLUSTER_ID serverList[] = 1; - attribute(readonly) CLUSTER_ID clientList[] = 2; - attribute(readonly) ENDPOINT_NO partsList[] = 3; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute DeviceType deviceList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -151,9 +151,9 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable) int64u breadcrumb = 0; - attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) int16u clusterRevision = 65533; + attribute int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + readonly attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -189,8 +189,8 @@ server cluster GeneralCommissioning = 48 { } server cluster Groups = 4 { - attribute(readonly) bitmap8 nameSupport = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute bitmap8 nameSupport = 0; + readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { INT16U groupId = 0; @@ -266,9 +266,9 @@ server cluster Identify = 3 { kActuator = 5; } - attribute(writable) int16u identifyTime = 0; - attribute(readonly) enum8 identifyType = 1; - attribute(readonly) int16u clusterRevision = 65533; + attribute int16u identifyTime = 0; + readonly attribute enum8 identifyType = 1; + readonly attribute int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -293,8 +293,8 @@ server cluster LevelControl = 8 { kDown = 1; } - attribute(readonly) int8u currentLevel = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u currentLevel = 0; + readonly attribute int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -399,16 +399,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u maxNetworks = 0; + readonly attribute NetworkInfo networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute boolean interfaceEnabled = 4; + readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; + readonly attribute octet_string lastNetworkID = 6; + readonly attribute int32u lastConnectErrorValue = 7; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -484,8 +484,8 @@ server cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly) boolean onOff = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute boolean onOff = 0; + readonly attribute int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -515,12 +515,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly) FabricDescriptor fabricsList[] = 1; - attribute(readonly) int8u supportedFabrics = 2; - attribute(readonly) int8u commissionedFabrics = 3; - attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly) fabric_idx currentFabricIndex = 5; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute FabricDescriptor fabricsList[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -601,12 +601,12 @@ server cluster Scenes = 5 { INT8U value = 3; } - attribute(readonly) int8u sceneCount = 0; - attribute(readonly) int8u currentScene = 1; - attribute(readonly) int16u currentGroup = 2; - attribute(readonly) boolean sceneValid = 3; - attribute(readonly) bitmap8 nameSupport = 4; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u sceneCount = 0; + readonly attribute int8u currentScene = 1; + readonly attribute int16u currentGroup = 2; + readonly attribute boolean sceneValid = 3; + readonly attribute bitmap8 nameSupport = 4; + readonly attribute int16u clusterRevision = 65533; request struct AddSceneRequest { INT16U groupId = 0; @@ -695,17 +695,17 @@ server cluster Scenes = 5 { } client cluster TemperatureMeasurement = 1026 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u clusterRevision = 65533; } server cluster TemperatureMeasurement = 1026 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u clusterRevision = 65533; } diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 4be14a2d022122..67d215fd083f47 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -16,26 +16,26 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly) int16u interactionModelVersion = 0; - attribute(readonly) char_string vendorName = 1; - attribute(readonly) vendor_id vendorID = 2; - attribute(readonly) char_string productName = 3; - attribute(readonly) int16u productID = 4; - attribute(writable) char_string nodeLabel = 5; - attribute(writable) char_string location = 6; - attribute(readonly) int16u hardwareVersion = 7; - attribute(readonly) char_string hardwareVersionString = 8; - attribute(readonly) int32u softwareVersion = 9; - attribute(readonly) char_string softwareVersionString = 10; - attribute(readonly) char_string manufacturingDate = 11; - attribute(readonly) char_string partNumber = 12; - attribute(readonly) long_char_string productURL = 13; - attribute(readonly) char_string productLabel = 14; - attribute(readonly) char_string serialNumber = 15; - attribute(writable) boolean localConfigDisabled = 16; - attribute(readonly) boolean reachable = 17; - attribute(readonly) char_string uniqueID = 18; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u interactionModelVersion = 0; + readonly attribute char_string vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string productName = 3; + readonly attribute int16u productID = 4; + attribute char_string nodeLabel = 5; + attribute char_string location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string softwareVersionString = 10; + readonly attribute char_string manufacturingDate = 11; + readonly attribute char_string partNumber = 12; + readonly attribute long_char_string productURL = 13; + readonly attribute char_string productLabel = 14; + readonly attribute char_string serialNumber = 15; + attribute boolean localConfigDisabled = 16; + readonly attribute boolean reachable = 17; + readonly attribute char_string uniqueID = 18; + readonly attribute int16u clusterRevision = 65533; } server cluster ColorControl = 768 { @@ -85,12 +85,12 @@ server cluster ColorControl = 768 { kDown = 3; } - attribute(readonly) int16u currentX = 3; - attribute(readonly) int16u currentY = 4; - attribute(writable) bitmap8 colorControlOptions = 15; - attribute(readonly) int16u coupleColorTempToLevelMinMireds = 16397; - attribute(writable) int16u startUpColorTemperatureMireds = 16400; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u currentX = 3; + readonly attribute int16u currentY = 4; + attribute bitmap8 colorControlOptions = 15; + readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; + attribute int16u startUpColorTemperatureMireds = 16400; + readonly attribute int16u clusterRevision = 65533; request struct MoveColorRequest { INT16S rateX = 0; @@ -126,11 +126,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly) DeviceType deviceList[] = 0; - attribute(readonly) CLUSTER_ID serverList[] = 1; - attribute(readonly) CLUSTER_ID clientList[] = 2; - attribute(readonly) ENDPOINT_NO partsList[] = 3; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute DeviceType deviceList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -151,9 +151,9 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable) int64u breadcrumb = 0; - attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) int16u clusterRevision = 65533; + attribute int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + readonly attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -189,8 +189,8 @@ server cluster GeneralCommissioning = 48 { } server cluster Groups = 4 { - attribute(readonly) bitmap8 nameSupport = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute bitmap8 nameSupport = 0; + readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { INT16U groupId = 0; @@ -266,9 +266,9 @@ server cluster Identify = 3 { kActuator = 5; } - attribute(writable) int16u identifyTime = 0; - attribute(readonly) enum8 identifyType = 1; - attribute(readonly) int16u clusterRevision = 65533; + attribute int16u identifyTime = 0; + readonly attribute enum8 identifyType = 1; + readonly attribute int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -293,8 +293,8 @@ server cluster LevelControl = 8 { kDown = 1; } - attribute(readonly) int8u currentLevel = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u currentLevel = 0; + readonly attribute int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -399,16 +399,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u maxNetworks = 0; + readonly attribute NetworkInfo networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute boolean interfaceEnabled = 4; + readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; + readonly attribute octet_string lastNetworkID = 6; + readonly attribute int32u lastConnectErrorValue = 7; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -484,8 +484,8 @@ server cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly) boolean onOff = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute boolean onOff = 0; + readonly attribute int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -515,12 +515,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly) FabricDescriptor fabricsList[] = 1; - attribute(readonly) int8u supportedFabrics = 2; - attribute(readonly) int8u commissionedFabrics = 3; - attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly) fabric_idx currentFabricIndex = 5; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute FabricDescriptor fabricsList[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -601,12 +601,12 @@ server cluster Scenes = 5 { INT8U value = 3; } - attribute(readonly) int8u sceneCount = 0; - attribute(readonly) int8u currentScene = 1; - attribute(readonly) int16u currentGroup = 2; - attribute(readonly) boolean sceneValid = 3; - attribute(readonly) bitmap8 nameSupport = 4; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u sceneCount = 0; + readonly attribute int8u currentScene = 1; + readonly attribute int16u currentGroup = 2; + readonly attribute boolean sceneValid = 3; + readonly attribute bitmap8 nameSupport = 4; + readonly attribute int16u clusterRevision = 65533; request struct AddSceneRequest { INT16U groupId = 0; @@ -695,17 +695,17 @@ server cluster Scenes = 5 { } client cluster TemperatureMeasurement = 1026 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u clusterRevision = 65533; } server cluster TemperatureMeasurement = 1026 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u clusterRevision = 65533; } diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index ff9570cb327ba0..12c14847adfbaa 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -19,10 +19,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u windowStatus = 0; + readonly attribute fabric_idx adminFabricIndex = 1; + readonly attribute int16u adminVendorId = 2; + readonly attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -57,18 +57,18 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly) int16u interactionModelVersion = 0; - attribute(readonly) char_string vendorName = 1; - attribute(readonly) vendor_id vendorID = 2; - attribute(readonly) char_string productName = 3; - attribute(readonly) int16u productID = 4; - attribute(writable) char_string nodeLabel = 5; - attribute(writable) char_string location = 6; - attribute(readonly) int16u hardwareVersion = 7; - attribute(readonly) char_string hardwareVersionString = 8; - attribute(readonly) int32u softwareVersion = 9; - attribute(readonly) char_string softwareVersionString = 10; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u interactionModelVersion = 0; + readonly attribute char_string vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string productName = 3; + readonly attribute int16u productID = 4; + attribute char_string nodeLabel = 5; + attribute char_string location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string softwareVersionString = 10; + readonly attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } @@ -79,11 +79,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly) DeviceType deviceList[] = 0; - attribute(readonly) CLUSTER_ID serverList[] = 1; - attribute(readonly) CLUSTER_ID clientList[] = 2; - attribute(readonly) ENDPOINT_NO partsList[] = 3; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute DeviceType deviceList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -117,22 +117,22 @@ server cluster DiagnosticLogs = 50 { } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } client cluster FlowMeasurement = 1028 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u clusterRevision = 65533; } server cluster FlowMeasurement = 1028 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -153,12 +153,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable) int64u breadcrumb = 0; - attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + attribute int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + readonly attribute enum8 regulatoryConfig = 2; + readonly attribute enum8 locationCapability = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -271,15 +271,15 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly) int16u rebootCount = 1; - attribute(readonly) int64u upTime = 2; - attribute(readonly) int32u totalOperationalHours = 3; - attribute(readonly) enum8 bootReasons = 4; - attribute(readonly) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly) ENUM8 activeRadioFaults[] = 6; - attribute(readonly) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute enum8 bootReasons = 4; + readonly attribute ENUM8 activeHardwareFaults[] = 5; + readonly attribute ENUM8 activeRadioFaults[] = 6; + readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute int16u clusterRevision = 65533; } server cluster LevelControl = 8 { @@ -293,8 +293,8 @@ server cluster LevelControl = 8 { kDown = 1; } - attribute(readonly) int8u currentLevel = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u currentLevel = 0; + readonly attribute int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -350,8 +350,8 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute char_string activeLocale = 1; + readonly attribute CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -404,16 +404,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u maxNetworks = 0; + readonly attribute NetworkInfo networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute boolean interfaceEnabled = 4; + readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; + readonly attribute octet_string lastNetworkID = 6; + readonly attribute int32u lastConnectErrorValue = 7; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -489,8 +489,8 @@ server cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly) boolean onOff = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute boolean onOff = 0; + readonly attribute int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -520,12 +520,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly) FabricDescriptor fabricsList[] = 1; - attribute(readonly) int8u supportedFabrics = 2; - attribute(readonly) int8u commissionedFabrics = 3; - attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly) fabric_idx currentFabricIndex = 5; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute FabricDescriptor fabricsList[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -600,17 +600,17 @@ server cluster OperationalCredentials = 62 { } client cluster PressureMeasurement = 1027 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u clusterRevision = 65533; } server cluster PressureMeasurement = 1027 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u clusterRevision = 65533; } server cluster PumpConfigurationAndControl = 512 { @@ -681,32 +681,32 @@ server cluster PumpConfigurationAndControl = 512 { info event TurbineOperation = 16 { } - attribute(readonly) int16s maxPressure = 0; - attribute(readonly) int16u maxSpeed = 1; - attribute(readonly) int16u maxFlow = 2; - attribute(readonly) int16s minConstPressure = 3; - attribute(readonly) int16s maxConstPressure = 4; - attribute(readonly) int16s minCompPressure = 5; - attribute(readonly) int16s maxCompPressure = 6; - attribute(readonly) int16u minConstSpeed = 7; - attribute(readonly) int16u maxConstSpeed = 8; - attribute(readonly) int16u minConstFlow = 9; - attribute(readonly) int16u maxConstFlow = 10; - attribute(readonly) int16s minConstTemp = 11; - attribute(readonly) int16s maxConstTemp = 12; - attribute(readonly) bitmap16 pumpStatus = 16; - attribute(readonly) enum8 effectiveOperationMode = 17; - attribute(readonly) enum8 effectiveControlMode = 18; - attribute(readonly) int16s capacity = 19; - attribute(readonly) int16u speed = 20; - attribute(writable) int24u lifetimeRunningHours = 21; - attribute(readonly) int24u power = 22; - attribute(writable) int32u lifetimeEnergyConsumed = 23; - attribute(writable) enum8 operationMode = 32; - attribute(writable) enum8 controlMode = 33; - attribute(readonly) bitmap16 alarmMask = 34; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s maxPressure = 0; + readonly attribute int16u maxSpeed = 1; + readonly attribute int16u maxFlow = 2; + readonly attribute int16s minConstPressure = 3; + readonly attribute int16s maxConstPressure = 4; + readonly attribute int16s minCompPressure = 5; + readonly attribute int16s maxCompPressure = 6; + readonly attribute int16u minConstSpeed = 7; + readonly attribute int16u maxConstSpeed = 8; + readonly attribute int16u minConstFlow = 9; + readonly attribute int16u maxConstFlow = 10; + readonly attribute int16s minConstTemp = 11; + readonly attribute int16s maxConstTemp = 12; + readonly attribute bitmap16 pumpStatus = 16; + readonly attribute enum8 effectiveOperationMode = 17; + readonly attribute enum8 effectiveControlMode = 18; + readonly attribute int16s capacity = 19; + readonly attribute int16u speed = 20; + attribute int24u lifetimeRunningHours = 21; + readonly attribute int24u power = 22; + attribute int32u lifetimeEnergyConsumed = 23; + attribute enum8 operationMode = 32; + attribute enum8 controlMode = 33; + readonly attribute bitmap16 alarmMask = 34; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster SoftwareDiagnostics = 52 { @@ -722,26 +722,26 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly) ThreadMetrics threadMetrics[] = 0; - attribute(readonly) int64u currentHeapFree = 1; - attribute(readonly) int64u currentHeapUsed = 2; - attribute(readonly) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute ThreadMetrics threadMetrics[] = 0; + readonly attribute int64u currentHeapFree = 1; + readonly attribute int64u currentHeapUsed = 2; + readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } client cluster TemperatureMeasurement = 1026 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u clusterRevision = 65533; } server cluster TemperatureMeasurement = 1026 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u clusterRevision = 65533; } server cluster ThreadNetworkDiagnostics = 53 { @@ -821,76 +821,76 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly) int16u channel = 0; - attribute(readonly) enum8 routingRole = 1; - attribute(readonly) octet_string networkName = 2; - attribute(readonly) int16u panId = 3; - attribute(readonly) int64u extendedPanId = 4; - attribute(readonly) octet_string meshLocalPrefix = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) NeighborTable neighborTableList[] = 7; - attribute(readonly) RouteTable routeTableList[] = 8; - attribute(readonly) int32u partitionId = 9; - attribute(readonly) int8u weighting = 10; - attribute(readonly) int8u dataVersion = 11; - attribute(readonly) int8u stableDataVersion = 12; - attribute(readonly) int8u leaderRouterId = 13; - attribute(readonly) int16u detachedRoleCount = 14; - attribute(readonly) int16u childRoleCount = 15; - attribute(readonly) int16u routerRoleCount = 16; - attribute(readonly) int16u leaderRoleCount = 17; - attribute(readonly) int16u attachAttemptCount = 18; - attribute(readonly) int16u partitionIdChangeCount = 19; - attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly) int16u parentChangeCount = 21; - attribute(readonly) int32u txTotalCount = 22; - attribute(readonly) int32u txUnicastCount = 23; - attribute(readonly) int32u txBroadcastCount = 24; - attribute(readonly) int32u txAckRequestedCount = 25; - attribute(readonly) int32u txAckedCount = 26; - attribute(readonly) int32u txNoAckRequestedCount = 27; - attribute(readonly) int32u txDataCount = 28; - attribute(readonly) int32u txDataPollCount = 29; - attribute(readonly) int32u txBeaconCount = 30; - attribute(readonly) int32u txBeaconRequestCount = 31; - attribute(readonly) int32u txOtherCount = 32; - attribute(readonly) int32u txRetryCount = 33; - attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly) int32u txErrCcaCount = 36; - attribute(readonly) int32u txErrAbortCount = 37; - attribute(readonly) int32u txErrBusyChannelCount = 38; - attribute(readonly) int32u rxTotalCount = 39; - attribute(readonly) int32u rxUnicastCount = 40; - attribute(readonly) int32u rxBroadcastCount = 41; - attribute(readonly) int32u rxDataCount = 42; - attribute(readonly) int32u rxDataPollCount = 43; - attribute(readonly) int32u rxBeaconCount = 44; - attribute(readonly) int32u rxBeaconRequestCount = 45; - attribute(readonly) int32u rxOtherCount = 46; - attribute(readonly) int32u rxAddressFilteredCount = 47; - attribute(readonly) int32u rxDestAddrFilteredCount = 48; - attribute(readonly) int32u rxDuplicatedCount = 49; - attribute(readonly) int32u rxErrNoFrameCount = 50; - attribute(readonly) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly) int32u rxErrSecCount = 53; - attribute(readonly) int32u rxErrFcsCount = 54; - attribute(readonly) int32u rxErrOtherCount = 55; - attribute(readonly) int64u activeTimestamp = 56; - attribute(readonly) int64u pendingTimestamp = 57; - attribute(readonly) int32u delay = 58; - attribute(readonly) SecurityPolicy securityPolicy[] = 59; - attribute(readonly) octet_string channelMask = 60; - attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u channel = 0; + readonly attribute enum8 routingRole = 1; + readonly attribute octet_string networkName = 2; + readonly attribute int16u panId = 3; + readonly attribute int64u extendedPanId = 4; + readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute NeighborTable neighborTableList[] = 7; + readonly attribute RouteTable routeTableList[] = 8; + readonly attribute int32u partitionId = 9; + readonly attribute int8u weighting = 10; + readonly attribute int8u dataVersion = 11; + readonly attribute int8u stableDataVersion = 12; + readonly attribute int8u leaderRouterId = 13; + readonly attribute int16u detachedRoleCount = 14; + readonly attribute int16u childRoleCount = 15; + readonly attribute int16u routerRoleCount = 16; + readonly attribute int16u leaderRoleCount = 17; + readonly attribute int16u attachAttemptCount = 18; + readonly attribute int16u partitionIdChangeCount = 19; + readonly attribute int16u betterPartitionAttachAttemptCount = 20; + readonly attribute int16u parentChangeCount = 21; + readonly attribute int32u txTotalCount = 22; + readonly attribute int32u txUnicastCount = 23; + readonly attribute int32u txBroadcastCount = 24; + readonly attribute int32u txAckRequestedCount = 25; + readonly attribute int32u txAckedCount = 26; + readonly attribute int32u txNoAckRequestedCount = 27; + readonly attribute int32u txDataCount = 28; + readonly attribute int32u txDataPollCount = 29; + readonly attribute int32u txBeaconCount = 30; + readonly attribute int32u txBeaconRequestCount = 31; + readonly attribute int32u txOtherCount = 32; + readonly attribute int32u txRetryCount = 33; + readonly attribute int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute int32u txErrCcaCount = 36; + readonly attribute int32u txErrAbortCount = 37; + readonly attribute int32u txErrBusyChannelCount = 38; + readonly attribute int32u rxTotalCount = 39; + readonly attribute int32u rxUnicastCount = 40; + readonly attribute int32u rxBroadcastCount = 41; + readonly attribute int32u rxDataCount = 42; + readonly attribute int32u rxDataPollCount = 43; + readonly attribute int32u rxBeaconCount = 44; + readonly attribute int32u rxBeaconRequestCount = 45; + readonly attribute int32u rxOtherCount = 46; + readonly attribute int32u rxAddressFilteredCount = 47; + readonly attribute int32u rxDestAddrFilteredCount = 48; + readonly attribute int32u rxDuplicatedCount = 49; + readonly attribute int32u rxErrNoFrameCount = 50; + readonly attribute int32u rxErrUnknownNeighborCount = 51; + readonly attribute int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute int32u rxErrSecCount = 53; + readonly attribute int32u rxErrFcsCount = 54; + readonly attribute int32u rxErrOtherCount = 55; + readonly attribute int64u activeTimestamp = 56; + readonly attribute int64u pendingTimestamp = 57; + readonly attribute int32u delay = 58; + readonly attribute SecurityPolicy securityPolicy[] = 59; + readonly attribute octet_string channelMask = 60; + readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; + readonly attribute NetworkFault activeNetworkFaultsList[] = 62; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } 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 04088538aedf2a..929d2259528a35 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 @@ -19,10 +19,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u windowStatus = 0; + readonly attribute fabric_idx adminFabricIndex = 1; + readonly attribute int16u adminVendorId = 2; + readonly attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -57,18 +57,18 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly) int16u interactionModelVersion = 0; - attribute(readonly) char_string vendorName = 1; - attribute(readonly) vendor_id vendorID = 2; - attribute(readonly) char_string productName = 3; - attribute(readonly) int16u productID = 4; - attribute(writable) char_string nodeLabel = 5; - attribute(writable) char_string location = 6; - attribute(readonly) int16u hardwareVersion = 7; - attribute(readonly) char_string hardwareVersionString = 8; - attribute(readonly) int32u softwareVersion = 9; - attribute(readonly) char_string softwareVersionString = 10; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u interactionModelVersion = 0; + readonly attribute char_string vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string productName = 3; + readonly attribute int16u productID = 4; + attribute char_string nodeLabel = 5; + attribute char_string location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string softwareVersionString = 10; + readonly attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } @@ -79,11 +79,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly) DeviceType deviceList[] = 0; - attribute(readonly) CLUSTER_ID serverList[] = 1; - attribute(readonly) CLUSTER_ID clientList[] = 2; - attribute(readonly) ENDPOINT_NO partsList[] = 3; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute DeviceType deviceList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -130,29 +130,29 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly) enum8 PHYRate = 0; - attribute(readonly) boolean fullDuplex = 1; - attribute(readonly) int64u packetRxCount = 2; - attribute(readonly) int64u packetTxCount = 3; - attribute(readonly) int64u txErrCount = 4; - attribute(readonly) int64u collisionCount = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) boolean carrierDetect = 7; - attribute(readonly) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 PHYRate = 0; + readonly attribute boolean fullDuplex = 1; + readonly attribute int64u packetRxCount = 2; + readonly attribute int64u packetTxCount = 3; + readonly attribute int64u txErrCount = 4; + readonly attribute int64u collisionCount = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute boolean carrierDetect = 7; + readonly attribute int64u timeSinceReset = 8; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } client cluster FlowMeasurement = 1028 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -173,12 +173,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable) int64u breadcrumb = 0; - attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + attribute int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + readonly attribute enum8 regulatoryConfig = 2; + readonly attribute enum8 locationCapability = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -291,15 +291,15 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly) int16u rebootCount = 1; - attribute(readonly) int64u upTime = 2; - attribute(readonly) int32u totalOperationalHours = 3; - attribute(readonly) enum8 bootReasons = 4; - attribute(readonly) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly) ENUM8 activeRadioFaults[] = 6; - attribute(readonly) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute enum8 bootReasons = 4; + readonly attribute ENUM8 activeHardwareFaults[] = 5; + readonly attribute ENUM8 activeRadioFaults[] = 6; + readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute int16u clusterRevision = 65533; } client cluster LevelControl = 8 { @@ -313,8 +313,8 @@ client cluster LevelControl = 8 { kDown = 1; } - attribute(readonly) int8u currentLevel = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u currentLevel = 0; + readonly attribute int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -370,8 +370,8 @@ client cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute char_string activeLocale = 1; + readonly attribute CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -424,16 +424,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u maxNetworks = 0; + readonly attribute NetworkInfo networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute boolean interfaceEnabled = 4; + readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; + readonly attribute octet_string lastNetworkID = 6; + readonly attribute int32u lastConnectErrorValue = 7; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -509,8 +509,8 @@ client cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly) boolean onOff = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute boolean onOff = 0; + readonly attribute int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -540,12 +540,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly) FabricDescriptor fabricsList[] = 1; - attribute(readonly) int8u supportedFabrics = 2; - attribute(readonly) int8u commissionedFabrics = 3; - attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly) fabric_idx currentFabricIndex = 5; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute FabricDescriptor fabricsList[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -620,10 +620,10 @@ server cluster OperationalCredentials = 62 { } client cluster PressureMeasurement = 1027 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u clusterRevision = 65533; } client cluster PumpConfigurationAndControl = 512 { @@ -694,14 +694,14 @@ client cluster PumpConfigurationAndControl = 512 { info event TurbineOperation = 16 { } - attribute(readonly) int16s maxPressure = 0; - attribute(readonly) int16u maxSpeed = 1; - attribute(readonly) int16u maxFlow = 2; - attribute(readonly) enum8 effectiveOperationMode = 17; - attribute(readonly) enum8 effectiveControlMode = 18; - attribute(readonly) int16s capacity = 19; - attribute(writable) enum8 operationMode = 32; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s maxPressure = 0; + readonly attribute int16u maxSpeed = 1; + readonly attribute int16u maxFlow = 2; + readonly attribute enum8 effectiveOperationMode = 17; + readonly attribute enum8 effectiveControlMode = 18; + readonly attribute int16s capacity = 19; + attribute enum8 operationMode = 32; + readonly attribute int16u clusterRevision = 65533; } server cluster SoftwareDiagnostics = 52 { @@ -717,19 +717,19 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly) ThreadMetrics threadMetrics[] = 0; - attribute(readonly) int64u currentHeapFree = 1; - attribute(readonly) int64u currentHeapUsed = 2; - attribute(readonly) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute ThreadMetrics threadMetrics[] = 0; + readonly attribute int64u currentHeapFree = 1; + readonly attribute int64u currentHeapUsed = 2; + readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } client cluster TemperatureMeasurement = 1026 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u clusterRevision = 65533; } server cluster ThreadNetworkDiagnostics = 53 { @@ -809,76 +809,76 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly) int16u channel = 0; - attribute(readonly) enum8 routingRole = 1; - attribute(readonly) octet_string networkName = 2; - attribute(readonly) int16u panId = 3; - attribute(readonly) int64u extendedPanId = 4; - attribute(readonly) octet_string meshLocalPrefix = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) NeighborTable neighborTableList[] = 7; - attribute(readonly) RouteTable routeTableList[] = 8; - attribute(readonly) int32u partitionId = 9; - attribute(readonly) int8u weighting = 10; - attribute(readonly) int8u dataVersion = 11; - attribute(readonly) int8u stableDataVersion = 12; - attribute(readonly) int8u leaderRouterId = 13; - attribute(readonly) int16u detachedRoleCount = 14; - attribute(readonly) int16u childRoleCount = 15; - attribute(readonly) int16u routerRoleCount = 16; - attribute(readonly) int16u leaderRoleCount = 17; - attribute(readonly) int16u attachAttemptCount = 18; - attribute(readonly) int16u partitionIdChangeCount = 19; - attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly) int16u parentChangeCount = 21; - attribute(readonly) int32u txTotalCount = 22; - attribute(readonly) int32u txUnicastCount = 23; - attribute(readonly) int32u txBroadcastCount = 24; - attribute(readonly) int32u txAckRequestedCount = 25; - attribute(readonly) int32u txAckedCount = 26; - attribute(readonly) int32u txNoAckRequestedCount = 27; - attribute(readonly) int32u txDataCount = 28; - attribute(readonly) int32u txDataPollCount = 29; - attribute(readonly) int32u txBeaconCount = 30; - attribute(readonly) int32u txBeaconRequestCount = 31; - attribute(readonly) int32u txOtherCount = 32; - attribute(readonly) int32u txRetryCount = 33; - attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly) int32u txErrCcaCount = 36; - attribute(readonly) int32u txErrAbortCount = 37; - attribute(readonly) int32u txErrBusyChannelCount = 38; - attribute(readonly) int32u rxTotalCount = 39; - attribute(readonly) int32u rxUnicastCount = 40; - attribute(readonly) int32u rxBroadcastCount = 41; - attribute(readonly) int32u rxDataCount = 42; - attribute(readonly) int32u rxDataPollCount = 43; - attribute(readonly) int32u rxBeaconCount = 44; - attribute(readonly) int32u rxBeaconRequestCount = 45; - attribute(readonly) int32u rxOtherCount = 46; - attribute(readonly) int32u rxAddressFilteredCount = 47; - attribute(readonly) int32u rxDestAddrFilteredCount = 48; - attribute(readonly) int32u rxDuplicatedCount = 49; - attribute(readonly) int32u rxErrNoFrameCount = 50; - attribute(readonly) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly) int32u rxErrSecCount = 53; - attribute(readonly) int32u rxErrFcsCount = 54; - attribute(readonly) int32u rxErrOtherCount = 55; - attribute(readonly) int64u activeTimestamp = 56; - attribute(readonly) int64u pendingTimestamp = 57; - attribute(readonly) int32u delay = 58; - attribute(readonly) SecurityPolicy securityPolicy[] = 59; - attribute(readonly) octet_string channelMask = 60; - attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u channel = 0; + readonly attribute enum8 routingRole = 1; + readonly attribute octet_string networkName = 2; + readonly attribute int16u panId = 3; + readonly attribute int64u extendedPanId = 4; + readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute NeighborTable neighborTableList[] = 7; + readonly attribute RouteTable routeTableList[] = 8; + readonly attribute int32u partitionId = 9; + readonly attribute int8u weighting = 10; + readonly attribute int8u dataVersion = 11; + readonly attribute int8u stableDataVersion = 12; + readonly attribute int8u leaderRouterId = 13; + readonly attribute int16u detachedRoleCount = 14; + readonly attribute int16u childRoleCount = 15; + readonly attribute int16u routerRoleCount = 16; + readonly attribute int16u leaderRoleCount = 17; + readonly attribute int16u attachAttemptCount = 18; + readonly attribute int16u partitionIdChangeCount = 19; + readonly attribute int16u betterPartitionAttachAttemptCount = 20; + readonly attribute int16u parentChangeCount = 21; + readonly attribute int32u txTotalCount = 22; + readonly attribute int32u txUnicastCount = 23; + readonly attribute int32u txBroadcastCount = 24; + readonly attribute int32u txAckRequestedCount = 25; + readonly attribute int32u txAckedCount = 26; + readonly attribute int32u txNoAckRequestedCount = 27; + readonly attribute int32u txDataCount = 28; + readonly attribute int32u txDataPollCount = 29; + readonly attribute int32u txBeaconCount = 30; + readonly attribute int32u txBeaconRequestCount = 31; + readonly attribute int32u txOtherCount = 32; + readonly attribute int32u txRetryCount = 33; + readonly attribute int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute int32u txErrCcaCount = 36; + readonly attribute int32u txErrAbortCount = 37; + readonly attribute int32u txErrBusyChannelCount = 38; + readonly attribute int32u rxTotalCount = 39; + readonly attribute int32u rxUnicastCount = 40; + readonly attribute int32u rxBroadcastCount = 41; + readonly attribute int32u rxDataCount = 42; + readonly attribute int32u rxDataPollCount = 43; + readonly attribute int32u rxBeaconCount = 44; + readonly attribute int32u rxBeaconRequestCount = 45; + readonly attribute int32u rxOtherCount = 46; + readonly attribute int32u rxAddressFilteredCount = 47; + readonly attribute int32u rxDestAddrFilteredCount = 48; + readonly attribute int32u rxDuplicatedCount = 49; + readonly attribute int32u rxErrNoFrameCount = 50; + readonly attribute int32u rxErrUnknownNeighborCount = 51; + readonly attribute int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute int32u rxErrSecCount = 53; + readonly attribute int32u rxErrFcsCount = 54; + readonly attribute int32u rxErrOtherCount = 55; + readonly attribute int64u activeTimestamp = 56; + readonly attribute int64u pendingTimestamp = 57; + readonly attribute int32u delay = 58; + readonly attribute SecurityPolicy securityPolicy[] = 59; + readonly attribute octet_string channelMask = 60; + readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; + readonly attribute NetworkFault activeNetworkFaultsList[] = 62; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -925,21 +925,21 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly) octet_string bssid = 0; - attribute(readonly) enum8 securityType = 1; - attribute(readonly) enum8 wiFiVersion = 2; - attribute(readonly) int16u channelNumber = 3; - attribute(readonly) int8s rssi = 4; - attribute(readonly) int32u beaconLostCount = 5; - attribute(readonly) int32u beaconRxCount = 6; - attribute(readonly) int32u packetMulticastRxCount = 7; - attribute(readonly) int32u packetMulticastTxCount = 8; - attribute(readonly) int32u packetUnicastRxCount = 9; - attribute(readonly) int32u packetUnicastTxCount = 10; - attribute(readonly) int64u currentMaxRate = 11; - attribute(readonly) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute octet_string bssid = 0; + readonly attribute enum8 securityType = 1; + readonly attribute enum8 wiFiVersion = 2; + readonly attribute int16u channelNumber = 3; + readonly attribute int8s rssi = 4; + readonly attribute int32u beaconLostCount = 5; + readonly attribute int32u beaconRxCount = 6; + readonly attribute int32u packetMulticastRxCount = 7; + readonly attribute int32u packetMulticastTxCount = 8; + readonly attribute int32u packetUnicastRxCount = 9; + readonly attribute int32u packetUnicastTxCount = 10; + readonly attribute int64u currentMaxRate = 11; + readonly attribute int64u overrunCount = 12; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index 42d02bcdea1886..689ac8d7e180c1 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -19,10 +19,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u windowStatus = 0; + readonly attribute fabric_idx adminFabricIndex = 1; + readonly attribute int16u adminVendorId = 2; + readonly attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -57,18 +57,18 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly) int16u interactionModelVersion = 0; - attribute(readonly) char_string vendorName = 1; - attribute(readonly) vendor_id vendorID = 2; - attribute(readonly) char_string productName = 3; - attribute(readonly) int16u productID = 4; - attribute(writable) char_string nodeLabel = 5; - attribute(writable) char_string location = 6; - attribute(readonly) int16u hardwareVersion = 7; - attribute(readonly) char_string hardwareVersionString = 8; - attribute(readonly) int32u softwareVersion = 9; - attribute(readonly) char_string softwareVersionString = 10; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u interactionModelVersion = 0; + readonly attribute char_string vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string productName = 3; + readonly attribute int16u productID = 4; + attribute char_string nodeLabel = 5; + attribute char_string location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string softwareVersionString = 10; + readonly attribute int16u clusterRevision = 65533; } server cluster Descriptor = 29 { @@ -77,11 +77,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly) DeviceType deviceList[] = 0; - attribute(readonly) CLUSTER_ID serverList[] = 1; - attribute(readonly) CLUSTER_ID clientList[] = 2; - attribute(readonly) ENDPOINT_NO partsList[] = 3; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute DeviceType deviceList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -128,22 +128,22 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly) enum8 PHYRate = 0; - attribute(readonly) boolean fullDuplex = 1; - attribute(readonly) int64u packetRxCount = 2; - attribute(readonly) int64u packetTxCount = 3; - attribute(readonly) int64u txErrCount = 4; - attribute(readonly) int64u collisionCount = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) boolean carrierDetect = 7; - attribute(readonly) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 PHYRate = 0; + readonly attribute boolean fullDuplex = 1; + readonly attribute int64u packetRxCount = 2; + readonly attribute int64u packetTxCount = 3; + readonly attribute int64u txErrCount = 4; + readonly attribute int64u collisionCount = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute boolean carrierDetect = 7; + readonly attribute int64u timeSinceReset = 8; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -164,12 +164,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable) int64u breadcrumb = 0; - attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + attribute int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + readonly attribute enum8 regulatoryConfig = 2; + readonly attribute enum8 locationCapability = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -282,20 +282,20 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly) int16u rebootCount = 1; - attribute(readonly) int64u upTime = 2; - attribute(readonly) int32u totalOperationalHours = 3; - attribute(readonly) enum8 bootReasons = 4; - attribute(readonly) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly) ENUM8 activeRadioFaults[] = 6; - attribute(readonly) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute enum8 bootReasons = 4; + readonly attribute ENUM8 activeHardwareFaults[] = 5; + readonly attribute ENUM8 activeRadioFaults[] = 6; + readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute int16u clusterRevision = 65533; } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute char_string activeLocale = 1; + readonly attribute CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -348,16 +348,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u maxNetworks = 0; + readonly attribute NetworkInfo networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute boolean interfaceEnabled = 4; + readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; + readonly attribute octet_string lastNetworkID = 6; + readonly attribute int32u lastConnectErrorValue = 7; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct AddOrUpdateWiFiNetworkRequest { OCTET_STRING ssid = 0; @@ -434,12 +434,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly) FabricDescriptor fabricsList[] = 1; - attribute(readonly) int8u supportedFabrics = 2; - attribute(readonly) int8u commissionedFabrics = 3; - attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly) fabric_idx currentFabricIndex = 5; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute FabricDescriptor fabricsList[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -518,21 +518,21 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster TemperatureMeasurement = 1026 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -579,21 +579,21 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly) octet_string bssid = 0; - attribute(readonly) enum8 securityType = 1; - attribute(readonly) enum8 wiFiVersion = 2; - attribute(readonly) int16u channelNumber = 3; - attribute(readonly) int8s rssi = 4; - attribute(readonly) int32u beaconLostCount = 5; - attribute(readonly) int32u beaconRxCount = 6; - attribute(readonly) int32u packetMulticastRxCount = 7; - attribute(readonly) int32u packetMulticastTxCount = 8; - attribute(readonly) int32u packetUnicastRxCount = 9; - attribute(readonly) int32u packetUnicastTxCount = 10; - attribute(readonly) int64u currentMaxRate = 11; - attribute(readonly) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute octet_string bssid = 0; + readonly attribute enum8 securityType = 1; + readonly attribute enum8 wiFiVersion = 2; + readonly attribute int16u channelNumber = 3; + readonly attribute int8s rssi = 4; + readonly attribute int32u beaconLostCount = 5; + readonly attribute int32u beaconRxCount = 6; + readonly attribute int32u packetMulticastRxCount = 7; + readonly attribute int32u packetMulticastTxCount = 8; + readonly attribute int32u packetUnicastRxCount = 9; + readonly attribute int32u packetUnicastTxCount = 10; + readonly attribute int64u currentMaxRate = 11; + readonly attribute int64u overrunCount = 12; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index d18513da56a02b..dbb441e1f04efb 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -19,10 +19,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u windowStatus = 0; + readonly attribute fabric_idx adminFabricIndex = 1; + readonly attribute int16u adminVendorId = 2; + readonly attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -57,32 +57,32 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly) int16u interactionModelVersion = 0; - attribute(readonly) char_string vendorName = 1; - attribute(readonly) vendor_id vendorID = 2; - attribute(readonly) char_string productName = 3; - attribute(readonly) int16u productID = 4; - attribute(writable) char_string nodeLabel = 5; - attribute(writable) char_string location = 6; - attribute(readonly) int16u hardwareVersion = 7; - attribute(readonly) char_string hardwareVersionString = 8; - attribute(readonly) int32u softwareVersion = 9; - attribute(readonly) char_string softwareVersionString = 10; - attribute(readonly) char_string manufacturingDate = 11; - attribute(readonly) char_string partNumber = 12; - attribute(readonly) long_char_string productURL = 13; - attribute(readonly) char_string productLabel = 14; - attribute(readonly) char_string serialNumber = 15; - attribute(writable) boolean localConfigDisabled = 16; - attribute(readonly) boolean reachable = 17; - attribute(readonly) char_string uniqueID = 18; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u interactionModelVersion = 0; + readonly attribute char_string vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string productName = 3; + readonly attribute int16u productID = 4; + attribute char_string nodeLabel = 5; + attribute char_string location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string softwareVersionString = 10; + readonly attribute char_string manufacturingDate = 11; + readonly attribute char_string partNumber = 12; + readonly attribute long_char_string productURL = 13; + readonly attribute char_string productLabel = 14; + readonly attribute char_string serialNumber = 15; + attribute boolean localConfigDisabled = 16; + readonly attribute boolean reachable = 17; + readonly attribute char_string uniqueID = 18; + readonly attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } server cluster Binding = 30 { - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; request struct BindRequest { NODE_ID nodeId = 0; @@ -108,11 +108,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly) DeviceType deviceList[] = 0; - attribute(readonly) CLUSTER_ID serverList[] = 1; - attribute(readonly) CLUSTER_ID clientList[] = 2; - attribute(readonly) ENDPOINT_NO partsList[] = 3; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute DeviceType deviceList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -159,22 +159,22 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly) enum8 PHYRate = 0; - attribute(readonly) boolean fullDuplex = 1; - attribute(readonly) int64u packetRxCount = 2; - attribute(readonly) int64u packetTxCount = 3; - attribute(readonly) int64u txErrCount = 4; - attribute(readonly) int64u collisionCount = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) boolean carrierDetect = 7; - attribute(readonly) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 PHYRate = 0; + readonly attribute boolean fullDuplex = 1; + readonly attribute int64u packetRxCount = 2; + readonly attribute int64u packetTxCount = 3; + readonly attribute int64u txErrCount = 4; + readonly attribute int64u collisionCount = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute boolean carrierDetect = 7; + readonly attribute int64u timeSinceReset = 8; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -195,12 +195,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable) int64u breadcrumb = 0; - attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + attribute int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + readonly attribute enum8 regulatoryConfig = 2; + readonly attribute enum8 locationCapability = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -313,15 +313,15 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly) int16u rebootCount = 1; - attribute(readonly) int64u upTime = 2; - attribute(readonly) int32u totalOperationalHours = 3; - attribute(readonly) enum8 bootReasons = 4; - attribute(readonly) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly) ENUM8 activeRadioFaults[] = 6; - attribute(readonly) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute enum8 bootReasons = 4; + readonly attribute ENUM8 activeHardwareFaults[] = 5; + readonly attribute ENUM8 activeRadioFaults[] = 6; + readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute int16u clusterRevision = 65533; } server cluster GroupKeyManagement = 63 { @@ -343,14 +343,14 @@ server cluster GroupKeyManagement = 63 { CHAR_STRING groupName = 3; } - attribute(readonly) GroupKey groupKeyMap[] = 0; - attribute(readonly) GroupInfo groupTable[] = 1; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute GroupKey groupKeyMap[] = 0; + readonly attribute GroupInfo groupTable[] = 1; + readonly attribute int16u clusterRevision = 65533; } server cluster Groups = 4 { - attribute(readonly) bitmap8 nameSupport = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute bitmap8 nameSupport = 0; + readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { INT16U groupId = 0; @@ -426,9 +426,9 @@ client cluster Identify = 3 { kActuator = 5; } - attribute(writable) int16u identifyTime = 0; - attribute(readonly) enum8 identifyType = 1; - attribute(readonly) int16u clusterRevision = 65533; + attribute int16u identifyTime = 0; + readonly attribute enum8 identifyType = 1; + readonly attribute int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -465,9 +465,9 @@ server cluster Identify = 3 { kActuator = 5; } - attribute(writable) int16u identifyTime = 0; - attribute(readonly) enum8 identifyType = 1; - attribute(readonly) int16u clusterRevision = 65533; + attribute int16u identifyTime = 0; + readonly attribute enum8 identifyType = 1; + readonly attribute int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -482,8 +482,8 @@ server cluster Identify = 3 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute char_string activeLocale = 1; + readonly attribute CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -536,16 +536,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u maxNetworks = 0; + readonly attribute NetworkInfo networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute boolean interfaceEnabled = 4; + readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; + readonly attribute octet_string lastNetworkID = 6; + readonly attribute int32u lastConnectErrorValue = 7; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -626,7 +626,7 @@ server cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -693,12 +693,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly) FabricDescriptor fabricsList[] = 1; - attribute(readonly) int8u supportedFabrics = 2; - attribute(readonly) int8u commissionedFabrics = 3; - attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly) fabric_idx currentFabricIndex = 5; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute FabricDescriptor fabricsList[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -779,12 +779,12 @@ server cluster Scenes = 5 { INT8U value = 3; } - attribute(readonly) int8u sceneCount = 0; - attribute(readonly) int8u currentScene = 1; - attribute(readonly) int16u currentGroup = 2; - attribute(readonly) boolean sceneValid = 3; - attribute(readonly) bitmap8 nameSupport = 4; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u sceneCount = 0; + readonly attribute int8u currentScene = 1; + readonly attribute int16u currentGroup = 2; + readonly attribute boolean sceneValid = 3; + readonly attribute bitmap8 nameSupport = 4; + readonly attribute int16u clusterRevision = 65533; request struct AddSceneRequest { INT16U groupId = 0; @@ -885,12 +885,12 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly) ThreadMetrics threadMetrics[] = 0; - attribute(readonly) int64u currentHeapFree = 1; - attribute(readonly) int64u currentHeapUsed = 2; - attribute(readonly) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute ThreadMetrics threadMetrics[] = 0; + readonly attribute int64u currentHeapFree = 1; + readonly attribute int64u currentHeapUsed = 2; + readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster Thermostat = 513 { @@ -900,25 +900,25 @@ server cluster Thermostat = 513 { kHeatAndCoolSetpoints = 2; } - attribute(readonly) int16s localTemperature = 0; - attribute(readonly) int16s absMinHeatSetpointLimit = 3; - attribute(readonly) int16s absMaxHeatSetpointLimit = 4; - attribute(readonly) int16s absMinCoolSetpointLimit = 5; - attribute(readonly) int16s absMaxCoolSetpointLimit = 6; - attribute(writable) int16s occupiedCoolingSetpoint = 17; - attribute(writable) int16s occupiedHeatingSetpoint = 18; - attribute(writable) int16s minHeatSetpointLimit = 21; - attribute(writable) int16s maxHeatSetpointLimit = 22; - attribute(writable) int16s minCoolSetpointLimit = 23; - attribute(writable) int16s maxCoolSetpointLimit = 24; - attribute(writable) int8s minSetpointDeadBand = 25; - attribute(writable) enum8 controlSequenceOfOperation = 27; - attribute(writable) enum8 systemMode = 28; - attribute(readonly) enum8 startOfWeek = 32; - attribute(readonly) int8u numberOfWeeklyTransitions = 33; - attribute(readonly) int8u numberOfDailyTransitions = 34; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s localTemperature = 0; + readonly attribute int16s absMinHeatSetpointLimit = 3; + readonly attribute int16s absMaxHeatSetpointLimit = 4; + readonly attribute int16s absMinCoolSetpointLimit = 5; + readonly attribute int16s absMaxCoolSetpointLimit = 6; + attribute int16s occupiedCoolingSetpoint = 17; + attribute int16s occupiedHeatingSetpoint = 18; + attribute int16s minHeatSetpointLimit = 21; + attribute int16s maxHeatSetpointLimit = 22; + attribute int16s minCoolSetpointLimit = 23; + attribute int16s maxCoolSetpointLimit = 24; + attribute int8s minSetpointDeadBand = 25; + attribute enum8 controlSequenceOfOperation = 27; + attribute enum8 systemMode = 28; + readonly attribute enum8 startOfWeek = 32; + readonly attribute int8u numberOfWeeklyTransitions = 33; + readonly attribute int8u numberOfDailyTransitions = 34; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct GetWeeklyScheduleRequest { DayOfWeek daysToReturn = 0; @@ -1037,76 +1037,76 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly) int16u channel = 0; - attribute(readonly) enum8 routingRole = 1; - attribute(readonly) octet_string networkName = 2; - attribute(readonly) int16u panId = 3; - attribute(readonly) int64u extendedPanId = 4; - attribute(readonly) octet_string meshLocalPrefix = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) NeighborTable neighborTableList[] = 7; - attribute(readonly) RouteTable routeTableList[] = 8; - attribute(readonly) int32u partitionId = 9; - attribute(readonly) int8u weighting = 10; - attribute(readonly) int8u dataVersion = 11; - attribute(readonly) int8u stableDataVersion = 12; - attribute(readonly) int8u leaderRouterId = 13; - attribute(readonly) int16u detachedRoleCount = 14; - attribute(readonly) int16u childRoleCount = 15; - attribute(readonly) int16u routerRoleCount = 16; - attribute(readonly) int16u leaderRoleCount = 17; - attribute(readonly) int16u attachAttemptCount = 18; - attribute(readonly) int16u partitionIdChangeCount = 19; - attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly) int16u parentChangeCount = 21; - attribute(readonly) int32u txTotalCount = 22; - attribute(readonly) int32u txUnicastCount = 23; - attribute(readonly) int32u txBroadcastCount = 24; - attribute(readonly) int32u txAckRequestedCount = 25; - attribute(readonly) int32u txAckedCount = 26; - attribute(readonly) int32u txNoAckRequestedCount = 27; - attribute(readonly) int32u txDataCount = 28; - attribute(readonly) int32u txDataPollCount = 29; - attribute(readonly) int32u txBeaconCount = 30; - attribute(readonly) int32u txBeaconRequestCount = 31; - attribute(readonly) int32u txOtherCount = 32; - attribute(readonly) int32u txRetryCount = 33; - attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly) int32u txErrCcaCount = 36; - attribute(readonly) int32u txErrAbortCount = 37; - attribute(readonly) int32u txErrBusyChannelCount = 38; - attribute(readonly) int32u rxTotalCount = 39; - attribute(readonly) int32u rxUnicastCount = 40; - attribute(readonly) int32u rxBroadcastCount = 41; - attribute(readonly) int32u rxDataCount = 42; - attribute(readonly) int32u rxDataPollCount = 43; - attribute(readonly) int32u rxBeaconCount = 44; - attribute(readonly) int32u rxBeaconRequestCount = 45; - attribute(readonly) int32u rxOtherCount = 46; - attribute(readonly) int32u rxAddressFilteredCount = 47; - attribute(readonly) int32u rxDestAddrFilteredCount = 48; - attribute(readonly) int32u rxDuplicatedCount = 49; - attribute(readonly) int32u rxErrNoFrameCount = 50; - attribute(readonly) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly) int32u rxErrSecCount = 53; - attribute(readonly) int32u rxErrFcsCount = 54; - attribute(readonly) int32u rxErrOtherCount = 55; - attribute(readonly) int64u activeTimestamp = 56; - attribute(readonly) int64u pendingTimestamp = 57; - attribute(readonly) int32u delay = 58; - attribute(readonly) SecurityPolicy securityPolicy[] = 59; - attribute(readonly) octet_string channelMask = 60; - attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u channel = 0; + readonly attribute enum8 routingRole = 1; + readonly attribute octet_string networkName = 2; + readonly attribute int16u panId = 3; + readonly attribute int64u extendedPanId = 4; + readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute NeighborTable neighborTableList[] = 7; + readonly attribute RouteTable routeTableList[] = 8; + readonly attribute int32u partitionId = 9; + readonly attribute int8u weighting = 10; + readonly attribute int8u dataVersion = 11; + readonly attribute int8u stableDataVersion = 12; + readonly attribute int8u leaderRouterId = 13; + readonly attribute int16u detachedRoleCount = 14; + readonly attribute int16u childRoleCount = 15; + readonly attribute int16u routerRoleCount = 16; + readonly attribute int16u leaderRoleCount = 17; + readonly attribute int16u attachAttemptCount = 18; + readonly attribute int16u partitionIdChangeCount = 19; + readonly attribute int16u betterPartitionAttachAttemptCount = 20; + readonly attribute int16u parentChangeCount = 21; + readonly attribute int32u txTotalCount = 22; + readonly attribute int32u txUnicastCount = 23; + readonly attribute int32u txBroadcastCount = 24; + readonly attribute int32u txAckRequestedCount = 25; + readonly attribute int32u txAckedCount = 26; + readonly attribute int32u txNoAckRequestedCount = 27; + readonly attribute int32u txDataCount = 28; + readonly attribute int32u txDataPollCount = 29; + readonly attribute int32u txBeaconCount = 30; + readonly attribute int32u txBeaconRequestCount = 31; + readonly attribute int32u txOtherCount = 32; + readonly attribute int32u txRetryCount = 33; + readonly attribute int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute int32u txErrCcaCount = 36; + readonly attribute int32u txErrAbortCount = 37; + readonly attribute int32u txErrBusyChannelCount = 38; + readonly attribute int32u rxTotalCount = 39; + readonly attribute int32u rxUnicastCount = 40; + readonly attribute int32u rxBroadcastCount = 41; + readonly attribute int32u rxDataCount = 42; + readonly attribute int32u rxDataPollCount = 43; + readonly attribute int32u rxBeaconCount = 44; + readonly attribute int32u rxBeaconRequestCount = 45; + readonly attribute int32u rxOtherCount = 46; + readonly attribute int32u rxAddressFilteredCount = 47; + readonly attribute int32u rxDestAddrFilteredCount = 48; + readonly attribute int32u rxDuplicatedCount = 49; + readonly attribute int32u rxErrNoFrameCount = 50; + readonly attribute int32u rxErrUnknownNeighborCount = 51; + readonly attribute int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute int32u rxErrSecCount = 53; + readonly attribute int32u rxErrFcsCount = 54; + readonly attribute int32u rxErrOtherCount = 55; + readonly attribute int64u activeTimestamp = 56; + readonly attribute int64u pendingTimestamp = 57; + readonly attribute int32u delay = 58; + readonly attribute SecurityPolicy securityPolicy[] = 59; + readonly attribute octet_string channelMask = 60; + readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; + readonly attribute NetworkFault activeNetworkFaultsList[] = 62; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -1153,21 +1153,21 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly) octet_string bssid = 0; - attribute(readonly) enum8 securityType = 1; - attribute(readonly) enum8 wiFiVersion = 2; - attribute(readonly) int16u channelNumber = 3; - attribute(readonly) int8s rssi = 4; - attribute(readonly) int32u beaconLostCount = 5; - attribute(readonly) int32u beaconRxCount = 6; - attribute(readonly) int32u packetMulticastRxCount = 7; - attribute(readonly) int32u packetMulticastTxCount = 8; - attribute(readonly) int32u packetUnicastRxCount = 9; - attribute(readonly) int32u packetUnicastTxCount = 10; - attribute(readonly) int64u currentMaxRate = 11; - attribute(readonly) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute octet_string bssid = 0; + readonly attribute enum8 securityType = 1; + readonly attribute enum8 wiFiVersion = 2; + readonly attribute int16u channelNumber = 3; + readonly attribute int8s rssi = 4; + readonly attribute int32u beaconLostCount = 5; + readonly attribute int32u beaconRxCount = 6; + readonly attribute int32u packetMulticastRxCount = 7; + readonly attribute int32u packetMulticastTxCount = 8; + readonly attribute int32u packetUnicastRxCount = 9; + readonly attribute int32u packetUnicastTxCount = 10; + readonly attribute int64u currentMaxRate = 11; + readonly attribute int64u overrunCount = 12; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 0881c0bcb7573e..b85ad7df624620 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -7,7 +7,7 @@ struct LabelStruct { } server cluster AccountLogin = 1294 { - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; request struct GetSetupPINRequestRequest { CHAR_STRING tempAccountIdentifier = 0; @@ -40,10 +40,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u windowStatus = 0; + readonly attribute fabric_idx adminFabricIndex = 1; + readonly attribute int16u adminVendorId = 2; + readonly attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -76,15 +76,15 @@ server cluster ApplicationBasic = 1293 { CHAR_STRING applicationId = 2; } - attribute(readonly) char_string vendorName = 0; - attribute(readonly) int16u vendorId = 1; - attribute(readonly) char_string applicationName = 2; - attribute(readonly) int16u productId = 3; - attribute(writable) ApplicationBasicApplication applicationApp = 4; - attribute(readonly) ApplicationStatusEnum applicationStatus = 5; - attribute(readonly) char_string applicationVersion = 6; - attribute(readonly) vendor_id allowedVendorList[] = 7; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute char_string vendorName = 0; + readonly attribute int16u vendorId = 1; + readonly attribute char_string applicationName = 2; + readonly attribute int16u productId = 3; + attribute ApplicationBasicApplication applicationApp = 4; + readonly attribute ApplicationStatusEnum applicationStatus = 5; + readonly attribute char_string applicationVersion = 6; + readonly attribute vendor_id allowedVendorList[] = 7; + readonly attribute int16u clusterRevision = 65533; } server cluster ApplicationLauncher = 1292 { @@ -104,9 +104,9 @@ server cluster ApplicationLauncher = 1292 { CHAR_STRING applicationId = 2; } - attribute(readonly) INT16U applicationLauncherList[] = 0; - attribute(writable) ApplicationEP applicationLauncherApp = 1; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute INT16U applicationLauncherList[] = 0; + attribute ApplicationEP applicationLauncherApp = 1; + readonly attribute int16u clusterRevision = 65533; request struct HideAppRequestRequest { ApplicationLauncherApplication application = 0; @@ -147,9 +147,9 @@ server cluster AudioOutput = 1291 { CHAR_STRING name = 3; } - attribute(readonly) OutputInfo audioOutputList[] = 0; - attribute(readonly) int8u currentAudioOutput = 1; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute OutputInfo audioOutputList[] = 0; + readonly attribute int8u currentAudioOutput = 1; + readonly attribute int16u clusterRevision = 65533; request struct RenameOutputRequestRequest { INT8U index = 0; @@ -179,31 +179,31 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly) int16u interactionModelVersion = 0; - attribute(readonly) char_string vendorName = 1; - attribute(readonly) vendor_id vendorID = 2; - attribute(readonly) char_string productName = 3; - attribute(readonly) int16u productID = 4; - attribute(writable) char_string nodeLabel = 5; - attribute(writable) char_string location = 6; - attribute(readonly) int16u hardwareVersion = 7; - attribute(readonly) char_string hardwareVersionString = 8; - attribute(readonly) int32u softwareVersion = 9; - attribute(readonly) char_string softwareVersionString = 10; - attribute(readonly) char_string manufacturingDate = 11; - attribute(readonly) char_string partNumber = 12; - attribute(readonly) long_char_string productURL = 13; - attribute(readonly) char_string productLabel = 14; - attribute(readonly) char_string serialNumber = 15; - attribute(writable) boolean localConfigDisabled = 16; - attribute(readonly) char_string uniqueID = 18; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u interactionModelVersion = 0; + readonly attribute char_string vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string productName = 3; + readonly attribute int16u productID = 4; + attribute char_string nodeLabel = 5; + attribute char_string location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string softwareVersionString = 10; + readonly attribute char_string manufacturingDate = 11; + readonly attribute char_string partNumber = 12; + readonly attribute long_char_string productURL = 13; + readonly attribute char_string productLabel = 14; + readonly attribute char_string serialNumber = 15; + attribute boolean localConfigDisabled = 16; + readonly attribute char_string uniqueID = 18; + readonly attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } client cluster Binding = 30 { - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; request struct BindRequest { NODE_ID nodeId = 0; @@ -224,7 +224,7 @@ client cluster Binding = 30 { } server cluster Binding = 30 { - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; request struct BindRequest { NODE_ID nodeId = 0; @@ -269,10 +269,10 @@ server cluster Channel = 1284 { LineupInfoTypeEnum lineupInfoType = 4; } - attribute(readonly) ChannelInfo channelList[] = 0; - attribute(writable) LineupInfo channelLineup = 1; - attribute(writable) ChannelInfo currentChannel = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute ChannelInfo channelList[] = 0; + attribute LineupInfo channelLineup = 1; + attribute ChannelInfo currentChannel = 2; + readonly attribute int16u clusterRevision = 65533; request struct ChangeChannelByNumberRequestRequest { INT16U majorNumber = 0; @@ -361,9 +361,9 @@ server cluster ContentLauncher = 1290 { MetricTypeEnum metric = 3; } - attribute(readonly) CHAR_STRING acceptHeaderList[] = 0; - attribute(writable) bitmap32 supportedStreamingProtocols = 1; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute CHAR_STRING acceptHeaderList[] = 0; + attribute bitmap32 supportedStreamingProtocols = 1; + readonly attribute int16u clusterRevision = 65533; request struct LaunchContentRequestRequest { BOOLEAN autoPlay = 0; @@ -392,11 +392,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly) DeviceType deviceList[] = 0; - attribute(readonly) CLUSTER_ID serverList[] = 1; - attribute(readonly) CLUSTER_ID clientList[] = 2; - attribute(readonly) ENDPOINT_NO partsList[] = 3; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute DeviceType deviceList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -443,22 +443,22 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly) enum8 PHYRate = 0; - attribute(readonly) boolean fullDuplex = 1; - attribute(readonly) int64u packetRxCount = 2; - attribute(readonly) int64u packetTxCount = 3; - attribute(readonly) int64u txErrCount = 4; - attribute(readonly) int64u collisionCount = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) boolean carrierDetect = 7; - attribute(readonly) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 PHYRate = 0; + readonly attribute boolean fullDuplex = 1; + readonly attribute int64u packetRxCount = 2; + readonly attribute int64u packetTxCount = 3; + readonly attribute int64u txErrCount = 4; + readonly attribute int64u collisionCount = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute boolean carrierDetect = 7; + readonly attribute int64u timeSinceReset = 8; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } client cluster GeneralCommissioning = 48 { @@ -479,12 +479,12 @@ client cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable) int64u breadcrumb = 0; - attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + attribute int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + readonly attribute enum8 regulatoryConfig = 2; + readonly attribute enum8 locationCapability = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -537,12 +537,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable) int64u breadcrumb = 0; - attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + attribute int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + readonly attribute enum8 regulatoryConfig = 2; + readonly attribute enum8 locationCapability = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -655,15 +655,15 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly) int16u rebootCount = 1; - attribute(readonly) int64u upTime = 2; - attribute(readonly) int32u totalOperationalHours = 3; - attribute(readonly) enum8 bootReasons = 4; - attribute(readonly) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly) ENUM8 activeRadioFaults[] = 6; - attribute(readonly) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute enum8 bootReasons = 4; + readonly attribute ENUM8 activeHardwareFaults[] = 5; + readonly attribute ENUM8 activeRadioFaults[] = 6; + readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute int16u clusterRevision = 65533; } server cluster GroupKeyManagement = 63 { @@ -685,9 +685,9 @@ server cluster GroupKeyManagement = 63 { CHAR_STRING groupName = 3; } - attribute(readonly) GroupKey groupKeyMap[] = 0; - attribute(readonly) GroupInfo groupTable[] = 1; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute GroupKey groupKeyMap[] = 0; + readonly attribute GroupInfo groupTable[] = 1; + readonly attribute int16u clusterRevision = 65533; } server cluster KeypadInput = 1289 { @@ -786,7 +786,7 @@ server cluster KeypadInput = 1289 { kInvalidKeyInCurrentState = 2; } - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; request struct SendKeyRequestRequest { CecKeyCode keyCode = 0; @@ -806,22 +806,22 @@ server cluster LevelControl = 8 { kDown = 1; } - attribute(readonly) int8u currentLevel = 0; - attribute(readonly) int16u remainingTime = 1; - attribute(readonly) int8u minLevel = 2; - attribute(readonly) int8u maxLevel = 3; - attribute(readonly) int16u currentFrequency = 4; - attribute(readonly) int16u minFrequency = 5; - attribute(readonly) int16u maxFrequency = 6; - attribute(writable) bitmap8 options = 15; - attribute(writable) int16u onOffTransitionTime = 16; - attribute(writable) int8u onLevel = 17; - attribute(writable) int16u onTransitionTime = 18; - attribute(writable) int16u offTransitionTime = 19; - attribute(writable) int8u defaultMoveRate = 20; - attribute(writable) int8u startUpCurrentLevel = 16384; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u currentLevel = 0; + readonly attribute int16u remainingTime = 1; + readonly attribute int8u minLevel = 2; + readonly attribute int8u maxLevel = 3; + readonly attribute int16u currentFrequency = 4; + readonly attribute int16u minFrequency = 5; + readonly attribute int16u maxFrequency = 6; + attribute bitmap8 options = 15; + attribute int16u onOffTransitionTime = 16; + attribute int8u onLevel = 17; + attribute int16u onTransitionTime = 18; + attribute int16u offTransitionTime = 19; + attribute int8u defaultMoveRate = 20; + attribute int8u startUpCurrentLevel = 16384; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -877,12 +877,12 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute char_string activeLocale = 1; + readonly attribute CHAR_STRING supportedLocales[] = 2; } server cluster LowPower = 1288 { - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; command Sleep(): DefaultSuccess = 0; } @@ -910,9 +910,9 @@ server cluster MediaInput = 1287 { CHAR_STRING description = 4; } - attribute(readonly) InputInfo mediaInputList[] = 0; - attribute(readonly) int8u currentMediaInput = 1; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute InputInfo mediaInputList[] = 0; + readonly attribute int8u currentMediaInput = 1; + readonly attribute int16u clusterRevision = 65533; request struct RenameInputRequestRequest { INT8U index = 0; @@ -951,14 +951,14 @@ server cluster MediaPlayback = 1286 { INT64U position = 2; } - attribute(readonly) PlaybackStateEnum playbackState = 0; - attribute(readonly) epoch_us startTime = 1; - attribute(readonly) int64u duration = 2; - attribute(writable) PlaybackPosition position = 3; - attribute(readonly) single playbackSpeed = 4; - attribute(readonly) int64u seekRangeEnd = 5; - attribute(readonly) int64u seekRangeStart = 6; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute PlaybackStateEnum playbackState = 0; + readonly attribute epoch_us startTime = 1; + readonly attribute int64u duration = 2; + attribute PlaybackPosition position = 3; + readonly attribute single playbackSpeed = 4; + readonly attribute int64u seekRangeEnd = 5; + readonly attribute int64u seekRangeStart = 6; + readonly attribute int16u clusterRevision = 65533; request struct SeekRequestRequest { INT64U position = 0; @@ -1039,16 +1039,16 @@ client cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u maxNetworks = 0; + readonly attribute NetworkInfo networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute boolean interfaceEnabled = 4; + readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; + readonly attribute octet_string lastNetworkID = 6; + readonly attribute int32u lastConnectErrorValue = 7; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -1158,16 +1158,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u maxNetworks = 0; + readonly attribute NetworkInfo networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute boolean interfaceEnabled = 4; + readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; + readonly attribute octet_string lastNetworkID = 6; + readonly attribute int32u lastConnectErrorValue = 7; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -1248,7 +1248,7 @@ server cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -1308,8 +1308,8 @@ server cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly) boolean onOff = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute boolean onOff = 0; + readonly attribute int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -1339,12 +1339,12 @@ client cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly) FabricDescriptor fabricsList[] = 1; - attribute(readonly) int8u supportedFabrics = 2; - attribute(readonly) int8u commissionedFabrics = 3; - attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly) fabric_idx currentFabricIndex = 5; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute FabricDescriptor fabricsList[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -1430,12 +1430,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly) FabricDescriptor fabricsList[] = 1; - attribute(readonly) int8u supportedFabrics = 2; - attribute(readonly) int8u commissionedFabrics = 3; - attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly) fabric_idx currentFabricIndex = 5; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute FabricDescriptor fabricsList[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -1510,10 +1510,10 @@ server cluster OperationalCredentials = 62 { } server cluster RelativeHumidityMeasurement = 1029 { - attribute(readonly) int16u measuredValue = 0; - attribute(readonly) int16u minMeasuredValue = 1; - attribute(readonly) int16u maxMeasuredValue = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u measuredValue = 0; + readonly attribute int16u minMeasuredValue = 1; + readonly attribute int16u maxMeasuredValue = 2; + readonly attribute int16u clusterRevision = 65533; } server cluster SoftwareDiagnostics = 52 { @@ -1529,12 +1529,12 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly) ThreadMetrics threadMetrics[] = 0; - attribute(readonly) int64u currentHeapFree = 1; - attribute(readonly) int64u currentHeapUsed = 2; - attribute(readonly) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute ThreadMetrics threadMetrics[] = 0; + readonly attribute int64u currentHeapFree = 1; + readonly attribute int64u currentHeapUsed = 2; + readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster TargetNavigator = 1285 { @@ -1549,9 +1549,9 @@ server cluster TargetNavigator = 1285 { CHAR_STRING name = 2; } - attribute(readonly) TargetInfo targetNavigatorList[] = 0; - attribute(readonly) int8u currentNavigatorTarget = 1; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute TargetInfo targetNavigatorList[] = 0; + readonly attribute int8u currentNavigatorTarget = 1; + readonly attribute int16u clusterRevision = 65533; request struct NavigateTargetRequestRequest { INT8U target = 0; @@ -1643,81 +1643,81 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly) int16u channel = 0; - attribute(readonly) enum8 routingRole = 1; - attribute(readonly) octet_string networkName = 2; - attribute(readonly) int16u panId = 3; - attribute(readonly) int64u extendedPanId = 4; - attribute(readonly) octet_string meshLocalPrefix = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) NeighborTable neighborTableList[] = 7; - attribute(readonly) RouteTable routeTableList[] = 8; - attribute(readonly) int32u partitionId = 9; - attribute(readonly) int8u weighting = 10; - attribute(readonly) int8u dataVersion = 11; - attribute(readonly) int8u stableDataVersion = 12; - attribute(readonly) int8u leaderRouterId = 13; - attribute(readonly) int16u detachedRoleCount = 14; - attribute(readonly) int16u childRoleCount = 15; - attribute(readonly) int16u routerRoleCount = 16; - attribute(readonly) int16u leaderRoleCount = 17; - attribute(readonly) int16u attachAttemptCount = 18; - attribute(readonly) int16u partitionIdChangeCount = 19; - attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly) int16u parentChangeCount = 21; - attribute(readonly) int32u txTotalCount = 22; - attribute(readonly) int32u txUnicastCount = 23; - attribute(readonly) int32u txBroadcastCount = 24; - attribute(readonly) int32u txAckRequestedCount = 25; - attribute(readonly) int32u txAckedCount = 26; - attribute(readonly) int32u txNoAckRequestedCount = 27; - attribute(readonly) int32u txDataCount = 28; - attribute(readonly) int32u txDataPollCount = 29; - attribute(readonly) int32u txBeaconCount = 30; - attribute(readonly) int32u txBeaconRequestCount = 31; - attribute(readonly) int32u txOtherCount = 32; - attribute(readonly) int32u txRetryCount = 33; - attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly) int32u txErrCcaCount = 36; - attribute(readonly) int32u txErrAbortCount = 37; - attribute(readonly) int32u txErrBusyChannelCount = 38; - attribute(readonly) int32u rxTotalCount = 39; - attribute(readonly) int32u rxUnicastCount = 40; - attribute(readonly) int32u rxBroadcastCount = 41; - attribute(readonly) int32u rxDataCount = 42; - attribute(readonly) int32u rxDataPollCount = 43; - attribute(readonly) int32u rxBeaconCount = 44; - attribute(readonly) int32u rxBeaconRequestCount = 45; - attribute(readonly) int32u rxOtherCount = 46; - attribute(readonly) int32u rxAddressFilteredCount = 47; - attribute(readonly) int32u rxDestAddrFilteredCount = 48; - attribute(readonly) int32u rxDuplicatedCount = 49; - attribute(readonly) int32u rxErrNoFrameCount = 50; - attribute(readonly) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly) int32u rxErrSecCount = 53; - attribute(readonly) int32u rxErrFcsCount = 54; - attribute(readonly) int32u rxErrOtherCount = 55; - attribute(readonly) int64u activeTimestamp = 56; - attribute(readonly) int64u pendingTimestamp = 57; - attribute(readonly) int32u delay = 58; - attribute(readonly) SecurityPolicy securityPolicy[] = 59; - attribute(readonly) octet_string channelMask = 60; - attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u channel = 0; + readonly attribute enum8 routingRole = 1; + readonly attribute octet_string networkName = 2; + readonly attribute int16u panId = 3; + readonly attribute int64u extendedPanId = 4; + readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute NeighborTable neighborTableList[] = 7; + readonly attribute RouteTable routeTableList[] = 8; + readonly attribute int32u partitionId = 9; + readonly attribute int8u weighting = 10; + readonly attribute int8u dataVersion = 11; + readonly attribute int8u stableDataVersion = 12; + readonly attribute int8u leaderRouterId = 13; + readonly attribute int16u detachedRoleCount = 14; + readonly attribute int16u childRoleCount = 15; + readonly attribute int16u routerRoleCount = 16; + readonly attribute int16u leaderRoleCount = 17; + readonly attribute int16u attachAttemptCount = 18; + readonly attribute int16u partitionIdChangeCount = 19; + readonly attribute int16u betterPartitionAttachAttemptCount = 20; + readonly attribute int16u parentChangeCount = 21; + readonly attribute int32u txTotalCount = 22; + readonly attribute int32u txUnicastCount = 23; + readonly attribute int32u txBroadcastCount = 24; + readonly attribute int32u txAckRequestedCount = 25; + readonly attribute int32u txAckedCount = 26; + readonly attribute int32u txNoAckRequestedCount = 27; + readonly attribute int32u txDataCount = 28; + readonly attribute int32u txDataPollCount = 29; + readonly attribute int32u txBeaconCount = 30; + readonly attribute int32u txBeaconRequestCount = 31; + readonly attribute int32u txOtherCount = 32; + readonly attribute int32u txRetryCount = 33; + readonly attribute int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute int32u txErrCcaCount = 36; + readonly attribute int32u txErrAbortCount = 37; + readonly attribute int32u txErrBusyChannelCount = 38; + readonly attribute int32u rxTotalCount = 39; + readonly attribute int32u rxUnicastCount = 40; + readonly attribute int32u rxBroadcastCount = 41; + readonly attribute int32u rxDataCount = 42; + readonly attribute int32u rxDataPollCount = 43; + readonly attribute int32u rxBeaconCount = 44; + readonly attribute int32u rxBeaconRequestCount = 45; + readonly attribute int32u rxOtherCount = 46; + readonly attribute int32u rxAddressFilteredCount = 47; + readonly attribute int32u rxDestAddrFilteredCount = 48; + readonly attribute int32u rxDuplicatedCount = 49; + readonly attribute int32u rxErrNoFrameCount = 50; + readonly attribute int32u rxErrUnknownNeighborCount = 51; + readonly attribute int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute int32u rxErrSecCount = 53; + readonly attribute int32u rxErrFcsCount = 54; + readonly attribute int32u rxErrOtherCount = 55; + readonly attribute int64u activeTimestamp = 56; + readonly attribute int64u pendingTimestamp = 57; + readonly attribute int32u delay = 58; + readonly attribute SecurityPolicy securityPolicy[] = 59; + readonly attribute octet_string channelMask = 60; + readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; + readonly attribute NetworkFault activeNetworkFaultsList[] = 62; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster WakeOnLan = 1283 { - attribute(readonly) char_string wakeOnLanMacAddress = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute char_string wakeOnLanMacAddress = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -1764,21 +1764,21 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly) octet_string bssid = 0; - attribute(readonly) enum8 securityType = 1; - attribute(readonly) enum8 wiFiVersion = 2; - attribute(readonly) int16u channelNumber = 3; - attribute(readonly) int8s rssi = 4; - attribute(readonly) int32u beaconLostCount = 5; - attribute(readonly) int32u beaconRxCount = 6; - attribute(readonly) int32u packetMulticastRxCount = 7; - attribute(readonly) int32u packetMulticastTxCount = 8; - attribute(readonly) int32u packetUnicastRxCount = 9; - attribute(readonly) int32u packetUnicastTxCount = 10; - attribute(readonly) int64u currentMaxRate = 11; - attribute(readonly) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute octet_string bssid = 0; + readonly attribute enum8 securityType = 1; + readonly attribute enum8 wiFiVersion = 2; + readonly attribute int16u channelNumber = 3; + readonly attribute int8s rssi = 4; + readonly attribute int32u beaconLostCount = 5; + readonly attribute int32u beaconRxCount = 6; + readonly attribute int32u packetMulticastRxCount = 7; + readonly attribute int32u packetMulticastTxCount = 8; + readonly attribute int32u packetUnicastRxCount = 9; + readonly attribute int32u packetUnicastTxCount = 10; + readonly attribute int64u currentMaxRate = 11; + readonly attribute int64u overrunCount = 12; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } 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 d79822852c6e06..c45abe423067d5 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 @@ -7,7 +7,7 @@ struct LabelStruct { } client cluster AccountLogin = 1294 { - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; request struct GetSetupPINRequestRequest { CHAR_STRING tempAccountIdentifier = 0; @@ -36,10 +36,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u windowStatus = 0; + readonly attribute fabric_idx adminFabricIndex = 1; + readonly attribute int16u adminVendorId = 2; + readonly attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -67,13 +67,13 @@ client cluster ApplicationBasic = 1293 { kActiveVisibleNotFocus = 3; } - attribute(readonly) char_string vendorName = 0; - attribute(readonly) int16u vendorId = 1; - attribute(readonly) char_string applicationName = 2; - attribute(readonly) int16u productId = 3; - attribute(readonly) ApplicationStatusEnum applicationStatus = 5; - attribute(readonly) char_string applicationVersion = 6; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute char_string vendorName = 0; + readonly attribute int16u vendorId = 1; + readonly attribute char_string applicationName = 2; + readonly attribute int16u productId = 3; + readonly attribute ApplicationStatusEnum applicationStatus = 5; + readonly attribute char_string applicationVersion = 6; + readonly attribute int16u clusterRevision = 65533; } client cluster ApplicationLauncher = 1292 { @@ -88,8 +88,8 @@ client cluster ApplicationLauncher = 1292 { CHAR_STRING applicationId = 2; } - attribute(readonly) INT16U applicationLauncherList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute INT16U applicationLauncherList[] = 0; + readonly attribute int16u clusterRevision = 65533; request struct HideAppRequestRequest { ApplicationLauncherApplication application = 0; @@ -125,8 +125,8 @@ client cluster AudioOutput = 1291 { CHAR_STRING name = 3; } - attribute(readonly) OutputInfo audioOutputList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute OutputInfo audioOutputList[] = 0; + readonly attribute int16u clusterRevision = 65533; request struct RenameOutputRequestRequest { INT8U index = 0; @@ -142,11 +142,11 @@ client cluster AudioOutput = 1291 { } server cluster BarrierControl = 259 { - attribute(readonly) enum8 barrierMovingState = 1; - attribute(readonly) bitmap16 barrierSafetyStatus = 2; - attribute(readonly) bitmap8 barrierCapabilities = 3; - attribute(readonly) int8u barrierPosition = 10; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 barrierMovingState = 1; + readonly attribute bitmap16 barrierSafetyStatus = 2; + readonly attribute bitmap8 barrierCapabilities = 3; + readonly attribute int8u barrierPosition = 10; + readonly attribute int16u clusterRevision = 65533; request struct BarrierControlGoToPercentRequest { INT8U percentOpen = 0; @@ -171,39 +171,39 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly) int16u interactionModelVersion = 0; - attribute(readonly) char_string vendorName = 1; - attribute(readonly) vendor_id vendorID = 2; - attribute(readonly) char_string productName = 3; - attribute(readonly) int16u productID = 4; - attribute(writable) char_string nodeLabel = 5; - attribute(writable) char_string location = 6; - attribute(readonly) int16u hardwareVersion = 7; - attribute(readonly) char_string hardwareVersionString = 8; - attribute(readonly) int32u softwareVersion = 9; - attribute(readonly) char_string softwareVersionString = 10; - attribute(readonly) char_string manufacturingDate = 11; - attribute(readonly) char_string partNumber = 12; - attribute(readonly) long_char_string productURL = 13; - attribute(readonly) char_string productLabel = 14; - attribute(readonly) char_string serialNumber = 15; - attribute(writable) boolean localConfigDisabled = 16; - attribute(readonly) boolean reachable = 17; - attribute(readonly) char_string uniqueID = 18; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u interactionModelVersion = 0; + readonly attribute char_string vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string productName = 3; + readonly attribute int16u productID = 4; + attribute char_string nodeLabel = 5; + attribute char_string location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string softwareVersionString = 10; + readonly attribute char_string manufacturingDate = 11; + readonly attribute char_string partNumber = 12; + readonly attribute long_char_string productURL = 13; + readonly attribute char_string productLabel = 14; + readonly attribute char_string serialNumber = 15; + attribute boolean localConfigDisabled = 16; + readonly attribute boolean reachable = 17; + readonly attribute char_string uniqueID = 18; + readonly attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } server cluster BinaryInputBasic = 15 { - attribute(writable) boolean outOfService = 81; - attribute(writable) boolean presentValue = 85; - attribute(readonly) bitmap8 statusFlags = 111; - attribute(readonly) int16u clusterRevision = 65533; + attribute boolean outOfService = 81; + attribute boolean presentValue = 85; + readonly attribute bitmap8 statusFlags = 111; + readonly attribute int16u clusterRevision = 65533; } server cluster Binding = 30 { - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; request struct BindRequest { NODE_ID nodeId = 0; @@ -224,21 +224,21 @@ server cluster Binding = 30 { } server cluster BridgedDeviceBasic = 57 { - attribute(readonly) char_string vendorName = 1; - attribute(readonly) int16u vendorID = 2; - attribute(readonly) char_string productName = 3; - attribute(writable) char_string nodeLabel = 5; - attribute(readonly) int16u hardwareVersion = 7; - attribute(readonly) char_string hardwareVersionString = 8; - attribute(readonly) int32u softwareVersion = 9; - attribute(readonly) char_string softwareVersionString = 10; - attribute(readonly) char_string manufacturingDate = 11; - attribute(readonly) char_string partNumber = 12; - attribute(readonly) long_char_string productURL = 13; - attribute(readonly) char_string productLabel = 14; - attribute(readonly) char_string serialNumber = 15; - attribute(readonly) boolean reachable = 17; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute char_string vendorName = 1; + readonly attribute int16u vendorID = 2; + readonly attribute char_string productName = 3; + attribute char_string nodeLabel = 5; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string softwareVersionString = 10; + readonly attribute char_string manufacturingDate = 11; + readonly attribute char_string partNumber = 12; + readonly attribute long_char_string productURL = 13; + readonly attribute char_string productLabel = 14; + readonly attribute char_string serialNumber = 15; + readonly attribute boolean reachable = 17; + readonly attribute int16u clusterRevision = 65533; command Leave(): DefaultSuccess = 2; command ReachableChanged(): DefaultSuccess = 3; @@ -271,10 +271,10 @@ client cluster Channel = 1284 { LineupInfoTypeEnum lineupInfoType = 4; } - attribute(readonly) ChannelInfo channelList[] = 0; - attribute(writable) LineupInfo channelLineup = 1; - attribute(writable) ChannelInfo currentChannel = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute ChannelInfo channelList[] = 0; + attribute LineupInfo channelLineup = 1; + attribute ChannelInfo currentChannel = 2; + readonly attribute int16u clusterRevision = 65533; request struct ChangeChannelByNumberRequestRequest { INT16U majorNumber = 0; @@ -341,57 +341,57 @@ server cluster ColorControl = 768 { kDown = 3; } - attribute(readonly) int8u currentHue = 0; - attribute(readonly) int8u currentSaturation = 1; - attribute(readonly) int16u remainingTime = 2; - attribute(readonly) int16u currentX = 3; - attribute(readonly) int16u currentY = 4; - attribute(readonly) enum8 driftCompensation = 5; - attribute(readonly) char_string compensationText = 6; - attribute(readonly) int16u colorTemperature = 7; - attribute(readonly) enum8 colorMode = 8; - attribute(writable) bitmap8 colorControlOptions = 15; - attribute(readonly) int8u numberOfPrimaries = 16; - attribute(readonly) int16u primary1X = 17; - attribute(readonly) int16u primary1Y = 18; - attribute(readonly) int8u primary1Intensity = 19; - attribute(readonly) int16u primary2X = 21; - attribute(readonly) int16u primary2Y = 22; - attribute(readonly) int8u primary2Intensity = 23; - attribute(readonly) int16u primary3X = 25; - attribute(readonly) int16u primary3Y = 26; - attribute(readonly) int8u primary3Intensity = 27; - attribute(readonly) int16u primary4X = 32; - attribute(readonly) int16u primary4Y = 33; - attribute(readonly) int8u primary4Intensity = 34; - attribute(readonly) int16u primary5X = 36; - attribute(readonly) int16u primary5Y = 37; - attribute(readonly) int8u primary5Intensity = 38; - attribute(readonly) int16u primary6X = 40; - attribute(readonly) int16u primary6Y = 41; - attribute(readonly) int8u primary6Intensity = 42; - attribute(writable) int16u whitePointX = 48; - attribute(writable) int16u whitePointY = 49; - attribute(writable) int16u colorPointRX = 50; - attribute(writable) int16u colorPointRY = 51; - attribute(writable) int8u colorPointRIntensity = 52; - attribute(writable) int16u colorPointGX = 54; - attribute(writable) int16u colorPointGY = 55; - attribute(writable) int8u colorPointGIntensity = 56; - attribute(writable) int16u colorPointBX = 58; - attribute(writable) int16u colorPointBY = 59; - attribute(writable) int8u colorPointBIntensity = 60; - attribute(readonly) int16u enhancedCurrentHue = 16384; - attribute(readonly) enum8 enhancedColorMode = 16385; - attribute(readonly) int8u colorLoopActive = 16386; - attribute(readonly) int8u colorLoopDirection = 16387; - attribute(readonly) int16u colorLoopTime = 16388; - attribute(readonly) bitmap16 colorCapabilities = 16394; - attribute(readonly) int16u colorTempPhysicalMin = 16395; - attribute(readonly) int16u colorTempPhysicalMax = 16396; - attribute(readonly) int16u coupleColorTempToLevelMinMireds = 16397; - attribute(writable) int16u startUpColorTemperatureMireds = 16400; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u currentHue = 0; + readonly attribute int8u currentSaturation = 1; + readonly attribute int16u remainingTime = 2; + readonly attribute int16u currentX = 3; + readonly attribute int16u currentY = 4; + readonly attribute enum8 driftCompensation = 5; + readonly attribute char_string compensationText = 6; + readonly attribute int16u colorTemperature = 7; + readonly attribute enum8 colorMode = 8; + attribute bitmap8 colorControlOptions = 15; + readonly attribute int8u numberOfPrimaries = 16; + readonly attribute int16u primary1X = 17; + readonly attribute int16u primary1Y = 18; + readonly attribute int8u primary1Intensity = 19; + readonly attribute int16u primary2X = 21; + readonly attribute int16u primary2Y = 22; + readonly attribute int8u primary2Intensity = 23; + readonly attribute int16u primary3X = 25; + readonly attribute int16u primary3Y = 26; + readonly attribute int8u primary3Intensity = 27; + readonly attribute int16u primary4X = 32; + readonly attribute int16u primary4Y = 33; + readonly attribute int8u primary4Intensity = 34; + readonly attribute int16u primary5X = 36; + readonly attribute int16u primary5Y = 37; + readonly attribute int8u primary5Intensity = 38; + readonly attribute int16u primary6X = 40; + readonly attribute int16u primary6Y = 41; + readonly attribute int8u primary6Intensity = 42; + attribute int16u whitePointX = 48; + attribute int16u whitePointY = 49; + attribute int16u colorPointRX = 50; + attribute int16u colorPointRY = 51; + attribute int8u colorPointRIntensity = 52; + attribute int16u colorPointGX = 54; + attribute int16u colorPointGY = 55; + attribute int8u colorPointGIntensity = 56; + attribute int16u colorPointBX = 58; + attribute int16u colorPointBY = 59; + attribute int8u colorPointBIntensity = 60; + readonly attribute int16u enhancedCurrentHue = 16384; + readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute int8u colorLoopActive = 16386; + readonly attribute int8u colorLoopDirection = 16387; + readonly attribute int16u colorLoopTime = 16388; + readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute int16u colorTempPhysicalMin = 16395; + readonly attribute int16u colorTempPhysicalMax = 16396; + readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; + attribute int16u startUpColorTemperatureMireds = 16400; + readonly attribute int16u clusterRevision = 65533; request struct MoveColorRequest { INT16S rateX = 0; @@ -580,9 +580,9 @@ client cluster ContentLauncher = 1290 { MetricTypeEnum metric = 3; } - attribute(readonly) CHAR_STRING acceptHeaderList[] = 0; - attribute(writable) bitmap32 supportedStreamingProtocols = 1; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute CHAR_STRING acceptHeaderList[] = 0; + attribute bitmap32 supportedStreamingProtocols = 1; + readonly attribute int16u clusterRevision = 65533; request struct LaunchContentRequestRequest { BOOLEAN autoPlay = 0; @@ -606,11 +606,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly) DeviceType deviceList[] = 0; - attribute(readonly) CLUSTER_ID serverList[] = 1; - attribute(readonly) CLUSTER_ID clientList[] = 2; - attribute(readonly) ENDPOINT_NO partsList[] = 3; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute DeviceType deviceList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -879,34 +879,34 @@ server cluster DoorLock = 257 { nullable INT16U dataIndex = 6; } - attribute(readonly) DlLockState lockState = 0; - attribute(readonly) DlLockType lockType = 1; - attribute(readonly) boolean actuatorEnabled = 2; - attribute(readonly) DlDoorState doorState = 3; - attribute(writable) int32u doorOpenEvents = 4; - attribute(writable) int32u doorClosedEvents = 5; - attribute(writable) int16u openPeriod = 6; - attribute(readonly) int16u numberOfTotalUsersSupported = 17; - attribute(readonly) int16u numberOfPINUsersSupported = 18; - attribute(readonly) int16u numberOfWeekDaySchedulesSupportedPerUser = 20; - attribute(readonly) int16u numberOfYearDaySchedulesSupportedPerUser = 21; - attribute(readonly) int16u numberOfHolidaySchedulesSupported = 22; - attribute(readonly) int8u maxPINCodeLength = 23; - attribute(readonly) int8u minPINCodeLength = 24; - attribute(readonly) bitmap8 credentialRulesSupport = 27; - attribute(writable) char_string language = 33; - attribute(writable) int32u autoRelockTime = 35; - attribute(writable) int8u soundVolume = 36; - attribute(writable) DlOperatingMode operatingMode = 37; - attribute(readonly) bitmap16 supportedOperatingModes = 38; - attribute(readonly) bitmap16 defaultConfigurationRegister = 39; - attribute(writable) boolean enableOneTouchLocking = 41; - attribute(writable) boolean enableInsideStatusLED = 42; - attribute(writable) boolean enablePrivacyModeButton = 43; - attribute(writable) int8u wrongCodeEntryLimit = 48; - attribute(writable) int8u userCodeTemporaryDisableTime = 49; - attribute(writable) boolean requirePINforRemoteOperation = 51; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute DlLockState lockState = 0; + readonly attribute DlLockType lockType = 1; + readonly attribute boolean actuatorEnabled = 2; + readonly attribute DlDoorState doorState = 3; + attribute int32u doorOpenEvents = 4; + attribute int32u doorClosedEvents = 5; + attribute int16u openPeriod = 6; + readonly attribute int16u numberOfTotalUsersSupported = 17; + readonly attribute int16u numberOfPINUsersSupported = 18; + readonly attribute int16u numberOfWeekDaySchedulesSupportedPerUser = 20; + readonly attribute int16u numberOfYearDaySchedulesSupportedPerUser = 21; + readonly attribute int16u numberOfHolidaySchedulesSupported = 22; + readonly attribute int8u maxPINCodeLength = 23; + readonly attribute int8u minPINCodeLength = 24; + readonly attribute bitmap8 credentialRulesSupport = 27; + attribute char_string language = 33; + attribute int32u autoRelockTime = 35; + attribute int8u soundVolume = 36; + attribute DlOperatingMode operatingMode = 37; + readonly attribute bitmap16 supportedOperatingModes = 38; + readonly attribute bitmap16 defaultConfigurationRegister = 39; + attribute boolean enableOneTouchLocking = 41; + attribute boolean enableInsideStatusLED = 42; + attribute boolean enablePrivacyModeButton = 43; + attribute int8u wrongCodeEntryLimit = 48; + attribute int8u userCodeTemporaryDisableTime = 49; + attribute boolean requirePINforRemoteOperation = 51; + readonly attribute int16u clusterRevision = 65533; request struct ClearCredentialRequest { DlCredential credential = 0; @@ -999,29 +999,29 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly) enum8 PHYRate = 0; - attribute(readonly) boolean fullDuplex = 1; - attribute(readonly) int64u packetRxCount = 2; - attribute(readonly) int64u packetTxCount = 3; - attribute(readonly) int64u txErrCount = 4; - attribute(readonly) int64u collisionCount = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) boolean carrierDetect = 7; - attribute(readonly) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 PHYRate = 0; + readonly attribute boolean fullDuplex = 1; + readonly attribute int64u packetRxCount = 2; + readonly attribute int64u packetTxCount = 3; + readonly attribute int64u txErrCount = 4; + readonly attribute int64u collisionCount = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute boolean carrierDetect = 7; + readonly attribute int64u timeSinceReset = 8; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster FlowMeasurement = 1028 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -1042,12 +1042,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable) int64u breadcrumb = 0; - attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + attribute int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + readonly attribute enum8 regulatoryConfig = 2; + readonly attribute enum8 locationCapability = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -1160,15 +1160,15 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly) int16u rebootCount = 1; - attribute(readonly) int64u upTime = 2; - attribute(readonly) int32u totalOperationalHours = 3; - attribute(readonly) enum8 bootReasons = 4; - attribute(readonly) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly) ENUM8 activeRadioFaults[] = 6; - attribute(readonly) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute enum8 bootReasons = 4; + readonly attribute ENUM8 activeHardwareFaults[] = 5; + readonly attribute ENUM8 activeRadioFaults[] = 6; + readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute int16u clusterRevision = 65533; } server cluster GroupKeyManagement = 63 { @@ -1190,14 +1190,14 @@ server cluster GroupKeyManagement = 63 { CHAR_STRING groupName = 3; } - attribute(readonly) GroupKey groupKeyMap[] = 0; - attribute(readonly) GroupInfo groupTable[] = 1; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute GroupKey groupKeyMap[] = 0; + readonly attribute GroupInfo groupTable[] = 1; + readonly attribute int16u clusterRevision = 65533; } server cluster Groups = 4 { - attribute(readonly) bitmap8 nameSupport = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute bitmap8 nameSupport = 0; + readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { INT16U groupId = 0; @@ -1277,12 +1277,12 @@ server cluster IasZone = 1280 { kInvalidZoneType = 65535; } - attribute(readonly) enum8 zoneState = 0; - attribute(readonly) enum16 zoneType = 1; - attribute(readonly) bitmap16 zoneStatus = 2; - attribute(writable) node_id iasCieAddress = 16; - attribute(readonly) int8u zoneId = 17; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 zoneState = 0; + readonly attribute enum16 zoneType = 1; + readonly attribute bitmap16 zoneStatus = 2; + attribute node_id iasCieAddress = 16; + readonly attribute int8u zoneId = 17; + readonly attribute int16u clusterRevision = 65533; request struct ZoneEnrollRequestRequest { IasZoneType zoneType = 0; @@ -1328,8 +1328,8 @@ server cluster Identify = 3 { kActuator = 5; } - attribute(writable) int16u identifyTime = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute int16u identifyTime = 0; + readonly attribute int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -1439,7 +1439,7 @@ client cluster KeypadInput = 1289 { kInvalidKeyInCurrentState = 2; } - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; request struct SendKeyRequestRequest { CecKeyCode keyCode = 0; @@ -1459,21 +1459,21 @@ server cluster LevelControl = 8 { kDown = 1; } - attribute(readonly) int8u currentLevel = 0; - attribute(readonly) int16u remainingTime = 1; - attribute(readonly) int8u minLevel = 2; - attribute(readonly) int8u maxLevel = 3; - attribute(readonly) int16u currentFrequency = 4; - attribute(readonly) int16u minFrequency = 5; - attribute(readonly) int16u maxFrequency = 6; - attribute(writable) bitmap8 options = 15; - attribute(writable) int16u onOffTransitionTime = 16; - attribute(writable) int8u onLevel = 17; - attribute(writable) int16u onTransitionTime = 18; - attribute(writable) int16u offTransitionTime = 19; - attribute(writable) int8u defaultMoveRate = 20; - attribute(writable) int8u startUpCurrentLevel = 16384; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u currentLevel = 0; + readonly attribute int16u remainingTime = 1; + readonly attribute int8u minLevel = 2; + readonly attribute int8u maxLevel = 3; + readonly attribute int16u currentFrequency = 4; + readonly attribute int16u minFrequency = 5; + readonly attribute int16u maxFrequency = 6; + attribute bitmap8 options = 15; + attribute int16u onOffTransitionTime = 16; + attribute int8u onLevel = 17; + attribute int16u onTransitionTime = 18; + attribute int16u offTransitionTime = 19; + attribute int8u defaultMoveRate = 20; + attribute int8u startUpCurrentLevel = 16384; + readonly attribute int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -1529,8 +1529,8 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute char_string activeLocale = 1; + readonly attribute CHAR_STRING supportedLocales[] = 2; } client cluster MediaInput = 1287 { @@ -1556,8 +1556,8 @@ client cluster MediaInput = 1287 { CHAR_STRING description = 4; } - attribute(readonly) InputInfo mediaInputList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute InputInfo mediaInputList[] = 0; + readonly attribute int16u clusterRevision = 65533; request struct RenameInputRequestRequest { INT8U index = 0; @@ -1591,7 +1591,7 @@ client cluster MediaPlayback = 1286 { kSeekOutOfRange = 5; } - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; request struct SeekRequestRequest { INT64U position = 0; @@ -1668,16 +1668,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u maxNetworks = 0; + readonly attribute NetworkInfo networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute boolean interfaceEnabled = 4; + readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; + readonly attribute octet_string lastNetworkID = 6; + readonly attribute int32u lastConnectErrorValue = 7; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -1758,7 +1758,7 @@ server cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -1803,10 +1803,10 @@ server cluster OtaSoftwareUpdateProvider = 41 { } server cluster OccupancySensing = 1030 { - attribute(readonly) bitmap8 occupancy = 0; - attribute(readonly) enum8 occupancySensorType = 1; - attribute(readonly) bitmap8 occupancySensorTypeBitmap = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute bitmap8 occupancy = 0; + readonly attribute enum8 occupancySensorType = 1; + readonly attribute bitmap8 occupancySensorTypeBitmap = 2; + readonly attribute int16u clusterRevision = 65533; } server cluster OnOff = 6 { @@ -1825,13 +1825,13 @@ server cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly) boolean onOff = 0; - attribute(readonly) boolean globalSceneControl = 16384; - attribute(writable) int16u onTime = 16385; - attribute(writable) int16u offWaitTime = 16386; - attribute(writable) enum8 startUpOnOff = 16387; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute boolean onOff = 0; + readonly attribute boolean globalSceneControl = 16384; + attribute int16u onTime = 16385; + attribute int16u offWaitTime = 16386; + attribute enum8 startUpOnOff = 16387; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -1861,12 +1861,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly) FabricDescriptor fabricsList[] = 1; - attribute(readonly) int8u supportedFabrics = 2; - attribute(readonly) int8u commissionedFabrics = 3; - attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly) fabric_idx currentFabricIndex = 5; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute FabricDescriptor fabricsList[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -1941,17 +1941,17 @@ server cluster OperationalCredentials = 62 { } server cluster PressureMeasurement = 1027 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u clusterRevision = 65533; } server cluster RelativeHumidityMeasurement = 1029 { - attribute(readonly) int16u measuredValue = 0; - attribute(readonly) int16u minMeasuredValue = 1; - attribute(readonly) int16u maxMeasuredValue = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u measuredValue = 0; + readonly attribute int16u minMeasuredValue = 1; + readonly attribute int16u maxMeasuredValue = 2; + readonly attribute int16u clusterRevision = 65533; } server cluster Scenes = 5 { @@ -1961,12 +1961,12 @@ server cluster Scenes = 5 { INT8U value = 3; } - attribute(readonly) int8u sceneCount = 0; - attribute(readonly) int8u currentScene = 1; - attribute(readonly) int16u currentGroup = 2; - attribute(readonly) boolean sceneValid = 3; - attribute(readonly) bitmap8 nameSupport = 4; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u sceneCount = 0; + readonly attribute int8u currentScene = 1; + readonly attribute int16u currentGroup = 2; + readonly attribute boolean sceneValid = 3; + readonly attribute bitmap8 nameSupport = 4; + readonly attribute int16u clusterRevision = 65533; request struct AddSceneRequest { INT16U groupId = 0; @@ -2067,12 +2067,12 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly) ThreadMetrics threadMetrics[] = 0; - attribute(readonly) int64u currentHeapFree = 1; - attribute(readonly) int64u currentHeapUsed = 2; - attribute(readonly) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute ThreadMetrics threadMetrics[] = 0; + readonly attribute int64u currentHeapFree = 1; + readonly attribute int64u currentHeapUsed = 2; + readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster Switch = 59 { @@ -2106,9 +2106,9 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } - attribute(readonly) int8u numberOfPositions = 0; - attribute(readonly) int8u currentPosition = 1; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; + readonly attribute int16u clusterRevision = 65533; } client cluster TargetNavigator = 1285 { @@ -2123,8 +2123,8 @@ client cluster TargetNavigator = 1285 { CHAR_STRING name = 2; } - attribute(readonly) TargetInfo targetNavigatorList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute TargetInfo targetNavigatorList[] = 0; + readonly attribute int16u clusterRevision = 65533; request struct NavigateTargetRequestRequest { INT8U target = 0; @@ -2135,10 +2135,10 @@ client cluster TargetNavigator = 1285 { } server cluster TemperatureMeasurement = 1026 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u clusterRevision = 65533; } server cluster TestCluster = 1295 { @@ -2163,27 +2163,27 @@ server cluster TestCluster = 1295 { SimpleEnum arg6[] = 6; } - attribute(writable) boolean boolean = 0; - attribute(writable) bitmap8 bitmap8 = 1; - attribute(writable) bitmap16 bitmap16 = 2; - attribute(writable) bitmap32 bitmap32 = 3; - attribute(writable) bitmap64 bitmap64 = 4; - attribute(writable) int8u int8u = 5; - attribute(writable) int16u int16u = 6; - attribute(writable) int32u int32u = 8; - attribute(writable) int64u int64u = 12; - attribute(writable) int8s int8s = 13; - attribute(writable) int16s int16s = 14; - attribute(writable) int32s int32s = 16; - attribute(writable) int64s int64s = 20; - attribute(writable) enum8 enum8 = 21; - attribute(writable) enum16 enum16 = 22; - attribute(writable) octet_string octetString = 25; - attribute(writable) INT8U listInt8u[] = 26; - attribute(writable) OCTET_STRING listOctetString[] = 27; - attribute(writable) TestListStructOctet listStructOctetString[] = 28; - attribute(writable) long_octet_string longOctetString = 29; - attribute(readonly) int16u clusterRevision = 65533; + attribute boolean boolean = 0; + attribute bitmap8 bitmap8 = 1; + attribute bitmap16 bitmap16 = 2; + attribute bitmap32 bitmap32 = 3; + attribute bitmap64 bitmap64 = 4; + attribute int8u int8u = 5; + attribute int16u int16u = 6; + attribute int32u int32u = 8; + attribute int64u int64u = 12; + attribute int8s int8s = 13; + attribute int16s int16s = 14; + attribute int32s int32s = 16; + attribute int64s int64s = 20; + attribute enum8 enum8 = 21; + attribute enum16 enum16 = 22; + attribute octet_string octetString = 25; + attribute INT8U listInt8u[] = 26; + attribute OCTET_STRING listOctetString[] = 27; + attribute TestListStructOctet listStructOctetString[] = 28; + attribute long_octet_string longOctetString = 29; + readonly attribute int16u clusterRevision = 65533; response struct TestSpecificResponse { INT8U returnValue = 0; @@ -2201,16 +2201,16 @@ server cluster Thermostat = 513 { kHeatAndCoolSetpoints = 2; } - attribute(readonly) int16s localTemperature = 0; - attribute(writable) int16s occupiedCoolingSetpoint = 17; - attribute(writable) int16s occupiedHeatingSetpoint = 18; - attribute(writable) enum8 controlSequenceOfOperation = 27; - attribute(writable) enum8 systemMode = 28; - attribute(readonly) enum8 startOfWeek = 32; - attribute(readonly) int8u numberOfWeeklyTransitions = 33; - attribute(readonly) int8u numberOfDailyTransitions = 34; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s localTemperature = 0; + attribute int16s occupiedCoolingSetpoint = 17; + attribute int16s occupiedHeatingSetpoint = 18; + attribute enum8 controlSequenceOfOperation = 27; + attribute enum8 systemMode = 28; + readonly attribute enum8 startOfWeek = 32; + readonly attribute int8u numberOfWeeklyTransitions = 33; + readonly attribute int8u numberOfDailyTransitions = 34; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; response struct GetWeeklyScheduleResponse { ENUM8 numberOfTransitionsForSequence = 0; @@ -2297,81 +2297,81 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly) int16u channel = 0; - attribute(readonly) enum8 routingRole = 1; - attribute(readonly) octet_string networkName = 2; - attribute(readonly) int16u panId = 3; - attribute(readonly) int64u extendedPanId = 4; - attribute(readonly) octet_string meshLocalPrefix = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) NeighborTable neighborTableList[] = 7; - attribute(readonly) RouteTable routeTableList[] = 8; - attribute(readonly) int32u partitionId = 9; - attribute(readonly) int8u weighting = 10; - attribute(readonly) int8u dataVersion = 11; - attribute(readonly) int8u stableDataVersion = 12; - attribute(readonly) int8u leaderRouterId = 13; - attribute(readonly) int16u detachedRoleCount = 14; - attribute(readonly) int16u childRoleCount = 15; - attribute(readonly) int16u routerRoleCount = 16; - attribute(readonly) int16u leaderRoleCount = 17; - attribute(readonly) int16u attachAttemptCount = 18; - attribute(readonly) int16u partitionIdChangeCount = 19; - attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly) int16u parentChangeCount = 21; - attribute(readonly) int32u txTotalCount = 22; - attribute(readonly) int32u txUnicastCount = 23; - attribute(readonly) int32u txBroadcastCount = 24; - attribute(readonly) int32u txAckRequestedCount = 25; - attribute(readonly) int32u txAckedCount = 26; - attribute(readonly) int32u txNoAckRequestedCount = 27; - attribute(readonly) int32u txDataCount = 28; - attribute(readonly) int32u txDataPollCount = 29; - attribute(readonly) int32u txBeaconCount = 30; - attribute(readonly) int32u txBeaconRequestCount = 31; - attribute(readonly) int32u txOtherCount = 32; - attribute(readonly) int32u txRetryCount = 33; - attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly) int32u txErrCcaCount = 36; - attribute(readonly) int32u txErrAbortCount = 37; - attribute(readonly) int32u txErrBusyChannelCount = 38; - attribute(readonly) int32u rxTotalCount = 39; - attribute(readonly) int32u rxUnicastCount = 40; - attribute(readonly) int32u rxBroadcastCount = 41; - attribute(readonly) int32u rxDataCount = 42; - attribute(readonly) int32u rxDataPollCount = 43; - attribute(readonly) int32u rxBeaconCount = 44; - attribute(readonly) int32u rxBeaconRequestCount = 45; - attribute(readonly) int32u rxOtherCount = 46; - attribute(readonly) int32u rxAddressFilteredCount = 47; - attribute(readonly) int32u rxDestAddrFilteredCount = 48; - attribute(readonly) int32u rxDuplicatedCount = 49; - attribute(readonly) int32u rxErrNoFrameCount = 50; - attribute(readonly) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly) int32u rxErrSecCount = 53; - attribute(readonly) int32u rxErrFcsCount = 54; - attribute(readonly) int32u rxErrOtherCount = 55; - attribute(readonly) int64u activeTimestamp = 56; - attribute(readonly) int64u pendingTimestamp = 57; - attribute(readonly) int32u delay = 58; - attribute(readonly) SecurityPolicy securityPolicy[] = 59; - attribute(readonly) octet_string channelMask = 60; - attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u channel = 0; + readonly attribute enum8 routingRole = 1; + readonly attribute octet_string networkName = 2; + readonly attribute int16u panId = 3; + readonly attribute int64u extendedPanId = 4; + readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute NeighborTable neighborTableList[] = 7; + readonly attribute RouteTable routeTableList[] = 8; + readonly attribute int32u partitionId = 9; + readonly attribute int8u weighting = 10; + readonly attribute int8u dataVersion = 11; + readonly attribute int8u stableDataVersion = 12; + readonly attribute int8u leaderRouterId = 13; + readonly attribute int16u detachedRoleCount = 14; + readonly attribute int16u childRoleCount = 15; + readonly attribute int16u routerRoleCount = 16; + readonly attribute int16u leaderRoleCount = 17; + readonly attribute int16u attachAttemptCount = 18; + readonly attribute int16u partitionIdChangeCount = 19; + readonly attribute int16u betterPartitionAttachAttemptCount = 20; + readonly attribute int16u parentChangeCount = 21; + readonly attribute int32u txTotalCount = 22; + readonly attribute int32u txUnicastCount = 23; + readonly attribute int32u txBroadcastCount = 24; + readonly attribute int32u txAckRequestedCount = 25; + readonly attribute int32u txAckedCount = 26; + readonly attribute int32u txNoAckRequestedCount = 27; + readonly attribute int32u txDataCount = 28; + readonly attribute int32u txDataPollCount = 29; + readonly attribute int32u txBeaconCount = 30; + readonly attribute int32u txBeaconRequestCount = 31; + readonly attribute int32u txOtherCount = 32; + readonly attribute int32u txRetryCount = 33; + readonly attribute int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute int32u txErrCcaCount = 36; + readonly attribute int32u txErrAbortCount = 37; + readonly attribute int32u txErrBusyChannelCount = 38; + readonly attribute int32u rxTotalCount = 39; + readonly attribute int32u rxUnicastCount = 40; + readonly attribute int32u rxBroadcastCount = 41; + readonly attribute int32u rxDataCount = 42; + readonly attribute int32u rxDataPollCount = 43; + readonly attribute int32u rxBeaconCount = 44; + readonly attribute int32u rxBeaconRequestCount = 45; + readonly attribute int32u rxOtherCount = 46; + readonly attribute int32u rxAddressFilteredCount = 47; + readonly attribute int32u rxDestAddrFilteredCount = 48; + readonly attribute int32u rxDuplicatedCount = 49; + readonly attribute int32u rxErrNoFrameCount = 50; + readonly attribute int32u rxErrUnknownNeighborCount = 51; + readonly attribute int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute int32u rxErrSecCount = 53; + readonly attribute int32u rxErrFcsCount = 54; + readonly attribute int32u rxErrOtherCount = 55; + readonly attribute int64u activeTimestamp = 56; + readonly attribute int64u pendingTimestamp = 57; + readonly attribute int32u delay = 58; + readonly attribute SecurityPolicy securityPolicy[] = 59; + readonly attribute octet_string channelMask = 60; + readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; + readonly attribute NetworkFault activeNetworkFaultsList[] = 62; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster WakeOnLan = 1283 { - attribute(readonly) char_string wakeOnLanMacAddress = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute char_string wakeOnLanMacAddress = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -2418,43 +2418,43 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly) octet_string bssid = 0; - attribute(readonly) enum8 securityType = 1; - attribute(readonly) enum8 wiFiVersion = 2; - attribute(readonly) int16u channelNumber = 3; - attribute(readonly) int8s rssi = 4; - attribute(readonly) int32u beaconLostCount = 5; - attribute(readonly) int32u beaconRxCount = 6; - attribute(readonly) int32u packetMulticastRxCount = 7; - attribute(readonly) int32u packetMulticastTxCount = 8; - attribute(readonly) int32u packetUnicastRxCount = 9; - attribute(readonly) int32u packetUnicastTxCount = 10; - attribute(readonly) int64u currentMaxRate = 11; - attribute(readonly) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute octet_string bssid = 0; + readonly attribute enum8 securityType = 1; + readonly attribute enum8 wiFiVersion = 2; + readonly attribute int16u channelNumber = 3; + readonly attribute int8s rssi = 4; + readonly attribute int32u beaconLostCount = 5; + readonly attribute int32u beaconRxCount = 6; + readonly attribute int32u packetMulticastRxCount = 7; + readonly attribute int32u packetMulticastTxCount = 8; + readonly attribute int32u packetUnicastRxCount = 9; + readonly attribute int32u packetUnicastTxCount = 10; + readonly attribute int64u currentMaxRate = 11; + readonly attribute int64u overrunCount = 12; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster WindowCovering = 258 { - attribute(readonly) enum8 type = 0; - attribute(readonly) int16u currentPositionLift = 3; - attribute(readonly) int16u currentPositionTilt = 4; - attribute(readonly) bitmap8 configStatus = 7; - attribute(readonly) Percent currentPositionLiftPercentage = 8; - attribute(readonly) Percent currentPositionTiltPercentage = 9; - attribute(readonly) bitmap8 operationalStatus = 10; - attribute(readonly) Percent100ths targetPositionLiftPercent100ths = 11; - attribute(readonly) Percent100ths targetPositionTiltPercent100ths = 12; - attribute(readonly) enum8 endProductType = 13; - attribute(readonly) Percent100ths currentPositionLiftPercent100ths = 14; - attribute(readonly) Percent100ths currentPositionTiltPercent100ths = 15; - attribute(readonly) int16u installedOpenLimitLift = 16; - attribute(readonly) int16u installedClosedLimitLift = 17; - attribute(readonly) int16u installedOpenLimitTilt = 18; - attribute(readonly) int16u installedClosedLimitTilt = 19; - attribute(writable) bitmap8 mode = 23; - attribute(readonly) bitmap16 safetyStatus = 26; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 type = 0; + readonly attribute int16u currentPositionLift = 3; + readonly attribute int16u currentPositionTilt = 4; + readonly attribute bitmap8 configStatus = 7; + readonly attribute Percent currentPositionLiftPercentage = 8; + readonly attribute Percent currentPositionTiltPercentage = 9; + readonly attribute bitmap8 operationalStatus = 10; + readonly attribute Percent100ths targetPositionLiftPercent100ths = 11; + readonly attribute Percent100ths targetPositionTiltPercent100ths = 12; + readonly attribute enum8 endProductType = 13; + readonly attribute Percent100ths currentPositionLiftPercent100ths = 14; + readonly attribute Percent100ths currentPositionTiltPercent100ths = 15; + readonly attribute int16u installedOpenLimitLift = 16; + readonly attribute int16u installedClosedLimitLift = 17; + readonly attribute int16u installedOpenLimitTilt = 18; + readonly attribute int16u installedClosedLimitTilt = 19; + attribute bitmap8 mode = 23; + readonly attribute bitmap16 safetyStatus = 26; + readonly attribute int16u clusterRevision = 65533; } diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 3417687e94b7a9..ad2102baaccc80 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -19,10 +19,10 @@ server cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u windowStatus = 0; + readonly attribute fabric_idx adminFabricIndex = 1; + readonly attribute int16u adminVendorId = 2; + readonly attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -57,25 +57,25 @@ server cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly) int16u interactionModelVersion = 0; - attribute(readonly) char_string vendorName = 1; - attribute(readonly) vendor_id vendorID = 2; - attribute(readonly) char_string productName = 3; - attribute(readonly) int16u productID = 4; - attribute(writable) char_string nodeLabel = 5; - attribute(writable) char_string location = 6; - attribute(readonly) int16u hardwareVersion = 7; - attribute(readonly) char_string hardwareVersionString = 8; - attribute(readonly) int32u softwareVersion = 9; - attribute(readonly) char_string softwareVersionString = 10; - attribute(readonly) char_string manufacturingDate = 11; - attribute(readonly) char_string partNumber = 12; - attribute(readonly) long_char_string productURL = 13; - attribute(readonly) char_string productLabel = 14; - attribute(readonly) char_string serialNumber = 15; - attribute(writable) boolean localConfigDisabled = 16; - attribute(readonly) boolean reachable = 17; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u interactionModelVersion = 0; + readonly attribute char_string vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string productName = 3; + readonly attribute int16u productID = 4; + attribute char_string nodeLabel = 5; + attribute char_string location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string softwareVersionString = 10; + readonly attribute char_string manufacturingDate = 11; + readonly attribute char_string partNumber = 12; + readonly attribute long_char_string productURL = 13; + readonly attribute char_string productLabel = 14; + readonly attribute char_string serialNumber = 15; + attribute boolean localConfigDisabled = 16; + readonly attribute boolean reachable = 17; + readonly attribute int16u clusterRevision = 65533; } server cluster Descriptor = 29 { @@ -84,11 +84,11 @@ server cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly) DeviceType deviceList[] = 0; - attribute(readonly) CLUSTER_ID serverList[] = 1; - attribute(readonly) CLUSTER_ID clientList[] = 2; - attribute(readonly) ENDPOINT_NO partsList[] = 3; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute DeviceType deviceList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute int16u clusterRevision = 65533; } server cluster EthernetNetworkDiagnostics = 55 { @@ -105,22 +105,22 @@ server cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly) enum8 PHYRate = 0; - attribute(readonly) boolean fullDuplex = 1; - attribute(readonly) int64u packetRxCount = 2; - attribute(readonly) int64u packetTxCount = 3; - attribute(readonly) int64u txErrCount = 4; - attribute(readonly) int64u collisionCount = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) boolean carrierDetect = 7; - attribute(readonly) int64u timeSinceReset = 8; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 PHYRate = 0; + readonly attribute boolean fullDuplex = 1; + readonly attribute int64u packetRxCount = 2; + readonly attribute int64u packetTxCount = 3; + readonly attribute int64u txErrCount = 4; + readonly attribute int64u collisionCount = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute boolean carrierDetect = 7; + readonly attribute int64u timeSinceReset = 8; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -141,12 +141,12 @@ server cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable) int64u breadcrumb = 0; - attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + attribute int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + readonly attribute enum8 regulatoryConfig = 2; + readonly attribute enum8 locationCapability = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -259,15 +259,15 @@ server cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly) int16u rebootCount = 1; - attribute(readonly) int64u upTime = 2; - attribute(readonly) int32u totalOperationalHours = 3; - attribute(readonly) enum8 bootReasons = 4; - attribute(readonly) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly) ENUM8 activeRadioFaults[] = 6; - attribute(readonly) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute enum8 bootReasons = 4; + readonly attribute ENUM8 activeHardwareFaults[] = 5; + readonly attribute ENUM8 activeRadioFaults[] = 6; + readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute int16u clusterRevision = 65533; } server cluster Identify = 3 { @@ -293,9 +293,9 @@ server cluster Identify = 3 { kActuator = 5; } - attribute(writable) int16u identifyTime = 0; - attribute(readonly) enum8 identifyType = 1; - attribute(readonly) int16u clusterRevision = 65533; + attribute int16u identifyTime = 0; + readonly attribute enum8 identifyType = 1; + readonly attribute int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -316,8 +316,8 @@ server cluster Identify = 3 { } server cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute char_string activeLocale = 1; + readonly attribute CHAR_STRING supportedLocales[] = 2; } server cluster NetworkCommissioning = 49 { @@ -370,16 +370,16 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u maxNetworks = 0; + readonly attribute NetworkInfo networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute boolean interfaceEnabled = 4; + readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; + readonly attribute octet_string lastNetworkID = 6; + readonly attribute int32u lastConnectErrorValue = 7; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -462,12 +462,12 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly) FabricDescriptor fabricsList[] = 1; - attribute(readonly) int8u supportedFabrics = 2; - attribute(readonly) int8u commissionedFabrics = 3; - attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly) fabric_idx currentFabricIndex = 5; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute FabricDescriptor fabricsList[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -542,17 +542,17 @@ server cluster OperationalCredentials = 62 { } server cluster PowerSource = 47 { - attribute(readonly) enum8 status = 0; - attribute(readonly) int8u order = 1; - attribute(readonly) char_string description = 2; - attribute(readonly) int32u batteryVoltage = 11; - attribute(readonly) int8u batteryPercentRemaining = 12; - attribute(readonly) int32u batteryTimeRemaining = 13; - attribute(readonly) enum8 batteryChargeLevel = 14; - attribute(readonly) ENUM8 activeBatteryFaults[] = 18; - attribute(readonly) enum8 batteryChargeState = 26; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 status = 0; + readonly attribute int8u order = 1; + readonly attribute char_string description = 2; + readonly attribute int32u batteryVoltage = 11; + readonly attribute int8u batteryPercentRemaining = 12; + readonly attribute int32u batteryTimeRemaining = 13; + readonly attribute enum8 batteryChargeLevel = 14; + readonly attribute ENUM8 activeBatteryFaults[] = 18; + readonly attribute enum8 batteryChargeState = 26; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster SoftwareDiagnostics = 52 { @@ -568,12 +568,12 @@ server cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly) ThreadMetrics threadMetrics[] = 0; - attribute(readonly) int64u currentHeapFree = 1; - attribute(readonly) int64u currentHeapUsed = 2; - attribute(readonly) int64u currentHeapHighWatermark = 3; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute ThreadMetrics threadMetrics[] = 0; + readonly attribute int64u currentHeapFree = 1; + readonly attribute int64u currentHeapUsed = 2; + readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster ThreadNetworkDiagnostics = 53 { @@ -653,76 +653,76 @@ server cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly) int16u channel = 0; - attribute(readonly) enum8 routingRole = 1; - attribute(readonly) octet_string networkName = 2; - attribute(readonly) int16u panId = 3; - attribute(readonly) int64u extendedPanId = 4; - attribute(readonly) octet_string meshLocalPrefix = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) NeighborTable neighborTableList[] = 7; - attribute(readonly) RouteTable routeTableList[] = 8; - attribute(readonly) int32u partitionId = 9; - attribute(readonly) int8u weighting = 10; - attribute(readonly) int8u dataVersion = 11; - attribute(readonly) int8u stableDataVersion = 12; - attribute(readonly) int8u leaderRouterId = 13; - attribute(readonly) int16u detachedRoleCount = 14; - attribute(readonly) int16u childRoleCount = 15; - attribute(readonly) int16u routerRoleCount = 16; - attribute(readonly) int16u leaderRoleCount = 17; - attribute(readonly) int16u attachAttemptCount = 18; - attribute(readonly) int16u partitionIdChangeCount = 19; - attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly) int16u parentChangeCount = 21; - attribute(readonly) int32u txTotalCount = 22; - attribute(readonly) int32u txUnicastCount = 23; - attribute(readonly) int32u txBroadcastCount = 24; - attribute(readonly) int32u txAckRequestedCount = 25; - attribute(readonly) int32u txAckedCount = 26; - attribute(readonly) int32u txNoAckRequestedCount = 27; - attribute(readonly) int32u txDataCount = 28; - attribute(readonly) int32u txDataPollCount = 29; - attribute(readonly) int32u txBeaconCount = 30; - attribute(readonly) int32u txBeaconRequestCount = 31; - attribute(readonly) int32u txOtherCount = 32; - attribute(readonly) int32u txRetryCount = 33; - attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly) int32u txErrCcaCount = 36; - attribute(readonly) int32u txErrAbortCount = 37; - attribute(readonly) int32u txErrBusyChannelCount = 38; - attribute(readonly) int32u rxTotalCount = 39; - attribute(readonly) int32u rxUnicastCount = 40; - attribute(readonly) int32u rxBroadcastCount = 41; - attribute(readonly) int32u rxDataCount = 42; - attribute(readonly) int32u rxDataPollCount = 43; - attribute(readonly) int32u rxBeaconCount = 44; - attribute(readonly) int32u rxBeaconRequestCount = 45; - attribute(readonly) int32u rxOtherCount = 46; - attribute(readonly) int32u rxAddressFilteredCount = 47; - attribute(readonly) int32u rxDestAddrFilteredCount = 48; - attribute(readonly) int32u rxDuplicatedCount = 49; - attribute(readonly) int32u rxErrNoFrameCount = 50; - attribute(readonly) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly) int32u rxErrSecCount = 53; - attribute(readonly) int32u rxErrFcsCount = 54; - attribute(readonly) int32u rxErrOtherCount = 55; - attribute(readonly) int64u activeTimestamp = 56; - attribute(readonly) int64u pendingTimestamp = 57; - attribute(readonly) int32u delay = 58; - attribute(readonly) SecurityPolicy securityPolicy[] = 59; - attribute(readonly) octet_string channelMask = 60; - attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u channel = 0; + readonly attribute enum8 routingRole = 1; + readonly attribute octet_string networkName = 2; + readonly attribute int16u panId = 3; + readonly attribute int64u extendedPanId = 4; + readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute NeighborTable neighborTableList[] = 7; + readonly attribute RouteTable routeTableList[] = 8; + readonly attribute int32u partitionId = 9; + readonly attribute int8u weighting = 10; + readonly attribute int8u dataVersion = 11; + readonly attribute int8u stableDataVersion = 12; + readonly attribute int8u leaderRouterId = 13; + readonly attribute int16u detachedRoleCount = 14; + readonly attribute int16u childRoleCount = 15; + readonly attribute int16u routerRoleCount = 16; + readonly attribute int16u leaderRoleCount = 17; + readonly attribute int16u attachAttemptCount = 18; + readonly attribute int16u partitionIdChangeCount = 19; + readonly attribute int16u betterPartitionAttachAttemptCount = 20; + readonly attribute int16u parentChangeCount = 21; + readonly attribute int32u txTotalCount = 22; + readonly attribute int32u txUnicastCount = 23; + readonly attribute int32u txBroadcastCount = 24; + readonly attribute int32u txAckRequestedCount = 25; + readonly attribute int32u txAckedCount = 26; + readonly attribute int32u txNoAckRequestedCount = 27; + readonly attribute int32u txDataCount = 28; + readonly attribute int32u txDataPollCount = 29; + readonly attribute int32u txBeaconCount = 30; + readonly attribute int32u txBeaconRequestCount = 31; + readonly attribute int32u txOtherCount = 32; + readonly attribute int32u txRetryCount = 33; + readonly attribute int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute int32u txErrCcaCount = 36; + readonly attribute int32u txErrAbortCount = 37; + readonly attribute int32u txErrBusyChannelCount = 38; + readonly attribute int32u rxTotalCount = 39; + readonly attribute int32u rxUnicastCount = 40; + readonly attribute int32u rxBroadcastCount = 41; + readonly attribute int32u rxDataCount = 42; + readonly attribute int32u rxDataPollCount = 43; + readonly attribute int32u rxBeaconCount = 44; + readonly attribute int32u rxBeaconRequestCount = 45; + readonly attribute int32u rxOtherCount = 46; + readonly attribute int32u rxAddressFilteredCount = 47; + readonly attribute int32u rxDestAddrFilteredCount = 48; + readonly attribute int32u rxDuplicatedCount = 49; + readonly attribute int32u rxErrNoFrameCount = 50; + readonly attribute int32u rxErrUnknownNeighborCount = 51; + readonly attribute int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute int32u rxErrSecCount = 53; + readonly attribute int32u rxErrFcsCount = 54; + readonly attribute int32u rxErrOtherCount = 55; + readonly attribute int64u activeTimestamp = 56; + readonly attribute int64u pendingTimestamp = 57; + readonly attribute int32u delay = 58; + readonly attribute SecurityPolicy securityPolicy[] = 59; + readonly attribute octet_string channelMask = 60; + readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; + readonly attribute NetworkFault activeNetworkFaultsList[] = 62; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -769,44 +769,44 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly) octet_string bssid = 0; - attribute(readonly) enum8 securityType = 1; - attribute(readonly) enum8 wiFiVersion = 2; - attribute(readonly) int16u channelNumber = 3; - attribute(readonly) int8s rssi = 4; - attribute(readonly) int32u beaconLostCount = 5; - attribute(readonly) int32u beaconRxCount = 6; - attribute(readonly) int32u packetMulticastRxCount = 7; - attribute(readonly) int32u packetMulticastTxCount = 8; - attribute(readonly) int32u packetUnicastRxCount = 9; - attribute(readonly) int32u packetUnicastTxCount = 10; - attribute(readonly) int64u currentMaxRate = 11; - attribute(readonly) int64u overrunCount = 12; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute octet_string bssid = 0; + readonly attribute enum8 securityType = 1; + readonly attribute enum8 wiFiVersion = 2; + readonly attribute int16u channelNumber = 3; + readonly attribute int8s rssi = 4; + readonly attribute int32u beaconLostCount = 5; + readonly attribute int32u beaconRxCount = 6; + readonly attribute int32u packetMulticastRxCount = 7; + readonly attribute int32u packetMulticastTxCount = 8; + readonly attribute int32u packetUnicastRxCount = 9; + readonly attribute int32u packetUnicastTxCount = 10; + readonly attribute int64u currentMaxRate = 11; + readonly attribute int64u overrunCount = 12; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster WindowCovering = 258 { - attribute(readonly) enum8 type = 0; - attribute(readonly) int16u currentPositionLift = 3; - attribute(readonly) int16u currentPositionTilt = 4; - attribute(readonly) bitmap8 configStatus = 7; - attribute(readonly) Percent currentPositionLiftPercentage = 8; - attribute(readonly) Percent currentPositionTiltPercentage = 9; - attribute(readonly) bitmap8 operationalStatus = 10; - attribute(readonly) Percent100ths targetPositionLiftPercent100ths = 11; - attribute(readonly) Percent100ths targetPositionTiltPercent100ths = 12; - attribute(readonly) enum8 endProductType = 13; - attribute(readonly) Percent100ths currentPositionLiftPercent100ths = 14; - attribute(readonly) Percent100ths currentPositionTiltPercent100ths = 15; - attribute(readonly) int16u installedOpenLimitLift = 16; - attribute(readonly) int16u installedClosedLimitLift = 17; - attribute(readonly) int16u installedOpenLimitTilt = 18; - attribute(readonly) int16u installedClosedLimitTilt = 19; - attribute(writable) bitmap8 mode = 23; - attribute(readonly) bitmap16 safetyStatus = 26; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 type = 0; + readonly attribute int16u currentPositionLift = 3; + readonly attribute int16u currentPositionTilt = 4; + readonly attribute bitmap8 configStatus = 7; + readonly attribute Percent currentPositionLiftPercentage = 8; + readonly attribute Percent currentPositionTiltPercentage = 9; + readonly attribute bitmap8 operationalStatus = 10; + readonly attribute Percent100ths targetPositionLiftPercent100ths = 11; + readonly attribute Percent100ths targetPositionTiltPercent100ths = 12; + readonly attribute enum8 endProductType = 13; + readonly attribute Percent100ths currentPositionLiftPercent100ths = 14; + readonly attribute Percent100ths currentPositionTiltPercent100ths = 15; + readonly attribute int16u installedOpenLimitLift = 16; + readonly attribute int16u installedClosedLimitLift = 17; + readonly attribute int16u installedOpenLimitTilt = 18; + readonly attribute int16u installedClosedLimitTilt = 19; + attribute bitmap8 mode = 23; + readonly attribute bitmap16 safetyStatus = 26; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct GoToLiftPercentageRequest { Percent liftPercentageValue = 0; diff --git a/src/app/zap-templates/templates/app/MatterIDL.zapt b/src/app/zap-templates/templates/app/MatterIDL.zapt index a20411c00e3f8b..e1f01ae81fde56 100644 --- a/src/app/zap-templates/templates/app/MatterIDL.zapt +++ b/src/app/zap-templates/templates/app/MatterIDL.zapt @@ -31,16 +31,14 @@ {{/zcl_events}} {{#chip_server_cluster_attributes}} - attribute( - {{~#if isWritableAttribute~}} - writable - {{~else~}} - readonly - {{~/if~}} - {{~#unless isReportableAttribute~}} - , nosubscribe - {{~/unless~}} - ) {{type}} {{asLowerCamelCase name~}} + {{! ensure indent }}{{#unless isWritableAttribute~}} + readonly {{!marker to place a space even with whitespace removal~}} + {{~/unless~}} + {{~!TODO: write only attributes should also be supported~}} + {{~#unless isReportableAttribute~}} + nosubscribe {{!marker to place a space even with whitespace removal~}} + {{~/unless~}} + {{~!Removes spaces~}} attribute {{type}} {{asLowerCamelCase name~}} {{~#if isList~}} [] {{~/if}} = {{code}}; diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index f37ee214bc9abb..2175f416ff7daa 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -62,15 +62,15 @@ client cluster AccessControl = 31 { ExtensionEntry latestValue = 4; } - attribute(writable) AccessControlEntry acl[] = 0; - attribute(writable) ExtensionEntry extension[] = 1; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + attribute AccessControlEntry acl[] = 0; + attribute ExtensionEntry extension[] = 1; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } client cluster AccountLogin = 1294 { - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct GetSetupPINRequestRequest { CHAR_STRING tempAccountIdentifier = 0; @@ -103,11 +103,11 @@ client cluster AdministratorCommissioning = 60 { kWindowNotOpen = 3; } - attribute(readonly) int8u windowStatus = 0; - attribute(readonly) fabric_idx adminFabricIndex = 1; - attribute(readonly) int16u adminVendorId = 2; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u windowStatus = 0; + readonly attribute fabric_idx adminFabricIndex = 1; + readonly attribute int16u adminVendorId = 2; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -140,16 +140,16 @@ client cluster ApplicationBasic = 1293 { CHAR_STRING applicationId = 2; } - attribute(readonly) char_string vendorName = 0; - attribute(readonly) int16u vendorId = 1; - attribute(readonly) char_string applicationName = 2; - attribute(readonly) int16u productId = 3; - attribute(writable) ApplicationBasicApplication applicationApp = 4; - attribute(readonly) ApplicationStatusEnum applicationStatus = 5; - attribute(readonly) char_string applicationVersion = 6; - attribute(readonly) vendor_id allowedVendorList[] = 7; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute char_string vendorName = 0; + readonly attribute int16u vendorId = 1; + readonly attribute char_string applicationName = 2; + readonly attribute int16u productId = 3; + attribute ApplicationBasicApplication applicationApp = 4; + readonly attribute ApplicationStatusEnum applicationStatus = 5; + readonly attribute char_string applicationVersion = 6; + readonly attribute vendor_id allowedVendorList[] = 7; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } client cluster ApplicationLauncher = 1292 { @@ -164,9 +164,9 @@ client cluster ApplicationLauncher = 1292 { CHAR_STRING applicationId = 2; } - attribute(readonly) INT16U applicationLauncherList[] = 0; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute INT16U applicationLauncherList[] = 0; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct HideAppRequestRequest { ApplicationLauncherApplication application = 0; @@ -207,10 +207,10 @@ client cluster AudioOutput = 1291 { CHAR_STRING name = 3; } - attribute(readonly) OutputInfo audioOutputList[] = 0; - attribute(readonly) int8u currentAudioOutput = 1; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute OutputInfo audioOutputList[] = 0; + readonly attribute int8u currentAudioOutput = 1; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct RenameOutputRequestRequest { INT8U index = 0; @@ -226,12 +226,12 @@ client cluster AudioOutput = 1291 { } client cluster BarrierControl = 259 { - attribute(readonly) enum8 barrierMovingState = 1; - attribute(readonly) bitmap16 barrierSafetyStatus = 2; - attribute(readonly) bitmap8 barrierCapabilities = 3; - attribute(readonly) int8u barrierPosition = 10; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 barrierMovingState = 1; + readonly attribute bitmap16 barrierSafetyStatus = 2; + readonly attribute bitmap8 barrierCapabilities = 3; + readonly attribute int8u barrierPosition = 10; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct BarrierControlGoToPercentRequest { INT8U percentOpen = 0; @@ -256,42 +256,42 @@ client cluster Basic = 40 { boolean reachableNewValue = 0; } - attribute(readonly) int16u interactionModelVersion = 0; - attribute(readonly) char_string vendorName = 1; - attribute(readonly) vendor_id vendorID = 2; - attribute(readonly) char_string productName = 3; - attribute(readonly) int16u productID = 4; - attribute(writable) char_string nodeLabel = 5; - attribute(writable) char_string location = 6; - attribute(readonly) int16u hardwareVersion = 7; - attribute(readonly) char_string hardwareVersionString = 8; - attribute(readonly) int32u softwareVersion = 9; - attribute(readonly) char_string softwareVersionString = 10; - attribute(readonly) char_string manufacturingDate = 11; - attribute(readonly) char_string partNumber = 12; - attribute(readonly) long_char_string productURL = 13; - attribute(readonly) char_string productLabel = 14; - attribute(readonly) char_string serialNumber = 15; - attribute(writable) boolean localConfigDisabled = 16; - attribute(readonly) boolean reachable = 17; - attribute(readonly) char_string uniqueID = 18; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u interactionModelVersion = 0; + readonly attribute char_string vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string productName = 3; + readonly attribute int16u productID = 4; + attribute char_string nodeLabel = 5; + attribute char_string location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string softwareVersionString = 10; + readonly attribute char_string manufacturingDate = 11; + readonly attribute char_string partNumber = 12; + readonly attribute long_char_string productURL = 13; + readonly attribute char_string productLabel = 14; + readonly attribute char_string serialNumber = 15; + attribute boolean localConfigDisabled = 16; + readonly attribute boolean reachable = 17; + readonly attribute char_string uniqueID = 18; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } client cluster BinaryInputBasic = 15 { - attribute(writable) boolean outOfService = 81; - attribute(writable) boolean presentValue = 85; - attribute(readonly) bitmap8 statusFlags = 111; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + attribute boolean outOfService = 81; + attribute boolean presentValue = 85; + readonly attribute bitmap8 statusFlags = 111; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } client cluster Binding = 30 { - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct BindRequest { NODE_ID nodeId = 0; @@ -316,9 +316,9 @@ client cluster BooleanState = 69 { boolean stateValue = 0; } - attribute(readonly) boolean stateValue = 0; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute boolean stateValue = 0; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } client cluster BridgedActions = 37 { @@ -379,11 +379,11 @@ client cluster BridgedActions = 37 { ActionErrorEnum error = 3; } - attribute(readonly) ActionStruct actionList[] = 0; - attribute(readonly) EndpointListStruct endpointList[] = 1; - attribute(readonly) long_char_string setupUrl = 2; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute ActionStruct actionList[] = 0; + readonly attribute EndpointListStruct endpointList[] = 1; + readonly attribute long_char_string setupUrl = 2; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct DisableActionRequest { INT16U actionID = 0; @@ -465,8 +465,8 @@ client cluster BridgedActions = 37 { } client cluster BridgedDeviceBasic = 57 { - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } client cluster Channel = 1284 { @@ -487,9 +487,9 @@ client cluster Channel = 1284 { CHAR_STRING affiliateCallSign = 5; } - attribute(readonly) ChannelInfo channelList[] = 0; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute ChannelInfo channelList[] = 0; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct ChangeChannelByNumberRequestRequest { INT16U majorNumber = 0; @@ -561,60 +561,60 @@ client cluster ColorControl = 768 { kDown = 3; } - attribute(readonly) int8u currentHue = 0; - attribute(readonly) int8u currentSaturation = 1; - attribute(readonly) int16u remainingTime = 2; - attribute(readonly) int16u currentX = 3; - attribute(readonly) int16u currentY = 4; - attribute(readonly) enum8 driftCompensation = 5; - attribute(readonly) char_string compensationText = 6; - attribute(readonly) int16u colorTemperature = 7; - attribute(readonly) enum8 colorMode = 8; - attribute(writable) bitmap8 colorControlOptions = 15; - attribute(readonly) int8u numberOfPrimaries = 16; - attribute(readonly) int16u primary1X = 17; - attribute(readonly) int16u primary1Y = 18; - attribute(readonly) int8u primary1Intensity = 19; - attribute(readonly) int16u primary2X = 21; - attribute(readonly) int16u primary2Y = 22; - attribute(readonly) int8u primary2Intensity = 23; - attribute(readonly) int16u primary3X = 25; - attribute(readonly) int16u primary3Y = 26; - attribute(readonly) int8u primary3Intensity = 27; - attribute(readonly) int16u primary4X = 32; - attribute(readonly) int16u primary4Y = 33; - attribute(readonly) int8u primary4Intensity = 34; - attribute(readonly) int16u primary5X = 36; - attribute(readonly) int16u primary5Y = 37; - attribute(readonly) int8u primary5Intensity = 38; - attribute(readonly) int16u primary6X = 40; - attribute(readonly) int16u primary6Y = 41; - attribute(readonly) int8u primary6Intensity = 42; - attribute(writable) int16u whitePointX = 48; - attribute(writable) int16u whitePointY = 49; - attribute(writable) int16u colorPointRX = 50; - attribute(writable) int16u colorPointRY = 51; - attribute(writable) int8u colorPointRIntensity = 52; - attribute(writable) int16u colorPointGX = 54; - attribute(writable) int16u colorPointGY = 55; - attribute(writable) int8u colorPointGIntensity = 56; - attribute(writable) int16u colorPointBX = 58; - attribute(writable) int16u colorPointBY = 59; - attribute(writable) int8u colorPointBIntensity = 60; - attribute(readonly) int16u enhancedCurrentHue = 16384; - attribute(readonly) enum8 enhancedColorMode = 16385; - attribute(readonly) int8u colorLoopActive = 16386; - attribute(readonly) int8u colorLoopDirection = 16387; - attribute(readonly) int16u colorLoopTime = 16388; - attribute(readonly) int16u colorLoopStartEnhancedHue = 16389; - attribute(readonly) int16u colorLoopStoredEnhancedHue = 16390; - attribute(readonly) bitmap16 colorCapabilities = 16394; - attribute(readonly) int16u colorTempPhysicalMin = 16395; - attribute(readonly) int16u colorTempPhysicalMax = 16396; - attribute(readonly) int16u coupleColorTempToLevelMinMireds = 16397; - attribute(writable) int16u startUpColorTemperatureMireds = 16400; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u currentHue = 0; + readonly attribute int8u currentSaturation = 1; + readonly attribute int16u remainingTime = 2; + readonly attribute int16u currentX = 3; + readonly attribute int16u currentY = 4; + readonly attribute enum8 driftCompensation = 5; + readonly attribute char_string compensationText = 6; + readonly attribute int16u colorTemperature = 7; + readonly attribute enum8 colorMode = 8; + attribute bitmap8 colorControlOptions = 15; + readonly attribute int8u numberOfPrimaries = 16; + readonly attribute int16u primary1X = 17; + readonly attribute int16u primary1Y = 18; + readonly attribute int8u primary1Intensity = 19; + readonly attribute int16u primary2X = 21; + readonly attribute int16u primary2Y = 22; + readonly attribute int8u primary2Intensity = 23; + readonly attribute int16u primary3X = 25; + readonly attribute int16u primary3Y = 26; + readonly attribute int8u primary3Intensity = 27; + readonly attribute int16u primary4X = 32; + readonly attribute int16u primary4Y = 33; + readonly attribute int8u primary4Intensity = 34; + readonly attribute int16u primary5X = 36; + readonly attribute int16u primary5Y = 37; + readonly attribute int8u primary5Intensity = 38; + readonly attribute int16u primary6X = 40; + readonly attribute int16u primary6Y = 41; + readonly attribute int8u primary6Intensity = 42; + attribute int16u whitePointX = 48; + attribute int16u whitePointY = 49; + attribute int16u colorPointRX = 50; + attribute int16u colorPointRY = 51; + attribute int8u colorPointRIntensity = 52; + attribute int16u colorPointGX = 54; + attribute int16u colorPointGY = 55; + attribute int8u colorPointGIntensity = 56; + attribute int16u colorPointBX = 58; + attribute int16u colorPointBY = 59; + attribute int8u colorPointBIntensity = 60; + readonly attribute int16u enhancedCurrentHue = 16384; + readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute int8u colorLoopActive = 16386; + readonly attribute int8u colorLoopDirection = 16387; + readonly attribute int16u colorLoopTime = 16388; + readonly attribute int16u colorLoopStartEnhancedHue = 16389; + readonly attribute int16u colorLoopStoredEnhancedHue = 16390; + readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute int16u colorTempPhysicalMin = 16395; + readonly attribute int16u colorTempPhysicalMax = 16396; + readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; + attribute int16u startUpColorTemperatureMireds = 16400; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct ColorLoopSetRequest { ColorLoopUpdateFlags updateFlags = 0; @@ -849,10 +849,10 @@ client cluster ContentLauncher = 1290 { MetricTypeEnum metric = 3; } - attribute(readonly) CHAR_STRING acceptHeaderList[] = 0; - attribute(writable) bitmap32 supportedStreamingProtocols = 1; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute CHAR_STRING acceptHeaderList[] = 0; + attribute bitmap32 supportedStreamingProtocols = 1; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct LaunchContentRequestRequest { BOOLEAN autoPlay = 0; @@ -881,12 +881,12 @@ client cluster Descriptor = 29 { INT16U revision = 2; } - attribute(readonly) DeviceType deviceList[] = 0; - attribute(readonly) CLUSTER_ID serverList[] = 1; - attribute(readonly) CLUSTER_ID clientList[] = 2; - attribute(readonly) ENDPOINT_NO partsList[] = 3; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute DeviceType deviceList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } client cluster DiagnosticLogs = 50 { @@ -909,7 +909,7 @@ client cluster DiagnosticLogs = 50 { kBdx = 1; } - attribute(readonly) attrib_id attributeList[] = 65531; + readonly attribute attrib_id attributeList[] = 65531; request struct RetrieveLogsRequestRequest { LogsIntent intent = 0; @@ -1163,24 +1163,24 @@ client cluster DoorLock = 257 { nullable INT16U dataIndex = 6; } - attribute(readonly) DlLockState lockState = 0; - attribute(readonly) DlLockType lockType = 1; - attribute(readonly) boolean actuatorEnabled = 2; - attribute(readonly) DlDoorState doorState = 3; - attribute(readonly) int16u numberOfTotalUsersSupported = 17; - attribute(readonly) int16u numberOfPINUsersSupported = 18; - attribute(readonly) int8u maxPINCodeLength = 23; - attribute(readonly) int8u minPINCodeLength = 24; - attribute(writable) char_string language = 33; - attribute(writable) int32u autoRelockTime = 35; - attribute(writable) int8u soundVolume = 36; - attribute(writable) DlOperatingMode operatingMode = 37; - attribute(readonly) bitmap16 supportedOperatingModes = 38; - attribute(writable) boolean enableOneTouchLocking = 41; - attribute(writable) boolean enablePrivacyModeButton = 43; - attribute(writable) int8u wrongCodeEntryLimit = 48; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute DlLockState lockState = 0; + readonly attribute DlLockType lockType = 1; + readonly attribute boolean actuatorEnabled = 2; + readonly attribute DlDoorState doorState = 3; + readonly attribute int16u numberOfTotalUsersSupported = 17; + readonly attribute int16u numberOfPINUsersSupported = 18; + readonly attribute int8u maxPINCodeLength = 23; + readonly attribute int8u minPINCodeLength = 24; + attribute char_string language = 33; + attribute int32u autoRelockTime = 35; + attribute int8u soundVolume = 36; + attribute DlOperatingMode operatingMode = 37; + readonly attribute bitmap16 supportedOperatingModes = 38; + attribute boolean enableOneTouchLocking = 41; + attribute boolean enablePrivacyModeButton = 43; + attribute int8u wrongCodeEntryLimit = 48; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct ClearCredentialRequest { DlCredential credential = 0; @@ -1260,19 +1260,19 @@ client cluster DoorLock = 257 { } client cluster ElectricalMeasurement = 2820 { - attribute(readonly) bitmap32 measurementType = 0; - attribute(readonly) int32s totalActivePower = 772; - attribute(readonly) int16u rmsVoltage = 1285; - attribute(readonly) int16u rmsVoltageMin = 1286; - attribute(readonly) int16u rmsVoltageMax = 1287; - attribute(readonly) int16u rmsCurrent = 1288; - attribute(readonly) int16u rmsCurrentMin = 1289; - attribute(readonly) int16u rmsCurrentMax = 1290; - attribute(readonly) int16s activePower = 1291; - attribute(readonly) int16s activePowerMin = 1292; - attribute(readonly) int16s activePowerMax = 1293; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute bitmap32 measurementType = 0; + readonly attribute int32s totalActivePower = 772; + readonly attribute int16u rmsVoltage = 1285; + readonly attribute int16u rmsVoltageMin = 1286; + readonly attribute int16u rmsVoltageMax = 1287; + readonly attribute int16u rmsCurrent = 1288; + readonly attribute int16u rmsCurrentMin = 1289; + readonly attribute int16u rmsCurrentMax = 1290; + readonly attribute int16s activePower = 1291; + readonly attribute int16s activePowerMin = 1292; + readonly attribute int16s activePowerMax = 1293; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } client cluster EthernetNetworkDiagnostics = 55 { @@ -1289,35 +1289,35 @@ client cluster EthernetNetworkDiagnostics = 55 { k400g = 9; } - attribute(readonly) enum8 PHYRate = 0; - attribute(readonly) boolean fullDuplex = 1; - attribute(readonly) int64u packetRxCount = 2; - attribute(readonly) int64u packetTxCount = 3; - attribute(readonly) int64u txErrCount = 4; - attribute(readonly) int64u collisionCount = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) boolean carrierDetect = 7; - attribute(readonly) int64u timeSinceReset = 8; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 PHYRate = 0; + readonly attribute boolean fullDuplex = 1; + readonly attribute int64u packetRxCount = 2; + readonly attribute int64u packetTxCount = 3; + readonly attribute int64u txErrCount = 4; + readonly attribute int64u collisionCount = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute boolean carrierDetect = 7; + readonly attribute int64u timeSinceReset = 8; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } client cluster FixedLabel = 64 { - attribute(readonly) LabelStruct labelList[] = 0; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute LabelStruct labelList[] = 0; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } client cluster FlowMeasurement = 1028 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u tolerance = 3; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u tolerance = 3; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } client cluster GeneralCommissioning = 48 { @@ -1338,12 +1338,12 @@ client cluster GeneralCommissioning = 48 { INT32U failSafeExpiryLengthMs = 1; } - attribute(writable) int64u breadcrumb = 0; - attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - attribute(readonly) enum8 regulatoryConfig = 2; - attribute(readonly) enum8 locationCapability = 3; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + attribute int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + readonly attribute enum8 regulatoryConfig = 2; + readonly attribute enum8 locationCapability = 3; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -1456,16 +1456,16 @@ client cluster GeneralDiagnostics = 51 { BootReasonType bootReason = 0; } - attribute(readonly) NetworkInterfaceType networkInterfaces[] = 0; - attribute(readonly) int16u rebootCount = 1; - attribute(readonly) int64u upTime = 2; - attribute(readonly) int32u totalOperationalHours = 3; - attribute(readonly) enum8 bootReasons = 4; - attribute(readonly) ENUM8 activeHardwareFaults[] = 5; - attribute(readonly) ENUM8 activeRadioFaults[] = 6; - attribute(readonly) ENUM8 activeNetworkFaults[] = 7; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute enum8 bootReasons = 4; + readonly attribute ENUM8 activeHardwareFaults[] = 5; + readonly attribute ENUM8 activeRadioFaults[] = 6; + readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } client cluster GroupKeyManagement = 63 { @@ -1498,12 +1498,12 @@ client cluster GroupKeyManagement = 63 { INT64U epochStartTime2 = 7; } - attribute(readonly) GroupKey groupKeyMap[] = 0; - attribute(readonly) GroupInfo groupTable[] = 1; - attribute(readonly) int16u maxGroupsPerFabric = 2; - attribute(readonly) int16u maxGroupKeysPerFabric = 3; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute GroupKey groupKeyMap[] = 0; + readonly attribute GroupInfo groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct KeySetReadRequest { INT16U groupKeySetID = 0; @@ -1536,9 +1536,9 @@ client cluster GroupKeyManagement = 63 { } client cluster Groups = 4 { - attribute(readonly) bitmap8 nameSupport = 0; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute bitmap8 nameSupport = 0; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { INT16U groupId = 0; @@ -1614,10 +1614,10 @@ client cluster Identify = 3 { kActuator = 5; } - attribute(writable) int16u identifyTime = 0; - attribute(readonly) enum8 identifyType = 1; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + attribute int16u identifyTime = 0; + readonly attribute enum8 identifyType = 1; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -1643,13 +1643,13 @@ client cluster IlluminanceMeasurement = 1024 { kCmos = 1; } - attribute(readonly) int16u measuredValue = 0; - attribute(readonly) int16u minMeasuredValue = 1; - attribute(readonly) int16u maxMeasuredValue = 2; - attribute(readonly) int16u tolerance = 3; - attribute(readonly) enum8 lightSensorType = 4; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u measuredValue = 0; + readonly attribute int16u minMeasuredValue = 1; + readonly attribute int16u maxMeasuredValue = 2; + readonly attribute int16u tolerance = 3; + readonly attribute enum8 lightSensorType = 4; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } client cluster KeypadInput = 1289 { @@ -1748,8 +1748,8 @@ client cluster KeypadInput = 1289 { kInvalidKeyInCurrentState = 2; } - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct SendKeyRequestRequest { CecKeyCode keyCode = 0; @@ -1773,23 +1773,23 @@ client cluster LevelControl = 8 { kDown = 1; } - attribute(readonly) int8u currentLevel = 0; - attribute(readonly) int16u remainingTime = 1; - attribute(readonly) int8u minLevel = 2; - attribute(readonly) int8u maxLevel = 3; - attribute(readonly) int16u currentFrequency = 4; - attribute(readonly) int16u minFrequency = 5; - attribute(readonly) int16u maxFrequency = 6; - attribute(writable) bitmap8 options = 15; - attribute(writable) int16u onOffTransitionTime = 16; - attribute(writable) int8u onLevel = 17; - attribute(writable) int16u onTransitionTime = 18; - attribute(writable) int16u offTransitionTime = 19; - attribute(writable) int8u defaultMoveRate = 20; - attribute(writable) int8u startUpCurrentLevel = 16384; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u currentLevel = 0; + readonly attribute int16u remainingTime = 1; + readonly attribute int8u minLevel = 2; + readonly attribute int8u maxLevel = 3; + readonly attribute int16u currentFrequency = 4; + readonly attribute int16u minFrequency = 5; + readonly attribute int16u maxFrequency = 6; + attribute bitmap8 options = 15; + attribute int16u onOffTransitionTime = 16; + attribute int8u onLevel = 17; + attribute int16u onTransitionTime = 18; + attribute int16u offTransitionTime = 19; + attribute int8u defaultMoveRate = 20; + attribute int8u startUpCurrentLevel = 16384; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -1845,13 +1845,13 @@ client cluster LevelControl = 8 { } client cluster LocalizationConfiguration = 43 { - attribute(writable) char_string activeLocale = 1; - attribute(readonly) CHAR_STRING supportedLocales[] = 2; + attribute char_string activeLocale = 1; + readonly attribute CHAR_STRING supportedLocales[] = 2; } client cluster LowPower = 1288 { - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; command Sleep(): DefaultSuccess = 0; } @@ -1879,10 +1879,10 @@ client cluster MediaInput = 1287 { CHAR_STRING description = 4; } - attribute(readonly) InputInfo mediaInputList[] = 0; - attribute(readonly) int8u currentMediaInput = 1; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute InputInfo mediaInputList[] = 0; + readonly attribute int8u currentMediaInput = 1; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct RenameInputRequestRequest { INT8U index = 0; @@ -1916,14 +1916,14 @@ client cluster MediaPlayback = 1286 { kSeekOutOfRange = 5; } - attribute(readonly) PlaybackStateEnum playbackState = 0; - attribute(readonly) epoch_us startTime = 1; - attribute(readonly) int64u duration = 2; - attribute(readonly) single playbackSpeed = 4; - attribute(readonly) int64u seekRangeEnd = 5; - attribute(readonly) int64u seekRangeStart = 6; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute PlaybackStateEnum playbackState = 0; + readonly attribute epoch_us startTime = 1; + readonly attribute int64u duration = 2; + readonly attribute single playbackSpeed = 4; + readonly attribute int64u seekRangeEnd = 5; + readonly attribute int64u seekRangeStart = 6; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct SeekRequestRequest { INT64U position = 0; @@ -1961,13 +1961,13 @@ client cluster ModeSelect = 80 { INT32U semanticTag = 3; } - attribute(readonly) int8u currentMode = 0; - attribute(readonly) ModeOptionStruct supportedModes[] = 1; - attribute(writable) int8u onMode = 2; - attribute(readonly) int8u startUpMode = 3; - attribute(readonly) char_string description = 4; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u currentMode = 0; + readonly attribute ModeOptionStruct supportedModes[] = 1; + attribute int8u onMode = 2; + readonly attribute int8u startUpMode = 3; + readonly attribute char_string description = 4; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct ChangeToModeRequest { INT8U newMode = 0; @@ -2026,16 +2026,16 @@ client cluster NetworkCommissioning = 49 { INT8U lqi = 8; } - attribute(readonly) int8u maxNetworks = 0; - attribute(readonly) NetworkInfo networks[] = 1; - attribute(readonly) int8u scanMaxTimeSeconds = 2; - attribute(readonly) int8u connectMaxTimeSeconds = 3; - attribute(writable) boolean interfaceEnabled = 4; - attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; - attribute(readonly) octet_string lastNetworkID = 6; - attribute(readonly) int32u lastConnectErrorValue = 7; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u maxNetworks = 0; + readonly attribute NetworkInfo networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute boolean interfaceEnabled = 4; + readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; + readonly attribute octet_string lastNetworkID = 6; + readonly attribute int32u lastConnectErrorValue = 7; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -2116,8 +2116,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -2213,12 +2213,12 @@ client cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute(writable) ProviderLocation defaultOtaProviders[] = 0; - attribute(readonly) boolean updatePossible = 1; - attribute(readonly) OTAUpdateStateEnum updateState = 2; - attribute(readonly) int8u updateStateProgress = 3; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + attribute ProviderLocation defaultOtaProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute OTAUpdateStateEnum updateState = 2; + readonly attribute int8u updateStateProgress = 3; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct AnnounceOtaProviderRequest { node_id providerNodeId = 0; @@ -2232,11 +2232,11 @@ client cluster OtaSoftwareUpdateRequestor = 42 { } client cluster OccupancySensing = 1030 { - attribute(readonly) bitmap8 occupancy = 0; - attribute(readonly) enum8 occupancySensorType = 1; - attribute(readonly) bitmap8 occupancySensorTypeBitmap = 2; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute bitmap8 occupancy = 0; + readonly attribute enum8 occupancySensorType = 1; + readonly attribute bitmap8 occupancySensorTypeBitmap = 2; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } client cluster OnOff = 6 { @@ -2255,14 +2255,14 @@ client cluster OnOff = 6 { kDyingLight = 1; } - attribute(readonly) boolean onOff = 0; - attribute(readonly) boolean globalSceneControl = 16384; - attribute(writable) int16u onTime = 16385; - attribute(writable) int16u offWaitTime = 16386; - attribute(writable) enum8 startUpOnOff = 16387; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute boolean onOff = 0; + readonly attribute boolean globalSceneControl = 16384; + attribute int16u onTime = 16385; + attribute int16u offWaitTime = 16386; + attribute enum8 startUpOnOff = 16387; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct OffWithEffectRequest { OnOffEffectIdentifier effectId = 0; @@ -2284,10 +2284,10 @@ client cluster OnOff = 6 { } client cluster OnOffSwitchConfiguration = 7 { - attribute(readonly) enum8 switchType = 0; - attribute(writable) enum8 switchActions = 16; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 switchType = 0; + attribute enum8 switchActions = 16; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } client cluster OperationalCredentials = 62 { @@ -2313,13 +2313,13 @@ client cluster OperationalCredentials = 62 { CHAR_STRING label = 6; } - attribute(readonly) FabricDescriptor fabricsList[] = 1; - attribute(readonly) int8u supportedFabrics = 2; - attribute(readonly) int8u commissionedFabrics = 3; - attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; - attribute(readonly) fabric_idx currentFabricIndex = 5; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute FabricDescriptor fabricsList[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute fabric_idx currentFabricIndex = 5; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -2394,32 +2394,32 @@ client cluster OperationalCredentials = 62 { } client cluster PowerSource = 47 { - attribute(readonly) enum8 status = 0; - attribute(readonly) int8u order = 1; - attribute(readonly) char_string description = 2; - attribute(readonly) int32u batteryVoltage = 11; - attribute(readonly) int8u batteryPercentRemaining = 12; - attribute(readonly) int32u batteryTimeRemaining = 13; - attribute(readonly) enum8 batteryChargeLevel = 14; - attribute(readonly) ENUM8 activeBatteryFaults[] = 18; - attribute(readonly) enum8 batteryChargeState = 26; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 status = 0; + readonly attribute int8u order = 1; + readonly attribute char_string description = 2; + readonly attribute int32u batteryVoltage = 11; + readonly attribute int8u batteryPercentRemaining = 12; + readonly attribute int32u batteryTimeRemaining = 13; + readonly attribute enum8 batteryChargeLevel = 14; + readonly attribute ENUM8 activeBatteryFaults[] = 18; + readonly attribute enum8 batteryChargeState = 26; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } client cluster PowerSourceConfiguration = 46 { - attribute(readonly) INT8U sources[] = 0; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute INT8U sources[] = 0; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } client cluster PressureMeasurement = 1027 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } client cluster PumpConfigurationAndControl = 512 { @@ -2490,42 +2490,42 @@ client cluster PumpConfigurationAndControl = 512 { info event TurbineOperation = 16 { } - attribute(readonly) int16s maxPressure = 0; - attribute(readonly) int16u maxSpeed = 1; - attribute(readonly) int16u maxFlow = 2; - attribute(readonly) int16s minConstPressure = 3; - attribute(readonly) int16s maxConstPressure = 4; - attribute(readonly) int16s minCompPressure = 5; - attribute(readonly) int16s maxCompPressure = 6; - attribute(readonly) int16u minConstSpeed = 7; - attribute(readonly) int16u maxConstSpeed = 8; - attribute(readonly) int16u minConstFlow = 9; - attribute(readonly) int16u maxConstFlow = 10; - attribute(readonly) int16s minConstTemp = 11; - attribute(readonly) int16s maxConstTemp = 12; - attribute(readonly) bitmap16 pumpStatus = 16; - attribute(readonly) enum8 effectiveOperationMode = 17; - attribute(readonly) enum8 effectiveControlMode = 18; - attribute(readonly) int16s capacity = 19; - attribute(readonly) int16u speed = 20; - attribute(writable) int24u lifetimeRunningHours = 21; - attribute(readonly) int24u power = 22; - attribute(writable) int32u lifetimeEnergyConsumed = 23; - attribute(writable) enum8 operationMode = 32; - attribute(writable) enum8 controlMode = 33; - attribute(readonly) bitmap16 alarmMask = 34; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s maxPressure = 0; + readonly attribute int16u maxSpeed = 1; + readonly attribute int16u maxFlow = 2; + readonly attribute int16s minConstPressure = 3; + readonly attribute int16s maxConstPressure = 4; + readonly attribute int16s minCompPressure = 5; + readonly attribute int16s maxCompPressure = 6; + readonly attribute int16u minConstSpeed = 7; + readonly attribute int16u maxConstSpeed = 8; + readonly attribute int16u minConstFlow = 9; + readonly attribute int16u maxConstFlow = 10; + readonly attribute int16s minConstTemp = 11; + readonly attribute int16s maxConstTemp = 12; + readonly attribute bitmap16 pumpStatus = 16; + readonly attribute enum8 effectiveOperationMode = 17; + readonly attribute enum8 effectiveControlMode = 18; + readonly attribute int16s capacity = 19; + readonly attribute int16u speed = 20; + attribute int24u lifetimeRunningHours = 21; + readonly attribute int24u power = 22; + attribute int32u lifetimeEnergyConsumed = 23; + attribute enum8 operationMode = 32; + attribute enum8 controlMode = 33; + readonly attribute bitmap16 alarmMask = 34; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } client cluster RelativeHumidityMeasurement = 1029 { - attribute(readonly) int16u measuredValue = 0; - attribute(readonly) int16u minMeasuredValue = 1; - attribute(readonly) int16u maxMeasuredValue = 2; - attribute(readonly) int16u tolerance = 3; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u measuredValue = 0; + readonly attribute int16u minMeasuredValue = 1; + readonly attribute int16u maxMeasuredValue = 2; + readonly attribute int16u tolerance = 3; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } client cluster Scenes = 5 { @@ -2535,13 +2535,13 @@ client cluster Scenes = 5 { INT8U value = 3; } - attribute(readonly) int8u sceneCount = 0; - attribute(readonly) int8u currentScene = 1; - attribute(readonly) int16u currentGroup = 2; - attribute(readonly) boolean sceneValid = 3; - attribute(readonly) bitmap8 nameSupport = 4; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u sceneCount = 0; + readonly attribute int8u currentScene = 1; + readonly attribute int16u currentGroup = 2; + readonly attribute boolean sceneValid = 3; + readonly attribute bitmap8 nameSupport = 4; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct AddSceneRequest { INT16U groupId = 0; @@ -2642,13 +2642,13 @@ client cluster SoftwareDiagnostics = 52 { SoftwareFault softwareFault = 0; } - attribute(readonly) ThreadMetrics threadMetrics[] = 0; - attribute(readonly) int64u currentHeapFree = 1; - attribute(readonly) int64u currentHeapUsed = 2; - attribute(readonly) int64u currentHeapHighWatermark = 3; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute ThreadMetrics threadMetrics[] = 0; + readonly attribute int64u currentHeapFree = 1; + readonly attribute int64u currentHeapUsed = 2; + readonly attribute int64u currentHeapHighWatermark = 3; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; command ResetWatermarks(): DefaultSuccess = 0; } @@ -2684,12 +2684,12 @@ client cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } - attribute(readonly) int8u numberOfPositions = 0; - attribute(readonly) int8u currentPosition = 1; - attribute(readonly) int8u multiPressMax = 2; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; + readonly attribute int8u multiPressMax = 2; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } client cluster TargetNavigator = 1285 { @@ -2704,10 +2704,10 @@ client cluster TargetNavigator = 1285 { CHAR_STRING name = 2; } - attribute(readonly) TargetInfo targetNavigatorList[] = 0; - attribute(readonly) int8u currentNavigatorTarget = 1; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute TargetInfo targetNavigatorList[] = 0; + readonly attribute int8u currentNavigatorTarget = 1; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct NavigateTargetRequestRequest { INT8U target = 0; @@ -2723,12 +2723,12 @@ client cluster TargetNavigator = 1285 { } client cluster TemperatureMeasurement = 1026 { - attribute(readonly) int16s measuredValue = 0; - attribute(readonly) int16s minMeasuredValue = 1; - attribute(readonly) int16s maxMeasuredValue = 2; - attribute(readonly) int16u tolerance = 3; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s measuredValue = 0; + readonly attribute int16s minMeasuredValue = 1; + readonly attribute int16s maxMeasuredValue = 2; + readonly attribute int16u tolerance = 3; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } client cluster TestCluster = 1295 { @@ -2795,86 +2795,86 @@ client cluster TestCluster = 1295 { SimpleEnum arg6[] = 6; } - attribute(writable) boolean boolean = 0; - attribute(writable) bitmap8 bitmap8 = 1; - attribute(writable) bitmap16 bitmap16 = 2; - attribute(writable) bitmap32 bitmap32 = 3; - attribute(writable) bitmap64 bitmap64 = 4; - attribute(writable) int8u int8u = 5; - attribute(writable) int16u int16u = 6; - attribute(writable) int24u int24u = 7; - attribute(writable) int32u int32u = 8; - attribute(writable) int40u int40u = 9; - attribute(writable) int48u int48u = 10; - attribute(writable) int56u int56u = 11; - attribute(writable) int64u int64u = 12; - attribute(writable) int8s int8s = 13; - attribute(writable) int16s int16s = 14; - attribute(writable) int24s int24s = 15; - attribute(writable) int32s int32s = 16; - attribute(writable) int40s int40s = 17; - attribute(writable) int48s int48s = 18; - attribute(writable) int56s int56s = 19; - attribute(writable) int64s int64s = 20; - attribute(writable) enum8 enum8 = 21; - attribute(writable) enum16 enum16 = 22; - attribute(writable) single floatSingle = 23; - attribute(writable) double floatDouble = 24; - attribute(writable) octet_string octetString = 25; - attribute(writable) INT8U listInt8u[] = 26; - attribute(writable) OCTET_STRING listOctetString[] = 27; - attribute(writable) TestListStructOctet listStructOctetString[] = 28; - attribute(writable) long_octet_string longOctetString = 29; - attribute(writable) char_string charString = 30; - attribute(writable) long_char_string longCharString = 31; - attribute(writable) epoch_us epochUs = 32; - attribute(writable) epoch_s epochS = 33; - attribute(writable) vendor_id vendorId = 34; - attribute(writable) NullablesAndOptionalsStruct listNullablesAndOptionalsStruct[] = 35; - attribute(writable) SimpleEnum enumAttr = 36; - attribute(writable) SimpleStruct structAttr = 37; - attribute(writable) int8u rangeRestrictedInt8u = 38; - attribute(writable) int8s rangeRestrictedInt8s = 39; - attribute(writable) int16u rangeRestrictedInt16u = 40; - attribute(writable) int16s rangeRestrictedInt16s = 41; - attribute(readonly) LONG_OCTET_STRING listLongOctetString[] = 42; - attribute(writable) boolean timedWriteBoolean = 48; - attribute(writable) boolean unsupported = 255; - attribute(writable) boolean nullableBoolean = 32768; - attribute(writable) bitmap8 nullableBitmap8 = 32769; - attribute(writable) bitmap16 nullableBitmap16 = 32770; - attribute(writable) bitmap32 nullableBitmap32 = 32771; - attribute(writable) bitmap64 nullableBitmap64 = 32772; - attribute(writable) int8u nullableInt8u = 32773; - attribute(writable) int16u nullableInt16u = 32774; - attribute(writable) int24u nullableInt24u = 32775; - attribute(writable) int32u nullableInt32u = 32776; - attribute(writable) int40u nullableInt40u = 32777; - attribute(writable) int48u nullableInt48u = 32778; - attribute(writable) int56u nullableInt56u = 32779; - attribute(writable) int64u nullableInt64u = 32780; - attribute(writable) int8s nullableInt8s = 32781; - attribute(writable) int16s nullableInt16s = 32782; - attribute(writable) int24s nullableInt24s = 32783; - attribute(writable) int32s nullableInt32s = 32784; - attribute(writable) int40s nullableInt40s = 32785; - attribute(writable) int48s nullableInt48s = 32786; - attribute(writable) int56s nullableInt56s = 32787; - attribute(writable) int64s nullableInt64s = 32788; - attribute(writable) enum8 nullableEnum8 = 32789; - attribute(writable) enum16 nullableEnum16 = 32790; - attribute(writable) single nullableFloatSingle = 32791; - attribute(writable) double nullableFloatDouble = 32792; - attribute(writable) octet_string nullableOctetString = 32793; - attribute(writable) char_string nullableCharString = 32798; - attribute(writable) SimpleEnum nullableEnumAttr = 32804; - attribute(writable) SimpleStruct nullableStruct = 32805; - attribute(writable) int8u nullableRangeRestrictedInt8u = 32806; - attribute(writable) int8s nullableRangeRestrictedInt8s = 32807; - attribute(writable) int16u nullableRangeRestrictedInt16u = 32808; - attribute(writable) int16s nullableRangeRestrictedInt16s = 32809; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + attribute boolean boolean = 0; + attribute bitmap8 bitmap8 = 1; + attribute bitmap16 bitmap16 = 2; + attribute bitmap32 bitmap32 = 3; + attribute bitmap64 bitmap64 = 4; + attribute int8u int8u = 5; + attribute int16u int16u = 6; + attribute int24u int24u = 7; + attribute int32u int32u = 8; + attribute int40u int40u = 9; + attribute int48u int48u = 10; + attribute int56u int56u = 11; + attribute int64u int64u = 12; + attribute int8s int8s = 13; + attribute int16s int16s = 14; + attribute int24s int24s = 15; + attribute int32s int32s = 16; + attribute int40s int40s = 17; + attribute int48s int48s = 18; + attribute int56s int56s = 19; + attribute int64s int64s = 20; + attribute enum8 enum8 = 21; + attribute enum16 enum16 = 22; + attribute single floatSingle = 23; + attribute double floatDouble = 24; + attribute octet_string octetString = 25; + attribute INT8U listInt8u[] = 26; + attribute OCTET_STRING listOctetString[] = 27; + attribute TestListStructOctet listStructOctetString[] = 28; + attribute long_octet_string longOctetString = 29; + attribute char_string charString = 30; + attribute long_char_string longCharString = 31; + attribute epoch_us epochUs = 32; + attribute epoch_s epochS = 33; + attribute vendor_id vendorId = 34; + attribute NullablesAndOptionalsStruct listNullablesAndOptionalsStruct[] = 35; + attribute SimpleEnum enumAttr = 36; + attribute SimpleStruct structAttr = 37; + attribute int8u rangeRestrictedInt8u = 38; + attribute int8s rangeRestrictedInt8s = 39; + attribute int16u rangeRestrictedInt16u = 40; + attribute int16s rangeRestrictedInt16s = 41; + readonly attribute LONG_OCTET_STRING listLongOctetString[] = 42; + attribute boolean timedWriteBoolean = 48; + attribute boolean unsupported = 255; + attribute boolean nullableBoolean = 32768; + attribute bitmap8 nullableBitmap8 = 32769; + attribute bitmap16 nullableBitmap16 = 32770; + attribute bitmap32 nullableBitmap32 = 32771; + attribute bitmap64 nullableBitmap64 = 32772; + attribute int8u nullableInt8u = 32773; + attribute int16u nullableInt16u = 32774; + attribute int24u nullableInt24u = 32775; + attribute int32u nullableInt32u = 32776; + attribute int40u nullableInt40u = 32777; + attribute int48u nullableInt48u = 32778; + attribute int56u nullableInt56u = 32779; + attribute int64u nullableInt64u = 32780; + attribute int8s nullableInt8s = 32781; + attribute int16s nullableInt16s = 32782; + attribute int24s nullableInt24s = 32783; + attribute int32s nullableInt32s = 32784; + attribute int40s nullableInt40s = 32785; + attribute int48s nullableInt48s = 32786; + attribute int56s nullableInt56s = 32787; + attribute int64s nullableInt64s = 32788; + attribute enum8 nullableEnum8 = 32789; + attribute enum16 nullableEnum16 = 32790; + attribute single nullableFloatSingle = 32791; + attribute double nullableFloatDouble = 32792; + attribute octet_string nullableOctetString = 32793; + attribute char_string nullableCharString = 32798; + attribute SimpleEnum nullableEnumAttr = 32804; + attribute SimpleStruct nullableStruct = 32805; + attribute int8u nullableRangeRestrictedInt8u = 32806; + attribute int8s nullableRangeRestrictedInt8s = 32807; + attribute int16u nullableRangeRestrictedInt16u = 32808; + attribute int16s nullableRangeRestrictedInt16s = 32809; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct SimpleStructEchoRequestRequest { SimpleStruct arg1 = 0; @@ -2995,26 +2995,26 @@ client cluster Thermostat = 513 { kHeatAndCoolSetpoints = 2; } - attribute(readonly) int16s localTemperature = 0; - attribute(readonly) int16s absMinHeatSetpointLimit = 3; - attribute(readonly) int16s absMaxHeatSetpointLimit = 4; - attribute(readonly) int16s absMinCoolSetpointLimit = 5; - attribute(readonly) int16s absMaxCoolSetpointLimit = 6; - attribute(writable) int16s occupiedCoolingSetpoint = 17; - attribute(writable) int16s occupiedHeatingSetpoint = 18; - attribute(writable) int16s minHeatSetpointLimit = 21; - attribute(writable) int16s maxHeatSetpointLimit = 22; - attribute(writable) int16s minCoolSetpointLimit = 23; - attribute(writable) int16s maxCoolSetpointLimit = 24; - attribute(writable) int8s minSetpointDeadBand = 25; - attribute(writable) enum8 controlSequenceOfOperation = 27; - attribute(writable) enum8 systemMode = 28; - attribute(readonly) enum8 startOfWeek = 32; - attribute(readonly) int8u numberOfWeeklyTransitions = 33; - attribute(readonly) int8u numberOfDailyTransitions = 34; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16s localTemperature = 0; + readonly attribute int16s absMinHeatSetpointLimit = 3; + readonly attribute int16s absMaxHeatSetpointLimit = 4; + readonly attribute int16s absMinCoolSetpointLimit = 5; + readonly attribute int16s absMaxCoolSetpointLimit = 6; + attribute int16s occupiedCoolingSetpoint = 17; + attribute int16s occupiedHeatingSetpoint = 18; + attribute int16s minHeatSetpointLimit = 21; + attribute int16s maxHeatSetpointLimit = 22; + attribute int16s minCoolSetpointLimit = 23; + attribute int16s maxCoolSetpointLimit = 24; + attribute int8s minSetpointDeadBand = 25; + attribute enum8 controlSequenceOfOperation = 27; + attribute enum8 systemMode = 28; + readonly attribute enum8 startOfWeek = 32; + readonly attribute int8u numberOfWeeklyTransitions = 33; + readonly attribute int8u numberOfDailyTransitions = 34; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct GetWeeklyScheduleRequest { DayOfWeek daysToReturn = 0; @@ -3057,11 +3057,11 @@ client cluster Thermostat = 513 { } client cluster ThermostatUserInterfaceConfiguration = 516 { - attribute(writable) enum8 temperatureDisplayMode = 0; - attribute(writable) enum8 keypadLockout = 1; - attribute(writable) enum8 scheduleProgrammingVisibility = 2; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + attribute enum8 temperatureDisplayMode = 0; + attribute enum8 keypadLockout = 1; + attribute enum8 scheduleProgrammingVisibility = 2; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } client cluster ThreadNetworkDiagnostics = 53 { @@ -3141,85 +3141,85 @@ client cluster ThreadNetworkDiagnostics = 53 { ThreadConnectionStatus connectionStatus = 0; } - attribute(readonly) int16u channel = 0; - attribute(readonly) enum8 routingRole = 1; - attribute(readonly) octet_string networkName = 2; - attribute(readonly) int16u panId = 3; - attribute(readonly) int64u extendedPanId = 4; - attribute(readonly) octet_string meshLocalPrefix = 5; - attribute(readonly) int64u overrunCount = 6; - attribute(readonly) NeighborTable neighborTableList[] = 7; - attribute(readonly) RouteTable routeTableList[] = 8; - attribute(readonly) int32u partitionId = 9; - attribute(readonly) int8u weighting = 10; - attribute(readonly) int8u dataVersion = 11; - attribute(readonly) int8u stableDataVersion = 12; - attribute(readonly) int8u leaderRouterId = 13; - attribute(readonly) int16u detachedRoleCount = 14; - attribute(readonly) int16u childRoleCount = 15; - attribute(readonly) int16u routerRoleCount = 16; - attribute(readonly) int16u leaderRoleCount = 17; - attribute(readonly) int16u attachAttemptCount = 18; - attribute(readonly) int16u partitionIdChangeCount = 19; - attribute(readonly) int16u betterPartitionAttachAttemptCount = 20; - attribute(readonly) int16u parentChangeCount = 21; - attribute(readonly) int32u txTotalCount = 22; - attribute(readonly) int32u txUnicastCount = 23; - attribute(readonly) int32u txBroadcastCount = 24; - attribute(readonly) int32u txAckRequestedCount = 25; - attribute(readonly) int32u txAckedCount = 26; - attribute(readonly) int32u txNoAckRequestedCount = 27; - attribute(readonly) int32u txDataCount = 28; - attribute(readonly) int32u txDataPollCount = 29; - attribute(readonly) int32u txBeaconCount = 30; - attribute(readonly) int32u txBeaconRequestCount = 31; - attribute(readonly) int32u txOtherCount = 32; - attribute(readonly) int32u txRetryCount = 33; - attribute(readonly) int32u txDirectMaxRetryExpiryCount = 34; - attribute(readonly) int32u txIndirectMaxRetryExpiryCount = 35; - attribute(readonly) int32u txErrCcaCount = 36; - attribute(readonly) int32u txErrAbortCount = 37; - attribute(readonly) int32u txErrBusyChannelCount = 38; - attribute(readonly) int32u rxTotalCount = 39; - attribute(readonly) int32u rxUnicastCount = 40; - attribute(readonly) int32u rxBroadcastCount = 41; - attribute(readonly) int32u rxDataCount = 42; - attribute(readonly) int32u rxDataPollCount = 43; - attribute(readonly) int32u rxBeaconCount = 44; - attribute(readonly) int32u rxBeaconRequestCount = 45; - attribute(readonly) int32u rxOtherCount = 46; - attribute(readonly) int32u rxAddressFilteredCount = 47; - attribute(readonly) int32u rxDestAddrFilteredCount = 48; - attribute(readonly) int32u rxDuplicatedCount = 49; - attribute(readonly) int32u rxErrNoFrameCount = 50; - attribute(readonly) int32u rxErrUnknownNeighborCount = 51; - attribute(readonly) int32u rxErrInvalidSrcAddrCount = 52; - attribute(readonly) int32u rxErrSecCount = 53; - attribute(readonly) int32u rxErrFcsCount = 54; - attribute(readonly) int32u rxErrOtherCount = 55; - attribute(readonly) int64u activeTimestamp = 56; - attribute(readonly) int64u pendingTimestamp = 57; - attribute(readonly) int32u delay = 58; - attribute(readonly) SecurityPolicy securityPolicy[] = 59; - attribute(readonly) octet_string channelMask = 60; - attribute(readonly) OperationalDatasetComponents operationalDatasetComponents[] = 61; - attribute(readonly) NetworkFault activeNetworkFaultsList[] = 62; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute int16u channel = 0; + readonly attribute enum8 routingRole = 1; + readonly attribute octet_string networkName = 2; + readonly attribute int16u panId = 3; + readonly attribute int64u extendedPanId = 4; + readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute int64u overrunCount = 6; + readonly attribute NeighborTable neighborTableList[] = 7; + readonly attribute RouteTable routeTableList[] = 8; + readonly attribute int32u partitionId = 9; + readonly attribute int8u weighting = 10; + readonly attribute int8u dataVersion = 11; + readonly attribute int8u stableDataVersion = 12; + readonly attribute int8u leaderRouterId = 13; + readonly attribute int16u detachedRoleCount = 14; + readonly attribute int16u childRoleCount = 15; + readonly attribute int16u routerRoleCount = 16; + readonly attribute int16u leaderRoleCount = 17; + readonly attribute int16u attachAttemptCount = 18; + readonly attribute int16u partitionIdChangeCount = 19; + readonly attribute int16u betterPartitionAttachAttemptCount = 20; + readonly attribute int16u parentChangeCount = 21; + readonly attribute int32u txTotalCount = 22; + readonly attribute int32u txUnicastCount = 23; + readonly attribute int32u txBroadcastCount = 24; + readonly attribute int32u txAckRequestedCount = 25; + readonly attribute int32u txAckedCount = 26; + readonly attribute int32u txNoAckRequestedCount = 27; + readonly attribute int32u txDataCount = 28; + readonly attribute int32u txDataPollCount = 29; + readonly attribute int32u txBeaconCount = 30; + readonly attribute int32u txBeaconRequestCount = 31; + readonly attribute int32u txOtherCount = 32; + readonly attribute int32u txRetryCount = 33; + readonly attribute int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute int32u txErrCcaCount = 36; + readonly attribute int32u txErrAbortCount = 37; + readonly attribute int32u txErrBusyChannelCount = 38; + readonly attribute int32u rxTotalCount = 39; + readonly attribute int32u rxUnicastCount = 40; + readonly attribute int32u rxBroadcastCount = 41; + readonly attribute int32u rxDataCount = 42; + readonly attribute int32u rxDataPollCount = 43; + readonly attribute int32u rxBeaconCount = 44; + readonly attribute int32u rxBeaconRequestCount = 45; + readonly attribute int32u rxOtherCount = 46; + readonly attribute int32u rxAddressFilteredCount = 47; + readonly attribute int32u rxDestAddrFilteredCount = 48; + readonly attribute int32u rxDuplicatedCount = 49; + readonly attribute int32u rxErrNoFrameCount = 50; + readonly attribute int32u rxErrUnknownNeighborCount = 51; + readonly attribute int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute int32u rxErrSecCount = 53; + readonly attribute int32u rxErrFcsCount = 54; + readonly attribute int32u rxErrOtherCount = 55; + readonly attribute int64u activeTimestamp = 56; + readonly attribute int64u pendingTimestamp = 57; + readonly attribute int32u delay = 58; + readonly attribute SecurityPolicy securityPolicy[] = 59; + readonly attribute octet_string channelMask = 60; + readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; + readonly attribute NetworkFault activeNetworkFaultsList[] = 62; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } client cluster UserLabel = 65 { - attribute(writable) LabelStruct labelList[] = 0; - attribute(readonly) int16u clusterRevision = 65533; + attribute LabelStruct labelList[] = 0; + readonly attribute int16u clusterRevision = 65533; } client cluster WakeOnLan = 1283 { - attribute(readonly) char_string wakeOnLanMacAddress = 0; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute char_string wakeOnLanMacAddress = 0; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } client cluster WiFiNetworkDiagnostics = 54 { @@ -3266,48 +3266,48 @@ client cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - attribute(readonly) octet_string bssid = 0; - attribute(readonly) enum8 securityType = 1; - attribute(readonly) enum8 wiFiVersion = 2; - attribute(readonly) int16u channelNumber = 3; - attribute(readonly) int8s rssi = 4; - attribute(readonly) int32u beaconLostCount = 5; - attribute(readonly) int32u beaconRxCount = 6; - attribute(readonly) int32u packetMulticastRxCount = 7; - attribute(readonly) int32u packetMulticastTxCount = 8; - attribute(readonly) int32u packetUnicastRxCount = 9; - attribute(readonly) int32u packetUnicastTxCount = 10; - attribute(readonly) int64u currentMaxRate = 11; - attribute(readonly) int64u overrunCount = 12; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute octet_string bssid = 0; + readonly attribute enum8 securityType = 1; + readonly attribute enum8 wiFiVersion = 2; + readonly attribute int16u channelNumber = 3; + readonly attribute int8s rssi = 4; + readonly attribute int32u beaconLostCount = 5; + readonly attribute int32u beaconRxCount = 6; + readonly attribute int32u packetMulticastRxCount = 7; + readonly attribute int32u packetMulticastTxCount = 8; + readonly attribute int32u packetUnicastRxCount = 9; + readonly attribute int32u packetUnicastTxCount = 10; + readonly attribute int64u currentMaxRate = 11; + readonly attribute int64u overrunCount = 12; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } client cluster WindowCovering = 258 { - attribute(readonly) enum8 type = 0; - attribute(readonly) int16u currentPositionLift = 3; - attribute(readonly) int16u currentPositionTilt = 4; - attribute(readonly) bitmap8 configStatus = 7; - attribute(readonly) Percent currentPositionLiftPercentage = 8; - attribute(readonly) Percent currentPositionTiltPercentage = 9; - attribute(readonly) bitmap8 operationalStatus = 10; - attribute(readonly) Percent100ths targetPositionLiftPercent100ths = 11; - attribute(readonly) Percent100ths targetPositionTiltPercent100ths = 12; - attribute(readonly) enum8 endProductType = 13; - attribute(readonly) Percent100ths currentPositionLiftPercent100ths = 14; - attribute(readonly) Percent100ths currentPositionTiltPercent100ths = 15; - attribute(readonly) int16u installedOpenLimitLift = 16; - attribute(readonly) int16u installedClosedLimitLift = 17; - attribute(readonly) int16u installedOpenLimitTilt = 18; - attribute(readonly) int16u installedClosedLimitTilt = 19; - attribute(writable) bitmap8 mode = 23; - attribute(readonly) bitmap16 safetyStatus = 26; - attribute(readonly) attrib_id attributeList[] = 65531; - attribute(readonly) bitmap32 featureMap = 65532; - attribute(readonly) int16u clusterRevision = 65533; + readonly attribute enum8 type = 0; + readonly attribute int16u currentPositionLift = 3; + readonly attribute int16u currentPositionTilt = 4; + readonly attribute bitmap8 configStatus = 7; + readonly attribute Percent currentPositionLiftPercentage = 8; + readonly attribute Percent currentPositionTiltPercentage = 9; + readonly attribute bitmap8 operationalStatus = 10; + readonly attribute Percent100ths targetPositionLiftPercent100ths = 11; + readonly attribute Percent100ths targetPositionTiltPercent100ths = 12; + readonly attribute enum8 endProductType = 13; + readonly attribute Percent100ths currentPositionLiftPercent100ths = 14; + readonly attribute Percent100ths currentPositionTiltPercent100ths = 15; + readonly attribute int16u installedOpenLimitLift = 16; + readonly attribute int16u installedClosedLimitLift = 17; + readonly attribute int16u installedOpenLimitTilt = 18; + readonly attribute int16u installedClosedLimitTilt = 19; + attribute bitmap8 mode = 23; + readonly attribute bitmap16 safetyStatus = 26; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct GoToLiftPercentageRequest { Percent liftPercentageValue = 0; From 7f766c621a62b06ba84ae235eb74fa3149c2e4fe Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 19 Jan 2022 17:40:50 -0500 Subject: [PATCH 071/124] Add default initializers to cluster-objects structs. (#13678) * Add default initializers to cluster-objects structs. These were missed when adding initializers to other things, because the structs' members are defined in a separate file now. * Address review comments --- .../test-cluster-server.cpp | 4 +- .../partials/cluster-objects-struct.zapt | 4 +- ...nericThreadStackManagerImpl_OpenThread.cpp | 7 +- .../zap-generated/cluster-objects.h | 302 +++++++++--------- 4 files changed, 160 insertions(+), 157 deletions(-) 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 6ad1f767830a8a..8557ba9a22e18c 100644 --- a/src/app/clusters/test-cluster-server/test-cluster-server.cpp +++ b/src/app/clusters/test-cluster-server/test-cluster-server.cpp @@ -91,9 +91,7 @@ uint8_t gListUint8Data[kAttributeListLength]; OctetStringData gListOctetStringData[kAttributeListLength]; OctetStringData gListOperationalCert[kAttributeListLength]; Structs::TestListStructOctet::Type listStructOctetStringData[kAttributeListLength]; -Structs::SimpleStruct::Type gStructAttributeValue = { 0, false, SimpleEnum::kValueA, - ByteSpan(), CharSpan(), BitFlags(), - 0, 0 }; +Structs::SimpleStruct::Type gStructAttributeValue; NullableStruct::TypeInfo::Type gNullableStructAttributeValue; // We don't actually support any interesting bits in the struct for now, except diff --git a/src/app/zap-templates/partials/cluster-objects-struct.zapt b/src/app/zap-templates/partials/cluster-objects-struct.zapt index 8e502eb4f6e14e..6241a15be788e2 100644 --- a/src/app/zap-templates/partials/cluster-objects-struct.zapt +++ b/src/app/zap-templates/partials/cluster-objects-struct.zapt @@ -9,7 +9,7 @@ namespace {{asUpperCamelCase name}} { struct Type { public: {{#zcl_struct_items}} - {{zapTypeToEncodableClusterObjectType type}} {{asLowerCamelCase label}}; + {{zapTypeToEncodableClusterObjectType type}} {{asLowerCamelCase label}}{{> cluster_objects_field_init}}; {{/zcl_struct_items}} CHIP_ERROR Encode(TLV::TLVWriter &writer, TLV::Tag tag) const; @@ -27,7 +27,7 @@ namespace {{asUpperCamelCase name}} { struct DecodableType { public: {{#zcl_struct_items}} - {{zapTypeToDecodableClusterObjectType type}} {{asLowerCamelCase label}}; + {{zapTypeToDecodableClusterObjectType type}} {{asLowerCamelCase label}}{{> cluster_objects_field_init}}; {{/zcl_struct_items}} CHIP_ERROR Decode(TLV::TLVReader &reader); }; diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp index 134cca16c7bcb2..92ed527b3840bd 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp @@ -1335,7 +1335,12 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::_WriteThreadNetw ThreadNetworkDiagnostics::Structs::SecurityPolicy::Type securityPolicy; static_assert(sizeof(securityPolicy) == sizeof(activeDataset.mSecurityPolicy), "securityPolicy Struct do not match otSecurityPolicy"); - memcpy(&securityPolicy, &activeDataset.mSecurityPolicy, sizeof(securityPolicy)); + uint16_t policyAsInts[2]; + static_assert(sizeof(policyAsInts) == sizeof(activeDataset.mSecurityPolicy), + "We're missing some members of otSecurityPolicy?"); + memcpy(&policyAsInts, &activeDataset.mSecurityPolicy, sizeof(policyAsInts)); + securityPolicy.rotationTime = policyAsInts[0]; + securityPolicy.flags = policyAsInts[1]; err = encoder.EncodeList([securityPolicy](const auto & aEncoder) -> CHIP_ERROR { ReturnErrorOnFailure(aEncoder.Encode(securityPolicy)); 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 04dcb3aeb59f82..43e92032bf5ce9 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 @@ -1799,9 +1799,9 @@ enum class Fields struct Type { public: - chip::ClusterId clusterId; - uint8_t length; - uint8_t value; + chip::ClusterId clusterId = static_cast(0); + uint8_t length = static_cast(0); + uint8_t value = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -4543,10 +4543,10 @@ enum class Fields struct Type { public: - uint8_t powerProfileId; - uint8_t energyPhaseId; - bool powerProfileRemoteControl; - uint8_t powerProfileState; + uint8_t powerProfileId = static_cast(0); + uint8_t energyPhaseId = static_cast(0); + bool powerProfileRemoteControl = static_cast(0); + uint8_t powerProfileState = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -4565,8 +4565,8 @@ enum class Fields struct Type { public: - uint8_t energyPhaseId; - uint16_t scheduledTime; + uint8_t energyPhaseId = static_cast(0); + uint16_t scheduledTime = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -4589,12 +4589,12 @@ enum class Fields struct Type { public: - uint8_t energyPhaseId; - uint8_t macroPhaseId; - uint16_t expectedDuration; - uint16_t peakPower; - uint16_t energy; - uint16_t maxActivationDelay; + uint8_t energyPhaseId = static_cast(0); + uint8_t macroPhaseId = static_cast(0); + uint16_t expectedDuration = static_cast(0); + uint16_t peakPower = static_cast(0); + uint16_t energy = static_cast(0); + uint16_t maxActivationDelay = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -6119,8 +6119,8 @@ enum class Fields struct Type { public: - chip::DeviceTypeId type; - uint16_t revision; + chip::DeviceTypeId type = static_cast(0); + uint16_t revision = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -6455,9 +6455,9 @@ enum class Fields struct Type { public: - chip::FabricIndex fabricIndex; - Privilege privilege; - AuthMode authMode; + chip::FabricIndex fabricIndex = static_cast(0); + Privilege privilege = static_cast(0); + AuthMode authMode = static_cast(0); DataModel::Nullable> subjects; DataModel::Nullable> targets; @@ -6468,9 +6468,9 @@ struct Type struct DecodableType { public: - chip::FabricIndex fabricIndex; - Privilege privilege; - AuthMode authMode; + chip::FabricIndex fabricIndex = static_cast(0); + Privilege privilege = static_cast(0); + AuthMode authMode = static_cast(0); DataModel::Nullable> subjects; DataModel::Nullable> targets; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -6487,7 +6487,7 @@ enum class Fields struct Type { public: - chip::FabricIndex fabricIndex; + chip::FabricIndex fabricIndex = static_cast(0); chip::ByteSpan data; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -7077,12 +7077,12 @@ enum class Fields struct Type { public: - uint16_t actionID; + uint16_t actionID = static_cast(0); chip::CharSpan name; - ActionTypeEnum type; - uint16_t endpointListID; - uint16_t supportedCommands; - ActionStateEnum status; + ActionTypeEnum type = static_cast(0); + uint16_t endpointListID = static_cast(0); + uint16_t supportedCommands = static_cast(0); + ActionStateEnum status = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -7103,9 +7103,9 @@ enum class Fields struct Type { public: - uint16_t endpointListID; + uint16_t endpointListID = static_cast(0); chip::CharSpan name; - EndpointListTypeEnum type; + EndpointListTypeEnum type = static_cast(0); DataModel::List endpoints; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -7114,9 +7114,9 @@ struct Type struct DecodableType { public: - uint16_t endpointListID; + uint16_t endpointListID = static_cast(0); chip::CharSpan name; - EndpointListTypeEnum type; + EndpointListTypeEnum type = static_cast(0); DataModel::DecodableList endpoints; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -8641,9 +8641,9 @@ enum class Fields struct Type { public: - chip::FabricIndex fabricIndex; - chip::NodeId providerNodeID; - chip::EndpointId endpoint; + chip::FabricIndex fabricIndex = static_cast(0); + chip::NodeId providerNodeID = static_cast(0); + chip::EndpointId endpoint = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -9705,7 +9705,7 @@ enum class Fields struct Type { public: - uint32_t failSafeExpiryLengthMs; + uint32_t failSafeExpiryLengthMs = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -10115,7 +10115,7 @@ struct Type { public: chip::ByteSpan networkID; - bool connected; + bool connected = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -10140,14 +10140,14 @@ enum class Fields struct Type { public: - uint64_t panId; - uint64_t extendedPanId; + uint64_t panId = static_cast(0); + uint64_t extendedPanId = static_cast(0); chip::CharSpan networkName; - uint16_t channel; - uint8_t version; - uint64_t extendedAddress; - int8_t rssi; - uint8_t lqi; + uint16_t channel = static_cast(0); + uint8_t version = static_cast(0); + uint64_t extendedAddress = static_cast(0); + int8_t rssi = static_cast(0); + uint8_t lqi = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -10170,12 +10170,12 @@ enum class Fields struct Type { public: - uint8_t security; + uint8_t security = static_cast(0); chip::ByteSpan ssid; chip::ByteSpan bssid; - uint16_t channel; - WiFiBand wiFiBand; - int8_t rssi; + uint16_t channel = static_cast(0); + WiFiBand wiFiBand = static_cast(0); + int8_t rssi = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -11006,11 +11006,11 @@ struct Type { public: chip::CharSpan name; - bool fabricConnected; - bool offPremiseServicesReachableIPv4; - bool offPremiseServicesReachableIPv6; + bool fabricConnected = static_cast(0); + bool offPremiseServicesReachableIPv4 = static_cast(0); + bool offPremiseServicesReachableIPv6 = static_cast(0); chip::ByteSpan hardwareAddress; - InterfaceType type; + InterfaceType type = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -11338,7 +11338,7 @@ enum class Fields struct Type { public: - uint64_t id; + uint64_t id = static_cast(0); chip::CharSpan name; chip::ByteSpan faultRecording; @@ -11362,11 +11362,11 @@ enum class Fields struct Type { public: - uint64_t id; + uint64_t id = static_cast(0); chip::CharSpan name; - uint32_t stackFreeCurrent; - uint32_t stackFreeMinimum; - uint32_t stackSize; + uint32_t stackFreeCurrent = static_cast(0); + uint32_t stackFreeMinimum = static_cast(0); + uint32_t stackSize = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -11617,20 +11617,20 @@ enum class Fields struct Type { public: - uint64_t extAddress; - uint32_t age; - uint16_t rloc16; - uint32_t linkFrameCounter; - uint32_t mleFrameCounter; - uint8_t lqi; - int8_t averageRssi; - int8_t lastRssi; - uint8_t frameErrorRate; - uint8_t messageErrorRate; - bool rxOnWhenIdle; - bool fullThreadDevice; - bool fullNetworkData; - bool isChild; + uint64_t extAddress = static_cast(0); + uint32_t age = static_cast(0); + uint16_t rloc16 = static_cast(0); + uint32_t linkFrameCounter = static_cast(0); + uint32_t mleFrameCounter = static_cast(0); + uint8_t lqi = static_cast(0); + int8_t averageRssi = static_cast(0); + int8_t lastRssi = static_cast(0); + uint8_t frameErrorRate = static_cast(0); + uint8_t messageErrorRate = static_cast(0); + bool rxOnWhenIdle = static_cast(0); + bool fullThreadDevice = static_cast(0); + bool fullNetworkData = static_cast(0); + bool isChild = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -11659,18 +11659,18 @@ enum class Fields struct Type { public: - bool activeTimestampPresent; - bool pendingTimestampPresent; - bool masterKeyPresent; - bool networkNamePresent; - bool extendedPanIdPresent; - bool meshLocalPrefixPresent; - bool delayPresent; - bool panIdPresent; - bool channelPresent; - bool pskcPresent; - bool securityPolicyPresent; - bool channelMaskPresent; + bool activeTimestampPresent = static_cast(0); + bool pendingTimestampPresent = static_cast(0); + bool masterKeyPresent = static_cast(0); + bool networkNamePresent = static_cast(0); + bool extendedPanIdPresent = static_cast(0); + bool meshLocalPrefixPresent = static_cast(0); + bool delayPresent = static_cast(0); + bool panIdPresent = static_cast(0); + bool channelPresent = static_cast(0); + bool pskcPresent = static_cast(0); + bool securityPolicyPresent = static_cast(0); + bool channelMaskPresent = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -11697,16 +11697,16 @@ enum class Fields struct Type { public: - uint64_t extAddress; - uint16_t rloc16; - uint8_t routerId; - uint8_t nextHop; - uint8_t pathCost; - uint8_t LQIIn; - uint8_t LQIOut; - uint8_t age; - bool allocated; - bool linkEstablished; + uint64_t extAddress = static_cast(0); + uint16_t rloc16 = static_cast(0); + uint8_t routerId = static_cast(0); + uint8_t nextHop = static_cast(0); + uint8_t pathCost = static_cast(0); + uint8_t LQIIn = static_cast(0); + uint8_t LQIOut = static_cast(0); + uint8_t age = static_cast(0); + bool allocated = static_cast(0); + bool linkEstablished = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -11725,8 +11725,8 @@ enum class Fields struct Type { public: - uint16_t rotationTime; - uint16_t flags; + uint16_t rotationTime = static_cast(0); + uint16_t flags = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -14410,11 +14410,11 @@ enum class Fields struct Type { public: - uint8_t fabricIndex; + uint8_t fabricIndex = static_cast(0); chip::ByteSpan rootPublicKey; - uint16_t vendorId; - chip::FabricId fabricId; - chip::NodeId nodeId; + uint16_t vendorId = static_cast(0); + chip::FabricId fabricId = static_cast(0); + chip::NodeId nodeId = static_cast(0); chip::CharSpan label; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -14434,7 +14434,7 @@ enum class Fields struct Type { public: - uint8_t fabricIndex; + uint8_t fabricIndex = static_cast(0); chip::ByteSpan noc; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -15104,8 +15104,8 @@ enum class Fields struct Type { public: - uint16_t fabricIndex; - uint16_t groupId; + uint16_t fabricIndex = static_cast(0); + uint16_t groupId = static_cast(0); DataModel::List endpoints; chip::CharSpan groupName; @@ -15115,8 +15115,8 @@ struct Type struct DecodableType { public: - uint16_t fabricIndex; - uint16_t groupId; + uint16_t fabricIndex = static_cast(0); + uint16_t groupId = static_cast(0); DataModel::DecodableList endpoints; chip::CharSpan groupName; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -15134,9 +15134,9 @@ enum class Fields struct Type { public: - chip::FabricIndex fabricIndex; - uint16_t groupId; - uint16_t groupKeySetID; + chip::FabricIndex fabricIndex = static_cast(0); + uint16_t groupId = static_cast(0); + uint16_t groupKeySetID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -15162,14 +15162,14 @@ enum class Fields struct Type { public: - uint16_t groupKeySetID; - GroupKeySecurityPolicy securityPolicy; + uint16_t groupKeySetID = static_cast(0); + GroupKeySecurityPolicy securityPolicy = static_cast(0); chip::ByteSpan epochKey0; - uint64_t epochStartTime0; + uint64_t epochStartTime0 = static_cast(0); chip::ByteSpan epochKey1; - uint64_t epochStartTime1; + uint64_t epochStartTime1 = static_cast(0); chip::ByteSpan epochKey2; - uint64_t epochStartTime2; + uint64_t epochStartTime2 = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -15955,8 +15955,8 @@ struct Type { public: chip::CharSpan label; - uint8_t mode; - uint32_t semanticTag; + uint8_t mode = static_cast(0); + uint32_t semanticTag = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -15975,8 +15975,8 @@ enum class Fields struct Type { public: - uint16_t mfgCode; - uint16_t value; + uint16_t mfgCode = static_cast(0); + uint16_t value = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -16682,8 +16682,8 @@ enum class Fields struct Type { public: - DlCredentialType credentialType; - uint16_t credentialIndex; + DlCredentialType credentialType = static_cast(0); + uint16_t credentialIndex = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -29265,8 +29265,8 @@ enum class Fields struct Type { public: - uint8_t zoneId; - chip::BitFlags zoneStatus; + uint8_t zoneId = static_cast(0); + chip::BitFlags zoneStatus = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -30404,8 +30404,8 @@ enum class Fields struct Type { public: - uint16_t majorNumber; - uint16_t minorNumber; + uint16_t majorNumber = static_cast(0); + uint16_t minorNumber = static_cast(0); chip::CharSpan name; chip::CharSpan callSign; chip::CharSpan affiliateCallSign; @@ -30432,7 +30432,7 @@ struct Type chip::CharSpan operatorName; chip::CharSpan lineupName; chip::CharSpan postalCode; - LineupInfoTypeEnum lineupInfoType; + LineupInfoTypeEnum lineupInfoType = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -30719,7 +30719,7 @@ enum class Fields struct Type { public: - uint8_t identifier; + uint8_t identifier = static_cast(0); chip::CharSpan name; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -30932,8 +30932,8 @@ enum class Fields struct Type { public: - uint64_t updatedAt; - uint64_t position; + uint64_t updatedAt = static_cast(0); + uint64_t position = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -31546,8 +31546,8 @@ enum class Fields struct Type { public: - uint8_t index; - InputTypeEnum inputType; + uint8_t index = static_cast(0); + InputTypeEnum inputType = static_cast(0); chip::CharSpan name; chip::CharSpan description; @@ -32190,9 +32190,9 @@ enum class Fields struct Type { public: - double width; - double height; - MetricTypeEnum metric; + double width = static_cast(0); + double height = static_cast(0); + MetricTypeEnum metric = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -32232,7 +32232,7 @@ enum class Fields struct Type { public: - ParameterEnum type; + ParameterEnum type = static_cast(0); chip::CharSpan value; DataModel::List externalIDList; @@ -32242,7 +32242,7 @@ struct Type struct DecodableType { public: - ParameterEnum type; + ParameterEnum type = static_cast(0); chip::CharSpan value; DataModel::DecodableList externalIDList; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -32567,8 +32567,8 @@ enum class Fields struct Type { public: - uint8_t index; - OutputTypeEnum outputType; + uint8_t index = static_cast(0); + OutputTypeEnum outputType = static_cast(0); chip::CharSpan name; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -32779,7 +32779,7 @@ enum class Fields struct Type { public: - uint16_t catalogVendorId; + uint16_t catalogVendorId = static_cast(0); chip::CharSpan applicationId; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -33074,7 +33074,7 @@ enum class Fields struct Type { public: - uint16_t catalogVendorId; + uint16_t catalogVendorId = static_cast(0); chip::CharSpan applicationId; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -33490,14 +33490,14 @@ enum class Fields struct Type { public: - uint8_t a; - bool b; - SimpleEnum c; + uint8_t a = static_cast(0); + bool b = static_cast(0); + SimpleEnum c = static_cast(0); chip::ByteSpan d; chip::CharSpan e; - chip::BitFlags f; - float g; - double h; + chip::BitFlags f = static_cast>(0); + float g = static_cast(0); + double h = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -33572,8 +33572,8 @@ enum class Fields struct Type { public: - uint8_t a; - bool b; + uint8_t a = static_cast(0); + bool b = static_cast(0); Structs::SimpleStruct::Type c; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -33598,8 +33598,8 @@ enum class Fields struct Type { public: - uint8_t a; - bool b; + uint8_t a = static_cast(0); + bool b = static_cast(0); Structs::SimpleStruct::Type c; DataModel::List d; DataModel::List e; @@ -33612,8 +33612,8 @@ struct Type struct DecodableType { public: - uint8_t a; - bool b; + uint8_t a = static_cast(0); + bool b = static_cast(0); Structs::SimpleStruct::DecodableType c; DataModel::DecodableList d; DataModel::DecodableList e; @@ -33655,7 +33655,7 @@ enum class Fields struct Type { public: - uint64_t fabricIndex; + uint64_t fabricIndex = static_cast(0); chip::ByteSpan operationalCert; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; From 332f97c972df0a187cd24e94cf88aa9b9a43a94b Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 19 Jan 2022 18:37:59 -0500 Subject: [PATCH 072/124] Fix YAML tests using value and constraints together. (#13658) This used to not work because setDefaultResponse would add two entries with the same name to the response.values list and then chip_tests_item_response_parameters would just look for the first entry in the list with the matching name and look for both value and constraints on it. The fix is to make setDefaultResponse produce the data structure that chip_tests_item_response_parameters is expecting. --- .../common/ClusterTestGeneration.js | 18 +-- .../Framework/CHIPTests/CHIPClustersTests.m | 108 ++++++++++++++++++ .../chip-tool/zap-generated/test/Commands.h | 72 +++++++----- 3 files changed, 159 insertions(+), 39 deletions(-) diff --git a/src/app/zap-templates/common/ClusterTestGeneration.js b/src/app/zap-templates/common/ClusterTestGeneration.js index 936611a8c71acc..2b67190434656c 100644 --- a/src/app/zap-templates/common/ClusterTestGeneration.js +++ b/src/app/zap-templates/common/ClusterTestGeneration.js @@ -288,19 +288,13 @@ function setDefaultResponse(test) throwError(test, errorStr); } - const name = test.isAttribute ? test.attribute : test.event; - const response = test[kResponseName]; - if (hasResponseValue) { - const value = { name, value : response.value, saveAs : response.saveAs }; - response.values.push(value); - } + if (hasResponseValueOrConstraints) { + const name = test.isAttribute ? test.attribute : test.event; + const response = test[kResponseName]; + const responseValue = hasResponseValue ? { value : response.value } : null; + const constraintsValue = hasResponseConstraints ? { constraints : response.constraints } : null; - if (hasResponseConstraints) { - let constraints = { name : name, constraints : response.constraints }; - if ('saveAs' in response && !hasResponseValue) { - constraints.saveAs = response.saveAs; - } - response.values.push(constraints); + response.values.push({ name, saveAs : response.saveAs, ...responseValue, ...constraintsValue }); } delete test[kResponseName].value; diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index e5340ef7df3223..835eb5fa2b4999 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -20086,6 +20086,18 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000001_ReadAttribute id actualValue = value; XCTAssertEqual([actualValue shortValue], 2600); } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue shortValue], 1600); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue shortValue], 2600); + } + } [expectation fulfill]; }]; @@ -20213,6 +20225,18 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000006_ReadAttribute id actualValue = value; XCTAssertEqual([actualValue shortValue], 2000); } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue shortValue], 700); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue shortValue], 3000); + } + } [expectation fulfill]; }]; @@ -20339,6 +20363,18 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000011_ReadAttribute id actualValue = value; XCTAssertEqual([actualValue shortValue], 700); } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue shortValue], 700); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue shortValue], 3000); + } + } [expectation fulfill]; }]; @@ -20465,6 +20501,18 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000016_ReadAttribute id actualValue = value; XCTAssertEqual([actualValue shortValue], 3000); } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue shortValue], 700); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue shortValue], 3000); + } + } [expectation fulfill]; }]; @@ -20591,6 +20639,18 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000021_ReadAttribute id actualValue = value; XCTAssertEqual([actualValue shortValue], 1600); } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue shortValue], 1600); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue shortValue], 3200); + } + } [expectation fulfill]; }]; @@ -20717,6 +20777,18 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000026_ReadAttribute id actualValue = value; XCTAssertEqual([actualValue shortValue], 3200); } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue shortValue], 1600); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue shortValue], 3200); + } + } [expectation fulfill]; }]; @@ -21042,6 +21114,18 @@ - (void)testSendClusterTest_TC_TSTAT_2_2_000039_ReadAttribute id actualValue = value; XCTAssertEqual([actualValue unsignedCharValue], 4); } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 5); + } + } [expectation fulfill]; }]; @@ -38512,6 +38596,12 @@ - (void)testSendClusterTestSaveAs_000097_ReadAttribute XCTAssertTrue([actualValue isEqualToString:@"NotDefault"]); readAttributeCharStringNotDefaultValue = [NSMutableString stringWithString:actualValue]; } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertNotEqualObjects(actualValue, readAttributeCharStringDefaultValue); + } + } [expectation fulfill]; }]; @@ -38537,6 +38627,12 @@ - (void)testSendClusterTestSaveAs_000098_ReadAttribute id actualValue = value; XCTAssertEqualObjects(actualValue, readAttributeCharStringNotDefaultValue); } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertNotEqualObjects(actualValue, readAttributeCharStringDefaultValue); + } + } [expectation fulfill]; }]; @@ -38706,6 +38802,12 @@ - (void)testSendClusterTestSaveAs_000105_ReadAttribute XCTAssertTrue([actualValue isEqualToData:[[NSData alloc] initWithBytes:"NotDefault" length:10]]); readAttributeOctetStringNotDefaultValue = [NSMutableData dataWithData:actualValue]; } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertNotEqualObjects(actualValue, readAttributeOctetStringDefaultValue); + } + } [expectation fulfill]; }]; @@ -38731,6 +38833,12 @@ - (void)testSendClusterTestSaveAs_000106_ReadAttribute id actualValue = value; XCTAssertEqualObjects(actualValue, readAttributeOctetStringNotDefaultValue); } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertNotEqualObjects(actualValue, readAttributeOctetStringDefaultValue); + } + } [expectation fulfill]; }]; diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index f0c9d3765f78f3..bff0c88cffa561 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -16065,7 +16065,7 @@ class Test_TC_DM_2_2 : public TestCommand VerifyOrReturn(CheckValueAsString("fabricsList[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabricsList", iter_0, 1)); } - + VerifyOrReturn(CheckConstraintType("fabricsList", "", "list")); NextTest(); } @@ -16086,7 +16086,7 @@ class Test_TC_DM_2_2 : public TestCommand void OnSuccessResponse_2(uint8_t supportedFabrics) { VerifyOrReturn(CheckValue("supportedFabrics", supportedFabrics, 16)); - + VerifyOrReturn(CheckConstraintType("supportedFabrics", "", "uint8")); NextTest(); } @@ -16107,7 +16107,7 @@ class Test_TC_DM_2_2 : public TestCommand void OnSuccessResponse_3(uint8_t commissionedFabrics) { VerifyOrReturn(CheckValue("commissionedFabrics", commissionedFabrics, 1)); - + VerifyOrReturn(CheckConstraintType("commissionedFabrics", "", "uint8")); NextTest(); } @@ -17893,7 +17893,7 @@ class Test_TC_LVL_2_1 : public TestCommand void OnSuccessResponse_3(uint8_t currentLevel) { VerifyOrReturn(CheckValue("currentLevel", currentLevel, 254)); - + VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); NextTest(); } @@ -17913,7 +17913,7 @@ class Test_TC_LVL_2_1 : public TestCommand void OnSuccessResponse_4(uint16_t remainingTime) { VerifyOrReturn(CheckValue("remainingTime", remainingTime, 0U)); - + VerifyOrReturn(CheckConstraintType("remainingTime", "", "uint16")); NextTest(); } @@ -17933,7 +17933,7 @@ class Test_TC_LVL_2_1 : public TestCommand void OnSuccessResponse_5(uint8_t minLevel) { VerifyOrReturn(CheckValue("minLevel", minLevel, 0)); - + VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); NextTest(); } @@ -17972,7 +17972,7 @@ class Test_TC_LVL_2_1 : public TestCommand void OnSuccessResponse_7(uint16_t currentFrequency) { VerifyOrReturn(CheckValue("currentFrequency", currentFrequency, 0U)); - + VerifyOrReturn(CheckConstraintType("currentFrequency", "", "uint16")); NextTest(); } @@ -17992,7 +17992,7 @@ class Test_TC_LVL_2_1 : public TestCommand void OnSuccessResponse_8(uint16_t minFrequency) { VerifyOrReturn(CheckValue("minFrequency", minFrequency, 0U)); - + VerifyOrReturn(CheckConstraintType("minFrequency", "", "uint16")); NextTest(); } @@ -18012,7 +18012,7 @@ class Test_TC_LVL_2_1 : public TestCommand void OnSuccessResponse_9(uint16_t maxFrequency) { VerifyOrReturn(CheckValue("maxFrequency", maxFrequency, 0U)); - + VerifyOrReturn(CheckConstraintType("maxFrequency", "", "uint16")); NextTest(); } @@ -18032,7 +18032,7 @@ class Test_TC_LVL_2_1 : public TestCommand void OnSuccessResponse_10(uint16_t onOffTransitionTime) { VerifyOrReturn(CheckValue("onOffTransitionTime", onOffTransitionTime, 0U)); - + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); NextTest(); } @@ -18128,7 +18128,7 @@ class Test_TC_LVL_2_1 : public TestCommand void OnSuccessResponse_15(uint8_t options) { VerifyOrReturn(CheckValue("options", options, 0)); - + VerifyOrReturn(CheckConstraintType("options", "", "map8")); NextTest(); } }; @@ -18404,7 +18404,7 @@ class Test_TC_LVL_2_2 : public TestCommand void OnSuccessResponse_1(uint16_t onOffTransitionTime) { VerifyOrReturn(CheckValue("onOffTransitionTime", onOffTransitionTime, 0U)); - + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); NextTest(); } @@ -18442,7 +18442,7 @@ class Test_TC_LVL_2_2 : public TestCommand void OnSuccessResponse_3(uint16_t onOffTransitionTime) { VerifyOrReturn(CheckValue("onOffTransitionTime", onOffTransitionTime, 10U)); - + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); NextTest(); } @@ -18500,7 +18500,7 @@ class Test_TC_LVL_2_2 : public TestCommand { VerifyOrReturn(CheckValueNonNull("onLevel", onLevel)); VerifyOrReturn(CheckValue("onLevel.Value()", onLevel.Value(), 254)); - + VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); NextTest(); } @@ -18540,7 +18540,7 @@ class Test_TC_LVL_2_2 : public TestCommand { VerifyOrReturn(CheckValueNonNull("onTransitionTime", onTransitionTime)); VerifyOrReturn(CheckValue("onTransitionTime.Value()", onTransitionTime.Value(), 100U)); - + VerifyOrReturn(CheckConstraintType("onTransitionTime", "", "uint16")); NextTest(); } @@ -18580,7 +18580,7 @@ class Test_TC_LVL_2_2 : public TestCommand { VerifyOrReturn(CheckValueNonNull("offTransitionTime", offTransitionTime)); VerifyOrReturn(CheckValue("offTransitionTime.Value()", offTransitionTime.Value(), 100U)); - + VerifyOrReturn(CheckConstraintType("offTransitionTime", "", "uint16")); NextTest(); } @@ -18601,7 +18601,7 @@ class Test_TC_LVL_2_2 : public TestCommand { VerifyOrReturn(CheckValueNonNull("defaultMoveRate", defaultMoveRate)); VerifyOrReturn(CheckValue("defaultMoveRate.Value()", defaultMoveRate.Value(), 0)); - + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); NextTest(); } @@ -18641,7 +18641,7 @@ class Test_TC_LVL_2_2 : public TestCommand { VerifyOrReturn(CheckValueNonNull("defaultMoveRate", defaultMoveRate)); VerifyOrReturn(CheckValue("defaultMoveRate.Value()", defaultMoveRate.Value(), 100)); - + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); NextTest(); } @@ -18681,7 +18681,7 @@ class Test_TC_LVL_2_2 : public TestCommand { VerifyOrReturn(CheckValueNonNull("startUpCurrentLevel", startUpCurrentLevel)); VerifyOrReturn(CheckValue("startUpCurrentLevel.Value()", startUpCurrentLevel.Value(), 254)); - + VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "", "uint8")); NextTest(); } }; @@ -22717,7 +22717,7 @@ class Test_TC_MC_9_1 : public TestCommand void OnSuccessResponse_3(uint16_t vendorId) { VerifyOrReturn(CheckValue("vendorId", vendorId, 0U)); - + VerifyOrReturn(CheckConstraintType("vendorId", "", "vendor-id")); NextTest(); } @@ -33957,7 +33957,9 @@ class Test_TC_TSTAT_2_2 : public TestCommand void OnSuccessResponse_1(int16_t occupiedCoolingSetpoint) { VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint, 2600)); - + VerifyOrReturn(CheckConstraintType("occupiedCoolingSetpoint", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint, 2600)); NextTest(); } @@ -34051,7 +34053,9 @@ class Test_TC_TSTAT_2_2 : public TestCommand void OnSuccessResponse_6(int16_t occupiedHeatingSetpoint) { VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint, 2000)); - + VerifyOrReturn(CheckConstraintType("occupiedHeatingSetpoint", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint, 700)); + VerifyOrReturn(CheckConstraintMaxValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint, 3000)); NextTest(); } @@ -34145,7 +34149,9 @@ class Test_TC_TSTAT_2_2 : public TestCommand void OnSuccessResponse_11(int16_t minHeatSetpointLimit) { VerifyOrReturn(CheckValue("minHeatSetpointLimit", minHeatSetpointLimit, 700)); - + VerifyOrReturn(CheckConstraintType("minHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("minHeatSetpointLimit", minHeatSetpointLimit, 700)); + VerifyOrReturn(CheckConstraintMaxValue("minHeatSetpointLimit", minHeatSetpointLimit, 3000)); NextTest(); } @@ -34239,7 +34245,9 @@ class Test_TC_TSTAT_2_2 : public TestCommand void OnSuccessResponse_16(int16_t maxHeatSetpointLimit) { VerifyOrReturn(CheckValue("maxHeatSetpointLimit", maxHeatSetpointLimit, 3000)); - + VerifyOrReturn(CheckConstraintType("maxHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("maxHeatSetpointLimit", maxHeatSetpointLimit, 700)); + VerifyOrReturn(CheckConstraintMaxValue("maxHeatSetpointLimit", maxHeatSetpointLimit, 3000)); NextTest(); } @@ -34333,7 +34341,9 @@ class Test_TC_TSTAT_2_2 : public TestCommand void OnSuccessResponse_21(int16_t minCoolSetpointLimit) { VerifyOrReturn(CheckValue("minCoolSetpointLimit", minCoolSetpointLimit, 1600)); - + VerifyOrReturn(CheckConstraintType("minCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("minCoolSetpointLimit", minCoolSetpointLimit, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("minCoolSetpointLimit", minCoolSetpointLimit, 3200)); NextTest(); } @@ -34427,7 +34437,9 @@ class Test_TC_TSTAT_2_2 : public TestCommand void OnSuccessResponse_26(int16_t maxCoolSetpointLimit) { VerifyOrReturn(CheckValue("maxCoolSetpointLimit", maxCoolSetpointLimit, 3200)); - + VerifyOrReturn(CheckConstraintType("maxCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("maxCoolSetpointLimit", maxCoolSetpointLimit, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("maxCoolSetpointLimit", maxCoolSetpointLimit, 3200)); NextTest(); } @@ -34666,7 +34678,9 @@ class Test_TC_TSTAT_2_2 : public TestCommand void OnSuccessResponse_39(uint8_t controlSequenceOfOperation) { VerifyOrReturn(CheckValue("controlSequenceOfOperation", controlSequenceOfOperation, 4)); - + VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("controlSequenceOfOperation", controlSequenceOfOperation, 0)); + VerifyOrReturn(CheckConstraintMaxValue("controlSequenceOfOperation", controlSequenceOfOperation, 5)); NextTest(); } @@ -63300,6 +63314,7 @@ class TestSaveAs : public TestCommand void OnSuccessResponse_97(chip::CharSpan charString) { VerifyOrReturn(CheckValueAsString("charString", charString, chip::CharSpan("NotDefault", 10))); + VerifyOrReturn(CheckConstraintNotValue("charString", charString, readAttributeCharStringDefaultValue)); if (readAttributeCharStringNotDefaultValueBuffer != nullptr) { @@ -63327,6 +63342,7 @@ class TestSaveAs : public TestCommand void OnSuccessResponse_98(chip::CharSpan charString) { VerifyOrReturn(CheckValueAsString("charString", charString, readAttributeCharStringNotDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("charString", charString, readAttributeCharStringDefaultValue)); NextTest(); } @@ -63469,6 +63485,7 @@ class TestSaveAs : public TestCommand { VerifyOrReturn( CheckValueAsString("octetString", octetString, chip::ByteSpan(chip::Uint8::from_const_char("NotDefault"), 10))); + VerifyOrReturn(CheckConstraintNotValue("octetString", octetString, readAttributeOctetStringDefaultValue)); if (readAttributeOctetStringNotDefaultValueBuffer != nullptr) { @@ -63496,6 +63513,7 @@ class TestSaveAs : public TestCommand void OnSuccessResponse_106(chip::ByteSpan octetString) { VerifyOrReturn(CheckValueAsString("octetString", octetString, readAttributeOctetStringNotDefaultValue)); + VerifyOrReturn(CheckConstraintNotValue("octetString", octetString, readAttributeOctetStringDefaultValue)); NextTest(); } From fd73341fcb6381193ece22fba33674dbbd88b1d0 Mon Sep 17 00:00:00 2001 From: Jerry Johns Date: Wed, 19 Jan 2022 17:33:56 -0800 Subject: [PATCH 073/124] Fix Local Session ID allocation to be global (#13569) --- src/controller/CHIPDeviceController.cpp | 13 ++++- .../secure_channel/SessionIDAllocator.cpp | 30 ++++++----- .../secure_channel/SessionIDAllocator.h | 5 +- .../tests/TestSessionIDAllocator.cpp | 54 +++++++------------ 4 files changed, 51 insertions(+), 51 deletions(-) diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 9e7dad861ebfd1..00b783a842f52c 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -619,6 +619,12 @@ CHIP_ERROR DeviceCommissioner::Init(CommissionerInitParams params) params.systemState->SessionMgr()->RegisterRecoveryDelegate(*this); +#if 0 // + // We cannot reinstantiate session ID allocator state from each fabric-scoped commissioner + // individually because the session ID allocator space is and must be shared for all users + // of the Session Manager. Disable persistence for now. #12821 tracks a proper fix this issue. + // + uint16_t nextKeyID = 0; uint16_t size = sizeof(nextKeyID); CHIP_ERROR error = mStorageDelegate->SyncGetKeyValue(kNextAvailableKeyID, &nextKeyID, size); @@ -627,6 +633,8 @@ CHIP_ERROR DeviceCommissioner::Init(CommissionerInitParams params) nextKeyID = 0; } ReturnErrorOnFailure(mIDAllocator.ReserveUpTo(nextKeyID)); +#endif + mPairingDelegate = params.pairingDelegate; #if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY // make this commissioner discoverable @@ -840,7 +848,10 @@ CHIP_ERROR DeviceCommissioner::EstablishPASEConnection(NodeId remoteDeviceId, Re // Immediately persist the updated mNextKeyID value // TODO maybe remove FreeRendezvousSession() since mNextKeyID is always persisted immediately - PersistNextKeyId(); + // + // Disabling session ID persistence (see previous comment in Init() about persisting key ids) + // + // PersistNextKeyId(); exit: if (err != CHIP_NO_ERROR) diff --git a/src/protocols/secure_channel/SessionIDAllocator.cpp b/src/protocols/secure_channel/SessionIDAllocator.cpp index 650dab3c2fbdbf..9df635d98d84fd 100644 --- a/src/protocols/secure_channel/SessionIDAllocator.cpp +++ b/src/protocols/secure_channel/SessionIDAllocator.cpp @@ -21,14 +21,16 @@ namespace chip { +uint16_t SessionIDAllocator::sNextAvailable = 1; + CHIP_ERROR SessionIDAllocator::Allocate(uint16_t & id) { - VerifyOrReturnError(mNextAvailable < kMaxSessionID, CHIP_ERROR_NO_MEMORY); - VerifyOrReturnError(mNextAvailable > kUnsecuredSessionId, CHIP_ERROR_INTERNAL); - id = mNextAvailable; + VerifyOrReturnError(sNextAvailable < kMaxSessionID, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(sNextAvailable > kUnsecuredSessionId, CHIP_ERROR_INTERNAL); + id = sNextAvailable; // TODO - Update SessionID allocator to use freed session IDs - mNextAvailable++; + sNextAvailable++; return CHIP_NO_ERROR; } @@ -36,19 +38,19 @@ CHIP_ERROR SessionIDAllocator::Allocate(uint16_t & id) void SessionIDAllocator::Free(uint16_t id) { // As per spec 4.4.1.3 Session ID of 0 is reserved for Unsecure communication - if (mNextAvailable > (kUnsecuredSessionId + 1) && (mNextAvailable - 1) == id) + if (sNextAvailable > (kUnsecuredSessionId + 1) && (sNextAvailable - 1) == id) { - mNextAvailable--; + sNextAvailable--; } } CHIP_ERROR SessionIDAllocator::Reserve(uint16_t id) { VerifyOrReturnError(id < kMaxSessionID, CHIP_ERROR_NO_MEMORY); - if (id >= mNextAvailable) + if (id >= sNextAvailable) { - mNextAvailable = id; - mNextAvailable++; + sNextAvailable = id; + sNextAvailable++; } // TODO - Check if ID is already allocated in SessionIDAllocator::Reserve() @@ -59,23 +61,23 @@ CHIP_ERROR SessionIDAllocator::Reserve(uint16_t id) CHIP_ERROR SessionIDAllocator::ReserveUpTo(uint16_t id) { VerifyOrReturnError(id < kMaxSessionID, CHIP_ERROR_NO_MEMORY); - if (id >= mNextAvailable) + if (id >= sNextAvailable) { - mNextAvailable = id; - mNextAvailable++; + sNextAvailable = id; + sNextAvailable++; } // TODO - Update ReserveUpTo to mark all IDs in use // Current SessionIDAllocator only tracks the smallest unused session ID. // If/when we change it to track all in use IDs, we should also update ReserveUpTo - // to reserve all individual session IDs, instead of just setting the mNextAvailable. + // to reserve all individual session IDs, instead of just setting the sNextAvailable. return CHIP_NO_ERROR; } uint16_t SessionIDAllocator::Peek() { - return mNextAvailable; + return sNextAvailable; } } // namespace chip diff --git a/src/protocols/secure_channel/SessionIDAllocator.h b/src/protocols/secure_channel/SessionIDAllocator.h index 25cb69334db89b..c56b292c1b3ed8 100644 --- a/src/protocols/secure_channel/SessionIDAllocator.h +++ b/src/protocols/secure_channel/SessionIDAllocator.h @@ -27,6 +27,9 @@ // available keys (either session or group), and the particular encryption/message // integrity algorithm to use for the message.The Session ID field is always present. // A Session ID of 0 SHALL indicate an unsecured session with no encryption or message integrity checking. +// +// The Session ID is allocated from a global numerical space shared across all fabrics and nodes on the resident process instance. +// namespace chip { @@ -46,7 +49,7 @@ class SessionIDAllocator static constexpr uint16_t kMaxSessionID = UINT16_MAX; static constexpr uint16_t kUnsecuredSessionId = 0; - uint16_t mNextAvailable = 1; + static uint16_t sNextAvailable; }; } // namespace chip diff --git a/src/protocols/secure_channel/tests/TestSessionIDAllocator.cpp b/src/protocols/secure_channel/tests/TestSessionIDAllocator.cpp index 68aa420e02c96c..55ce38f24b30d8 100644 --- a/src/protocols/secure_channel/tests/TestSessionIDAllocator.cpp +++ b/src/protocols/secure_channel/tests/TestSessionIDAllocator.cpp @@ -24,76 +24,61 @@ using namespace chip; -void TestSessionIDAllocator_Allocate(nlTestSuite * inSuite, void * inContext) -{ - SessionIDAllocator allocator; - - NL_TEST_ASSERT(inSuite, allocator.Peek() == 1); - - uint16_t id; - - for (uint16_t i = 1; i < 16; i++) - { - CHIP_ERROR err = allocator.Allocate(id); - NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - NL_TEST_ASSERT(inSuite, id == i); - NL_TEST_ASSERT(inSuite, allocator.Peek() == i + 1); - } -} - void TestSessionIDAllocator_Free(nlTestSuite * inSuite, void * inContext) { SessionIDAllocator allocator; - - NL_TEST_ASSERT(inSuite, allocator.Peek() == 1); + uint16_t i = allocator.Peek(); uint16_t id; - for (uint16_t i = 1; i < 17; i++) + for (uint16_t j = 0; j < 17; j++) { CHIP_ERROR err = allocator.Allocate(id); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - NL_TEST_ASSERT(inSuite, id == i); - NL_TEST_ASSERT(inSuite, allocator.Peek() == i + 1); + NL_TEST_ASSERT(inSuite, id == static_cast(i + j)); + NL_TEST_ASSERT(inSuite, allocator.Peek() == static_cast(i + j + 1)); } // Free an intermediate ID allocator.Free(10); - NL_TEST_ASSERT(inSuite, allocator.Peek() == 17); + NL_TEST_ASSERT(inSuite, allocator.Peek() == static_cast(i + 17)); // Free the last allocated ID - allocator.Free(16); - NL_TEST_ASSERT(inSuite, allocator.Peek() == 16); + allocator.Free(static_cast(i + 16)); + NL_TEST_ASSERT(inSuite, allocator.Peek() == static_cast(i + 16)); // Free some random unallocated ID allocator.Free(100); - NL_TEST_ASSERT(inSuite, allocator.Peek() == 16); + NL_TEST_ASSERT(inSuite, allocator.Peek() == static_cast(i + 16)); } void TestSessionIDAllocator_Reserve(nlTestSuite * inSuite, void * inContext) { SessionIDAllocator allocator; - + uint16_t i = allocator.Peek(); uint16_t id; - for (uint16_t i = 1; i < 16; i++) + for (uint16_t j = 0; j < 17; j++) { CHIP_ERROR err = allocator.Allocate(id); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - NL_TEST_ASSERT(inSuite, id == i); - NL_TEST_ASSERT(inSuite, allocator.Peek() == i + 1); + NL_TEST_ASSERT(inSuite, id == static_cast(i + j)); + NL_TEST_ASSERT(inSuite, allocator.Peek() == static_cast(i + j + 1)); } - allocator.Reserve(100); - NL_TEST_ASSERT(inSuite, allocator.Peek() == 101); + i = allocator.Peek(); + allocator.Reserve(static_cast(i + 100)); + NL_TEST_ASSERT(inSuite, allocator.Peek() == static_cast(i + 101)); } void TestSessionIDAllocator_ReserveUpTo(nlTestSuite * inSuite, void * inContext) { SessionIDAllocator allocator; + uint16_t i = allocator.Peek(); - allocator.ReserveUpTo(100); - NL_TEST_ASSERT(inSuite, allocator.Peek() == 101); + i = allocator.Peek(); + allocator.Reserve(static_cast(i + 100)); + NL_TEST_ASSERT(inSuite, allocator.Peek() == static_cast(i + 101)); } // Test Suite @@ -104,7 +89,6 @@ void TestSessionIDAllocator_ReserveUpTo(nlTestSuite * inSuite, void * inContext) // clang-format off static const nlTest sTests[] = { - NL_TEST_DEF("SessionIDAllocator_Allocate", TestSessionIDAllocator_Allocate), NL_TEST_DEF("SessionIDAllocator_Free", TestSessionIDAllocator_Free), NL_TEST_DEF("SessionIDAllocator_Reserve", TestSessionIDAllocator_Reserve), NL_TEST_DEF("SessionIDAllocator_ReserveUpTo", TestSessionIDAllocator_ReserveUpTo), From 6255ecb7287f3a964ed5c04c589c7b9a8eb96a2c Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk <66371704+kkasperczyk-no@users.noreply.github.com> Date: Thu, 20 Jan 2022 02:53:47 +0100 Subject: [PATCH 074/124] [docs] Updated Python CHIP controller commissioning guide (#13687) The Python CHIP controller commissioning guide is not up to date and describes old way of device commissioning. * Removed steps describing sending AddOrUpdateNetwork and ConnectNetwork commands, resolving IP address and closing Bluetooth LE connection * Added step to set network pairing credentials * Added documentation for set-pairing-thread-credential and set-pairing-wifi-credential commands --- .github/.wordlist.txt | 1 + .../guides/python_chip_controller_building.md | 189 ++++++++---------- 2 files changed, 82 insertions(+), 108 deletions(-) diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index d7f33d37231f92..8685bab7478ec7 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -978,6 +978,7 @@ testws texinfo textboxes TFT +threadOperationalDataset ThreadStackManager ThreadStackManagerImpl Thunderboard diff --git a/docs/guides/python_chip_controller_building.md b/docs/guides/python_chip_controller_building.md index d7deba4b07dd49..d250afe174cde9 100644 --- a/docs/guides/python_chip_controller_building.md +++ b/docs/guides/python_chip_controller_building.md @@ -143,61 +143,17 @@ following command to scan all advertised Matter devices: chip-device-ctrl > ble-scan ``` -### Step 4: Connect to Matter accessory device over Bluetooth LE +### Step 4: Set network pairing credentials -The controller uses a 12-bit value called **discriminator** to discern between -multiple commissionable device advertisements. Moreover, a 27-bit **PIN code** -is used by the controller to authenticate in the device. You can find those -values in the logging terminal of the device (for example, UART). For example: - -``` -I: 254 [DL]Device Configuration: -I: 257 [DL] Serial Number: TEST_SN -I: 260 [DL] Vendor Id: 9050 (0x235A) -I: 263 [DL] Product Id: 20043 (0x4E4B) -I: 267 [DL] Hardware Version: 1 -I: 270 [DL] Setup Pin Code: 20202021 -I: 273 [DL] Setup Discriminator: 3840 (0xF00) -I: 278 [DL] Manufacturing Date: (not set) -I: 281 [DL] Device Type: 65535 (0xFFFF) -``` - -Run the following command to establish the secure connection over Bluetooth LE, -with the following assumptions for the Matter accessory device: - -- The discriminator of the device is _3840_ -- The setup pin code of the device is _20202021_ -- The temporary Node ID is _1234_ +You must provide the controller with network credentials that will be further +used in the device commissioning procedure to configure the device with a +network interface, such as Thread or Wi-Fi. -``` -chip-device-ctrl > connect -ble 3840 20202021 1234 -``` - -You can skip the last parameter, that is the Node ID. If you skip it, the -controller will assign it randomly. However, note the Node ID down, because it -is required later in the configuration process. - -At the end of the secure connection establishment, the Python controller prints -the following log: - -``` -Secure Session to Device Established -``` - -This means that the PASE (Password-Authenticated Session Establishment) session -using SPAKE2+ protocol is completed. - -### Step 5: Commission Matter accessory to the underlying network +#### Setting Thread network credentials -The main goal of the network commissioning step is to configure the device with -a network interface, such as Thread or Wi-Fi. This process provides the device -with network credentials. - -#### Commissioning a Thread device - -1. Fetch and store the current Active Operational Dataset and Extended PAN ID - from the Thread Border Router. Depending if Thread Border Router is running - on Docker or natively on Raspberry Pi, execute the following commands: +1. Fetch and store the current Active Operational Dataset from the Thread Border + Router. Depending on if the Thread Border Router is running on Docker or + natively on Raspberry Pi, execute the following commands: - For Docker: @@ -205,10 +161,6 @@ with network credentials. sudo docker exec -it otbr sh -c "sudo ot-ctl dataset active -x" 0e080000000000010000000300001335060004001fffe002084fe76e9a8b5edaf50708fde46f999f0698e20510d47f5027a414ffeebaefa92285cc84fa030f4f70656e5468726561642d653439630102e49c0410b92f8c7fbb4f9f3e08492ee3915fbd2f0c0402a0fff8 Done - - sudo docker exec -it otbr sh -c "sudo ot-ctl dataset extpanid” - 4fe76e9a8b5edaf5 - Done ``` - For native installation: @@ -217,10 +169,6 @@ with network credentials. sudo ot-ctl dataset active -x 0e080000000000010000000300001335060004001fffe002084fe76e9a8b5edaf50708fde46f999f0698e20510d47f5027a414ffeebaefa92285cc84fa030f4f70656e5468726561642d653439630102e49c0410b92f8c7fbb4f9f3e08492ee3915fbd2f0c0402a0fff8 Done - - sudo ot-ctl dataset extpanid - 4fe76e9a8b5edaf5 - Done ``` Matter specification does not define how the Thread or Wi-Fi credentials are @@ -228,73 +176,80 @@ with network credentials. datasets directly from the Thread Border Router, you might also use a different out-of-band method. -2. Inject the previously obtained Active Operational Dataset as hex-encoded - value using ZCL Network Commissioning cluster: - - > Each ZCL command has a following format: - > `zcl [arguments]` +2. Set the previously obtained Active Operational Dataset as a hex-encoded value + using the following command: ``` - chip-device-ctrl > zcl NetworkCommissioning AddOrUpdateThreadNetwork 1234 0 0 operationalDataset=hex:0e080000000000010000000300001335060004001fffe002084fe76e9a8b5edaf50708fde46f999f0698e20510d47f5027a414ffeebaefa92285cc84fa030f4f70656e5468726561642d653439630102e49c0410b92f8c7fbb4f9f3e08492ee3915fbd2f0c0402a0fff8 breadcrumb=0 + chip-device-ctrl > set-pairing-thread-credential 0e080000000000010000000300001335060004001fffe002084fe76e9a8b5edaf50708fde46f999f0698e20510d47f5027a414ffeebaefa92285cc84fa030f4f70656e5468726561642d653439630102e49c0410b92f8c7fbb4f9f3e08492ee3915fbd2f0c0402a0fff8 ``` -3. Enable Thread interface on the device by executing the following command with - `networkID` equal to Extended PAN Id of the Thread network: - - ``` - chip-device-ctrl > zcl NetworkCommissioning ConnectNetwork 1234 0 0 networkID=hex:4fe76e9a8b5edaf5 breadcrumb=0 - ``` +#### Setting Wi-Fi network credentials -#### Commissioning a Wi-Fi device +Assuming your Wi-Fi SSID is _TESTSSID_, and your Wi-Fi password is _P455W4RD_, +set the credentials to the controller by executing the following command: -1. Assuming your Wi-Fi SSID is _TESTSSID_, and your Wi-Fi password is - _P455W4RD_, inject the credentials to the device by executing the following - command: +``` +chip-device-ctrl > set-pairing-wifi-credential TESTSSID P455W4RD +``` - ``` - chip-device-ctrl > zcl NetworkCommissioning AddOrUpdateWiFiNetwork 1234 0 0 ssid=str:TESTSSID credentials=str:P455W4RD breadcrumb=0 - ``` +### Step 5: Commission the Matter accessory device over Bluetooth LE -2. Enable the Wi-Fi interface on the device by executing the following command: +The controller uses a 12-bit value called **discriminator** to discern between +multiple commissionable device advertisements, as well as a 27-bit **setup PIN +code** to authenticate the device. You can find these values in the logging +terminal of the device (for example, UART). For example: - ``` - chip-device-ctrl > zcl NetworkCommissioning ConnectNetwork 1234 0 0 networkID=str:TESTSSID breadcrumb=0 - ``` +``` +I: 254 [DL]Device Configuration: +I: 257 [DL] Serial Number: TEST_SN +I: 260 [DL] Vendor Id: 9050 (0x235A) +I: 263 [DL] Product Id: 20043 (0x4E4B) +I: 267 [DL] Hardware Version: 1 +I: 270 [DL] Setup Pin Code: 20202021 +I: 273 [DL] Setup Discriminator: 3840 (0xF00) +I: 278 [DL] Manufacturing Date: (not set) +I: 281 [DL] Device Type: 65535 (0xFFFF) +``` -### Step 6: Close Bluetooth LE connection. +Run the following command to establish the secure connection over Bluetooth LE, +with the following assumptions for the Matter accessory device: -After the Matter accessory device was provisioned with Thread or Wi-Fi -credentials (or both), the commissioning process is finished. The Python CHIP -controller is now using only the IPv6 traffic to reach the device, so you can -close the Bluetooth LE connection. To close the connection, run the following -command: +- The discriminator of the device is _3840_ +- The setup pin code of the device is _20202021_ +- The temporary Node ID is _1234_ ``` -chip-device-ctrl > close-ble +chip-device-ctrl > connect -ble 3840 20202021 1234 ``` -### Step 7: Discover IPv6 address of the Matter accessory. - -The Matter controller must discover the IPv6 address of the node that it -previously commissioned. Depending on the network type: +You can skip the last parameter, the Node ID, in the command. If you skip it, +the controller will assign it randomly. In that case, note down the Node ID, +because it is required later in the configuration process. -- For Thread, the Matter accessory uses SRP (Service Registration Protocol) to - register its presence on the Thread Border Router’s SRP Server. -- For Wi-Fi or Ethernet devices, the Matter accessory uses the mDNS (Multicast - Domain Name System) protocol. +After connecting the device over Bluetooth LE, the controller will go through +the following stages: -Assuming your Node ID is _1234_ (use the Node ID you noted down when you -established the secure connection over Bluetooth LE)), run the following -command: +- Establishing a secure connection that completes the PASE + (Password-Authenticated Session Establishment) session using SPAKE2+ + protocol and results in printing the following log: -``` -chip-device-ctrl > resolve 1234 -``` + ``` + Secure Session to Device Established + ``` -A notification in the log indicates that the node address has been updated. The -IPv6 address of the device is cached in the controller for later usage. +- Providing the device with a network interface using ZCL Network + Commissioning cluster commands, and the network pairing credentials set in + the previous step. +- Discovering the IPv6 address of the Matter accessory using the SRP (Service + Registration Protocol) for Thread devices, or the mDNS (Multicast Domain + Name System) protocol for Wi-Fi or Ethernet devices. It results in printing + log that indicates that the node address has been updated. The IPv6 address + of the device is cached in the controller for later usage. +- Closing the Bluetooth LE connection, as the commissioning process is + finished and the Python CHIP controller is now using only the IPv6 traffic + to reach the device. -### Step 8: Control application ZCL clusters. +### Step 6: Control application ZCL clusters. For the light bulb example, execute the following command to toggle the LED state: @@ -310,7 +265,7 @@ value somewhere between 0 and 255. chip-device-ctrl > zcl LevelControl MoveToLevel 1234 1 0 level=50 ``` -### Step 9: Read basic information out of the accessory. +### Step 7: Read basic information out of the accessory. Every Matter accessory device supports a Basic Cluster, which maintains collection of attributes that a controller can obtain from a device, such as the @@ -372,6 +327,24 @@ chip-device-ctrl > ble-scan 2021-05-29 22:28:16,246 ChipBLEMgr INFO scanning stopped ``` +### `set-pairing-thread-credential ` + +Provides the controller with Thread network credentials that will be used in the +device commissioning procedure to configure the device with a Thread interface. + +``` +chip-device-ctrl > set-pairing-thread-credential 0e080000000000010000000300001335060004001fffe002084fe76e9a8b5edaf50708fde46f999f0698e20510d47f5027a414ffeebaefa92285cc84fa030f4f70656e5468726561642d653439630102e49c0410b92f8c7fbb4f9f3e08492ee3915fbd2f0c0402a0fff8 +``` + +### `set-pairing-wifi-credential ` + +Provides the controller with Wi-Fi network credentials that will be used in the +device commissioning procedure to configure the device with a Wi-Fi interface. + +``` +chip-device-ctrl > set-pairing-wifi-credential TESTSSID P455W4RD +``` + ### `connect -ip

[]` Do key exchange and establish a secure session between controller and device From 957ddc800f1fc2211d16daaafb8147626695e2e1 Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk <66371704+kkasperczyk-no@users.noreply.github.com> Date: Thu, 20 Jan 2022 02:53:57 +0100 Subject: [PATCH 075/124] [controller] Fixed error handling on session establishment failure (#13697) In https://github.com/project-chip/connectedhomeip/pull/13287 the regression was introduced that starting commissioning, while an existing commissioning is in progress will cancel it. * Brought back previous error handling and added clearing mDeviceBeingCommissioned to allow starting new commissioning after previous ones fail. --- src/controller/CHIPDeviceController.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 00b783a842f52c..4be4ab46314cb4 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -856,7 +856,17 @@ CHIP_ERROR DeviceCommissioner::EstablishPASEConnection(NodeId remoteDeviceId, Re exit: if (err != CHIP_NO_ERROR) { - RendezvousCleanup(err); + // Delete the current rendezvous session only if a device is not currently being paired. + if (mDeviceBeingCommissioned == nullptr) + { + FreeRendezvousSession(); + } + + if (device != nullptr) + { + ReleaseCommissioneeDevice(device); + mDeviceBeingCommissioned = nullptr; + } } return err; From b693ea601019bd7b3ec5fadfadaa31b0ff38ce10 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 19 Jan 2022 20:54:22 -0500 Subject: [PATCH 076/124] Add CI for builds without error logging enabled. (#13717) --- .github/workflows/build.yaml | 5 +++++ src/controller/python/chip/native/StackInit.cpp | 4 +++- src/crypto/CHIPCryptoPALOpenSSL.cpp | 2 ++ src/lib/dnssd/minimal_mdns/Server.cpp | 2 ++ src/messaging/ReliableMessageMgr.cpp | 4 +++- src/platform/Linux/bluez/Helper.cpp | 8 ++++++++ src/platform/Linux/bluez/MainLoop.cpp | 4 +++- 7 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 68cef7b29446a9..972768a595a1d0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -90,6 +90,11 @@ jobs: - name: Run Build Without Progress Logging timeout-minutes: 20 run: scripts/run_in_build_env.sh "ninja -C ./out" + - name: Setup Build Without Error Logging + run: scripts/build/gn_gen.sh --args="chip_detail_logging=false chip_progress_logging=false chip_error_logging=false" + - name: Run Build Without Error Logging + timeout-minutes: 20 + run: scripts/run_in_build_env.sh "ninja -C ./out" build_linux: name: Build on Linux (fake, gcc_release, clang, mbedtls, simulated) timeout-minutes: 90 diff --git a/src/controller/python/chip/native/StackInit.cpp b/src/controller/python/chip/native/StackInit.cpp index e438972ca2229a..3d071d1b4d8f22 100644 --- a/src/controller/python/chip/native/StackInit.cpp +++ b/src/controller/python/chip/native/StackInit.cpp @@ -80,8 +80,10 @@ void pychip_native_init() { ChipLogError(DeviceLayer, "Failed to initialize CHIP stack: platform init failed: %s", chip::ErrorStr(err)); } - int result = pthread_create(&sPlatformMainThread, nullptr, PlatformMainLoop, nullptr); + int result = pthread_create(&sPlatformMainThread, nullptr, PlatformMainLoop, nullptr); +#if CHIP_ERROR_LOGGING int tmpErrno = errno; +#endif // CHIP_ERROR_LOGGING if (result != 0) { diff --git a/src/crypto/CHIPCryptoPALOpenSSL.cpp b/src/crypto/CHIPCryptoPALOpenSSL.cpp index b36d5467106fb5..ac65c77fd9d8db 100644 --- a/src/crypto/CHIPCryptoPALOpenSSL.cpp +++ b/src/crypto/CHIPCryptoPALOpenSSL.cpp @@ -97,6 +97,7 @@ static void _logSSLError() unsigned long ssl_err_code = ERR_get_error(); while (ssl_err_code != 0) { +#if CHIP_ERROR_LOGGING const char * err_str_lib = ERR_lib_error_string(ssl_err_code); const char * err_str_routine = ERR_func_error_string(ssl_err_code); const char * err_str_reason = ERR_reason_error_string(ssl_err_code); @@ -104,6 +105,7 @@ static void _logSSLError() { ChipLogError(Crypto, " ssl err %s %s %s\n", err_str_lib, err_str_routine, err_str_reason); } +#endif // CHIP_ERROR_LOGGING ssl_err_code = ERR_get_error(); } } diff --git a/src/lib/dnssd/minimal_mdns/Server.cpp b/src/lib/dnssd/minimal_mdns/Server.cpp index 01b881f39c78fb..816feac1e71e77 100644 --- a/src/lib/dnssd/minimal_mdns/Server.cpp +++ b/src/lib/dnssd/minimal_mdns/Server.cpp @@ -165,6 +165,7 @@ CHIP_ERROR JoinMulticastGroup(chip::Inet::InterfaceId interfaceId, chip::Inet::U return endpoint->JoinMulticastGroup(interfaceId, address); } +#if CHIP_ERROR_LOGGING const char * AddressTypeStr(chip::Inet::IPAddressType addressType) { switch (addressType) @@ -179,6 +180,7 @@ const char * AddressTypeStr(chip::Inet::IPAddressType addressType) return "UNKNOWN"; } } +#endif } // namespace diff --git a/src/messaging/ReliableMessageMgr.cpp b/src/messaging/ReliableMessageMgr.cpp index 4869be51e4dbc9..755d54e2d36d7c 100644 --- a/src/messaging/ReliableMessageMgr.cpp +++ b/src/messaging/ReliableMessageMgr.cpp @@ -123,8 +123,10 @@ void ReliableMessageMgr::ExecuteActions() VerifyOrDie(!entry->retainedBuf.IsNull()); - uint8_t sendCount = entry->sendCount; + uint8_t sendCount = entry->sendCount; +#if CHIP_ERROR_LOGGING || CHIP_DETAIL_LOGGING uint32_t messageCounter = entry->retainedBuf.GetMessageCounter(); +#endif // CHIP_ERROR_LOGGING || CHIP_DETAIL_LOGGING if (sendCount == CHIP_CONFIG_RMP_DEFAULT_MAX_RETRANS) { diff --git a/src/platform/Linux/bluez/Helper.cpp b/src/platform/Linux/bluez/Helper.cpp index 30844ce3bc5eab..4819c3c8d2560d 100644 --- a/src/platform/Linux/bluez/Helper.cpp +++ b/src/platform/Linux/bluez/Helper.cpp @@ -422,7 +422,9 @@ static gboolean BluezCharacteristicAcquireWrite(BluezGattCharacteristic1 * aChar { int fds[2] = { -1, -1 }; GIOChannel * channel; +#if CHIP_ERROR_LOGGING char * errStr; +#endif // CHIP_ERROR_LOGGING GVariantDict options; bool isSuccess = false; BluezConnection * conn = nullptr; @@ -438,7 +440,9 @@ static gboolean BluezCharacteristicAcquireWrite(BluezGattCharacteristic1 * aChar if (socketpair(AF_UNIX, SOCK_SEQPACKET | SOCK_NONBLOCK | SOCK_CLOEXEC, 0, fds) < 0) { +#if CHIP_ERROR_LOGGING errStr = strerror(errno); +#endif // CHIP_ERROR_LOGGING ChipLogError(DeviceLayer, "FAIL: socketpair: %s in %s", errStr, __func__); g_dbus_method_invocation_return_dbus_error(aInvocation, "org.bluez.Error.Failed", "FD creation failed"); goto exit; @@ -490,7 +494,9 @@ static gboolean BluezCharacteristicAcquireNotify(BluezGattCharacteristic1 * aCha { int fds[2] = { -1, -1 }; GIOChannel * channel; +#if CHIP_ERROR_LOGGING char * errStr; +#endif // CHIP_ERROR_LOGGING GVariantDict options; BluezConnection * conn = nullptr; bool isSuccess = false; @@ -515,7 +521,9 @@ static gboolean BluezCharacteristicAcquireNotify(BluezGattCharacteristic1 * aCha } if (socketpair(AF_UNIX, SOCK_SEQPACKET | SOCK_NONBLOCK | SOCK_CLOEXEC, 0, fds) < 0) { +#if CHIP_ERROR_LOGGING errStr = strerror(errno); +#endif // CHIP_ERROR_LOGGING ChipLogError(DeviceLayer, "FAIL: socketpair: %s in %s", errStr, __func__); g_dbus_method_invocation_return_dbus_error(aInvocation, "org.bluez.Error.Failed", "FD creation failed"); goto exit; diff --git a/src/platform/Linux/bluez/MainLoop.cpp b/src/platform/Linux/bluez/MainLoop.cpp index 55c58bf38827c6..64320f5cfa674b 100644 --- a/src/platform/Linux/bluez/MainLoop.cpp +++ b/src/platform/Linux/bluez/MainLoop.cpp @@ -122,7 +122,9 @@ CHIP_ERROR MainLoop::EnsureStarted() } int pthreadErr = pthread_create(&mThread, nullptr, &MainLoop::Thread, reinterpret_cast(this)); - int tmpErrno = errno; +#if CHIP_ERROR_LOGGING + int tmpErrno = errno; +#endif // CHIP_ERROR_LOGGING if (pthreadErr != 0) { ChipLogError(DeviceLayer, "FAIL: pthread_create (%s) in %s", strerror(tmpErrno), __func__); From 1de37deca13fb024ec9e4e81cf7ab57e8c83a14d Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 19 Jan 2022 20:54:51 -0500 Subject: [PATCH 077/124] Update ZAP to tip. (#13731) The changes to the field ids of structs are intended, and were verified to all match the spec now. The change to use fieldIdentifier for command fields is because ZAP now exposes it. --- .../all-clusters-app.matter | 320 +++++++-------- .../bridge-common/bridge-app.matter | 152 +++---- .../door-lock-common/door-lock-app.matter | 156 +++---- .../lighting-common/lighting-app.matter | 152 +++---- examples/lock-app/lock-common/lock-app.matter | 152 +++---- .../log-source-common/log-source-app.matter | 42 +- .../ota-provider-app.matter | 50 +-- .../ota-requestor-app.matter | 50 +-- .../placeholder/linux/apps/app1/config.matter | 56 +-- .../placeholder/linux/apps/app2/config.matter | 56 +-- examples/pump-app/pump-common/pump-app.matter | 152 +++---- .../pump-controller-app.matter | 152 +++---- .../esp32/main/temperature-measurement.matter | 66 +-- .../thermostat-common/thermostat.matter | 158 +++---- examples/tv-app/tv-common/tv-app.matter | 286 ++++++------- .../tv-casting-common/tv-casting-app.matter | 242 +++++------ examples/window-app/common/window-app.matter | 152 +++---- .../im_command_handler_cluster_commands.zapt | 2 +- .../templates/app/cluster-objects.zapt | 2 +- .../zap-templates/templates/chip/helper.js | 6 +- .../data_model/controller-clusters.matter | 324 +++++++-------- .../python/chip/clusters/Objects.py | 388 +++++++++--------- third_party/zap/repo | 2 +- .../zap-generated/cluster-objects.h | 384 ++++++++--------- 24 files changed, 1750 insertions(+), 1752 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index fe24dc6be7d331..bfda8a92abea9b 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 @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 1; - CHAR_STRING value = 2; + CHAR_STRING label = 0; + CHAR_STRING value = 1; } server cluster AccessControl = 31 { @@ -133,8 +133,8 @@ server cluster ApplicationLauncher = 1292 { } struct ApplicationLauncherApplication { - INT16U catalogVendorId = 1; - CHAR_STRING applicationId = 2; + INT16U catalogVendorId = 0; + CHAR_STRING applicationId = 1; } readonly attribute INT16U applicationLauncherList[] = 0; @@ -152,9 +152,9 @@ server cluster AudioOutput = 1291 { } struct OutputInfo { - INT8U index = 1; - OutputTypeEnum outputType = 2; - CHAR_STRING name = 3; + INT8U index = 0; + OutputTypeEnum outputType = 1; + CHAR_STRING name = 2; } readonly attribute OutputInfo audioOutputList[] = 0; @@ -283,19 +283,19 @@ server cluster BridgedActions = 37 { } struct ActionStruct { - INT16U actionID = 1; - CHAR_STRING name = 2; - ActionTypeEnum type = 3; - INT16U endpointListID = 4; - INT16U supportedCommands = 5; - ActionStateEnum status = 6; + INT16U actionID = 0; + CHAR_STRING name = 1; + ActionTypeEnum type = 2; + INT16U endpointListID = 3; + INT16U supportedCommands = 4; + ActionStateEnum status = 5; } struct EndpointListStruct { - INT16U endpointListID = 1; - CHAR_STRING name = 2; - EndpointListTypeEnum type = 3; - ENDPOINT_NO endpoints[] = 4; + INT16U endpointListID = 0; + CHAR_STRING name = 1; + EndpointListTypeEnum type = 2; + ENDPOINT_NO endpoints[] = 3; } info event StateChanged = 0 { @@ -332,11 +332,11 @@ server cluster Channel = 1284 { } struct ChannelInfo { - INT16U majorNumber = 1; - INT16U minorNumber = 2; - CHAR_STRING name = 3; - CHAR_STRING callSign = 4; - CHAR_STRING affiliateCallSign = 5; + INT16U majorNumber = 0; + INT16U minorNumber = 1; + CHAR_STRING name = 2; + CHAR_STRING callSign = 3; + CHAR_STRING affiliateCallSign = 4; } readonly attribute ChannelInfo channelList[] = 0; @@ -642,39 +642,39 @@ server cluster ContentLauncher = 1290 { } struct ContentSearch { - Parameter parameterList[] = 1; + Parameter parameterList[] = 0; } struct Parameter { - ParameterEnum type = 1; - CHAR_STRING value = 2; - AdditionalInfo externalIDList[] = 3; + ParameterEnum type = 0; + CHAR_STRING value = 1; + AdditionalInfo externalIDList[] = 2; } struct AdditionalInfo { - CHAR_STRING name = 1; - CHAR_STRING value = 2; + CHAR_STRING name = 0; + CHAR_STRING value = 1; } struct BrandingInformation { - CHAR_STRING providerName = 1; - StyleInformation background = 2; - StyleInformation logo = 3; - StyleInformation progressBar = 4; - StyleInformation splash = 5; - StyleInformation waterMark = 6; + CHAR_STRING providerName = 0; + StyleInformation background = 1; + StyleInformation logo = 2; + StyleInformation progressBar = 3; + StyleInformation splash = 4; + StyleInformation waterMark = 5; } struct StyleInformation { - CHAR_STRING imageUrl = 1; - CHAR_STRING color = 2; - Dimension size = 3; + CHAR_STRING imageUrl = 0; + CHAR_STRING color = 1; + Dimension size = 2; } struct Dimension { - double width = 1; - double height = 2; - MetricTypeEnum metric = 3; + double width = 0; + double height = 1; + MetricTypeEnum metric = 2; } readonly attribute CHAR_STRING acceptHeaderList[] = 0; @@ -684,8 +684,8 @@ server cluster ContentLauncher = 1290 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 1; - INT16U revision = 2; + DEVTYPE_ID type = 0; + INT16U revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -920,8 +920,8 @@ server cluster DoorLock = 257 { } struct DlCredential { - DlCredentialType credentialType = 1; - INT16U credentialIndex = 2; + DlCredentialType credentialType = 0; + INT16U credentialIndex = 1; } critical event DoorLockAlarm = 0 { @@ -1139,7 +1139,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfoType { - INT32U failSafeExpiryLengthMs = 1; + INT32U failSafeExpiryLengthMs = 0; } attribute int64u breadcrumb = 0; @@ -1233,12 +1233,12 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 1; - BOOLEAN fabricConnected = 2; - BOOLEAN offPremiseServicesReachableIPv4 = 3; - BOOLEAN offPremiseServicesReachableIPv6 = 4; - OCTET_STRING hardwareAddress = 5; - InterfaceType type = 6; + CHAR_STRING name = 0; + BOOLEAN fabricConnected = 1; + BOOLEAN offPremiseServicesReachableIPv4 = 2; + BOOLEAN offPremiseServicesReachableIPv6 = 3; + OCTET_STRING hardwareAddress = 4; + InterfaceType type = 5; } critical event HardwareFaultChange = 0 { @@ -1714,10 +1714,10 @@ server cluster MediaInput = 1287 { } struct InputInfo { - INT8U index = 1; - InputTypeEnum inputType = 2; - CHAR_STRING name = 3; - CHAR_STRING description = 4; + INT8U index = 0; + InputTypeEnum inputType = 1; + CHAR_STRING name = 2; + CHAR_STRING description = 3; } readonly attribute InputInfo mediaInputList[] = 0; @@ -1753,9 +1753,9 @@ server cluster MediaPlayback = 1286 { server cluster ModeSelect = 80 { struct ModeOptionStruct { - CHAR_STRING label = 1; - INT8U mode = 2; - INT32U semanticTag = 3; + CHAR_STRING label = 0; + INT8U mode = 1; + INT32U semanticTag = 2; } readonly attribute int8u currentMode = 0; @@ -1798,28 +1798,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING networkID = 1; - BOOLEAN connected = 2; + OCTET_STRING networkID = 0; + BOOLEAN connected = 1; } struct WiFiInterfaceScanResult { - BITMAP8 security = 1; - OCTET_STRING ssid = 2; - OCTET_STRING bssid = 3; - INT16U channel = 4; - WiFiBand wiFiBand = 5; - INT8S rssi = 6; + BITMAP8 security = 0; + OCTET_STRING ssid = 1; + OCTET_STRING bssid = 2; + INT16U channel = 3; + WiFiBand wiFiBand = 4; + INT8S rssi = 5; } struct ThreadInterfaceScanResult { - INT64U panId = 1; - INT64U extendedPanId = 2; - CHAR_STRING networkName = 3; - INT16U channel = 4; - INT8U version = 5; - INT64U extendedAddress = 6; - INT8S rssi = 7; - INT8U lqi = 8; + INT64U panId = 0; + INT64U extendedPanId = 1; + CHAR_STRING networkName = 2; + INT16U channel = 3; + INT8U version = 4; + INT64U extendedAddress = 5; + INT8S rssi = 6; + INT8U lqi = 7; } readonly attribute int8u maxNetworks = 0; @@ -2085,12 +2085,12 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 1; - OCTET_STRING rootPublicKey = 2; - INT16U vendorId = 3; - FABRIC_ID fabricId = 4; - NODE_ID nodeId = 5; - CHAR_STRING label = 6; + INT8U fabricIndex = 0; + OCTET_STRING rootPublicKey = 1; + INT16U vendorId = 2; + FABRIC_ID fabricId = 3; + NODE_ID nodeId = 4; + CHAR_STRING label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; @@ -2304,9 +2304,9 @@ server cluster RelativeHumidityMeasurement = 1029 { server cluster Scenes = 5 { struct SceneExtensionFieldSet { - CLUSTER_ID clusterId = 1; - INT8U length = 2; - INT8U value = 3; + CLUSTER_ID clusterId = 0; + INT8U length = 1; + INT8U value = 2; } readonly attribute int8u sceneCount = 0; @@ -2404,11 +2404,11 @@ server cluster Scenes = 5 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 1; - CHAR_STRING name = 2; - INT32U stackFreeCurrent = 3; - INT32U stackFreeMinimum = 4; - INT32U stackSize = 5; + INT64U id = 0; + CHAR_STRING name = 1; + INT32U stackFreeCurrent = 2; + INT32U stackFreeMinimum = 3; + INT32U stackSize = 4; } info event SoftwareFault = 0 { @@ -2471,8 +2471,8 @@ server cluster TargetNavigator = 1285 { } struct TargetInfo { - INT8U identifier = 1; - CHAR_STRING name = 2; + INT8U identifier = 0; + CHAR_STRING name = 1; } readonly attribute TargetInfo targetNavigatorList[] = 0; @@ -2497,50 +2497,50 @@ server cluster TestCluster = 1295 { } struct TestListStructOctet { - INT64U fabricIndex = 1; - OCTET_STRING operationalCert = 2; + INT64U fabricIndex = 0; + OCTET_STRING operationalCert = 1; } struct NullablesAndOptionalsStruct { - nullable INT16U nullableInt = 1; - optional INT16U optionalInt = 2; - optional nullable INT16U nullableOptionalInt = 3; - nullable CHAR_STRING nullableString = 4; - optional CHAR_STRING optionalString = 5; - optional nullable CHAR_STRING nullableOptionalString = 6; - nullable SimpleStruct nullableStruct = 7; - optional SimpleStruct optionalStruct = 8; - optional nullable SimpleStruct nullableOptionalStruct = 9; - nullable SimpleEnum nullableList[] = 10; - optional SimpleEnum optionalList[] = 11; - optional nullable SimpleEnum nullableOptionalList[] = 12; + nullable INT16U nullableInt = 0; + optional INT16U optionalInt = 1; + optional nullable INT16U nullableOptionalInt = 2; + nullable CHAR_STRING nullableString = 3; + optional CHAR_STRING optionalString = 4; + optional nullable CHAR_STRING nullableOptionalString = 5; + nullable SimpleStruct nullableStruct = 6; + optional SimpleStruct optionalStruct = 7; + optional nullable SimpleStruct nullableOptionalStruct = 8; + nullable SimpleEnum nullableList[] = 9; + optional SimpleEnum optionalList[] = 10; + optional nullable SimpleEnum nullableOptionalList[] = 11; } struct SimpleStruct { - INT8U a = 1; - BOOLEAN b = 2; - SimpleEnum c = 3; - OCTET_STRING d = 4; - CHAR_STRING e = 5; - SimpleBitmap f = 6; - single g = 7; - double h = 8; + INT8U a = 0; + BOOLEAN b = 1; + SimpleEnum c = 2; + OCTET_STRING d = 3; + CHAR_STRING e = 4; + SimpleBitmap f = 5; + single g = 6; + double h = 7; } struct NestedStructList { - INT8U a = 1; - BOOLEAN b = 2; - SimpleStruct c = 3; - SimpleStruct d[] = 4; - INT32U e[] = 5; - OCTET_STRING f[] = 6; - INT8U g[] = 7; + INT8U a = 0; + BOOLEAN b = 1; + SimpleStruct c = 2; + SimpleStruct d[] = 3; + INT32U e[] = 4; + OCTET_STRING f[] = 5; + INT8U g[] = 6; } struct NestedStruct { - INT8U a = 1; - BOOLEAN b = 2; - SimpleStruct c = 3; + INT8U a = 0; + BOOLEAN b = 1; + SimpleStruct c = 2; } info event TestEvent = 1 { @@ -2797,53 +2797,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 1; - INT32U age = 2; - INT16U rloc16 = 3; - INT32U linkFrameCounter = 4; - INT32U mleFrameCounter = 5; - INT8U lqi = 6; - INT8S averageRssi = 7; - INT8S lastRssi = 8; - INT8U frameErrorRate = 9; - INT8U messageErrorRate = 10; - BOOLEAN rxOnWhenIdle = 11; - BOOLEAN fullThreadDevice = 12; - BOOLEAN fullNetworkData = 13; - BOOLEAN isChild = 14; + INT64U extAddress = 0; + INT32U age = 1; + INT16U rloc16 = 2; + INT32U linkFrameCounter = 3; + INT32U mleFrameCounter = 4; + INT8U lqi = 5; + INT8S averageRssi = 6; + INT8S lastRssi = 7; + INT8U frameErrorRate = 8; + INT8U messageErrorRate = 9; + BOOLEAN rxOnWhenIdle = 10; + BOOLEAN fullThreadDevice = 11; + BOOLEAN fullNetworkData = 12; + BOOLEAN isChild = 13; } struct RouteTable { - INT64U extAddress = 1; - INT16U rloc16 = 2; - INT8U routerId = 3; - INT8U nextHop = 4; - INT8U pathCost = 5; - INT8U LQIIn = 6; - INT8U LQIOut = 7; - INT8U age = 8; - BOOLEAN allocated = 9; - BOOLEAN linkEstablished = 10; + INT64U extAddress = 0; + INT16U rloc16 = 1; + INT8U routerId = 2; + INT8U nextHop = 3; + INT8U pathCost = 4; + INT8U LQIIn = 5; + INT8U LQIOut = 6; + INT8U age = 7; + BOOLEAN allocated = 8; + BOOLEAN linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 1; - BITMAP16 flags = 2; + INT16U rotationTime = 0; + BITMAP16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 1; - BOOLEAN pendingTimestampPresent = 2; - BOOLEAN masterKeyPresent = 3; - BOOLEAN networkNamePresent = 4; - BOOLEAN extendedPanIdPresent = 5; - BOOLEAN meshLocalPrefixPresent = 6; - BOOLEAN delayPresent = 7; - BOOLEAN panIdPresent = 8; - BOOLEAN channelPresent = 9; - BOOLEAN pskcPresent = 10; - BOOLEAN securityPolicyPresent = 11; - BOOLEAN channelMaskPresent = 12; + BOOLEAN activeTimestampPresent = 0; + BOOLEAN pendingTimestampPresent = 1; + BOOLEAN masterKeyPresent = 2; + BOOLEAN networkNamePresent = 3; + BOOLEAN extendedPanIdPresent = 4; + BOOLEAN meshLocalPrefixPresent = 5; + BOOLEAN delayPresent = 6; + BOOLEAN panIdPresent = 7; + BOOLEAN channelPresent = 8; + BOOLEAN pskcPresent = 9; + BOOLEAN securityPolicyPresent = 10; + BOOLEAN channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 3961b050530505..34a1202bebc03e 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 1; - CHAR_STRING value = 2; + CHAR_STRING label = 0; + CHAR_STRING value = 1; } server cluster AdministratorCommissioning = 60 { @@ -73,8 +73,8 @@ server cluster Basic = 40 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 1; - INT16U revision = 2; + DEVTYPE_ID type = 0; + INT16U revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -161,7 +161,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfoType { - INT32U failSafeExpiryLengthMs = 1; + INT32U failSafeExpiryLengthMs = 0; } attribute int64u breadcrumb = 0; @@ -255,12 +255,12 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 1; - BOOLEAN fabricConnected = 2; - BOOLEAN offPremiseServicesReachableIPv4 = 3; - BOOLEAN offPremiseServicesReachableIPv6 = 4; - OCTET_STRING hardwareAddress = 5; - InterfaceType type = 6; + CHAR_STRING name = 0; + BOOLEAN fabricConnected = 1; + BOOLEAN offPremiseServicesReachableIPv4 = 2; + BOOLEAN offPremiseServicesReachableIPv6 = 3; + OCTET_STRING hardwareAddress = 4; + InterfaceType type = 5; } critical event HardwareFaultChange = 0 { @@ -405,28 +405,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING networkID = 1; - BOOLEAN connected = 2; + OCTET_STRING networkID = 0; + BOOLEAN connected = 1; } struct WiFiInterfaceScanResult { - BITMAP8 security = 1; - OCTET_STRING ssid = 2; - OCTET_STRING bssid = 3; - INT16U channel = 4; - WiFiBand wiFiBand = 5; - INT8S rssi = 6; + BITMAP8 security = 0; + OCTET_STRING ssid = 1; + OCTET_STRING bssid = 2; + INT16U channel = 3; + WiFiBand wiFiBand = 4; + INT8S rssi = 5; } struct ThreadInterfaceScanResult { - INT64U panId = 1; - INT64U extendedPanId = 2; - CHAR_STRING networkName = 3; - INT16U channel = 4; - INT8U version = 5; - INT64U extendedAddress = 6; - INT8S rssi = 7; - INT8U lqi = 8; + INT64U panId = 0; + INT64U extendedPanId = 1; + CHAR_STRING networkName = 2; + INT16U channel = 3; + INT8U version = 4; + INT64U extendedAddress = 5; + INT8S rssi = 6; + INT8U lqi = 7; } readonly attribute int8u maxNetworks = 0; @@ -537,12 +537,12 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 1; - OCTET_STRING rootPublicKey = 2; - INT16U vendorId = 3; - FABRIC_ID fabricId = 4; - NODE_ID nodeId = 5; - CHAR_STRING label = 6; + INT8U fabricIndex = 0; + OCTET_STRING rootPublicKey = 1; + INT16U vendorId = 2; + FABRIC_ID fabricId = 3; + NODE_ID nodeId = 4; + CHAR_STRING label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; @@ -626,11 +626,11 @@ server cluster OperationalCredentials = 62 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 1; - CHAR_STRING name = 2; - INT32U stackFreeCurrent = 3; - INT32U stackFreeMinimum = 4; - INT32U stackSize = 5; + INT64U id = 0; + CHAR_STRING name = 1; + INT32U stackFreeCurrent = 2; + INT32U stackFreeMinimum = 3; + INT32U stackSize = 4; } info event SoftwareFault = 0 { @@ -707,53 +707,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 1; - INT32U age = 2; - INT16U rloc16 = 3; - INT32U linkFrameCounter = 4; - INT32U mleFrameCounter = 5; - INT8U lqi = 6; - INT8S averageRssi = 7; - INT8S lastRssi = 8; - INT8U frameErrorRate = 9; - INT8U messageErrorRate = 10; - BOOLEAN rxOnWhenIdle = 11; - BOOLEAN fullThreadDevice = 12; - BOOLEAN fullNetworkData = 13; - BOOLEAN isChild = 14; + INT64U extAddress = 0; + INT32U age = 1; + INT16U rloc16 = 2; + INT32U linkFrameCounter = 3; + INT32U mleFrameCounter = 4; + INT8U lqi = 5; + INT8S averageRssi = 6; + INT8S lastRssi = 7; + INT8U frameErrorRate = 8; + INT8U messageErrorRate = 9; + BOOLEAN rxOnWhenIdle = 10; + BOOLEAN fullThreadDevice = 11; + BOOLEAN fullNetworkData = 12; + BOOLEAN isChild = 13; } struct RouteTable { - INT64U extAddress = 1; - INT16U rloc16 = 2; - INT8U routerId = 3; - INT8U nextHop = 4; - INT8U pathCost = 5; - INT8U LQIIn = 6; - INT8U LQIOut = 7; - INT8U age = 8; - BOOLEAN allocated = 9; - BOOLEAN linkEstablished = 10; + INT64U extAddress = 0; + INT16U rloc16 = 1; + INT8U routerId = 2; + INT8U nextHop = 3; + INT8U pathCost = 4; + INT8U LQIIn = 5; + INT8U LQIOut = 6; + INT8U age = 7; + BOOLEAN allocated = 8; + BOOLEAN linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 1; - BITMAP16 flags = 2; + INT16U rotationTime = 0; + BITMAP16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 1; - BOOLEAN pendingTimestampPresent = 2; - BOOLEAN masterKeyPresent = 3; - BOOLEAN networkNamePresent = 4; - BOOLEAN extendedPanIdPresent = 5; - BOOLEAN meshLocalPrefixPresent = 6; - BOOLEAN delayPresent = 7; - BOOLEAN panIdPresent = 8; - BOOLEAN channelPresent = 9; - BOOLEAN pskcPresent = 10; - BOOLEAN securityPolicyPresent = 11; - BOOLEAN channelMaskPresent = 12; + BOOLEAN activeTimestampPresent = 0; + BOOLEAN pendingTimestampPresent = 1; + BOOLEAN masterKeyPresent = 2; + BOOLEAN networkNamePresent = 3; + BOOLEAN extendedPanIdPresent = 4; + BOOLEAN meshLocalPrefixPresent = 5; + BOOLEAN delayPresent = 6; + BOOLEAN panIdPresent = 7; + BOOLEAN channelPresent = 8; + BOOLEAN pskcPresent = 9; + BOOLEAN securityPolicyPresent = 10; + BOOLEAN channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/examples/door-lock-app/door-lock-common/door-lock-app.matter b/examples/door-lock-app/door-lock-common/door-lock-app.matter index c84c60cd4242e8..fa43a261912543 100644 --- a/examples/door-lock-app/door-lock-common/door-lock-app.matter +++ b/examples/door-lock-app/door-lock-common/door-lock-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 1; - CHAR_STRING value = 2; + CHAR_STRING label = 0; + CHAR_STRING value = 1; } server cluster AdministratorCommissioning = 60 { @@ -73,8 +73,8 @@ server cluster Basic = 40 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 1; - INT16U revision = 2; + DEVTYPE_ID type = 0; + INT16U revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -309,8 +309,8 @@ server cluster DoorLock = 257 { } struct DlCredential { - DlCredentialType credentialType = 1; - INT16U credentialIndex = 2; + DlCredentialType credentialType = 0; + INT16U credentialIndex = 1; } critical event DoorLockAlarm = 0 { @@ -494,7 +494,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfoType { - INT32U failSafeExpiryLengthMs = 1; + INT32U failSafeExpiryLengthMs = 0; } attribute int64u breadcrumb = 0; @@ -588,12 +588,12 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 1; - BOOLEAN fabricConnected = 2; - BOOLEAN offPremiseServicesReachableIPv4 = 3; - BOOLEAN offPremiseServicesReachableIPv6 = 4; - OCTET_STRING hardwareAddress = 5; - InterfaceType type = 6; + CHAR_STRING name = 0; + BOOLEAN fabricConnected = 1; + BOOLEAN offPremiseServicesReachableIPv4 = 2; + BOOLEAN offPremiseServicesReachableIPv6 = 3; + OCTET_STRING hardwareAddress = 4; + InterfaceType type = 5; } critical event HardwareFaultChange = 0 { @@ -657,28 +657,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING networkID = 1; - BOOLEAN connected = 2; + OCTET_STRING networkID = 0; + BOOLEAN connected = 1; } struct WiFiInterfaceScanResult { - BITMAP8 security = 1; - OCTET_STRING ssid = 2; - OCTET_STRING bssid = 3; - INT16U channel = 4; - WiFiBand wiFiBand = 5; - INT8S rssi = 6; + BITMAP8 security = 0; + OCTET_STRING ssid = 1; + OCTET_STRING bssid = 2; + INT16U channel = 3; + WiFiBand wiFiBand = 4; + INT8S rssi = 5; } struct ThreadInterfaceScanResult { - INT64U panId = 1; - INT64U extendedPanId = 2; - CHAR_STRING networkName = 3; - INT16U channel = 4; - INT8U version = 5; - INT64U extendedAddress = 6; - INT8S rssi = 7; - INT8U lqi = 8; + INT64U panId = 0; + INT64U extendedPanId = 1; + CHAR_STRING networkName = 2; + INT16U channel = 3; + INT8U version = 4; + INT64U extendedAddress = 5; + INT8S rssi = 6; + INT8U lqi = 7; } readonly attribute int8u maxNetworks = 0; @@ -765,12 +765,12 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 1; - OCTET_STRING rootPublicKey = 2; - INT16U vendorId = 3; - FABRIC_ID fabricId = 4; - NODE_ID nodeId = 5; - CHAR_STRING label = 6; + INT8U fabricIndex = 0; + OCTET_STRING rootPublicKey = 1; + INT16U vendorId = 2; + FABRIC_ID fabricId = 3; + NODE_ID nodeId = 4; + CHAR_STRING label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; @@ -872,11 +872,11 @@ server cluster PowerSourceConfiguration = 46 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 1; - CHAR_STRING name = 2; - INT32U stackFreeCurrent = 3; - INT32U stackFreeMinimum = 4; - INT32U stackSize = 5; + INT64U id = 0; + CHAR_STRING name = 1; + INT32U stackFreeCurrent = 2; + INT32U stackFreeMinimum = 3; + INT32U stackSize = 4; } info event SoftwareFault = 0 { @@ -915,53 +915,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 1; - INT32U age = 2; - INT16U rloc16 = 3; - INT32U linkFrameCounter = 4; - INT32U mleFrameCounter = 5; - INT8U lqi = 6; - INT8S averageRssi = 7; - INT8S lastRssi = 8; - INT8U frameErrorRate = 9; - INT8U messageErrorRate = 10; - BOOLEAN rxOnWhenIdle = 11; - BOOLEAN fullThreadDevice = 12; - BOOLEAN fullNetworkData = 13; - BOOLEAN isChild = 14; + INT64U extAddress = 0; + INT32U age = 1; + INT16U rloc16 = 2; + INT32U linkFrameCounter = 3; + INT32U mleFrameCounter = 4; + INT8U lqi = 5; + INT8S averageRssi = 6; + INT8S lastRssi = 7; + INT8U frameErrorRate = 8; + INT8U messageErrorRate = 9; + BOOLEAN rxOnWhenIdle = 10; + BOOLEAN fullThreadDevice = 11; + BOOLEAN fullNetworkData = 12; + BOOLEAN isChild = 13; } struct RouteTable { - INT64U extAddress = 1; - INT16U rloc16 = 2; - INT8U routerId = 3; - INT8U nextHop = 4; - INT8U pathCost = 5; - INT8U LQIIn = 6; - INT8U LQIOut = 7; - INT8U age = 8; - BOOLEAN allocated = 9; - BOOLEAN linkEstablished = 10; + INT64U extAddress = 0; + INT16U rloc16 = 1; + INT8U routerId = 2; + INT8U nextHop = 3; + INT8U pathCost = 4; + INT8U LQIIn = 5; + INT8U LQIOut = 6; + INT8U age = 7; + BOOLEAN allocated = 8; + BOOLEAN linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 1; - BITMAP16 flags = 2; + INT16U rotationTime = 0; + BITMAP16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 1; - BOOLEAN pendingTimestampPresent = 2; - BOOLEAN masterKeyPresent = 3; - BOOLEAN networkNamePresent = 4; - BOOLEAN extendedPanIdPresent = 5; - BOOLEAN meshLocalPrefixPresent = 6; - BOOLEAN delayPresent = 7; - BOOLEAN panIdPresent = 8; - BOOLEAN channelPresent = 9; - BOOLEAN pskcPresent = 10; - BOOLEAN securityPolicyPresent = 11; - BOOLEAN channelMaskPresent = 12; + BOOLEAN activeTimestampPresent = 0; + BOOLEAN pendingTimestampPresent = 1; + BOOLEAN masterKeyPresent = 2; + BOOLEAN networkNamePresent = 3; + BOOLEAN extendedPanIdPresent = 4; + BOOLEAN meshLocalPrefixPresent = 5; + BOOLEAN delayPresent = 6; + BOOLEAN panIdPresent = 7; + BOOLEAN channelPresent = 8; + BOOLEAN pskcPresent = 9; + BOOLEAN securityPolicyPresent = 10; + BOOLEAN channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 2567e30773641b..9c420c30815022 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 1; - CHAR_STRING value = 2; + CHAR_STRING label = 0; + CHAR_STRING value = 1; } server cluster AdministratorCommissioning = 60 { @@ -320,8 +320,8 @@ server cluster ColorControl = 768 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 1; - INT16U revision = 2; + DEVTYPE_ID type = 0; + INT16U revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -410,7 +410,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfoType { - INT32U failSafeExpiryLengthMs = 1; + INT32U failSafeExpiryLengthMs = 0; } attribute int64u breadcrumb = 0; @@ -504,12 +504,12 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 1; - BOOLEAN fabricConnected = 2; - BOOLEAN offPremiseServicesReachableIPv4 = 3; - BOOLEAN offPremiseServicesReachableIPv6 = 4; - OCTET_STRING hardwareAddress = 5; - InterfaceType type = 6; + CHAR_STRING name = 0; + BOOLEAN fabricConnected = 1; + BOOLEAN offPremiseServicesReachableIPv4 = 2; + BOOLEAN offPremiseServicesReachableIPv6 = 3; + OCTET_STRING hardwareAddress = 4; + InterfaceType type = 5; } critical event HardwareFaultChange = 0 { @@ -699,28 +699,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING networkID = 1; - BOOLEAN connected = 2; + OCTET_STRING networkID = 0; + BOOLEAN connected = 1; } struct WiFiInterfaceScanResult { - BITMAP8 security = 1; - OCTET_STRING ssid = 2; - OCTET_STRING bssid = 3; - INT16U channel = 4; - WiFiBand wiFiBand = 5; - INT8S rssi = 6; + BITMAP8 security = 0; + OCTET_STRING ssid = 1; + OCTET_STRING bssid = 2; + INT16U channel = 3; + WiFiBand wiFiBand = 4; + INT8S rssi = 5; } struct ThreadInterfaceScanResult { - INT64U panId = 1; - INT64U extendedPanId = 2; - CHAR_STRING networkName = 3; - INT16U channel = 4; - INT8U version = 5; - INT64U extendedAddress = 6; - INT8S rssi = 7; - INT8U lqi = 8; + INT64U panId = 0; + INT64U extendedPanId = 1; + CHAR_STRING networkName = 2; + INT16U channel = 3; + INT8U version = 4; + INT64U extendedAddress = 5; + INT8S rssi = 6; + INT8U lqi = 7; } readonly attribute int8u maxNetworks = 0; @@ -1022,12 +1022,12 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 1; - OCTET_STRING rootPublicKey = 2; - INT16U vendorId = 3; - FABRIC_ID fabricId = 4; - NODE_ID nodeId = 5; - CHAR_STRING label = 6; + INT8U fabricIndex = 0; + OCTET_STRING rootPublicKey = 1; + INT16U vendorId = 2; + FABRIC_ID fabricId = 3; + NODE_ID nodeId = 4; + CHAR_STRING label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; @@ -1111,11 +1111,11 @@ server cluster OperationalCredentials = 62 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 1; - CHAR_STRING name = 2; - INT32U stackFreeCurrent = 3; - INT32U stackFreeMinimum = 4; - INT32U stackSize = 5; + INT64U id = 0; + CHAR_STRING name = 1; + INT32U stackFreeCurrent = 2; + INT32U stackFreeMinimum = 3; + INT32U stackSize = 4; } info event SoftwareFault = 0 { @@ -1189,53 +1189,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 1; - INT32U age = 2; - INT16U rloc16 = 3; - INT32U linkFrameCounter = 4; - INT32U mleFrameCounter = 5; - INT8U lqi = 6; - INT8S averageRssi = 7; - INT8S lastRssi = 8; - INT8U frameErrorRate = 9; - INT8U messageErrorRate = 10; - BOOLEAN rxOnWhenIdle = 11; - BOOLEAN fullThreadDevice = 12; - BOOLEAN fullNetworkData = 13; - BOOLEAN isChild = 14; + INT64U extAddress = 0; + INT32U age = 1; + INT16U rloc16 = 2; + INT32U linkFrameCounter = 3; + INT32U mleFrameCounter = 4; + INT8U lqi = 5; + INT8S averageRssi = 6; + INT8S lastRssi = 7; + INT8U frameErrorRate = 8; + INT8U messageErrorRate = 9; + BOOLEAN rxOnWhenIdle = 10; + BOOLEAN fullThreadDevice = 11; + BOOLEAN fullNetworkData = 12; + BOOLEAN isChild = 13; } struct RouteTable { - INT64U extAddress = 1; - INT16U rloc16 = 2; - INT8U routerId = 3; - INT8U nextHop = 4; - INT8U pathCost = 5; - INT8U LQIIn = 6; - INT8U LQIOut = 7; - INT8U age = 8; - BOOLEAN allocated = 9; - BOOLEAN linkEstablished = 10; + INT64U extAddress = 0; + INT16U rloc16 = 1; + INT8U routerId = 2; + INT8U nextHop = 3; + INT8U pathCost = 4; + INT8U LQIIn = 5; + INT8U LQIOut = 6; + INT8U age = 7; + BOOLEAN allocated = 8; + BOOLEAN linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 1; - BITMAP16 flags = 2; + INT16U rotationTime = 0; + BITMAP16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 1; - BOOLEAN pendingTimestampPresent = 2; - BOOLEAN masterKeyPresent = 3; - BOOLEAN networkNamePresent = 4; - BOOLEAN extendedPanIdPresent = 5; - BOOLEAN meshLocalPrefixPresent = 6; - BOOLEAN delayPresent = 7; - BOOLEAN panIdPresent = 8; - BOOLEAN channelPresent = 9; - BOOLEAN pskcPresent = 10; - BOOLEAN securityPolicyPresent = 11; - BOOLEAN channelMaskPresent = 12; + BOOLEAN activeTimestampPresent = 0; + BOOLEAN pendingTimestampPresent = 1; + BOOLEAN masterKeyPresent = 2; + BOOLEAN networkNamePresent = 3; + BOOLEAN extendedPanIdPresent = 4; + BOOLEAN meshLocalPrefixPresent = 5; + BOOLEAN delayPresent = 6; + BOOLEAN panIdPresent = 7; + BOOLEAN channelPresent = 8; + BOOLEAN pskcPresent = 9; + BOOLEAN securityPolicyPresent = 10; + BOOLEAN channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 1e4cc77e0a03ea..e85295ff9102d2 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 1; - CHAR_STRING value = 2; + CHAR_STRING label = 0; + CHAR_STRING value = 1; } server cluster AdministratorCommissioning = 60 { @@ -73,8 +73,8 @@ server cluster Basic = 40 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 1; - INT16U revision = 2; + DEVTYPE_ID type = 0; + INT16U revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -161,7 +161,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfoType { - INT32U failSafeExpiryLengthMs = 1; + INT32U failSafeExpiryLengthMs = 0; } attribute int64u breadcrumb = 0; @@ -255,12 +255,12 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 1; - BOOLEAN fabricConnected = 2; - BOOLEAN offPremiseServicesReachableIPv4 = 3; - BOOLEAN offPremiseServicesReachableIPv6 = 4; - OCTET_STRING hardwareAddress = 5; - InterfaceType type = 6; + CHAR_STRING name = 0; + BOOLEAN fabricConnected = 1; + BOOLEAN offPremiseServicesReachableIPv4 = 2; + BOOLEAN offPremiseServicesReachableIPv6 = 3; + OCTET_STRING hardwareAddress = 4; + InterfaceType type = 5; } critical event HardwareFaultChange = 0 { @@ -324,28 +324,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING networkID = 1; - BOOLEAN connected = 2; + OCTET_STRING networkID = 0; + BOOLEAN connected = 1; } struct WiFiInterfaceScanResult { - BITMAP8 security = 1; - OCTET_STRING ssid = 2; - OCTET_STRING bssid = 3; - INT16U channel = 4; - WiFiBand wiFiBand = 5; - INT8S rssi = 6; + BITMAP8 security = 0; + OCTET_STRING ssid = 1; + OCTET_STRING bssid = 2; + INT16U channel = 3; + WiFiBand wiFiBand = 4; + INT8S rssi = 5; } struct ThreadInterfaceScanResult { - INT64U panId = 1; - INT64U extendedPanId = 2; - CHAR_STRING networkName = 3; - INT16U channel = 4; - INT8U version = 5; - INT64U extendedAddress = 6; - INT8S rssi = 7; - INT8U lqi = 8; + INT64U panId = 0; + INT64U extendedPanId = 1; + CHAR_STRING networkName = 2; + INT16U channel = 3; + INT8U version = 4; + INT64U extendedAddress = 5; + INT8S rssi = 6; + INT8U lqi = 7; } readonly attribute int8u maxNetworks = 0; @@ -461,12 +461,12 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 1; - OCTET_STRING rootPublicKey = 2; - INT16U vendorId = 3; - FABRIC_ID fabricId = 4; - NODE_ID nodeId = 5; - CHAR_STRING label = 6; + INT8U fabricIndex = 0; + OCTET_STRING rootPublicKey = 1; + INT16U vendorId = 2; + FABRIC_ID fabricId = 3; + NODE_ID nodeId = 4; + CHAR_STRING label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; @@ -568,11 +568,11 @@ server cluster PowerSourceConfiguration = 46 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 1; - CHAR_STRING name = 2; - INT32U stackFreeCurrent = 3; - INT32U stackFreeMinimum = 4; - INT32U stackSize = 5; + INT64U id = 0; + CHAR_STRING name = 1; + INT32U stackFreeCurrent = 2; + INT32U stackFreeMinimum = 3; + INT32U stackSize = 4; } info event SoftwareFault = 0 { @@ -611,53 +611,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 1; - INT32U age = 2; - INT16U rloc16 = 3; - INT32U linkFrameCounter = 4; - INT32U mleFrameCounter = 5; - INT8U lqi = 6; - INT8S averageRssi = 7; - INT8S lastRssi = 8; - INT8U frameErrorRate = 9; - INT8U messageErrorRate = 10; - BOOLEAN rxOnWhenIdle = 11; - BOOLEAN fullThreadDevice = 12; - BOOLEAN fullNetworkData = 13; - BOOLEAN isChild = 14; + INT64U extAddress = 0; + INT32U age = 1; + INT16U rloc16 = 2; + INT32U linkFrameCounter = 3; + INT32U mleFrameCounter = 4; + INT8U lqi = 5; + INT8S averageRssi = 6; + INT8S lastRssi = 7; + INT8U frameErrorRate = 8; + INT8U messageErrorRate = 9; + BOOLEAN rxOnWhenIdle = 10; + BOOLEAN fullThreadDevice = 11; + BOOLEAN fullNetworkData = 12; + BOOLEAN isChild = 13; } struct RouteTable { - INT64U extAddress = 1; - INT16U rloc16 = 2; - INT8U routerId = 3; - INT8U nextHop = 4; - INT8U pathCost = 5; - INT8U LQIIn = 6; - INT8U LQIOut = 7; - INT8U age = 8; - BOOLEAN allocated = 9; - BOOLEAN linkEstablished = 10; + INT64U extAddress = 0; + INT16U rloc16 = 1; + INT8U routerId = 2; + INT8U nextHop = 3; + INT8U pathCost = 4; + INT8U LQIIn = 5; + INT8U LQIOut = 6; + INT8U age = 7; + BOOLEAN allocated = 8; + BOOLEAN linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 1; - BITMAP16 flags = 2; + INT16U rotationTime = 0; + BITMAP16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 1; - BOOLEAN pendingTimestampPresent = 2; - BOOLEAN masterKeyPresent = 3; - BOOLEAN networkNamePresent = 4; - BOOLEAN extendedPanIdPresent = 5; - BOOLEAN meshLocalPrefixPresent = 6; - BOOLEAN delayPresent = 7; - BOOLEAN panIdPresent = 8; - BOOLEAN channelPresent = 9; - BOOLEAN pskcPresent = 10; - BOOLEAN securityPolicyPresent = 11; - BOOLEAN channelMaskPresent = 12; + BOOLEAN activeTimestampPresent = 0; + BOOLEAN pendingTimestampPresent = 1; + BOOLEAN masterKeyPresent = 2; + BOOLEAN networkNamePresent = 3; + BOOLEAN extendedPanIdPresent = 4; + BOOLEAN meshLocalPrefixPresent = 5; + BOOLEAN delayPresent = 6; + BOOLEAN panIdPresent = 7; + BOOLEAN channelPresent = 8; + BOOLEAN pskcPresent = 9; + BOOLEAN securityPolicyPresent = 10; + BOOLEAN channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index cb0ab78e63bfda..62dbefcd91ee51 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -75,7 +75,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfoType { - INT32U failSafeExpiryLengthMs = 1; + INT32U failSafeExpiryLengthMs = 0; } attribute int64u breadcrumb = 0; @@ -141,23 +141,23 @@ server cluster NetworkCommissioning = 49 { } struct WiFiInterfaceScanResult { - BITMAP8 security = 1; - OCTET_STRING ssid = 2; - OCTET_STRING bssid = 3; - INT16U channel = 4; - WiFiBand wiFiBand = 5; - INT8S rssi = 6; + BITMAP8 security = 0; + OCTET_STRING ssid = 1; + OCTET_STRING bssid = 2; + INT16U channel = 3; + WiFiBand wiFiBand = 4; + INT8S rssi = 5; } struct ThreadInterfaceScanResult { - INT64U panId = 1; - INT64U extendedPanId = 2; - CHAR_STRING networkName = 3; - INT16U channel = 4; - INT8U version = 5; - INT64U extendedAddress = 6; - INT8S rssi = 7; - INT8U lqi = 8; + INT64U panId = 0; + INT64U extendedPanId = 1; + CHAR_STRING networkName = 2; + INT16U channel = 3; + INT8U version = 4; + INT64U extendedAddress = 5; + INT8S rssi = 6; + INT8U lqi = 7; } readonly attribute int16u clusterRevision = 65533; @@ -235,12 +235,12 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 1; - OCTET_STRING rootPublicKey = 2; - INT16U vendorId = 3; - FABRIC_ID fabricId = 4; - NODE_ID nodeId = 5; - CHAR_STRING label = 6; + INT8U fabricIndex = 0; + OCTET_STRING rootPublicKey = 1; + INT16U vendorId = 2; + FABRIC_ID fabricId = 3; + NODE_ID nodeId = 4; + CHAR_STRING label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; 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 127426ee77ade9..8a30d8e8a4bfd7 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 @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 1; - CHAR_STRING value = 2; + CHAR_STRING label = 0; + CHAR_STRING value = 1; } server cluster FixedLabel = 64 { @@ -26,7 +26,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfoType { - INT32U failSafeExpiryLengthMs = 1; + INT32U failSafeExpiryLengthMs = 0; } attribute int64u breadcrumb = 0; @@ -100,28 +100,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING networkID = 1; - BOOLEAN connected = 2; + OCTET_STRING networkID = 0; + BOOLEAN connected = 1; } struct WiFiInterfaceScanResult { - BITMAP8 security = 1; - OCTET_STRING ssid = 2; - OCTET_STRING bssid = 3; - INT16U channel = 4; - WiFiBand wiFiBand = 5; - INT8S rssi = 6; + BITMAP8 security = 0; + OCTET_STRING ssid = 1; + OCTET_STRING bssid = 2; + INT16U channel = 3; + WiFiBand wiFiBand = 4; + INT8S rssi = 5; } struct ThreadInterfaceScanResult { - INT64U panId = 1; - INT64U extendedPanId = 2; - CHAR_STRING networkName = 3; - INT16U channel = 4; - INT8U version = 5; - INT64U extendedAddress = 6; - INT8S rssi = 7; - INT8U lqi = 8; + INT64U panId = 0; + INT64U extendedPanId = 1; + CHAR_STRING networkName = 2; + INT16U channel = 3; + INT8U version = 4; + INT64U extendedAddress = 5; + INT8S rssi = 6; + INT8U lqi = 7; } readonly attribute int8u maxNetworks = 0; @@ -273,12 +273,12 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 1; - OCTET_STRING rootPublicKey = 2; - INT16U vendorId = 3; - FABRIC_ID fabricId = 4; - NODE_ID nodeId = 5; - CHAR_STRING label = 6; + INT8U fabricIndex = 0; + OCTET_STRING rootPublicKey = 1; + INT16U vendorId = 2; + FABRIC_ID fabricId = 3; + NODE_ID nodeId = 4; + CHAR_STRING label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; 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 35533af4a4838a..56dd3f7db5369c 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 @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 1; - CHAR_STRING value = 2; + CHAR_STRING label = 0; + CHAR_STRING value = 1; } server cluster Basic = 40 { @@ -57,7 +57,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfoType { - INT32U failSafeExpiryLengthMs = 1; + INT32U failSafeExpiryLengthMs = 0; } attribute int64u breadcrumb = 0; @@ -131,28 +131,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING networkID = 1; - BOOLEAN connected = 2; + OCTET_STRING networkID = 0; + BOOLEAN connected = 1; } struct WiFiInterfaceScanResult { - BITMAP8 security = 1; - OCTET_STRING ssid = 2; - OCTET_STRING bssid = 3; - INT16U channel = 4; - WiFiBand wiFiBand = 5; - INT8S rssi = 6; + BITMAP8 security = 0; + OCTET_STRING ssid = 1; + OCTET_STRING bssid = 2; + INT16U channel = 3; + WiFiBand wiFiBand = 4; + INT8S rssi = 5; } struct ThreadInterfaceScanResult { - INT64U panId = 1; - INT64U extendedPanId = 2; - CHAR_STRING networkName = 3; - INT16U channel = 4; - INT8U version = 5; - INT64U extendedAddress = 6; - INT8S rssi = 7; - INT8U lqi = 8; + INT64U panId = 0; + INT64U extendedPanId = 1; + CHAR_STRING networkName = 2; + INT16U channel = 3; + INT8U version = 4; + INT64U extendedAddress = 5; + INT8S rssi = 6; + INT8U lqi = 7; } readonly attribute int8u maxNetworks = 0; @@ -373,12 +373,12 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 1; - OCTET_STRING rootPublicKey = 2; - INT16U vendorId = 3; - FABRIC_ID fabricId = 4; - NODE_ID nodeId = 5; - CHAR_STRING label = 6; + INT8U fabricIndex = 0; + OCTET_STRING rootPublicKey = 1; + INT16U vendorId = 2; + FABRIC_ID fabricId = 3; + NODE_ID nodeId = 4; + CHAR_STRING label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 67d215fd083f47..caf234bea8612d 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -122,8 +122,8 @@ server cluster ColorControl = 768 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 1; - INT16U revision = 2; + DEVTYPE_ID type = 0; + INT16U revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -148,7 +148,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfoType { - INT32U failSafeExpiryLengthMs = 1; + INT32U failSafeExpiryLengthMs = 0; } attribute int64u breadcrumb = 0; @@ -375,28 +375,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING networkID = 1; - BOOLEAN connected = 2; + OCTET_STRING networkID = 0; + BOOLEAN connected = 1; } struct WiFiInterfaceScanResult { - BITMAP8 security = 1; - OCTET_STRING ssid = 2; - OCTET_STRING bssid = 3; - INT16U channel = 4; - WiFiBand wiFiBand = 5; - INT8S rssi = 6; + BITMAP8 security = 0; + OCTET_STRING ssid = 1; + OCTET_STRING bssid = 2; + INT16U channel = 3; + WiFiBand wiFiBand = 4; + INT8S rssi = 5; } struct ThreadInterfaceScanResult { - INT64U panId = 1; - INT64U extendedPanId = 2; - CHAR_STRING networkName = 3; - INT16U channel = 4; - INT8U version = 5; - INT64U extendedAddress = 6; - INT8S rssi = 7; - INT8U lqi = 8; + INT64U panId = 0; + INT64U extendedPanId = 1; + CHAR_STRING networkName = 2; + INT16U channel = 3; + INT8U version = 4; + INT64U extendedAddress = 5; + INT8S rssi = 6; + INT8U lqi = 7; } readonly attribute int8u maxNetworks = 0; @@ -507,12 +507,12 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 1; - OCTET_STRING rootPublicKey = 2; - INT16U vendorId = 3; - FABRIC_ID fabricId = 4; - NODE_ID nodeId = 5; - CHAR_STRING label = 6; + INT8U fabricIndex = 0; + OCTET_STRING rootPublicKey = 1; + INT16U vendorId = 2; + FABRIC_ID fabricId = 3; + NODE_ID nodeId = 4; + CHAR_STRING label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; @@ -596,9 +596,9 @@ server cluster OperationalCredentials = 62 { server cluster Scenes = 5 { struct SceneExtensionFieldSet { - CLUSTER_ID clusterId = 1; - INT8U length = 2; - INT8U value = 3; + CLUSTER_ID clusterId = 0; + INT8U length = 1; + INT8U value = 2; } readonly attribute int8u sceneCount = 0; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 67d215fd083f47..caf234bea8612d 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -122,8 +122,8 @@ server cluster ColorControl = 768 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 1; - INT16U revision = 2; + DEVTYPE_ID type = 0; + INT16U revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -148,7 +148,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfoType { - INT32U failSafeExpiryLengthMs = 1; + INT32U failSafeExpiryLengthMs = 0; } attribute int64u breadcrumb = 0; @@ -375,28 +375,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING networkID = 1; - BOOLEAN connected = 2; + OCTET_STRING networkID = 0; + BOOLEAN connected = 1; } struct WiFiInterfaceScanResult { - BITMAP8 security = 1; - OCTET_STRING ssid = 2; - OCTET_STRING bssid = 3; - INT16U channel = 4; - WiFiBand wiFiBand = 5; - INT8S rssi = 6; + BITMAP8 security = 0; + OCTET_STRING ssid = 1; + OCTET_STRING bssid = 2; + INT16U channel = 3; + WiFiBand wiFiBand = 4; + INT8S rssi = 5; } struct ThreadInterfaceScanResult { - INT64U panId = 1; - INT64U extendedPanId = 2; - CHAR_STRING networkName = 3; - INT16U channel = 4; - INT8U version = 5; - INT64U extendedAddress = 6; - INT8S rssi = 7; - INT8U lqi = 8; + INT64U panId = 0; + INT64U extendedPanId = 1; + CHAR_STRING networkName = 2; + INT16U channel = 3; + INT8U version = 4; + INT64U extendedAddress = 5; + INT8S rssi = 6; + INT8U lqi = 7; } readonly attribute int8u maxNetworks = 0; @@ -507,12 +507,12 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 1; - OCTET_STRING rootPublicKey = 2; - INT16U vendorId = 3; - FABRIC_ID fabricId = 4; - NODE_ID nodeId = 5; - CHAR_STRING label = 6; + INT8U fabricIndex = 0; + OCTET_STRING rootPublicKey = 1; + INT16U vendorId = 2; + FABRIC_ID fabricId = 3; + NODE_ID nodeId = 4; + CHAR_STRING label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; @@ -596,9 +596,9 @@ server cluster OperationalCredentials = 62 { server cluster Scenes = 5 { struct SceneExtensionFieldSet { - CLUSTER_ID clusterId = 1; - INT8U length = 2; - INT8U value = 3; + CLUSTER_ID clusterId = 0; + INT8U length = 1; + INT8U value = 2; } readonly attribute int8u sceneCount = 0; diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 12c14847adfbaa..db69dedc026746 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 1; - CHAR_STRING value = 2; + CHAR_STRING label = 0; + CHAR_STRING value = 1; } server cluster AdministratorCommissioning = 60 { @@ -75,8 +75,8 @@ server cluster Basic = 40 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 1; - INT16U revision = 2; + DEVTYPE_ID type = 0; + INT16U revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -150,7 +150,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfoType { - INT32U failSafeExpiryLengthMs = 1; + INT32U failSafeExpiryLengthMs = 0; } attribute int64u breadcrumb = 0; @@ -244,12 +244,12 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 1; - BOOLEAN fabricConnected = 2; - BOOLEAN offPremiseServicesReachableIPv4 = 3; - BOOLEAN offPremiseServicesReachableIPv6 = 4; - OCTET_STRING hardwareAddress = 5; - InterfaceType type = 6; + CHAR_STRING name = 0; + BOOLEAN fabricConnected = 1; + BOOLEAN offPremiseServicesReachableIPv4 = 2; + BOOLEAN offPremiseServicesReachableIPv6 = 3; + OCTET_STRING hardwareAddress = 4; + InterfaceType type = 5; } critical event HardwareFaultChange = 0 { @@ -380,28 +380,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING networkID = 1; - BOOLEAN connected = 2; + OCTET_STRING networkID = 0; + BOOLEAN connected = 1; } struct WiFiInterfaceScanResult { - BITMAP8 security = 1; - OCTET_STRING ssid = 2; - OCTET_STRING bssid = 3; - INT16U channel = 4; - WiFiBand wiFiBand = 5; - INT8S rssi = 6; + BITMAP8 security = 0; + OCTET_STRING ssid = 1; + OCTET_STRING bssid = 2; + INT16U channel = 3; + WiFiBand wiFiBand = 4; + INT8S rssi = 5; } struct ThreadInterfaceScanResult { - INT64U panId = 1; - INT64U extendedPanId = 2; - CHAR_STRING networkName = 3; - INT16U channel = 4; - INT8U version = 5; - INT64U extendedAddress = 6; - INT8S rssi = 7; - INT8U lqi = 8; + INT64U panId = 0; + INT64U extendedPanId = 1; + CHAR_STRING networkName = 2; + INT16U channel = 3; + INT8U version = 4; + INT64U extendedAddress = 5; + INT8S rssi = 6; + INT8U lqi = 7; } readonly attribute int8u maxNetworks = 0; @@ -512,12 +512,12 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 1; - OCTET_STRING rootPublicKey = 2; - INT16U vendorId = 3; - FABRIC_ID fabricId = 4; - NODE_ID nodeId = 5; - CHAR_STRING label = 6; + INT8U fabricIndex = 0; + OCTET_STRING rootPublicKey = 1; + INT16U vendorId = 2; + FABRIC_ID fabricId = 3; + NODE_ID nodeId = 4; + CHAR_STRING label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; @@ -711,11 +711,11 @@ server cluster PumpConfigurationAndControl = 512 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 1; - CHAR_STRING name = 2; - INT32U stackFreeCurrent = 3; - INT32U stackFreeMinimum = 4; - INT32U stackSize = 5; + INT64U id = 0; + CHAR_STRING name = 1; + INT32U stackFreeCurrent = 2; + INT32U stackFreeMinimum = 3; + INT32U stackSize = 4; } info event SoftwareFault = 0 { @@ -768,53 +768,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 1; - INT32U age = 2; - INT16U rloc16 = 3; - INT32U linkFrameCounter = 4; - INT32U mleFrameCounter = 5; - INT8U lqi = 6; - INT8S averageRssi = 7; - INT8S lastRssi = 8; - INT8U frameErrorRate = 9; - INT8U messageErrorRate = 10; - BOOLEAN rxOnWhenIdle = 11; - BOOLEAN fullThreadDevice = 12; - BOOLEAN fullNetworkData = 13; - BOOLEAN isChild = 14; + INT64U extAddress = 0; + INT32U age = 1; + INT16U rloc16 = 2; + INT32U linkFrameCounter = 3; + INT32U mleFrameCounter = 4; + INT8U lqi = 5; + INT8S averageRssi = 6; + INT8S lastRssi = 7; + INT8U frameErrorRate = 8; + INT8U messageErrorRate = 9; + BOOLEAN rxOnWhenIdle = 10; + BOOLEAN fullThreadDevice = 11; + BOOLEAN fullNetworkData = 12; + BOOLEAN isChild = 13; } struct RouteTable { - INT64U extAddress = 1; - INT16U rloc16 = 2; - INT8U routerId = 3; - INT8U nextHop = 4; - INT8U pathCost = 5; - INT8U LQIIn = 6; - INT8U LQIOut = 7; - INT8U age = 8; - BOOLEAN allocated = 9; - BOOLEAN linkEstablished = 10; + INT64U extAddress = 0; + INT16U rloc16 = 1; + INT8U routerId = 2; + INT8U nextHop = 3; + INT8U pathCost = 4; + INT8U LQIIn = 5; + INT8U LQIOut = 6; + INT8U age = 7; + BOOLEAN allocated = 8; + BOOLEAN linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 1; - BITMAP16 flags = 2; + INT16U rotationTime = 0; + BITMAP16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 1; - BOOLEAN pendingTimestampPresent = 2; - BOOLEAN masterKeyPresent = 3; - BOOLEAN networkNamePresent = 4; - BOOLEAN extendedPanIdPresent = 5; - BOOLEAN meshLocalPrefixPresent = 6; - BOOLEAN delayPresent = 7; - BOOLEAN panIdPresent = 8; - BOOLEAN channelPresent = 9; - BOOLEAN pskcPresent = 10; - BOOLEAN securityPolicyPresent = 11; - BOOLEAN channelMaskPresent = 12; + BOOLEAN activeTimestampPresent = 0; + BOOLEAN pendingTimestampPresent = 1; + BOOLEAN masterKeyPresent = 2; + BOOLEAN networkNamePresent = 3; + BOOLEAN extendedPanIdPresent = 4; + BOOLEAN meshLocalPrefixPresent = 5; + BOOLEAN delayPresent = 6; + BOOLEAN panIdPresent = 7; + BOOLEAN channelPresent = 8; + BOOLEAN pskcPresent = 9; + BOOLEAN securityPolicyPresent = 10; + BOOLEAN channelMaskPresent = 11; } info event ConnectionStatus = 0 { 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 929d2259528a35..acb4a4dc9fcb9b 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 @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 1; - CHAR_STRING value = 2; + CHAR_STRING label = 0; + CHAR_STRING value = 1; } server cluster AdministratorCommissioning = 60 { @@ -75,8 +75,8 @@ server cluster Basic = 40 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 1; - INT16U revision = 2; + DEVTYPE_ID type = 0; + INT16U revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -170,7 +170,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfoType { - INT32U failSafeExpiryLengthMs = 1; + INT32U failSafeExpiryLengthMs = 0; } attribute int64u breadcrumb = 0; @@ -264,12 +264,12 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 1; - BOOLEAN fabricConnected = 2; - BOOLEAN offPremiseServicesReachableIPv4 = 3; - BOOLEAN offPremiseServicesReachableIPv6 = 4; - OCTET_STRING hardwareAddress = 5; - InterfaceType type = 6; + CHAR_STRING name = 0; + BOOLEAN fabricConnected = 1; + BOOLEAN offPremiseServicesReachableIPv4 = 2; + BOOLEAN offPremiseServicesReachableIPv6 = 3; + OCTET_STRING hardwareAddress = 4; + InterfaceType type = 5; } critical event HardwareFaultChange = 0 { @@ -400,28 +400,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING networkID = 1; - BOOLEAN connected = 2; + OCTET_STRING networkID = 0; + BOOLEAN connected = 1; } struct WiFiInterfaceScanResult { - BITMAP8 security = 1; - OCTET_STRING ssid = 2; - OCTET_STRING bssid = 3; - INT16U channel = 4; - WiFiBand wiFiBand = 5; - INT8S rssi = 6; + BITMAP8 security = 0; + OCTET_STRING ssid = 1; + OCTET_STRING bssid = 2; + INT16U channel = 3; + WiFiBand wiFiBand = 4; + INT8S rssi = 5; } struct ThreadInterfaceScanResult { - INT64U panId = 1; - INT64U extendedPanId = 2; - CHAR_STRING networkName = 3; - INT16U channel = 4; - INT8U version = 5; - INT64U extendedAddress = 6; - INT8S rssi = 7; - INT8U lqi = 8; + INT64U panId = 0; + INT64U extendedPanId = 1; + CHAR_STRING networkName = 2; + INT16U channel = 3; + INT8U version = 4; + INT64U extendedAddress = 5; + INT8S rssi = 6; + INT8U lqi = 7; } readonly attribute int8u maxNetworks = 0; @@ -532,12 +532,12 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 1; - OCTET_STRING rootPublicKey = 2; - INT16U vendorId = 3; - FABRIC_ID fabricId = 4; - NODE_ID nodeId = 5; - CHAR_STRING label = 6; + INT8U fabricIndex = 0; + OCTET_STRING rootPublicKey = 1; + INT16U vendorId = 2; + FABRIC_ID fabricId = 3; + NODE_ID nodeId = 4; + CHAR_STRING label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; @@ -706,11 +706,11 @@ client cluster PumpConfigurationAndControl = 512 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 1; - CHAR_STRING name = 2; - INT32U stackFreeCurrent = 3; - INT32U stackFreeMinimum = 4; - INT32U stackSize = 5; + INT64U id = 0; + CHAR_STRING name = 1; + INT32U stackFreeCurrent = 2; + INT32U stackFreeMinimum = 3; + INT32U stackSize = 4; } info event SoftwareFault = 0 { @@ -756,53 +756,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 1; - INT32U age = 2; - INT16U rloc16 = 3; - INT32U linkFrameCounter = 4; - INT32U mleFrameCounter = 5; - INT8U lqi = 6; - INT8S averageRssi = 7; - INT8S lastRssi = 8; - INT8U frameErrorRate = 9; - INT8U messageErrorRate = 10; - BOOLEAN rxOnWhenIdle = 11; - BOOLEAN fullThreadDevice = 12; - BOOLEAN fullNetworkData = 13; - BOOLEAN isChild = 14; + INT64U extAddress = 0; + INT32U age = 1; + INT16U rloc16 = 2; + INT32U linkFrameCounter = 3; + INT32U mleFrameCounter = 4; + INT8U lqi = 5; + INT8S averageRssi = 6; + INT8S lastRssi = 7; + INT8U frameErrorRate = 8; + INT8U messageErrorRate = 9; + BOOLEAN rxOnWhenIdle = 10; + BOOLEAN fullThreadDevice = 11; + BOOLEAN fullNetworkData = 12; + BOOLEAN isChild = 13; } struct RouteTable { - INT64U extAddress = 1; - INT16U rloc16 = 2; - INT8U routerId = 3; - INT8U nextHop = 4; - INT8U pathCost = 5; - INT8U LQIIn = 6; - INT8U LQIOut = 7; - INT8U age = 8; - BOOLEAN allocated = 9; - BOOLEAN linkEstablished = 10; + INT64U extAddress = 0; + INT16U rloc16 = 1; + INT8U routerId = 2; + INT8U nextHop = 3; + INT8U pathCost = 4; + INT8U LQIIn = 5; + INT8U LQIOut = 6; + INT8U age = 7; + BOOLEAN allocated = 8; + BOOLEAN linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 1; - BITMAP16 flags = 2; + INT16U rotationTime = 0; + BITMAP16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 1; - BOOLEAN pendingTimestampPresent = 2; - BOOLEAN masterKeyPresent = 3; - BOOLEAN networkNamePresent = 4; - BOOLEAN extendedPanIdPresent = 5; - BOOLEAN meshLocalPrefixPresent = 6; - BOOLEAN delayPresent = 7; - BOOLEAN panIdPresent = 8; - BOOLEAN channelPresent = 9; - BOOLEAN pskcPresent = 10; - BOOLEAN securityPolicyPresent = 11; - BOOLEAN channelMaskPresent = 12; + BOOLEAN activeTimestampPresent = 0; + BOOLEAN pendingTimestampPresent = 1; + BOOLEAN masterKeyPresent = 2; + BOOLEAN networkNamePresent = 3; + BOOLEAN extendedPanIdPresent = 4; + BOOLEAN meshLocalPrefixPresent = 5; + BOOLEAN delayPresent = 6; + BOOLEAN panIdPresent = 7; + BOOLEAN channelPresent = 8; + BOOLEAN pskcPresent = 9; + BOOLEAN securityPolicyPresent = 10; + BOOLEAN channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index 689ac8d7e180c1..7b7b62695f6224 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 1; - CHAR_STRING value = 2; + CHAR_STRING label = 0; + CHAR_STRING value = 1; } server cluster AdministratorCommissioning = 60 { @@ -73,8 +73,8 @@ server cluster Basic = 40 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 1; - INT16U revision = 2; + DEVTYPE_ID type = 0; + INT16U revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -161,7 +161,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfoType { - INT32U failSafeExpiryLengthMs = 1; + INT32U failSafeExpiryLengthMs = 0; } attribute int64u breadcrumb = 0; @@ -255,12 +255,12 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 1; - BOOLEAN fabricConnected = 2; - BOOLEAN offPremiseServicesReachableIPv4 = 3; - BOOLEAN offPremiseServicesReachableIPv6 = 4; - OCTET_STRING hardwareAddress = 5; - InterfaceType type = 6; + CHAR_STRING name = 0; + BOOLEAN fabricConnected = 1; + BOOLEAN offPremiseServicesReachableIPv4 = 2; + BOOLEAN offPremiseServicesReachableIPv6 = 3; + OCTET_STRING hardwareAddress = 4; + InterfaceType type = 5; } critical event HardwareFaultChange = 0 { @@ -324,28 +324,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING networkID = 1; - BOOLEAN connected = 2; + OCTET_STRING networkID = 0; + BOOLEAN connected = 1; } struct WiFiInterfaceScanResult { - BITMAP8 security = 1; - OCTET_STRING ssid = 2; - OCTET_STRING bssid = 3; - INT16U channel = 4; - WiFiBand wiFiBand = 5; - INT8S rssi = 6; + BITMAP8 security = 0; + OCTET_STRING ssid = 1; + OCTET_STRING bssid = 2; + INT16U channel = 3; + WiFiBand wiFiBand = 4; + INT8S rssi = 5; } struct ThreadInterfaceScanResult { - INT64U panId = 1; - INT64U extendedPanId = 2; - CHAR_STRING networkName = 3; - INT16U channel = 4; - INT8U version = 5; - INT64U extendedAddress = 6; - INT8S rssi = 7; - INT8U lqi = 8; + INT64U panId = 0; + INT64U extendedPanId = 1; + CHAR_STRING networkName = 2; + INT16U channel = 3; + INT8U version = 4; + INT64U extendedAddress = 5; + INT8S rssi = 6; + INT8U lqi = 7; } readonly attribute int8u maxNetworks = 0; @@ -426,12 +426,12 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 1; - OCTET_STRING rootPublicKey = 2; - INT16U vendorId = 3; - FABRIC_ID fabricId = 4; - NODE_ID nodeId = 5; - CHAR_STRING label = 6; + INT8U fabricIndex = 0; + OCTET_STRING rootPublicKey = 1; + INT16U vendorId = 2; + FABRIC_ID fabricId = 3; + NODE_ID nodeId = 4; + CHAR_STRING label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index dbb441e1f04efb..751c3ff075cb4e 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 1; - CHAR_STRING value = 2; + CHAR_STRING label = 0; + CHAR_STRING value = 1; } server cluster AdministratorCommissioning = 60 { @@ -104,8 +104,8 @@ server cluster Binding = 30 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 1; - INT16U revision = 2; + DEVTYPE_ID type = 0; + INT16U revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -192,7 +192,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfoType { - INT32U failSafeExpiryLengthMs = 1; + INT32U failSafeExpiryLengthMs = 0; } attribute int64u breadcrumb = 0; @@ -286,12 +286,12 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 1; - BOOLEAN fabricConnected = 2; - BOOLEAN offPremiseServicesReachableIPv4 = 3; - BOOLEAN offPremiseServicesReachableIPv6 = 4; - OCTET_STRING hardwareAddress = 5; - InterfaceType type = 6; + CHAR_STRING name = 0; + BOOLEAN fabricConnected = 1; + BOOLEAN offPremiseServicesReachableIPv4 = 2; + BOOLEAN offPremiseServicesReachableIPv6 = 3; + OCTET_STRING hardwareAddress = 4; + InterfaceType type = 5; } critical event HardwareFaultChange = 0 { @@ -512,28 +512,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING networkID = 1; - BOOLEAN connected = 2; + OCTET_STRING networkID = 0; + BOOLEAN connected = 1; } struct WiFiInterfaceScanResult { - BITMAP8 security = 1; - OCTET_STRING ssid = 2; - OCTET_STRING bssid = 3; - INT16U channel = 4; - WiFiBand wiFiBand = 5; - INT8S rssi = 6; + BITMAP8 security = 0; + OCTET_STRING ssid = 1; + OCTET_STRING bssid = 2; + INT16U channel = 3; + WiFiBand wiFiBand = 4; + INT8S rssi = 5; } struct ThreadInterfaceScanResult { - INT64U panId = 1; - INT64U extendedPanId = 2; - CHAR_STRING networkName = 3; - INT16U channel = 4; - INT8U version = 5; - INT64U extendedAddress = 6; - INT8S rssi = 7; - INT8U lqi = 8; + INT64U panId = 0; + INT64U extendedPanId = 1; + CHAR_STRING networkName = 2; + INT16U channel = 3; + INT8U version = 4; + INT64U extendedAddress = 5; + INT8S rssi = 6; + INT8U lqi = 7; } readonly attribute int8u maxNetworks = 0; @@ -685,12 +685,12 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 1; - OCTET_STRING rootPublicKey = 2; - INT16U vendorId = 3; - FABRIC_ID fabricId = 4; - NODE_ID nodeId = 5; - CHAR_STRING label = 6; + INT8U fabricIndex = 0; + OCTET_STRING rootPublicKey = 1; + INT16U vendorId = 2; + FABRIC_ID fabricId = 3; + NODE_ID nodeId = 4; + CHAR_STRING label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; @@ -774,9 +774,9 @@ server cluster OperationalCredentials = 62 { server cluster Scenes = 5 { struct SceneExtensionFieldSet { - CLUSTER_ID clusterId = 1; - INT8U length = 2; - INT8U value = 3; + CLUSTER_ID clusterId = 0; + INT8U length = 1; + INT8U value = 2; } readonly attribute int8u sceneCount = 0; @@ -874,11 +874,11 @@ server cluster Scenes = 5 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 1; - CHAR_STRING name = 2; - INT32U stackFreeCurrent = 3; - INT32U stackFreeMinimum = 4; - INT32U stackSize = 5; + INT64U id = 0; + CHAR_STRING name = 1; + INT32U stackFreeCurrent = 2; + INT32U stackFreeMinimum = 3; + INT32U stackSize = 4; } info event SoftwareFault = 0 { @@ -984,53 +984,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 1; - INT32U age = 2; - INT16U rloc16 = 3; - INT32U linkFrameCounter = 4; - INT32U mleFrameCounter = 5; - INT8U lqi = 6; - INT8S averageRssi = 7; - INT8S lastRssi = 8; - INT8U frameErrorRate = 9; - INT8U messageErrorRate = 10; - BOOLEAN rxOnWhenIdle = 11; - BOOLEAN fullThreadDevice = 12; - BOOLEAN fullNetworkData = 13; - BOOLEAN isChild = 14; + INT64U extAddress = 0; + INT32U age = 1; + INT16U rloc16 = 2; + INT32U linkFrameCounter = 3; + INT32U mleFrameCounter = 4; + INT8U lqi = 5; + INT8S averageRssi = 6; + INT8S lastRssi = 7; + INT8U frameErrorRate = 8; + INT8U messageErrorRate = 9; + BOOLEAN rxOnWhenIdle = 10; + BOOLEAN fullThreadDevice = 11; + BOOLEAN fullNetworkData = 12; + BOOLEAN isChild = 13; } struct RouteTable { - INT64U extAddress = 1; - INT16U rloc16 = 2; - INT8U routerId = 3; - INT8U nextHop = 4; - INT8U pathCost = 5; - INT8U LQIIn = 6; - INT8U LQIOut = 7; - INT8U age = 8; - BOOLEAN allocated = 9; - BOOLEAN linkEstablished = 10; + INT64U extAddress = 0; + INT16U rloc16 = 1; + INT8U routerId = 2; + INT8U nextHop = 3; + INT8U pathCost = 4; + INT8U LQIIn = 5; + INT8U LQIOut = 6; + INT8U age = 7; + BOOLEAN allocated = 8; + BOOLEAN linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 1; - BITMAP16 flags = 2; + INT16U rotationTime = 0; + BITMAP16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 1; - BOOLEAN pendingTimestampPresent = 2; - BOOLEAN masterKeyPresent = 3; - BOOLEAN networkNamePresent = 4; - BOOLEAN extendedPanIdPresent = 5; - BOOLEAN meshLocalPrefixPresent = 6; - BOOLEAN delayPresent = 7; - BOOLEAN panIdPresent = 8; - BOOLEAN channelPresent = 9; - BOOLEAN pskcPresent = 10; - BOOLEAN securityPolicyPresent = 11; - BOOLEAN channelMaskPresent = 12; + BOOLEAN activeTimestampPresent = 0; + BOOLEAN pendingTimestampPresent = 1; + BOOLEAN masterKeyPresent = 2; + BOOLEAN networkNamePresent = 3; + BOOLEAN extendedPanIdPresent = 4; + BOOLEAN meshLocalPrefixPresent = 5; + BOOLEAN delayPresent = 6; + BOOLEAN panIdPresent = 7; + BOOLEAN channelPresent = 8; + BOOLEAN pskcPresent = 9; + BOOLEAN securityPolicyPresent = 10; + BOOLEAN channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index b85ad7df624620..d11460df97aead 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 1; - CHAR_STRING value = 2; + CHAR_STRING label = 0; + CHAR_STRING value = 1; } server cluster AccountLogin = 1294 { @@ -72,8 +72,8 @@ server cluster ApplicationBasic = 1293 { } struct ApplicationBasicApplication { - INT16U catalogVendorId = 1; - CHAR_STRING applicationId = 2; + INT16U catalogVendorId = 0; + CHAR_STRING applicationId = 1; } readonly attribute char_string vendorName = 0; @@ -95,13 +95,13 @@ server cluster ApplicationLauncher = 1292 { } struct ApplicationEP { - ApplicationLauncherApplication application = 1; - CHAR_STRING endpoint = 2; + ApplicationLauncherApplication application = 0; + CHAR_STRING endpoint = 1; } struct ApplicationLauncherApplication { - INT16U catalogVendorId = 1; - CHAR_STRING applicationId = 2; + INT16U catalogVendorId = 0; + CHAR_STRING applicationId = 1; } readonly attribute INT16U applicationLauncherList[] = 0; @@ -142,9 +142,9 @@ server cluster AudioOutput = 1291 { } struct OutputInfo { - INT8U index = 1; - OutputTypeEnum outputType = 2; - CHAR_STRING name = 3; + INT8U index = 0; + OutputTypeEnum outputType = 1; + CHAR_STRING name = 2; } readonly attribute OutputInfo audioOutputList[] = 0; @@ -255,18 +255,18 @@ server cluster Channel = 1284 { } struct ChannelInfo { - INT16U majorNumber = 1; - INT16U minorNumber = 2; - CHAR_STRING name = 3; - CHAR_STRING callSign = 4; - CHAR_STRING affiliateCallSign = 5; + INT16U majorNumber = 0; + INT16U minorNumber = 1; + CHAR_STRING name = 2; + CHAR_STRING callSign = 3; + CHAR_STRING affiliateCallSign = 4; } struct LineupInfo { - CHAR_STRING operatorName = 1; - CHAR_STRING lineupName = 2; - CHAR_STRING postalCode = 3; - LineupInfoTypeEnum lineupInfoType = 4; + CHAR_STRING operatorName = 0; + CHAR_STRING lineupName = 1; + CHAR_STRING postalCode = 2; + LineupInfoTypeEnum lineupInfoType = 3; } readonly attribute ChannelInfo channelList[] = 0; @@ -326,39 +326,39 @@ server cluster ContentLauncher = 1290 { } struct ContentSearch { - Parameter parameterList[] = 1; + Parameter parameterList[] = 0; } struct Parameter { - ParameterEnum type = 1; - CHAR_STRING value = 2; - AdditionalInfo externalIDList[] = 3; + ParameterEnum type = 0; + CHAR_STRING value = 1; + AdditionalInfo externalIDList[] = 2; } struct AdditionalInfo { - CHAR_STRING name = 1; - CHAR_STRING value = 2; + CHAR_STRING name = 0; + CHAR_STRING value = 1; } struct BrandingInformation { - CHAR_STRING providerName = 1; - StyleInformation background = 2; - StyleInformation logo = 3; - StyleInformation progressBar = 4; - StyleInformation splash = 5; - StyleInformation waterMark = 6; + CHAR_STRING providerName = 0; + StyleInformation background = 1; + StyleInformation logo = 2; + StyleInformation progressBar = 3; + StyleInformation splash = 4; + StyleInformation waterMark = 5; } struct StyleInformation { - CHAR_STRING imageUrl = 1; - CHAR_STRING color = 2; - Dimension size = 3; + CHAR_STRING imageUrl = 0; + CHAR_STRING color = 1; + Dimension size = 2; } struct Dimension { - double width = 1; - double height = 2; - MetricTypeEnum metric = 3; + double width = 0; + double height = 1; + MetricTypeEnum metric = 2; } readonly attribute CHAR_STRING acceptHeaderList[] = 0; @@ -388,8 +388,8 @@ server cluster ContentLauncher = 1290 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 1; - INT16U revision = 2; + DEVTYPE_ID type = 0; + INT16U revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -476,7 +476,7 @@ client cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfoType { - INT32U failSafeExpiryLengthMs = 1; + INT32U failSafeExpiryLengthMs = 0; } attribute int64u breadcrumb = 0; @@ -534,7 +534,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfoType { - INT32U failSafeExpiryLengthMs = 1; + INT32U failSafeExpiryLengthMs = 0; } attribute int64u breadcrumb = 0; @@ -628,12 +628,12 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 1; - BOOLEAN fabricConnected = 2; - BOOLEAN offPremiseServicesReachableIPv4 = 3; - BOOLEAN offPremiseServicesReachableIPv6 = 4; - OCTET_STRING hardwareAddress = 5; - InterfaceType type = 6; + CHAR_STRING name = 0; + BOOLEAN fabricConnected = 1; + BOOLEAN offPremiseServicesReachableIPv4 = 2; + BOOLEAN offPremiseServicesReachableIPv6 = 3; + OCTET_STRING hardwareAddress = 4; + InterfaceType type = 5; } critical event HardwareFaultChange = 0 { @@ -904,10 +904,10 @@ server cluster MediaInput = 1287 { } struct InputInfo { - INT8U index = 1; - InputTypeEnum inputType = 2; - CHAR_STRING name = 3; - CHAR_STRING description = 4; + INT8U index = 0; + InputTypeEnum inputType = 1; + CHAR_STRING name = 2; + CHAR_STRING description = 3; } readonly attribute InputInfo mediaInputList[] = 0; @@ -947,8 +947,8 @@ server cluster MediaPlayback = 1286 { } struct PlaybackPosition { - INT64U updatedAt = 1; - INT64U position = 2; + INT64U updatedAt = 0; + INT64U position = 1; } readonly attribute PlaybackStateEnum playbackState = 0; @@ -1015,28 +1015,28 @@ client cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING networkID = 1; - BOOLEAN connected = 2; + OCTET_STRING networkID = 0; + BOOLEAN connected = 1; } struct WiFiInterfaceScanResult { - BITMAP8 security = 1; - OCTET_STRING ssid = 2; - OCTET_STRING bssid = 3; - INT16U channel = 4; - WiFiBand wiFiBand = 5; - INT8S rssi = 6; + BITMAP8 security = 0; + OCTET_STRING ssid = 1; + OCTET_STRING bssid = 2; + INT16U channel = 3; + WiFiBand wiFiBand = 4; + INT8S rssi = 5; } struct ThreadInterfaceScanResult { - INT64U panId = 1; - INT64U extendedPanId = 2; - CHAR_STRING networkName = 3; - INT16U channel = 4; - INT8U version = 5; - INT64U extendedAddress = 6; - INT8S rssi = 7; - INT8U lqi = 8; + INT64U panId = 0; + INT64U extendedPanId = 1; + CHAR_STRING networkName = 2; + INT16U channel = 3; + INT8U version = 4; + INT64U extendedAddress = 5; + INT8S rssi = 6; + INT8U lqi = 7; } readonly attribute int8u maxNetworks = 0; @@ -1134,28 +1134,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING networkID = 1; - BOOLEAN connected = 2; + OCTET_STRING networkID = 0; + BOOLEAN connected = 1; } struct WiFiInterfaceScanResult { - BITMAP8 security = 1; - OCTET_STRING ssid = 2; - OCTET_STRING bssid = 3; - INT16U channel = 4; - WiFiBand wiFiBand = 5; - INT8S rssi = 6; + BITMAP8 security = 0; + OCTET_STRING ssid = 1; + OCTET_STRING bssid = 2; + INT16U channel = 3; + WiFiBand wiFiBand = 4; + INT8S rssi = 5; } struct ThreadInterfaceScanResult { - INT64U panId = 1; - INT64U extendedPanId = 2; - CHAR_STRING networkName = 3; - INT16U channel = 4; - INT8U version = 5; - INT64U extendedAddress = 6; - INT8S rssi = 7; - INT8U lqi = 8; + INT64U panId = 0; + INT64U extendedPanId = 1; + CHAR_STRING networkName = 2; + INT16U channel = 3; + INT8U version = 4; + INT64U extendedAddress = 5; + INT8S rssi = 6; + INT8U lqi = 7; } readonly attribute int8u maxNetworks = 0; @@ -1331,12 +1331,12 @@ client cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 1; - OCTET_STRING rootPublicKey = 2; - INT16U vendorId = 3; - FABRIC_ID fabricId = 4; - NODE_ID nodeId = 5; - CHAR_STRING label = 6; + INT8U fabricIndex = 0; + OCTET_STRING rootPublicKey = 1; + INT16U vendorId = 2; + FABRIC_ID fabricId = 3; + NODE_ID nodeId = 4; + CHAR_STRING label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; @@ -1422,12 +1422,12 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 1; - OCTET_STRING rootPublicKey = 2; - INT16U vendorId = 3; - FABRIC_ID fabricId = 4; - NODE_ID nodeId = 5; - CHAR_STRING label = 6; + INT8U fabricIndex = 0; + OCTET_STRING rootPublicKey = 1; + INT16U vendorId = 2; + FABRIC_ID fabricId = 3; + NODE_ID nodeId = 4; + CHAR_STRING label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; @@ -1518,11 +1518,11 @@ server cluster RelativeHumidityMeasurement = 1029 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 1; - CHAR_STRING name = 2; - INT32U stackFreeCurrent = 3; - INT32U stackFreeMinimum = 4; - INT32U stackSize = 5; + INT64U id = 0; + CHAR_STRING name = 1; + INT32U stackFreeCurrent = 2; + INT32U stackFreeMinimum = 3; + INT32U stackSize = 4; } info event SoftwareFault = 0 { @@ -1545,8 +1545,8 @@ server cluster TargetNavigator = 1285 { } struct TargetInfo { - INT8U identifier = 1; - CHAR_STRING name = 2; + INT8U identifier = 0; + CHAR_STRING name = 1; } readonly attribute TargetInfo targetNavigatorList[] = 0; @@ -1590,53 +1590,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 1; - INT32U age = 2; - INT16U rloc16 = 3; - INT32U linkFrameCounter = 4; - INT32U mleFrameCounter = 5; - INT8U lqi = 6; - INT8S averageRssi = 7; - INT8S lastRssi = 8; - INT8U frameErrorRate = 9; - INT8U messageErrorRate = 10; - BOOLEAN rxOnWhenIdle = 11; - BOOLEAN fullThreadDevice = 12; - BOOLEAN fullNetworkData = 13; - BOOLEAN isChild = 14; + INT64U extAddress = 0; + INT32U age = 1; + INT16U rloc16 = 2; + INT32U linkFrameCounter = 3; + INT32U mleFrameCounter = 4; + INT8U lqi = 5; + INT8S averageRssi = 6; + INT8S lastRssi = 7; + INT8U frameErrorRate = 8; + INT8U messageErrorRate = 9; + BOOLEAN rxOnWhenIdle = 10; + BOOLEAN fullThreadDevice = 11; + BOOLEAN fullNetworkData = 12; + BOOLEAN isChild = 13; } struct RouteTable { - INT64U extAddress = 1; - INT16U rloc16 = 2; - INT8U routerId = 3; - INT8U nextHop = 4; - INT8U pathCost = 5; - INT8U LQIIn = 6; - INT8U LQIOut = 7; - INT8U age = 8; - BOOLEAN allocated = 9; - BOOLEAN linkEstablished = 10; + INT64U extAddress = 0; + INT16U rloc16 = 1; + INT8U routerId = 2; + INT8U nextHop = 3; + INT8U pathCost = 4; + INT8U LQIIn = 5; + INT8U LQIOut = 6; + INT8U age = 7; + BOOLEAN allocated = 8; + BOOLEAN linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 1; - BITMAP16 flags = 2; + INT16U rotationTime = 0; + BITMAP16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 1; - BOOLEAN pendingTimestampPresent = 2; - BOOLEAN masterKeyPresent = 3; - BOOLEAN networkNamePresent = 4; - BOOLEAN extendedPanIdPresent = 5; - BOOLEAN meshLocalPrefixPresent = 6; - BOOLEAN delayPresent = 7; - BOOLEAN panIdPresent = 8; - BOOLEAN channelPresent = 9; - BOOLEAN pskcPresent = 10; - BOOLEAN securityPolicyPresent = 11; - BOOLEAN channelMaskPresent = 12; + BOOLEAN activeTimestampPresent = 0; + BOOLEAN pendingTimestampPresent = 1; + BOOLEAN masterKeyPresent = 2; + BOOLEAN networkNamePresent = 3; + BOOLEAN extendedPanIdPresent = 4; + BOOLEAN meshLocalPrefixPresent = 5; + BOOLEAN delayPresent = 6; + BOOLEAN panIdPresent = 7; + BOOLEAN channelPresent = 8; + BOOLEAN pskcPresent = 9; + BOOLEAN securityPolicyPresent = 10; + BOOLEAN channelMaskPresent = 11; } info event ConnectionStatus = 0 { 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 c45abe423067d5..0b1d04c09b2e31 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 @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 1; - CHAR_STRING value = 2; + CHAR_STRING label = 0; + CHAR_STRING value = 1; } client cluster AccountLogin = 1294 { @@ -84,8 +84,8 @@ client cluster ApplicationLauncher = 1292 { } struct ApplicationLauncherApplication { - INT16U catalogVendorId = 1; - CHAR_STRING applicationId = 2; + INT16U catalogVendorId = 0; + CHAR_STRING applicationId = 1; } readonly attribute INT16U applicationLauncherList[] = 0; @@ -120,9 +120,9 @@ client cluster AudioOutput = 1291 { } struct OutputInfo { - INT8U index = 1; - OutputTypeEnum outputType = 2; - CHAR_STRING name = 3; + INT8U index = 0; + OutputTypeEnum outputType = 1; + CHAR_STRING name = 2; } readonly attribute OutputInfo audioOutputList[] = 0; @@ -257,18 +257,18 @@ client cluster Channel = 1284 { } struct ChannelInfo { - INT16U majorNumber = 1; - INT16U minorNumber = 2; - CHAR_STRING name = 3; - CHAR_STRING callSign = 4; - CHAR_STRING affiliateCallSign = 5; + INT16U majorNumber = 0; + INT16U minorNumber = 1; + CHAR_STRING name = 2; + CHAR_STRING callSign = 3; + CHAR_STRING affiliateCallSign = 4; } struct LineupInfo { - CHAR_STRING operatorName = 1; - CHAR_STRING lineupName = 2; - CHAR_STRING postalCode = 3; - LineupInfoTypeEnum lineupInfoType = 4; + CHAR_STRING operatorName = 0; + CHAR_STRING lineupName = 1; + CHAR_STRING postalCode = 2; + LineupInfoTypeEnum lineupInfoType = 3; } readonly attribute ChannelInfo channelList[] = 0; @@ -545,39 +545,39 @@ client cluster ContentLauncher = 1290 { } struct ContentSearch { - Parameter parameterList[] = 1; + Parameter parameterList[] = 0; } struct Parameter { - ParameterEnum type = 1; - CHAR_STRING value = 2; - AdditionalInfo externalIDList[] = 3; + ParameterEnum type = 0; + CHAR_STRING value = 1; + AdditionalInfo externalIDList[] = 2; } struct AdditionalInfo { - CHAR_STRING name = 1; - CHAR_STRING value = 2; + CHAR_STRING name = 0; + CHAR_STRING value = 1; } struct BrandingInformation { - CHAR_STRING providerName = 1; - StyleInformation background = 2; - StyleInformation logo = 3; - StyleInformation progressBar = 4; - StyleInformation splash = 5; - StyleInformation waterMark = 6; + CHAR_STRING providerName = 0; + StyleInformation background = 1; + StyleInformation logo = 2; + StyleInformation progressBar = 3; + StyleInformation splash = 4; + StyleInformation waterMark = 5; } struct StyleInformation { - CHAR_STRING imageUrl = 1; - CHAR_STRING color = 2; - Dimension size = 3; + CHAR_STRING imageUrl = 0; + CHAR_STRING color = 1; + Dimension size = 2; } struct Dimension { - double width = 1; - double height = 2; - MetricTypeEnum metric = 3; + double width = 0; + double height = 1; + MetricTypeEnum metric = 2; } readonly attribute CHAR_STRING acceptHeaderList[] = 0; @@ -602,8 +602,8 @@ client cluster ContentLauncher = 1290 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 1; - INT16U revision = 2; + DEVTYPE_ID type = 0; + INT16U revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -838,8 +838,8 @@ server cluster DoorLock = 257 { } struct DlCredential { - DlCredentialType credentialType = 1; - INT16U credentialIndex = 2; + DlCredentialType credentialType = 0; + INT16U credentialIndex = 1; } critical event DoorLockAlarm = 0 { @@ -1039,7 +1039,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfoType { - INT32U failSafeExpiryLengthMs = 1; + INT32U failSafeExpiryLengthMs = 0; } attribute int64u breadcrumb = 0; @@ -1133,12 +1133,12 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 1; - BOOLEAN fabricConnected = 2; - BOOLEAN offPremiseServicesReachableIPv4 = 3; - BOOLEAN offPremiseServicesReachableIPv6 = 4; - OCTET_STRING hardwareAddress = 5; - InterfaceType type = 6; + CHAR_STRING name = 0; + BOOLEAN fabricConnected = 1; + BOOLEAN offPremiseServicesReachableIPv4 = 2; + BOOLEAN offPremiseServicesReachableIPv6 = 3; + OCTET_STRING hardwareAddress = 4; + InterfaceType type = 5; } critical event HardwareFaultChange = 0 { @@ -1550,10 +1550,10 @@ client cluster MediaInput = 1287 { } struct InputInfo { - INT8U index = 1; - InputTypeEnum inputType = 2; - CHAR_STRING name = 3; - CHAR_STRING description = 4; + INT8U index = 0; + InputTypeEnum inputType = 1; + CHAR_STRING name = 2; + CHAR_STRING description = 3; } readonly attribute InputInfo mediaInputList[] = 0; @@ -1644,28 +1644,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING networkID = 1; - BOOLEAN connected = 2; + OCTET_STRING networkID = 0; + BOOLEAN connected = 1; } struct WiFiInterfaceScanResult { - BITMAP8 security = 1; - OCTET_STRING ssid = 2; - OCTET_STRING bssid = 3; - INT16U channel = 4; - WiFiBand wiFiBand = 5; - INT8S rssi = 6; + BITMAP8 security = 0; + OCTET_STRING ssid = 1; + OCTET_STRING bssid = 2; + INT16U channel = 3; + WiFiBand wiFiBand = 4; + INT8S rssi = 5; } struct ThreadInterfaceScanResult { - INT64U panId = 1; - INT64U extendedPanId = 2; - CHAR_STRING networkName = 3; - INT16U channel = 4; - INT8U version = 5; - INT64U extendedAddress = 6; - INT8S rssi = 7; - INT8U lqi = 8; + INT64U panId = 0; + INT64U extendedPanId = 1; + CHAR_STRING networkName = 2; + INT16U channel = 3; + INT8U version = 4; + INT64U extendedAddress = 5; + INT8S rssi = 6; + INT8U lqi = 7; } readonly attribute int8u maxNetworks = 0; @@ -1853,12 +1853,12 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 1; - OCTET_STRING rootPublicKey = 2; - INT16U vendorId = 3; - FABRIC_ID fabricId = 4; - NODE_ID nodeId = 5; - CHAR_STRING label = 6; + INT8U fabricIndex = 0; + OCTET_STRING rootPublicKey = 1; + INT16U vendorId = 2; + FABRIC_ID fabricId = 3; + NODE_ID nodeId = 4; + CHAR_STRING label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; @@ -1956,9 +1956,9 @@ server cluster RelativeHumidityMeasurement = 1029 { server cluster Scenes = 5 { struct SceneExtensionFieldSet { - CLUSTER_ID clusterId = 1; - INT8U length = 2; - INT8U value = 3; + CLUSTER_ID clusterId = 0; + INT8U length = 1; + INT8U value = 2; } readonly attribute int8u sceneCount = 0; @@ -2056,11 +2056,11 @@ server cluster Scenes = 5 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 1; - CHAR_STRING name = 2; - INT32U stackFreeCurrent = 3; - INT32U stackFreeMinimum = 4; - INT32U stackSize = 5; + INT64U id = 0; + CHAR_STRING name = 1; + INT32U stackFreeCurrent = 2; + INT32U stackFreeMinimum = 3; + INT32U stackSize = 4; } info event SoftwareFault = 0 { @@ -2119,8 +2119,8 @@ client cluster TargetNavigator = 1285 { } struct TargetInfo { - INT8U identifier = 1; - CHAR_STRING name = 2; + INT8U identifier = 0; + CHAR_STRING name = 1; } readonly attribute TargetInfo targetNavigatorList[] = 0; @@ -2150,8 +2150,8 @@ server cluster TestCluster = 1295 { } struct TestListStructOctet { - INT64U fabricIndex = 1; - OCTET_STRING operationalCert = 2; + INT64U fabricIndex = 0; + OCTET_STRING operationalCert = 1; } info event TestEvent = 1 { @@ -2244,53 +2244,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 1; - INT32U age = 2; - INT16U rloc16 = 3; - INT32U linkFrameCounter = 4; - INT32U mleFrameCounter = 5; - INT8U lqi = 6; - INT8S averageRssi = 7; - INT8S lastRssi = 8; - INT8U frameErrorRate = 9; - INT8U messageErrorRate = 10; - BOOLEAN rxOnWhenIdle = 11; - BOOLEAN fullThreadDevice = 12; - BOOLEAN fullNetworkData = 13; - BOOLEAN isChild = 14; + INT64U extAddress = 0; + INT32U age = 1; + INT16U rloc16 = 2; + INT32U linkFrameCounter = 3; + INT32U mleFrameCounter = 4; + INT8U lqi = 5; + INT8S averageRssi = 6; + INT8S lastRssi = 7; + INT8U frameErrorRate = 8; + INT8U messageErrorRate = 9; + BOOLEAN rxOnWhenIdle = 10; + BOOLEAN fullThreadDevice = 11; + BOOLEAN fullNetworkData = 12; + BOOLEAN isChild = 13; } struct RouteTable { - INT64U extAddress = 1; - INT16U rloc16 = 2; - INT8U routerId = 3; - INT8U nextHop = 4; - INT8U pathCost = 5; - INT8U LQIIn = 6; - INT8U LQIOut = 7; - INT8U age = 8; - BOOLEAN allocated = 9; - BOOLEAN linkEstablished = 10; + INT64U extAddress = 0; + INT16U rloc16 = 1; + INT8U routerId = 2; + INT8U nextHop = 3; + INT8U pathCost = 4; + INT8U LQIIn = 5; + INT8U LQIOut = 6; + INT8U age = 7; + BOOLEAN allocated = 8; + BOOLEAN linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 1; - BITMAP16 flags = 2; + INT16U rotationTime = 0; + BITMAP16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 1; - BOOLEAN pendingTimestampPresent = 2; - BOOLEAN masterKeyPresent = 3; - BOOLEAN networkNamePresent = 4; - BOOLEAN extendedPanIdPresent = 5; - BOOLEAN meshLocalPrefixPresent = 6; - BOOLEAN delayPresent = 7; - BOOLEAN panIdPresent = 8; - BOOLEAN channelPresent = 9; - BOOLEAN pskcPresent = 10; - BOOLEAN securityPolicyPresent = 11; - BOOLEAN channelMaskPresent = 12; + BOOLEAN activeTimestampPresent = 0; + BOOLEAN pendingTimestampPresent = 1; + BOOLEAN masterKeyPresent = 2; + BOOLEAN networkNamePresent = 3; + BOOLEAN extendedPanIdPresent = 4; + BOOLEAN meshLocalPrefixPresent = 5; + BOOLEAN delayPresent = 6; + BOOLEAN panIdPresent = 7; + BOOLEAN channelPresent = 8; + BOOLEAN pskcPresent = 9; + BOOLEAN securityPolicyPresent = 10; + BOOLEAN channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index ad2102baaccc80..0007a094b4f681 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 1; - CHAR_STRING value = 2; + CHAR_STRING label = 0; + CHAR_STRING value = 1; } server cluster AdministratorCommissioning = 60 { @@ -80,8 +80,8 @@ server cluster Basic = 40 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 1; - INT16U revision = 2; + DEVTYPE_ID type = 0; + INT16U revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -138,7 +138,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfoType { - INT32U failSafeExpiryLengthMs = 1; + INT32U failSafeExpiryLengthMs = 0; } attribute int64u breadcrumb = 0; @@ -232,12 +232,12 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 1; - BOOLEAN fabricConnected = 2; - BOOLEAN offPremiseServicesReachableIPv4 = 3; - BOOLEAN offPremiseServicesReachableIPv6 = 4; - OCTET_STRING hardwareAddress = 5; - InterfaceType type = 6; + CHAR_STRING name = 0; + BOOLEAN fabricConnected = 1; + BOOLEAN offPremiseServicesReachableIPv4 = 2; + BOOLEAN offPremiseServicesReachableIPv6 = 3; + OCTET_STRING hardwareAddress = 4; + InterfaceType type = 5; } critical event HardwareFaultChange = 0 { @@ -346,28 +346,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING networkID = 1; - BOOLEAN connected = 2; + OCTET_STRING networkID = 0; + BOOLEAN connected = 1; } struct WiFiInterfaceScanResult { - BITMAP8 security = 1; - OCTET_STRING ssid = 2; - OCTET_STRING bssid = 3; - INT16U channel = 4; - WiFiBand wiFiBand = 5; - INT8S rssi = 6; + BITMAP8 security = 0; + OCTET_STRING ssid = 1; + OCTET_STRING bssid = 2; + INT16U channel = 3; + WiFiBand wiFiBand = 4; + INT8S rssi = 5; } struct ThreadInterfaceScanResult { - INT64U panId = 1; - INT64U extendedPanId = 2; - CHAR_STRING networkName = 3; - INT16U channel = 4; - INT8U version = 5; - INT64U extendedAddress = 6; - INT8S rssi = 7; - INT8U lqi = 8; + INT64U panId = 0; + INT64U extendedPanId = 1; + CHAR_STRING networkName = 2; + INT16U channel = 3; + INT8U version = 4; + INT64U extendedAddress = 5; + INT8S rssi = 6; + INT8U lqi = 7; } readonly attribute int8u maxNetworks = 0; @@ -454,12 +454,12 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 1; - OCTET_STRING rootPublicKey = 2; - INT16U vendorId = 3; - FABRIC_ID fabricId = 4; - NODE_ID nodeId = 5; - CHAR_STRING label = 6; + INT8U fabricIndex = 0; + OCTET_STRING rootPublicKey = 1; + INT16U vendorId = 2; + FABRIC_ID fabricId = 3; + NODE_ID nodeId = 4; + CHAR_STRING label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; @@ -557,11 +557,11 @@ server cluster PowerSource = 47 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 1; - CHAR_STRING name = 2; - INT32U stackFreeCurrent = 3; - INT32U stackFreeMinimum = 4; - INT32U stackSize = 5; + INT64U id = 0; + CHAR_STRING name = 1; + INT32U stackFreeCurrent = 2; + INT32U stackFreeMinimum = 3; + INT32U stackSize = 4; } info event SoftwareFault = 0 { @@ -600,53 +600,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 1; - INT32U age = 2; - INT16U rloc16 = 3; - INT32U linkFrameCounter = 4; - INT32U mleFrameCounter = 5; - INT8U lqi = 6; - INT8S averageRssi = 7; - INT8S lastRssi = 8; - INT8U frameErrorRate = 9; - INT8U messageErrorRate = 10; - BOOLEAN rxOnWhenIdle = 11; - BOOLEAN fullThreadDevice = 12; - BOOLEAN fullNetworkData = 13; - BOOLEAN isChild = 14; + INT64U extAddress = 0; + INT32U age = 1; + INT16U rloc16 = 2; + INT32U linkFrameCounter = 3; + INT32U mleFrameCounter = 4; + INT8U lqi = 5; + INT8S averageRssi = 6; + INT8S lastRssi = 7; + INT8U frameErrorRate = 8; + INT8U messageErrorRate = 9; + BOOLEAN rxOnWhenIdle = 10; + BOOLEAN fullThreadDevice = 11; + BOOLEAN fullNetworkData = 12; + BOOLEAN isChild = 13; } struct RouteTable { - INT64U extAddress = 1; - INT16U rloc16 = 2; - INT8U routerId = 3; - INT8U nextHop = 4; - INT8U pathCost = 5; - INT8U LQIIn = 6; - INT8U LQIOut = 7; - INT8U age = 8; - BOOLEAN allocated = 9; - BOOLEAN linkEstablished = 10; + INT64U extAddress = 0; + INT16U rloc16 = 1; + INT8U routerId = 2; + INT8U nextHop = 3; + INT8U pathCost = 4; + INT8U LQIIn = 5; + INT8U LQIOut = 6; + INT8U age = 7; + BOOLEAN allocated = 8; + BOOLEAN linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 1; - BITMAP16 flags = 2; + INT16U rotationTime = 0; + BITMAP16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 1; - BOOLEAN pendingTimestampPresent = 2; - BOOLEAN masterKeyPresent = 3; - BOOLEAN networkNamePresent = 4; - BOOLEAN extendedPanIdPresent = 5; - BOOLEAN meshLocalPrefixPresent = 6; - BOOLEAN delayPresent = 7; - BOOLEAN panIdPresent = 8; - BOOLEAN channelPresent = 9; - BOOLEAN pskcPresent = 10; - BOOLEAN securityPolicyPresent = 11; - BOOLEAN channelMaskPresent = 12; + BOOLEAN activeTimestampPresent = 0; + BOOLEAN pendingTimestampPresent = 1; + BOOLEAN masterKeyPresent = 2; + BOOLEAN networkNamePresent = 3; + BOOLEAN extendedPanIdPresent = 4; + BOOLEAN meshLocalPrefixPresent = 5; + BOOLEAN delayPresent = 6; + BOOLEAN panIdPresent = 7; + BOOLEAN channelPresent = 8; + BOOLEAN pskcPresent = 9; + BOOLEAN securityPolicyPresent = 10; + BOOLEAN channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/src/app/zap-templates/partials/im_command_handler_cluster_commands.zapt b/src/app/zap-templates/partials/im_command_handler_cluster_commands.zapt index f989635a19c965..e4b0278cae26ca 100644 --- a/src/app/zap-templates/partials/im_command_handler_cluster_commands.zapt +++ b/src/app/zap-templates/partials/im_command_handler_cluster_commands.zapt @@ -54,7 +54,7 @@ while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) switch (currentDecodeTagId) { {{#zcl_command_arguments}} - case {{index}}: + case {{fieldIdentifier}}: {{#if isArray}} // Just for compatibility, we will add array type support in IM later. TLVUnpackError = aDataTlv.GetDataPtr(const_cast({{asSymbol label}})); diff --git a/src/app/zap-templates/templates/app/cluster-objects.zapt b/src/app/zap-templates/templates/app/cluster-objects.zapt index d6684e20ddb768..b2b4bed4051e3e 100644 --- a/src/app/zap-templates/templates/app/cluster-objects.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects.zapt @@ -99,7 +99,7 @@ namespace Commands { namespace {{asUpperCamelCase name}} { enum class Fields { {{#zcl_command_arguments}} - k{{asUpperCamelCase label}} = {{index}}, + k{{asUpperCamelCase label}} = {{fieldIdentifier}}, {{/zcl_command_arguments}} }; diff --git a/src/app/zap-templates/templates/chip/helper.js b/src/app/zap-templates/templates/chip/helper.js index c7f9ea859b6a02..997848f9f5d352 100644 --- a/src/app/zap-templates/templates/chip/helper.js +++ b/src/app/zap-templates/templates/chip/helper.js @@ -250,8 +250,7 @@ function chip_cluster_command_arguments(options) const commands = getCommands.call(this.parent, 'chip_cluster_commands_argments'); const filter = command => command.id == commandId; - return asBlocks.call(this, - commands.then(items => items.find(filter).arguments.map((value, index) => ({...value, fieldIdentifier : index }))), options); + return asBlocks.call(this, commands.then(items => items.find(filter).arguments), options); } /** @@ -300,8 +299,7 @@ function chip_cluster_response_arguments(options) const responses = getResponses.call(this.parent, 'chip_cluster_responses_argments'); const filter = command => command.id == commandId; - return asBlocks.call(this, - responses.then(items => items.find(filter).arguments.map((value, index) => ({...value, fieldIdentifier : index }))), options); + return asBlocks.call(this, responses.then(items => items.find(filter).arguments), options); } /** diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 2175f416ff7daa..531239332d6c6a 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 1; - CHAR_STRING value = 2; + CHAR_STRING label = 0; + CHAR_STRING value = 1; } client cluster AccessControl = 31 { @@ -136,8 +136,8 @@ client cluster ApplicationBasic = 1293 { } struct ApplicationBasicApplication { - INT16U catalogVendorId = 1; - CHAR_STRING applicationId = 2; + INT16U catalogVendorId = 0; + CHAR_STRING applicationId = 1; } readonly attribute char_string vendorName = 0; @@ -160,8 +160,8 @@ client cluster ApplicationLauncher = 1292 { } struct ApplicationLauncherApplication { - INT16U catalogVendorId = 1; - CHAR_STRING applicationId = 2; + INT16U catalogVendorId = 0; + CHAR_STRING applicationId = 1; } readonly attribute INT16U applicationLauncherList[] = 0; @@ -202,9 +202,9 @@ client cluster AudioOutput = 1291 { } struct OutputInfo { - INT8U index = 1; - OutputTypeEnum outputType = 2; - CHAR_STRING name = 3; + INT8U index = 0; + OutputTypeEnum outputType = 1; + CHAR_STRING name = 2; } readonly attribute OutputInfo audioOutputList[] = 0; @@ -351,19 +351,19 @@ client cluster BridgedActions = 37 { } struct ActionStruct { - INT16U actionID = 1; - CHAR_STRING name = 2; - ActionTypeEnum type = 3; - INT16U endpointListID = 4; - INT16U supportedCommands = 5; - ActionStateEnum status = 6; + INT16U actionID = 0; + CHAR_STRING name = 1; + ActionTypeEnum type = 2; + INT16U endpointListID = 3; + INT16U supportedCommands = 4; + ActionStateEnum status = 5; } struct EndpointListStruct { - INT16U endpointListID = 1; - CHAR_STRING name = 2; - EndpointListTypeEnum type = 3; - ENDPOINT_NO endpoints[] = 4; + INT16U endpointListID = 0; + CHAR_STRING name = 1; + EndpointListTypeEnum type = 2; + ENDPOINT_NO endpoints[] = 3; } info event StateChanged = 0 { @@ -480,11 +480,11 @@ client cluster Channel = 1284 { } struct ChannelInfo { - INT16U majorNumber = 1; - INT16U minorNumber = 2; - CHAR_STRING name = 3; - CHAR_STRING callSign = 4; - CHAR_STRING affiliateCallSign = 5; + INT16U majorNumber = 0; + INT16U minorNumber = 1; + CHAR_STRING name = 2; + CHAR_STRING callSign = 3; + CHAR_STRING affiliateCallSign = 4; } readonly attribute ChannelInfo channelList[] = 0; @@ -814,39 +814,39 @@ client cluster ContentLauncher = 1290 { } struct ContentSearch { - Parameter parameterList[] = 1; + Parameter parameterList[] = 0; } struct Parameter { - ParameterEnum type = 1; - CHAR_STRING value = 2; - AdditionalInfo externalIDList[] = 3; + ParameterEnum type = 0; + CHAR_STRING value = 1; + AdditionalInfo externalIDList[] = 2; } struct AdditionalInfo { - CHAR_STRING name = 1; - CHAR_STRING value = 2; + CHAR_STRING name = 0; + CHAR_STRING value = 1; } struct BrandingInformation { - CHAR_STRING providerName = 1; - StyleInformation background = 2; - StyleInformation logo = 3; - StyleInformation progressBar = 4; - StyleInformation splash = 5; - StyleInformation waterMark = 6; + CHAR_STRING providerName = 0; + StyleInformation background = 1; + StyleInformation logo = 2; + StyleInformation progressBar = 3; + StyleInformation splash = 4; + StyleInformation waterMark = 5; } struct StyleInformation { - CHAR_STRING imageUrl = 1; - CHAR_STRING color = 2; - Dimension size = 3; + CHAR_STRING imageUrl = 0; + CHAR_STRING color = 1; + Dimension size = 2; } struct Dimension { - double width = 1; - double height = 2; - MetricTypeEnum metric = 3; + double width = 0; + double height = 1; + MetricTypeEnum metric = 2; } readonly attribute CHAR_STRING acceptHeaderList[] = 0; @@ -877,8 +877,8 @@ client cluster ContentLauncher = 1290 { client cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 1; - INT16U revision = 2; + DEVTYPE_ID type = 0; + INT16U revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -1122,8 +1122,8 @@ client cluster DoorLock = 257 { } struct DlCredential { - DlCredentialType credentialType = 1; - INT16U credentialIndex = 2; + DlCredentialType credentialType = 0; + INT16U credentialIndex = 1; } critical event DoorLockAlarm = 0 { @@ -1335,7 +1335,7 @@ client cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfoType { - INT32U failSafeExpiryLengthMs = 1; + INT32U failSafeExpiryLengthMs = 0; } attribute int64u breadcrumb = 0; @@ -1429,12 +1429,12 @@ client cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 1; - BOOLEAN fabricConnected = 2; - BOOLEAN offPremiseServicesReachableIPv4 = 3; - BOOLEAN offPremiseServicesReachableIPv6 = 4; - OCTET_STRING hardwareAddress = 5; - InterfaceType type = 6; + CHAR_STRING name = 0; + BOOLEAN fabricConnected = 1; + BOOLEAN offPremiseServicesReachableIPv4 = 2; + BOOLEAN offPremiseServicesReachableIPv6 = 3; + OCTET_STRING hardwareAddress = 4; + InterfaceType type = 5; } critical event HardwareFaultChange = 0 { @@ -1873,10 +1873,10 @@ client cluster MediaInput = 1287 { } struct InputInfo { - INT8U index = 1; - InputTypeEnum inputType = 2; - CHAR_STRING name = 3; - CHAR_STRING description = 4; + INT8U index = 0; + InputTypeEnum inputType = 1; + CHAR_STRING name = 2; + CHAR_STRING description = 3; } readonly attribute InputInfo mediaInputList[] = 0; @@ -1956,9 +1956,9 @@ client cluster MediaPlayback = 1286 { client cluster ModeSelect = 80 { struct ModeOptionStruct { - CHAR_STRING label = 1; - INT8U mode = 2; - INT32U semanticTag = 3; + CHAR_STRING label = 0; + INT8U mode = 1; + INT32U semanticTag = 2; } readonly attribute int8u currentMode = 0; @@ -2002,28 +2002,28 @@ client cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING networkID = 1; - BOOLEAN connected = 2; + OCTET_STRING networkID = 0; + BOOLEAN connected = 1; } struct WiFiInterfaceScanResult { - BITMAP8 security = 1; - OCTET_STRING ssid = 2; - OCTET_STRING bssid = 3; - INT16U channel = 4; - WiFiBand wiFiBand = 5; - INT8S rssi = 6; + BITMAP8 security = 0; + OCTET_STRING ssid = 1; + OCTET_STRING bssid = 2; + INT16U channel = 3; + WiFiBand wiFiBand = 4; + INT8S rssi = 5; } struct ThreadInterfaceScanResult { - INT64U panId = 1; - INT64U extendedPanId = 2; - CHAR_STRING networkName = 3; - INT16U channel = 4; - INT8U version = 5; - INT64U extendedAddress = 6; - INT8S rssi = 7; - INT8U lqi = 8; + INT64U panId = 0; + INT64U extendedPanId = 1; + CHAR_STRING networkName = 2; + INT16U channel = 3; + INT8U version = 4; + INT64U extendedAddress = 5; + INT8S rssi = 6; + INT8U lqi = 7; } readonly attribute int8u maxNetworks = 0; @@ -2305,12 +2305,12 @@ client cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 1; - OCTET_STRING rootPublicKey = 2; - INT16U vendorId = 3; - FABRIC_ID fabricId = 4; - NODE_ID nodeId = 5; - CHAR_STRING label = 6; + INT8U fabricIndex = 0; + OCTET_STRING rootPublicKey = 1; + INT16U vendorId = 2; + FABRIC_ID fabricId = 3; + NODE_ID nodeId = 4; + CHAR_STRING label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; @@ -2530,9 +2530,9 @@ client cluster RelativeHumidityMeasurement = 1029 { client cluster Scenes = 5 { struct SceneExtensionFieldSet { - CLUSTER_ID clusterId = 1; - INT8U length = 2; - INT8U value = 3; + CLUSTER_ID clusterId = 0; + INT8U length = 1; + INT8U value = 2; } readonly attribute int8u sceneCount = 0; @@ -2631,11 +2631,11 @@ client cluster Scenes = 5 { client cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 1; - CHAR_STRING name = 2; - INT32U stackFreeCurrent = 3; - INT32U stackFreeMinimum = 4; - INT32U stackSize = 5; + INT64U id = 0; + CHAR_STRING name = 1; + INT32U stackFreeCurrent = 2; + INT32U stackFreeMinimum = 3; + INT32U stackSize = 4; } info event SoftwareFault = 0 { @@ -2700,8 +2700,8 @@ client cluster TargetNavigator = 1285 { } struct TargetInfo { - INT8U identifier = 1; - CHAR_STRING name = 2; + INT8U identifier = 0; + CHAR_STRING name = 1; } readonly attribute TargetInfo targetNavigatorList[] = 0; @@ -2740,50 +2740,50 @@ client cluster TestCluster = 1295 { } struct TestListStructOctet { - INT64U fabricIndex = 1; - OCTET_STRING operationalCert = 2; + INT64U fabricIndex = 0; + OCTET_STRING operationalCert = 1; } struct NullablesAndOptionalsStruct { - nullable INT16U nullableInt = 1; - optional INT16U optionalInt = 2; - optional nullable INT16U nullableOptionalInt = 3; - nullable CHAR_STRING nullableString = 4; - optional CHAR_STRING optionalString = 5; - optional nullable CHAR_STRING nullableOptionalString = 6; - nullable SimpleStruct nullableStruct = 7; - optional SimpleStruct optionalStruct = 8; - optional nullable SimpleStruct nullableOptionalStruct = 9; - nullable SimpleEnum nullableList[] = 10; - optional SimpleEnum optionalList[] = 11; - optional nullable SimpleEnum nullableOptionalList[] = 12; + nullable INT16U nullableInt = 0; + optional INT16U optionalInt = 1; + optional nullable INT16U nullableOptionalInt = 2; + nullable CHAR_STRING nullableString = 3; + optional CHAR_STRING optionalString = 4; + optional nullable CHAR_STRING nullableOptionalString = 5; + nullable SimpleStruct nullableStruct = 6; + optional SimpleStruct optionalStruct = 7; + optional nullable SimpleStruct nullableOptionalStruct = 8; + nullable SimpleEnum nullableList[] = 9; + optional SimpleEnum optionalList[] = 10; + optional nullable SimpleEnum nullableOptionalList[] = 11; } struct SimpleStruct { - INT8U a = 1; - BOOLEAN b = 2; - SimpleEnum c = 3; - OCTET_STRING d = 4; - CHAR_STRING e = 5; - SimpleBitmap f = 6; - single g = 7; - double h = 8; + INT8U a = 0; + BOOLEAN b = 1; + SimpleEnum c = 2; + OCTET_STRING d = 3; + CHAR_STRING e = 4; + SimpleBitmap f = 5; + single g = 6; + double h = 7; } struct NestedStructList { - INT8U a = 1; - BOOLEAN b = 2; - SimpleStruct c = 3; - SimpleStruct d[] = 4; - INT32U e[] = 5; - OCTET_STRING f[] = 6; - INT8U g[] = 7; + INT8U a = 0; + BOOLEAN b = 1; + SimpleStruct c = 2; + SimpleStruct d[] = 3; + INT32U e[] = 4; + OCTET_STRING f[] = 5; + INT8U g[] = 6; } struct NestedStruct { - INT8U a = 1; - BOOLEAN b = 2; - SimpleStruct c = 3; + INT8U a = 0; + BOOLEAN b = 1; + SimpleStruct c = 2; } info event TestEvent = 1 { @@ -3088,53 +3088,53 @@ client cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 1; - INT32U age = 2; - INT16U rloc16 = 3; - INT32U linkFrameCounter = 4; - INT32U mleFrameCounter = 5; - INT8U lqi = 6; - INT8S averageRssi = 7; - INT8S lastRssi = 8; - INT8U frameErrorRate = 9; - INT8U messageErrorRate = 10; - BOOLEAN rxOnWhenIdle = 11; - BOOLEAN fullThreadDevice = 12; - BOOLEAN fullNetworkData = 13; - BOOLEAN isChild = 14; + INT64U extAddress = 0; + INT32U age = 1; + INT16U rloc16 = 2; + INT32U linkFrameCounter = 3; + INT32U mleFrameCounter = 4; + INT8U lqi = 5; + INT8S averageRssi = 6; + INT8S lastRssi = 7; + INT8U frameErrorRate = 8; + INT8U messageErrorRate = 9; + BOOLEAN rxOnWhenIdle = 10; + BOOLEAN fullThreadDevice = 11; + BOOLEAN fullNetworkData = 12; + BOOLEAN isChild = 13; } struct RouteTable { - INT64U extAddress = 1; - INT16U rloc16 = 2; - INT8U routerId = 3; - INT8U nextHop = 4; - INT8U pathCost = 5; - INT8U LQIIn = 6; - INT8U LQIOut = 7; - INT8U age = 8; - BOOLEAN allocated = 9; - BOOLEAN linkEstablished = 10; + INT64U extAddress = 0; + INT16U rloc16 = 1; + INT8U routerId = 2; + INT8U nextHop = 3; + INT8U pathCost = 4; + INT8U LQIIn = 5; + INT8U LQIOut = 6; + INT8U age = 7; + BOOLEAN allocated = 8; + BOOLEAN linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 1; - BITMAP16 flags = 2; + INT16U rotationTime = 0; + BITMAP16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 1; - BOOLEAN pendingTimestampPresent = 2; - BOOLEAN masterKeyPresent = 3; - BOOLEAN networkNamePresent = 4; - BOOLEAN extendedPanIdPresent = 5; - BOOLEAN meshLocalPrefixPresent = 6; - BOOLEAN delayPresent = 7; - BOOLEAN panIdPresent = 8; - BOOLEAN channelPresent = 9; - BOOLEAN pskcPresent = 10; - BOOLEAN securityPolicyPresent = 11; - BOOLEAN channelMaskPresent = 12; + BOOLEAN activeTimestampPresent = 0; + BOOLEAN pendingTimestampPresent = 1; + BOOLEAN masterKeyPresent = 2; + BOOLEAN networkNamePresent = 3; + BOOLEAN extendedPanIdPresent = 4; + BOOLEAN meshLocalPrefixPresent = 5; + BOOLEAN delayPresent = 6; + BOOLEAN panIdPresent = 7; + BOOLEAN channelPresent = 8; + BOOLEAN pskcPresent = 9; + BOOLEAN securityPolicyPresent = 10; + BOOLEAN channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index bf0b7d22cfce3a..e1dfcb274b8e43 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -1839,9 +1839,9 @@ class SceneExtensionFieldSet(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="clusterId", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="length", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="value", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="length", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="value", Tag=2, Type=uint), ]) clusterId: 'uint' = 0 @@ -3924,10 +3924,10 @@ class PowerProfileRecord(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="powerProfileId", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="energyPhaseId", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="powerProfileRemoteControl", Tag=3, Type=bool), - ClusterObjectFieldDescriptor(Label="powerProfileState", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="powerProfileId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="energyPhaseId", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="powerProfileRemoteControl", Tag=2, Type=bool), + ClusterObjectFieldDescriptor(Label="powerProfileState", Tag=3, Type=uint), ]) powerProfileId: 'uint' = 0 @@ -3941,8 +3941,8 @@ class ScheduledPhase(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="energyPhaseId", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="scheduledTime", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="energyPhaseId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="scheduledTime", Tag=1, Type=uint), ]) energyPhaseId: 'uint' = 0 @@ -3954,12 +3954,12 @@ class TransferredPhase(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="energyPhaseId", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="macroPhaseId", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="expectedDuration", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="peakPower", Tag=4, Type=uint), - ClusterObjectFieldDescriptor(Label="energy", Tag=5, Type=uint), - ClusterObjectFieldDescriptor(Label="maxActivationDelay", Tag=6, Type=uint), + ClusterObjectFieldDescriptor(Label="energyPhaseId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="macroPhaseId", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="expectedDuration", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="peakPower", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="energy", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="maxActivationDelay", Tag=5, Type=uint), ]) energyPhaseId: 'uint' = 0 @@ -4869,8 +4869,8 @@ class DeviceType(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="type", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="revision", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="type", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="revision", Tag=1, Type=uint), ]) type: 'uint' = 0 @@ -5664,12 +5664,12 @@ class ActionStruct(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="actionID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="name", Tag=2, Type=str), - ClusterObjectFieldDescriptor(Label="type", Tag=3, Type=BridgedActions.Enums.ActionTypeEnum), - ClusterObjectFieldDescriptor(Label="endpointListID", Tag=4, Type=uint), - ClusterObjectFieldDescriptor(Label="supportedCommands", Tag=5, Type=uint), - ClusterObjectFieldDescriptor(Label="status", Tag=6, Type=BridgedActions.Enums.ActionStateEnum), + ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="type", Tag=2, Type=BridgedActions.Enums.ActionTypeEnum), + ClusterObjectFieldDescriptor(Label="endpointListID", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="supportedCommands", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="status", Tag=5, Type=BridgedActions.Enums.ActionStateEnum), ]) actionID: 'uint' = 0 @@ -5685,10 +5685,10 @@ class EndpointListStruct(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="endpointListID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="name", Tag=2, Type=str), - ClusterObjectFieldDescriptor(Label="type", Tag=3, Type=BridgedActions.Enums.EndpointListTypeEnum), - ClusterObjectFieldDescriptor(Label="endpoints", Tag=4, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="endpointListID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="type", Tag=2, Type=BridgedActions.Enums.EndpointListTypeEnum), + ClusterObjectFieldDescriptor(Label="endpoints", Tag=3, Type=typing.List[uint]), ]) endpointListID: 'uint' = 0 @@ -8055,7 +8055,7 @@ class BasicCommissioningInfoType(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="failSafeExpiryLengthMs", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="failSafeExpiryLengthMs", Tag=0, Type=uint), ]) failSafeExpiryLengthMs: 'uint' = 0 @@ -8347,8 +8347,8 @@ class NetworkInfo(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="networkID", Tag=1, Type=bytes), - ClusterObjectFieldDescriptor(Label="connected", Tag=2, Type=bool), + ClusterObjectFieldDescriptor(Label="networkID", Tag=0, Type=bytes), + ClusterObjectFieldDescriptor(Label="connected", Tag=1, Type=bool), ]) networkID: 'bytes' = b"" @@ -8360,14 +8360,14 @@ class ThreadInterfaceScanResult(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="panId", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="extendedPanId", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="networkName", Tag=3, Type=str), - ClusterObjectFieldDescriptor(Label="channel", Tag=4, Type=uint), - ClusterObjectFieldDescriptor(Label="version", Tag=5, Type=uint), - ClusterObjectFieldDescriptor(Label="extendedAddress", Tag=6, Type=uint), - ClusterObjectFieldDescriptor(Label="rssi", Tag=7, Type=int), - ClusterObjectFieldDescriptor(Label="lqi", Tag=8, Type=uint), + ClusterObjectFieldDescriptor(Label="panId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="extendedPanId", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="networkName", Tag=2, Type=str), + ClusterObjectFieldDescriptor(Label="channel", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="version", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="extendedAddress", Tag=5, Type=uint), + ClusterObjectFieldDescriptor(Label="rssi", Tag=6, Type=int), + ClusterObjectFieldDescriptor(Label="lqi", Tag=7, Type=uint), ]) panId: 'uint' = 0 @@ -8385,12 +8385,12 @@ class WiFiInterfaceScanResult(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="security", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="ssid", Tag=2, Type=bytes), - ClusterObjectFieldDescriptor(Label="bssid", Tag=3, Type=bytes), - ClusterObjectFieldDescriptor(Label="channel", Tag=4, Type=uint), - ClusterObjectFieldDescriptor(Label="wiFiBand", Tag=5, Type=NetworkCommissioning.Enums.WiFiBand), - ClusterObjectFieldDescriptor(Label="rssi", Tag=6, Type=int), + ClusterObjectFieldDescriptor(Label="security", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="ssid", Tag=1, Type=bytes), + ClusterObjectFieldDescriptor(Label="bssid", Tag=2, Type=bytes), + ClusterObjectFieldDescriptor(Label="channel", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="wiFiBand", Tag=4, Type=NetworkCommissioning.Enums.WiFiBand), + ClusterObjectFieldDescriptor(Label="rssi", Tag=5, Type=int), ]) security: 'uint' = 0 @@ -8961,12 +8961,12 @@ class NetworkInterfaceType(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=str), - ClusterObjectFieldDescriptor(Label="fabricConnected", Tag=2, Type=bool), - ClusterObjectFieldDescriptor(Label="offPremiseServicesReachableIPv4", Tag=3, Type=bool), - ClusterObjectFieldDescriptor(Label="offPremiseServicesReachableIPv6", Tag=4, Type=bool), - ClusterObjectFieldDescriptor(Label="hardwareAddress", Tag=5, Type=bytes), - ClusterObjectFieldDescriptor(Label="type", Tag=6, Type=GeneralDiagnostics.Enums.InterfaceType), + ClusterObjectFieldDescriptor(Label="name", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="fabricConnected", Tag=1, Type=bool), + ClusterObjectFieldDescriptor(Label="offPremiseServicesReachableIPv4", Tag=2, Type=bool), + ClusterObjectFieldDescriptor(Label="offPremiseServicesReachableIPv6", Tag=3, Type=bool), + ClusterObjectFieldDescriptor(Label="hardwareAddress", Tag=4, Type=bytes), + ClusterObjectFieldDescriptor(Label="type", Tag=5, Type=GeneralDiagnostics.Enums.InterfaceType), ]) name: 'str' = "" @@ -9274,9 +9274,9 @@ class SoftwareFault(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="id", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="name", Tag=2, Type=str), - ClusterObjectFieldDescriptor(Label="faultRecording", Tag=3, Type=bytes), + ClusterObjectFieldDescriptor(Label="id", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="faultRecording", Tag=2, Type=bytes), ]) id: 'uint' = 0 @@ -9289,11 +9289,11 @@ class ThreadMetrics(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="id", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="name", Tag=2, Type=str), - ClusterObjectFieldDescriptor(Label="stackFreeCurrent", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="stackFreeMinimum", Tag=4, Type=uint), - ClusterObjectFieldDescriptor(Label="stackSize", Tag=5, Type=uint), + ClusterObjectFieldDescriptor(Label="id", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="stackFreeCurrent", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="stackFreeMinimum", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="stackSize", Tag=4, Type=uint), ]) id: 'uint' = 0 @@ -9625,20 +9625,20 @@ class NeighborTable(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="extAddress", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="age", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="rloc16", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="linkFrameCounter", Tag=4, Type=uint), - ClusterObjectFieldDescriptor(Label="mleFrameCounter", Tag=5, Type=uint), - ClusterObjectFieldDescriptor(Label="lqi", Tag=6, Type=uint), - ClusterObjectFieldDescriptor(Label="averageRssi", Tag=7, Type=int), - ClusterObjectFieldDescriptor(Label="lastRssi", Tag=8, Type=int), - ClusterObjectFieldDescriptor(Label="frameErrorRate", Tag=9, Type=uint), - ClusterObjectFieldDescriptor(Label="messageErrorRate", Tag=10, Type=uint), - ClusterObjectFieldDescriptor(Label="rxOnWhenIdle", Tag=11, Type=bool), - ClusterObjectFieldDescriptor(Label="fullThreadDevice", Tag=12, Type=bool), - ClusterObjectFieldDescriptor(Label="fullNetworkData", Tag=13, Type=bool), - ClusterObjectFieldDescriptor(Label="isChild", Tag=14, Type=bool), + ClusterObjectFieldDescriptor(Label="extAddress", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="age", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="rloc16", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="linkFrameCounter", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="mleFrameCounter", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="lqi", Tag=5, Type=uint), + ClusterObjectFieldDescriptor(Label="averageRssi", Tag=6, Type=int), + ClusterObjectFieldDescriptor(Label="lastRssi", Tag=7, Type=int), + ClusterObjectFieldDescriptor(Label="frameErrorRate", Tag=8, Type=uint), + ClusterObjectFieldDescriptor(Label="messageErrorRate", Tag=9, Type=uint), + ClusterObjectFieldDescriptor(Label="rxOnWhenIdle", Tag=10, Type=bool), + ClusterObjectFieldDescriptor(Label="fullThreadDevice", Tag=11, Type=bool), + ClusterObjectFieldDescriptor(Label="fullNetworkData", Tag=12, Type=bool), + ClusterObjectFieldDescriptor(Label="isChild", Tag=13, Type=bool), ]) extAddress: 'uint' = 0 @@ -9662,18 +9662,18 @@ class OperationalDatasetComponents(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="activeTimestampPresent", Tag=1, Type=bool), - ClusterObjectFieldDescriptor(Label="pendingTimestampPresent", Tag=2, Type=bool), - ClusterObjectFieldDescriptor(Label="masterKeyPresent", Tag=3, Type=bool), - ClusterObjectFieldDescriptor(Label="networkNamePresent", Tag=4, Type=bool), - ClusterObjectFieldDescriptor(Label="extendedPanIdPresent", Tag=5, Type=bool), - ClusterObjectFieldDescriptor(Label="meshLocalPrefixPresent", Tag=6, Type=bool), - ClusterObjectFieldDescriptor(Label="delayPresent", Tag=7, Type=bool), - ClusterObjectFieldDescriptor(Label="panIdPresent", Tag=8, Type=bool), - ClusterObjectFieldDescriptor(Label="channelPresent", Tag=9, Type=bool), - ClusterObjectFieldDescriptor(Label="pskcPresent", Tag=10, Type=bool), - ClusterObjectFieldDescriptor(Label="securityPolicyPresent", Tag=11, Type=bool), - ClusterObjectFieldDescriptor(Label="channelMaskPresent", Tag=12, Type=bool), + ClusterObjectFieldDescriptor(Label="activeTimestampPresent", Tag=0, Type=bool), + ClusterObjectFieldDescriptor(Label="pendingTimestampPresent", Tag=1, Type=bool), + ClusterObjectFieldDescriptor(Label="masterKeyPresent", Tag=2, Type=bool), + ClusterObjectFieldDescriptor(Label="networkNamePresent", Tag=3, Type=bool), + ClusterObjectFieldDescriptor(Label="extendedPanIdPresent", Tag=4, Type=bool), + ClusterObjectFieldDescriptor(Label="meshLocalPrefixPresent", Tag=5, Type=bool), + ClusterObjectFieldDescriptor(Label="delayPresent", Tag=6, Type=bool), + ClusterObjectFieldDescriptor(Label="panIdPresent", Tag=7, Type=bool), + ClusterObjectFieldDescriptor(Label="channelPresent", Tag=8, Type=bool), + ClusterObjectFieldDescriptor(Label="pskcPresent", Tag=9, Type=bool), + ClusterObjectFieldDescriptor(Label="securityPolicyPresent", Tag=10, Type=bool), + ClusterObjectFieldDescriptor(Label="channelMaskPresent", Tag=11, Type=bool), ]) activeTimestampPresent: 'bool' = False @@ -9695,16 +9695,16 @@ class RouteTable(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="extAddress", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="rloc16", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="routerId", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="nextHop", Tag=4, Type=uint), - ClusterObjectFieldDescriptor(Label="pathCost", Tag=5, Type=uint), - ClusterObjectFieldDescriptor(Label="LQIIn", Tag=6, Type=uint), - ClusterObjectFieldDescriptor(Label="LQIOut", Tag=7, Type=uint), - ClusterObjectFieldDescriptor(Label="age", Tag=8, Type=uint), - ClusterObjectFieldDescriptor(Label="allocated", Tag=9, Type=bool), - ClusterObjectFieldDescriptor(Label="linkEstablished", Tag=10, Type=bool), + ClusterObjectFieldDescriptor(Label="extAddress", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="rloc16", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="routerId", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="nextHop", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="pathCost", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="LQIIn", Tag=5, Type=uint), + ClusterObjectFieldDescriptor(Label="LQIOut", Tag=6, Type=uint), + ClusterObjectFieldDescriptor(Label="age", Tag=7, Type=uint), + ClusterObjectFieldDescriptor(Label="allocated", Tag=8, Type=bool), + ClusterObjectFieldDescriptor(Label="linkEstablished", Tag=9, Type=bool), ]) extAddress: 'uint' = 0 @@ -9724,8 +9724,8 @@ class SecurityPolicy(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="rotationTime", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="flags", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="rotationTime", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="flags", Tag=1, Type=uint), ]) rotationTime: 'uint' = 0 @@ -12459,12 +12459,12 @@ class FabricDescriptor(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="rootPublicKey", Tag=2, Type=bytes), - ClusterObjectFieldDescriptor(Label="vendorId", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="fabricId", Tag=4, Type=uint), - ClusterObjectFieldDescriptor(Label="nodeId", Tag=5, Type=uint), - ClusterObjectFieldDescriptor(Label="label", Tag=6, Type=str), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="rootPublicKey", Tag=1, Type=bytes), + ClusterObjectFieldDescriptor(Label="vendorId", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="fabricId", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="nodeId", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="label", Tag=5, Type=str), ]) fabricIndex: 'uint' = 0 @@ -12480,8 +12480,8 @@ class NOCStruct(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="noc", Tag=2, Type=bytes), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="noc", Tag=1, Type=bytes), ]) fabricIndex: 'uint' = 0 @@ -13160,8 +13160,8 @@ class LabelStruct(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="label", Tag=1, Type=str), - ClusterObjectFieldDescriptor(Label="value", Tag=2, Type=str), + ClusterObjectFieldDescriptor(Label="label", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=str), ]) label: 'str' = "" @@ -13264,8 +13264,8 @@ class LabelStruct(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="label", Tag=1, Type=str), - ClusterObjectFieldDescriptor(Label="value", Tag=2, Type=str), + ClusterObjectFieldDescriptor(Label="label", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=str), ]) label: 'str' = "" @@ -13698,9 +13698,9 @@ class ModeOptionStruct(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="label", Tag=1, Type=str), - ClusterObjectFieldDescriptor(Label="mode", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="semanticTag", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="label", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="mode", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="semanticTag", Tag=2, Type=uint), ]) label: 'str' = "" @@ -13713,8 +13713,8 @@ class SemanticTag(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="mfgCode", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="value", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="mfgCode", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=uint), ]) mfgCode: 'uint' = 0 @@ -14319,8 +14319,8 @@ class DlCredential(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="credentialType", Tag=1, Type=DoorLock.Enums.DlCredentialType), - ClusterObjectFieldDescriptor(Label="credentialIndex", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="credentialType", Tag=0, Type=DoorLock.Enums.DlCredentialType), + ClusterObjectFieldDescriptor(Label="credentialIndex", Tag=1, Type=uint), ]) credentialType: 'DoorLock.Enums.DlCredentialType' = 0 @@ -26817,8 +26817,8 @@ class IasAceZoneStatusResult(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="zoneId", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="zoneStatus", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="zoneId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="zoneStatus", Tag=1, Type=uint), ]) zoneId: 'uint' = 0 @@ -27482,11 +27482,11 @@ class ChannelInfo(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="majorNumber", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="minorNumber", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="name", Tag=3, Type=str), - ClusterObjectFieldDescriptor(Label="callSign", Tag=4, Type=str), - ClusterObjectFieldDescriptor(Label="affiliateCallSign", Tag=5, Type=str), + ClusterObjectFieldDescriptor(Label="majorNumber", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="minorNumber", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="name", Tag=2, Type=str), + ClusterObjectFieldDescriptor(Label="callSign", Tag=3, Type=str), + ClusterObjectFieldDescriptor(Label="affiliateCallSign", Tag=4, Type=str), ]) majorNumber: 'uint' = 0 @@ -27501,10 +27501,10 @@ class LineupInfo(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="operatorName", Tag=1, Type=str), - ClusterObjectFieldDescriptor(Label="lineupName", Tag=2, Type=str), - ClusterObjectFieldDescriptor(Label="postalCode", Tag=3, Type=str), - ClusterObjectFieldDescriptor(Label="lineupInfoType", Tag=4, Type=Channel.Enums.LineupInfoTypeEnum), + ClusterObjectFieldDescriptor(Label="operatorName", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="lineupName", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="postalCode", Tag=2, Type=str), + ClusterObjectFieldDescriptor(Label="lineupInfoType", Tag=3, Type=Channel.Enums.LineupInfoTypeEnum), ]) operatorName: 'str' = "" @@ -27714,8 +27714,8 @@ class TargetInfo(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="identifier", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="name", Tag=2, Type=str), + ClusterObjectFieldDescriptor(Label="identifier", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=str), ]) identifier: 'uint' = 0 @@ -27896,8 +27896,8 @@ class PlaybackPosition(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="updatedAt", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="position", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="updatedAt", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="position", Tag=1, Type=uint), ]) updatedAt: 'uint' = 0 @@ -28278,10 +28278,10 @@ class InputInfo(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="index", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="inputType", Tag=2, Type=MediaInput.Enums.InputTypeEnum), - ClusterObjectFieldDescriptor(Label="name", Tag=3, Type=str), - ClusterObjectFieldDescriptor(Label="description", Tag=4, Type=str), + ClusterObjectFieldDescriptor(Label="index", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="inputType", Tag=1, Type=MediaInput.Enums.InputTypeEnum), + ClusterObjectFieldDescriptor(Label="name", Tag=2, Type=str), + ClusterObjectFieldDescriptor(Label="description", Tag=3, Type=str), ]) index: 'uint' = 0 @@ -28769,9 +28769,9 @@ class Dimension(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="width", Tag=1, Type=float), - ClusterObjectFieldDescriptor(Label="height", Tag=2, Type=float), - ClusterObjectFieldDescriptor(Label="metric", Tag=3, Type=ContentLauncher.Enums.MetricTypeEnum), + ClusterObjectFieldDescriptor(Label="width", Tag=0, Type=float), + ClusterObjectFieldDescriptor(Label="height", Tag=1, Type=float), + ClusterObjectFieldDescriptor(Label="metric", Tag=2, Type=ContentLauncher.Enums.MetricTypeEnum), ]) width: 'float' = 0.0 @@ -28784,8 +28784,8 @@ class AdditionalInfo(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=str), - ClusterObjectFieldDescriptor(Label="value", Tag=2, Type=str), + ClusterObjectFieldDescriptor(Label="name", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=str), ]) name: 'str' = "" @@ -28797,9 +28797,9 @@ class Parameter(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="type", Tag=1, Type=ContentLauncher.Enums.ParameterEnum), - ClusterObjectFieldDescriptor(Label="value", Tag=2, Type=str), - ClusterObjectFieldDescriptor(Label="externalIDList", Tag=3, Type=typing.List[ContentLauncher.Structs.AdditionalInfo]), + ClusterObjectFieldDescriptor(Label="type", Tag=0, Type=ContentLauncher.Enums.ParameterEnum), + ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="externalIDList", Tag=2, Type=typing.List[ContentLauncher.Structs.AdditionalInfo]), ]) type: 'ContentLauncher.Enums.ParameterEnum' = 0 @@ -28812,7 +28812,7 @@ class ContentSearch(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="parameterList", Tag=1, Type=typing.List[ContentLauncher.Structs.Parameter]), + ClusterObjectFieldDescriptor(Label="parameterList", Tag=0, Type=typing.List[ContentLauncher.Structs.Parameter]), ]) parameterList: 'typing.List[ContentLauncher.Structs.Parameter]' = field(default_factory=lambda: []) @@ -28823,9 +28823,9 @@ class StyleInformation(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="imageUrl", Tag=1, Type=str), - ClusterObjectFieldDescriptor(Label="color", Tag=2, Type=str), - ClusterObjectFieldDescriptor(Label="size", Tag=3, Type=ContentLauncher.Structs.Dimension), + ClusterObjectFieldDescriptor(Label="imageUrl", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="color", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="size", Tag=2, Type=ContentLauncher.Structs.Dimension), ]) imageUrl: 'str' = "" @@ -28838,12 +28838,12 @@ class BrandingInformation(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="providerName", Tag=1, Type=str), - ClusterObjectFieldDescriptor(Label="background", Tag=2, Type=ContentLauncher.Structs.StyleInformation), - ClusterObjectFieldDescriptor(Label="logo", Tag=3, Type=ContentLauncher.Structs.StyleInformation), - ClusterObjectFieldDescriptor(Label="progressBar", Tag=4, Type=ContentLauncher.Structs.StyleInformation), - ClusterObjectFieldDescriptor(Label="splash", Tag=5, Type=ContentLauncher.Structs.StyleInformation), - ClusterObjectFieldDescriptor(Label="waterMark", Tag=6, Type=ContentLauncher.Structs.StyleInformation), + ClusterObjectFieldDescriptor(Label="providerName", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="background", Tag=1, Type=ContentLauncher.Structs.StyleInformation), + ClusterObjectFieldDescriptor(Label="logo", Tag=2, Type=ContentLauncher.Structs.StyleInformation), + ClusterObjectFieldDescriptor(Label="progressBar", Tag=3, Type=ContentLauncher.Structs.StyleInformation), + ClusterObjectFieldDescriptor(Label="splash", Tag=4, Type=ContentLauncher.Structs.StyleInformation), + ClusterObjectFieldDescriptor(Label="waterMark", Tag=5, Type=ContentLauncher.Structs.StyleInformation), ]) providerName: 'str' = "" @@ -29033,9 +29033,9 @@ class OutputInfo(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="index", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="outputType", Tag=2, Type=AudioOutput.Enums.OutputTypeEnum), - ClusterObjectFieldDescriptor(Label="name", Tag=3, Type=str), + ClusterObjectFieldDescriptor(Label="index", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="outputType", Tag=1, Type=AudioOutput.Enums.OutputTypeEnum), + ClusterObjectFieldDescriptor(Label="name", Tag=2, Type=str), ]) index: 'uint' = 0 @@ -29196,8 +29196,8 @@ class ApplicationLauncherApplication(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="catalogVendorId", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="applicationId", Tag=2, Type=str), + ClusterObjectFieldDescriptor(Label="catalogVendorId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="applicationId", Tag=1, Type=str), ]) catalogVendorId: 'uint' = 0 @@ -29209,8 +29209,8 @@ class ApplicationEP(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="application", Tag=1, Type=ApplicationLauncher.Structs.ApplicationLauncherApplication), - ClusterObjectFieldDescriptor(Label="endpoint", Tag=2, Type=str), + ClusterObjectFieldDescriptor(Label="application", Tag=0, Type=ApplicationLauncher.Structs.ApplicationLauncherApplication), + ClusterObjectFieldDescriptor(Label="endpoint", Tag=1, Type=str), ]) application: 'ApplicationLauncher.Structs.ApplicationLauncherApplication' = field(default_factory=lambda: ApplicationLauncher.Structs.ApplicationLauncherApplication()) @@ -29415,8 +29415,8 @@ class ApplicationBasicApplication(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="catalogVendorId", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="applicationId", Tag=2, Type=str), + ClusterObjectFieldDescriptor(Label="catalogVendorId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="applicationId", Tag=1, Type=str), ]) catalogVendorId: 'uint' = 0 @@ -29936,14 +29936,14 @@ class SimpleStruct(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="a", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="b", Tag=2, Type=bool), - ClusterObjectFieldDescriptor(Label="c", Tag=3, Type=TestCluster.Enums.SimpleEnum), - ClusterObjectFieldDescriptor(Label="d", Tag=4, Type=bytes), - ClusterObjectFieldDescriptor(Label="e", Tag=5, Type=str), - ClusterObjectFieldDescriptor(Label="f", Tag=6, Type=uint), - ClusterObjectFieldDescriptor(Label="g", Tag=7, Type=float), - ClusterObjectFieldDescriptor(Label="h", Tag=8, Type=float), + ClusterObjectFieldDescriptor(Label="a", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="b", Tag=1, Type=bool), + ClusterObjectFieldDescriptor(Label="c", Tag=2, Type=TestCluster.Enums.SimpleEnum), + ClusterObjectFieldDescriptor(Label="d", Tag=3, Type=bytes), + ClusterObjectFieldDescriptor(Label="e", Tag=4, Type=str), + ClusterObjectFieldDescriptor(Label="f", Tag=5, Type=uint), + ClusterObjectFieldDescriptor(Label="g", Tag=6, Type=float), + ClusterObjectFieldDescriptor(Label="h", Tag=7, Type=float), ]) a: 'uint' = 0 @@ -29961,18 +29961,18 @@ class NullablesAndOptionalsStruct(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="nullableInt", Tag=1, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="optionalInt", Tag=2, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="nullableOptionalInt", Tag=3, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="nullableString", Tag=4, Type=typing.Union[Nullable, str]), - ClusterObjectFieldDescriptor(Label="optionalString", Tag=5, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="nullableOptionalString", Tag=6, Type=typing.Union[None, Nullable, str]), - ClusterObjectFieldDescriptor(Label="nullableStruct", Tag=7, Type=typing.Union[Nullable, TestCluster.Structs.SimpleStruct]), - ClusterObjectFieldDescriptor(Label="optionalStruct", Tag=8, Type=typing.Optional[TestCluster.Structs.SimpleStruct]), - ClusterObjectFieldDescriptor(Label="nullableOptionalStruct", Tag=9, Type=typing.Union[None, Nullable, TestCluster.Structs.SimpleStruct]), - ClusterObjectFieldDescriptor(Label="nullableList", Tag=10, Type=typing.Union[Nullable, typing.List[TestCluster.Enums.SimpleEnum]]), - ClusterObjectFieldDescriptor(Label="optionalList", Tag=11, Type=typing.Optional[typing.List[TestCluster.Enums.SimpleEnum]]), - ClusterObjectFieldDescriptor(Label="nullableOptionalList", Tag=12, Type=typing.Union[None, Nullable, typing.List[TestCluster.Enums.SimpleEnum]]), + ClusterObjectFieldDescriptor(Label="nullableInt", Tag=0, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="optionalInt", Tag=1, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="nullableOptionalInt", Tag=2, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="nullableString", Tag=3, Type=typing.Union[Nullable, str]), + ClusterObjectFieldDescriptor(Label="optionalString", Tag=4, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="nullableOptionalString", Tag=5, Type=typing.Union[None, Nullable, str]), + ClusterObjectFieldDescriptor(Label="nullableStruct", Tag=6, Type=typing.Union[Nullable, TestCluster.Structs.SimpleStruct]), + ClusterObjectFieldDescriptor(Label="optionalStruct", Tag=7, Type=typing.Optional[TestCluster.Structs.SimpleStruct]), + ClusterObjectFieldDescriptor(Label="nullableOptionalStruct", Tag=8, Type=typing.Union[None, Nullable, TestCluster.Structs.SimpleStruct]), + ClusterObjectFieldDescriptor(Label="nullableList", Tag=9, Type=typing.Union[Nullable, typing.List[TestCluster.Enums.SimpleEnum]]), + ClusterObjectFieldDescriptor(Label="optionalList", Tag=10, Type=typing.Optional[typing.List[TestCluster.Enums.SimpleEnum]]), + ClusterObjectFieldDescriptor(Label="nullableOptionalList", Tag=11, Type=typing.Union[None, Nullable, typing.List[TestCluster.Enums.SimpleEnum]]), ]) nullableInt: 'typing.Union[Nullable, uint]' = NullValue @@ -29994,9 +29994,9 @@ class NestedStruct(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="a", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="b", Tag=2, Type=bool), - ClusterObjectFieldDescriptor(Label="c", Tag=3, Type=TestCluster.Structs.SimpleStruct), + ClusterObjectFieldDescriptor(Label="a", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="b", Tag=1, Type=bool), + ClusterObjectFieldDescriptor(Label="c", Tag=2, Type=TestCluster.Structs.SimpleStruct), ]) a: 'uint' = 0 @@ -30009,13 +30009,13 @@ class NestedStructList(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="a", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="b", Tag=2, Type=bool), - ClusterObjectFieldDescriptor(Label="c", Tag=3, Type=TestCluster.Structs.SimpleStruct), - ClusterObjectFieldDescriptor(Label="d", Tag=4, Type=typing.List[TestCluster.Structs.SimpleStruct]), - ClusterObjectFieldDescriptor(Label="e", Tag=5, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="f", Tag=6, Type=typing.List[bytes]), - ClusterObjectFieldDescriptor(Label="g", Tag=7, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="a", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="b", Tag=1, Type=bool), + ClusterObjectFieldDescriptor(Label="c", Tag=2, Type=TestCluster.Structs.SimpleStruct), + ClusterObjectFieldDescriptor(Label="d", Tag=3, Type=typing.List[TestCluster.Structs.SimpleStruct]), + ClusterObjectFieldDescriptor(Label="e", Tag=4, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="f", Tag=5, Type=typing.List[bytes]), + ClusterObjectFieldDescriptor(Label="g", Tag=6, Type=typing.List[uint]), ]) a: 'uint' = 0 @@ -30032,7 +30032,7 @@ class DoubleNestedStructList(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="a", Tag=1, Type=typing.List[TestCluster.Structs.NestedStructList]), + ClusterObjectFieldDescriptor(Label="a", Tag=0, Type=typing.List[TestCluster.Structs.NestedStructList]), ]) a: 'typing.List[TestCluster.Structs.NestedStructList]' = field(default_factory=lambda: []) @@ -30043,8 +30043,8 @@ class TestListStructOctet(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="operationalCert", Tag=2, Type=bytes), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="operationalCert", Tag=1, Type=bytes), ]) fabricIndex: 'uint' = 0 diff --git a/third_party/zap/repo b/third_party/zap/repo index 9c60a2d16c3eaf..d57a2656ed73c1 160000 --- a/third_party/zap/repo +++ b/third_party/zap/repo @@ -1 +1 @@ -Subproject commit 9c60a2d16c3eaf9bbb30256bcb798b4c348446d0 +Subproject commit d57a2656ed73c12a72e393ab65cb0a729b9593a9 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 43e92032bf5ce9..c504ead4c10204 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 @@ -43,8 +43,8 @@ namespace Structs { namespace LabelStruct { enum class Fields { - kLabel = 1, - kValue = 2, + kLabel = 0, + kValue = 1, }; struct Type @@ -1791,9 +1791,9 @@ namespace Structs { namespace SceneExtensionFieldSet { enum class Fields { - kClusterId = 1, - kLength = 2, - kValue = 3, + kClusterId = 0, + kLength = 1, + kValue = 2, }; struct Type @@ -4534,10 +4534,10 @@ namespace Structs { namespace PowerProfileRecord { enum class Fields { - kPowerProfileId = 1, - kEnergyPhaseId = 2, - kPowerProfileRemoteControl = 3, - kPowerProfileState = 4, + kPowerProfileId = 0, + kEnergyPhaseId = 1, + kPowerProfileRemoteControl = 2, + kPowerProfileState = 3, }; struct Type @@ -4558,8 +4558,8 @@ using DecodableType = Type; namespace ScheduledPhase { enum class Fields { - kEnergyPhaseId = 1, - kScheduledTime = 2, + kEnergyPhaseId = 0, + kScheduledTime = 1, }; struct Type @@ -4578,12 +4578,12 @@ using DecodableType = Type; namespace TransferredPhase { enum class Fields { - kEnergyPhaseId = 1, - kMacroPhaseId = 2, - kExpectedDuration = 3, - kPeakPower = 4, - kEnergy = 5, - kMaxActivationDelay = 6, + kEnergyPhaseId = 0, + kMacroPhaseId = 1, + kExpectedDuration = 2, + kPeakPower = 3, + kEnergy = 4, + kMaxActivationDelay = 5, }; struct Type @@ -6112,8 +6112,8 @@ namespace Structs { namespace DeviceType { enum class Fields { - kType = 1, - kRevision = 2, + kType = 0, + kRevision = 1, }; struct Type @@ -7066,12 +7066,12 @@ namespace Structs { namespace ActionStruct { enum class Fields { - kActionID = 1, - kName = 2, - kType = 3, - kEndpointListID = 4, - kSupportedCommands = 5, - kStatus = 6, + kActionID = 0, + kName = 1, + kType = 2, + kEndpointListID = 3, + kSupportedCommands = 4, + kStatus = 5, }; struct Type @@ -7094,10 +7094,10 @@ using DecodableType = Type; namespace EndpointListStruct { enum class Fields { - kEndpointListID = 1, - kName = 2, - kType = 3, - kEndpoints = 4, + kEndpointListID = 0, + kName = 1, + kType = 2, + kEndpoints = 3, }; struct Type @@ -9699,7 +9699,7 @@ namespace Structs { namespace BasicCommissioningInfoType { enum class Fields { - kFailSafeExpiryLengthMs = 1, + kFailSafeExpiryLengthMs = 0, }; struct Type @@ -10107,8 +10107,8 @@ namespace Structs { namespace NetworkInfo { enum class Fields { - kNetworkID = 1, - kConnected = 2, + kNetworkID = 0, + kConnected = 1, }; struct Type @@ -10127,14 +10127,14 @@ using DecodableType = Type; namespace ThreadInterfaceScanResult { enum class Fields { - kPanId = 1, - kExtendedPanId = 2, - kNetworkName = 3, - kChannel = 4, - kVersion = 5, - kExtendedAddress = 6, - kRssi = 7, - kLqi = 8, + kPanId = 0, + kExtendedPanId = 1, + kNetworkName = 2, + kChannel = 3, + kVersion = 4, + kExtendedAddress = 5, + kRssi = 6, + kLqi = 7, }; struct Type @@ -10159,12 +10159,12 @@ using DecodableType = Type; namespace WiFiInterfaceScanResult { enum class Fields { - kSecurity = 1, - kSsid = 2, - kBssid = 3, - kChannel = 4, - kWiFiBand = 5, - kRssi = 6, + kSecurity = 0, + kSsid = 1, + kBssid = 2, + kChannel = 3, + kWiFiBand = 4, + kRssi = 5, }; struct Type @@ -10994,12 +10994,12 @@ namespace Structs { namespace NetworkInterfaceType { enum class Fields { - kName = 1, - kFabricConnected = 2, - kOffPremiseServicesReachableIPv4 = 3, - kOffPremiseServicesReachableIPv6 = 4, - kHardwareAddress = 5, - kType = 6, + kName = 0, + kFabricConnected = 1, + kOffPremiseServicesReachableIPv4 = 2, + kOffPremiseServicesReachableIPv6 = 3, + kHardwareAddress = 4, + kType = 5, }; struct Type @@ -11330,9 +11330,9 @@ namespace Structs { namespace SoftwareFault { enum class Fields { - kId = 1, - kName = 2, - kFaultRecording = 3, + kId = 0, + kName = 1, + kFaultRecording = 2, }; struct Type @@ -11352,11 +11352,11 @@ using DecodableType = Type; namespace ThreadMetrics { enum class Fields { - kId = 1, - kName = 2, - kStackFreeCurrent = 3, - kStackFreeMinimum = 4, - kStackSize = 5, + kId = 0, + kName = 1, + kStackFreeCurrent = 2, + kStackFreeMinimum = 3, + kStackSize = 4, }; struct Type @@ -11598,20 +11598,20 @@ namespace Structs { namespace NeighborTable { enum class Fields { - kExtAddress = 1, - kAge = 2, - kRloc16 = 3, - kLinkFrameCounter = 4, - kMleFrameCounter = 5, - kLqi = 6, - kAverageRssi = 7, - kLastRssi = 8, - kFrameErrorRate = 9, - kMessageErrorRate = 10, - kRxOnWhenIdle = 11, - kFullThreadDevice = 12, - kFullNetworkData = 13, - kIsChild = 14, + kExtAddress = 0, + kAge = 1, + kRloc16 = 2, + kLinkFrameCounter = 3, + kMleFrameCounter = 4, + kLqi = 5, + kAverageRssi = 6, + kLastRssi = 7, + kFrameErrorRate = 8, + kMessageErrorRate = 9, + kRxOnWhenIdle = 10, + kFullThreadDevice = 11, + kFullNetworkData = 12, + kIsChild = 13, }; struct Type @@ -11642,18 +11642,18 @@ using DecodableType = Type; namespace OperationalDatasetComponents { enum class Fields { - kActiveTimestampPresent = 1, - kPendingTimestampPresent = 2, - kMasterKeyPresent = 3, - kNetworkNamePresent = 4, - kExtendedPanIdPresent = 5, - kMeshLocalPrefixPresent = 6, - kDelayPresent = 7, - kPanIdPresent = 8, - kChannelPresent = 9, - kPskcPresent = 10, - kSecurityPolicyPresent = 11, - kChannelMaskPresent = 12, + kActiveTimestampPresent = 0, + kPendingTimestampPresent = 1, + kMasterKeyPresent = 2, + kNetworkNamePresent = 3, + kExtendedPanIdPresent = 4, + kMeshLocalPrefixPresent = 5, + kDelayPresent = 6, + kPanIdPresent = 7, + kChannelPresent = 8, + kPskcPresent = 9, + kSecurityPolicyPresent = 10, + kChannelMaskPresent = 11, }; struct Type @@ -11682,16 +11682,16 @@ using DecodableType = Type; namespace RouteTable { enum class Fields { - kExtAddress = 1, - kRloc16 = 2, - kRouterId = 3, - kNextHop = 4, - kPathCost = 5, - kLQIIn = 6, - kLQIOut = 7, - kAge = 8, - kAllocated = 9, - kLinkEstablished = 10, + kExtAddress = 0, + kRloc16 = 1, + kRouterId = 2, + kNextHop = 3, + kPathCost = 4, + kLQIIn = 5, + kLQIOut = 6, + kAge = 7, + kAllocated = 8, + kLinkEstablished = 9, }; struct Type @@ -11718,8 +11718,8 @@ using DecodableType = Type; namespace SecurityPolicy { enum class Fields { - kRotationTime = 1, - kFlags = 2, + kRotationTime = 0, + kFlags = 1, }; struct Type @@ -14399,12 +14399,12 @@ namespace Structs { namespace FabricDescriptor { enum class Fields { - kFabricIndex = 1, - kRootPublicKey = 2, - kVendorId = 3, - kFabricId = 4, - kNodeId = 5, - kLabel = 6, + kFabricIndex = 0, + kRootPublicKey = 1, + kVendorId = 2, + kFabricId = 3, + kNodeId = 4, + kLabel = 5, }; struct Type @@ -14427,8 +14427,8 @@ using DecodableType = Type; namespace NOCStruct { enum class Fields { - kFabricIndex = 1, - kNoc = 2, + kFabricIndex = 0, + kNoc = 1, }; struct Type @@ -15946,9 +15946,9 @@ namespace Structs { namespace ModeOptionStruct { enum class Fields { - kLabel = 1, - kMode = 2, - kSemanticTag = 3, + kLabel = 0, + kMode = 1, + kSemanticTag = 2, }; struct Type @@ -15968,8 +15968,8 @@ using DecodableType = Type; namespace SemanticTag { enum class Fields { - kMfgCode = 1, - kValue = 2, + kMfgCode = 0, + kValue = 1, }; struct Type @@ -16675,8 +16675,8 @@ namespace Structs { namespace DlCredential { enum class Fields { - kCredentialType = 1, - kCredentialIndex = 2, + kCredentialType = 0, + kCredentialIndex = 1, }; struct Type @@ -29258,8 +29258,8 @@ namespace Structs { namespace IasAceZoneStatusResult { enum class Fields { - kZoneId = 1, - kZoneStatus = 2, + kZoneId = 0, + kZoneStatus = 1, }; struct Type @@ -30394,11 +30394,11 @@ namespace Structs { namespace ChannelInfo { enum class Fields { - kMajorNumber = 1, - kMinorNumber = 2, - kName = 3, - kCallSign = 4, - kAffiliateCallSign = 5, + kMajorNumber = 0, + kMinorNumber = 1, + kName = 2, + kCallSign = 3, + kAffiliateCallSign = 4, }; struct Type @@ -30420,10 +30420,10 @@ using DecodableType = Type; namespace LineupInfo { enum class Fields { - kOperatorName = 1, - kLineupName = 2, - kPostalCode = 3, - kLineupInfoType = 4, + kOperatorName = 0, + kLineupName = 1, + kPostalCode = 2, + kLineupInfoType = 3, }; struct Type @@ -30712,8 +30712,8 @@ namespace Structs { namespace TargetInfo { enum class Fields { - kIdentifier = 1, - kName = 2, + kIdentifier = 0, + kName = 1, }; struct Type @@ -30925,8 +30925,8 @@ namespace Structs { namespace PlaybackPosition { enum class Fields { - kUpdatedAt = 1, - kPosition = 2, + kUpdatedAt = 0, + kPosition = 1, }; struct Type @@ -31537,10 +31537,10 @@ namespace Structs { namespace InputInfo { enum class Fields { - kIndex = 1, - kInputType = 2, - kName = 3, - kDescription = 4, + kIndex = 0, + kInputType = 1, + kName = 2, + kDescription = 3, }; struct Type @@ -32182,9 +32182,9 @@ namespace Structs { namespace Dimension { enum class Fields { - kWidth = 1, - kHeight = 2, - kMetric = 3, + kWidth = 0, + kHeight = 1, + kMetric = 2, }; struct Type @@ -32204,8 +32204,8 @@ using DecodableType = Type; namespace AdditionalInfo { enum class Fields { - kName = 1, - kValue = 2, + kName = 0, + kValue = 1, }; struct Type @@ -32224,9 +32224,9 @@ using DecodableType = Type; namespace Parameter { enum class Fields { - kType = 1, - kValue = 2, - kExternalIDList = 3, + kType = 0, + kValue = 1, + kExternalIDList = 2, }; struct Type @@ -32252,7 +32252,7 @@ struct DecodableType namespace ContentSearch { enum class Fields { - kParameterList = 1, + kParameterList = 0, }; struct Type @@ -32274,9 +32274,9 @@ struct DecodableType namespace StyleInformation { enum class Fields { - kImageUrl = 1, - kColor = 2, - kSize = 3, + kImageUrl = 0, + kColor = 1, + kSize = 2, }; struct Type @@ -32296,12 +32296,12 @@ using DecodableType = Type; namespace BrandingInformation { enum class Fields { - kProviderName = 1, - kBackground = 2, - kLogo = 3, - kProgressBar = 4, - kSplash = 5, - kWaterMark = 6, + kProviderName = 0, + kBackground = 1, + kLogo = 2, + kProgressBar = 3, + kSplash = 4, + kWaterMark = 5, }; struct Type @@ -32559,9 +32559,9 @@ namespace Structs { namespace OutputInfo { enum class Fields { - kIndex = 1, - kOutputType = 2, - kName = 3, + kIndex = 0, + kOutputType = 1, + kName = 2, }; struct Type @@ -32772,8 +32772,8 @@ namespace Structs { namespace ApplicationLauncherApplication { enum class Fields { - kCatalogVendorId = 1, - kApplicationId = 2, + kCatalogVendorId = 0, + kApplicationId = 1, }; struct Type @@ -32792,8 +32792,8 @@ using DecodableType = Type; namespace ApplicationEP { enum class Fields { - kApplication = 1, - kEndpoint = 2, + kApplication = 0, + kEndpoint = 1, }; struct Type @@ -33067,8 +33067,8 @@ namespace Structs { namespace ApplicationBasicApplication { enum class Fields { - kCatalogVendorId = 1, - kApplicationId = 2, + kCatalogVendorId = 0, + kApplicationId = 1, }; struct Type @@ -33477,14 +33477,14 @@ namespace Structs { namespace SimpleStruct { enum class Fields { - kA = 1, - kB = 2, - kC = 3, - kD = 4, - kE = 5, - kF = 6, - kG = 7, - kH = 8, + kA = 0, + kB = 1, + kC = 2, + kD = 3, + kE = 4, + kF = 5, + kG = 6, + kH = 7, }; struct Type @@ -33509,18 +33509,18 @@ using DecodableType = Type; namespace NullablesAndOptionalsStruct { enum class Fields { - kNullableInt = 1, - kOptionalInt = 2, - kNullableOptionalInt = 3, - kNullableString = 4, - kOptionalString = 5, - kNullableOptionalString = 6, - kNullableStruct = 7, - kOptionalStruct = 8, - kNullableOptionalStruct = 9, - kNullableList = 10, - kOptionalList = 11, - kNullableOptionalList = 12, + kNullableInt = 0, + kOptionalInt = 1, + kNullableOptionalInt = 2, + kNullableString = 3, + kOptionalString = 4, + kNullableOptionalString = 5, + kNullableStruct = 6, + kOptionalStruct = 7, + kNullableOptionalStruct = 8, + kNullableList = 9, + kOptionalList = 10, + kNullableOptionalList = 11, }; struct Type @@ -33564,9 +33564,9 @@ struct DecodableType namespace NestedStruct { enum class Fields { - kA = 1, - kB = 2, - kC = 3, + kA = 0, + kB = 1, + kC = 2, }; struct Type @@ -33586,13 +33586,13 @@ using DecodableType = Type; namespace NestedStructList { enum class Fields { - kA = 1, - kB = 2, - kC = 3, - kD = 4, - kE = 5, - kF = 6, - kG = 7, + kA = 0, + kB = 1, + kC = 2, + kD = 3, + kE = 4, + kF = 5, + kG = 6, }; struct Type @@ -33626,7 +33626,7 @@ struct DecodableType namespace DoubleNestedStructList { enum class Fields { - kA = 1, + kA = 0, }; struct Type @@ -33648,8 +33648,8 @@ struct DecodableType namespace TestListStructOctet { enum class Fields { - kFabricIndex = 1, - kOperationalCert = 2, + kFabricIndex = 0, + kOperationalCert = 1, }; struct Type From 38536088c76e5d30d2570f820a3dcc9696adf21c Mon Sep 17 00:00:00 2001 From: Sagar Dhawan Date: Wed, 19 Jan 2022 19:03:24 -0800 Subject: [PATCH 078/124] Fix pairing via the SetupCodePairer (#13677) * Fix pairing via the SetupCodePairer * Fix iOS CHIPTool and make sure only PASE is setup for BLE discovery * Fix compile * Restyled by clang-format * Update src/controller/SetUpCodePairer.cpp Co-authored-by: Boris Zbarsky * Fix Darwin test * Fix the zapt file Co-authored-by: Restyled.io Co-authored-by: Boris Zbarsky --- src/controller/CHIPDeviceController.cpp | 1 - src/controller/SetUpCodePairer.cpp | 4 +- .../QRCode/QRCodeViewController.m | 73 +++++-------------- .../Framework/CHIP.xcodeproj/project.pbxproj | 8 ++ src/darwin/Framework/CHIP/CHIP.h | 1 + .../CHIP/CHIPCommissioningParameters.h | 51 +++++++++++++ .../CHIP/CHIPCommissioningParameters.m | 26 +++++++ .../Framework/CHIP/CHIPDeviceController.h | 4 + .../Framework/CHIP/CHIPDeviceController.mm | 42 +++++++++++ .../CHIP/CHIPDevicePairingDelegate.h | 8 +- .../CHIP/CHIPDevicePairingDelegateBridge.h | 2 + .../CHIP/CHIPDevicePairingDelegateBridge.mm | 14 +++- .../CHIP/templates/clusters-tests.zapt | 7 ++ .../Framework/CHIPTests/CHIPClustersTests.m | 7 ++ 14 files changed, 184 insertions(+), 64 deletions(-) create mode 100644 src/darwin/Framework/CHIP/CHIPCommissioningParameters.h create mode 100644 src/darwin/Framework/CHIP/CHIPCommissioningParameters.m diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 4be4ab46314cb4..61350870fb1a0e 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -1649,7 +1649,6 @@ void DeviceCommissioner::OnNodeIdResolved(const chip::Dnssd::ResolvedNodeData & if (mDeviceBeingCommissioned != nullptr && mDeviceBeingCommissioned->GetDeviceId() == nodeData.mPeerId.GetNodeId()) { - RendezvousCleanup(CHIP_NO_ERROR); // Let's release the device that's being paired, if pairing was successful, // and the device is available on the operational network. ReleaseCommissioneeDevice(mDeviceBeingCommissioned); diff --git a/src/controller/SetUpCodePairer.cpp b/src/controller/SetUpCodePairer.cpp index a53c4fdcb2fa37..ddb460051b40b9 100644 --- a/src/controller/SetUpCodePairer.cpp +++ b/src/controller/SetUpCodePairer.cpp @@ -146,7 +146,9 @@ void SetUpCodePairer::OnDiscoveredDeviceOverBle(BLE_CONNECTION_OBJECT connObj) Transport::PeerAddress peerAddress = Transport::PeerAddress::BLE(); RendezvousParameters params = RendezvousParameters().SetPeerAddress(peerAddress).SetConnectionObject(connObj); - OnDeviceDiscovered(params); + // We don't have network credentials, so can't do the entire pairing flow. Just establish a PASE session to the + // device and let our consumer deal with the rest. + LogErrorOnFailure(mCommissioner->EstablishPASEConnection(mRemoteId, params.SetSetupPINCode(mSetUpPINCode))); } void SetUpCodePairer::OnDiscoveredDeviceOverBleSuccess(void * appState, BLE_CONNECTION_OBJECT connObj) diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m index df63c6978e8aec..4e2ee4ba58bad8 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m @@ -628,62 +628,31 @@ - (void)retrieveAndSendWiFiCredentials } NSLog(@"New SSID: %@ Password: %@", networkSSID.text, networkPassword.text); - [strongSelf addOrUpdateWiFiNetwork:networkSSID.text password:networkPassword.text]; + [strongSelf commissionWithSSID:networkSSID.text password:networkPassword.text]; } }]]; [self presentViewController:alertController animated:YES completion:nil]; } -- (void)addOrUpdateWiFiNetwork:(NSString *)ssid password:(NSString *)password +- (void)commissionWithSSID:(NSString *)ssid password:(NSString *)password { - CHIPDevice * chipDevice = CHIPGetDeviceBeingCommissioned(); - if (chipDevice) { - self.cluster = [[CHIPNetworkCommissioning alloc] initWithDevice:chipDevice endpoint:0 queue:dispatch_get_main_queue()]; - __auto_type * params = [[CHIPNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams alloc] init]; - params.ssid = [ssid dataUsingEncoding:NSUTF8StringEncoding]; - params.credentials = [password dataUsingEncoding:NSUTF8StringEncoding]; - params.breadcrumb = @(0); - - __weak typeof(self) weakSelf = self; - [self->_cluster - addOrUpdateWiFiNetworkWithParams:params - completionHandler:^(CHIPNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable response, - NSError * _Nullable error) { - // TODO: addWiFiNetworkWithParams - // returns status in its response, - // not via the NSError! - [weakSelf onAddNetworkResponse:error isWiFi:YES]; - }]; - } else { - NSLog(@"Status: Failed to find a device being commissioned"); - } -} -- (void)addOrUpdateThreadNetwork:(NSData *)threadDataSet -{ - CHIPDevice * chipDevice = CHIPGetDeviceBeingCommissioned(); - if (chipDevice) { - self.cluster = [[CHIPNetworkCommissioning alloc] initWithDevice:chipDevice endpoint:0 queue:dispatch_get_main_queue()]; - __auto_type * params = [[CHIPNetworkCommissioningClusterAddOrUpdateThreadNetworkParams alloc] init]; - params.operationalDataset = threadDataSet; - params.breadcrumb = @(0); - - __weak typeof(self) weakSelf = self; - [self->_cluster - addOrUpdateThreadNetworkWithParams:params - completionHandler:^(CHIPNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable response, - NSError * _Nullable error) { - // TODO: addThreadNetworkWithParams - // returns status in its response, - // not via the NSError! - [weakSelf onAddNetworkResponse:error isWiFi:NO]; - }]; - } else { - NSLog(@"Status: Failed to find a device being commissioned"); + NSError * error; + CHIPDeviceController * controller = [CHIPDeviceController sharedController]; + // create commissioning params in ObjC. Pass those in here with network credentials. + // maybe this just becomes the new norm + CHIPCommissioningParameters * params = [[CHIPCommissioningParameters alloc] init]; + params.wifiSSID = [ssid dataUsingEncoding:NSUTF8StringEncoding]; + params.wifiCredentials = [password dataUsingEncoding:NSUTF8StringEncoding]; + + uint64_t deviceId = CHIPGetNextAvailableDeviceID() - 1; + + if (![controller commissionDevice:deviceId commissioningParams:params error:&error]) { + NSLog(@"Failed to commission Device %llu, with error %@", deviceId, error); } } -- (void)onAddNetworkResponse:(NSError *)error isWiFi:(BOOL)isWiFi +- (void)onAddNetworkResponse:(NSError *)error { if (error != nil) { NSLog(@"Error adding network: %@", error); @@ -691,13 +660,9 @@ - (void)onAddNetworkResponse:(NSError *)error isWiFi:(BOOL)isWiFi } __auto_type * params = [[CHIPNetworkCommissioningClusterConnectNetworkParams alloc] init]; - if (isWiFi) { - NSString * ssid = CHIPGetDomainValueForKey(kCHIPToolDefaultsDomain, kNetworkSSIDDefaultsKey); - params.networkID = [ssid dataUsingEncoding:NSUTF8StringEncoding]; - } else { - uint8_t tempThreadNetworkId[] = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }; - params.networkID = [NSData dataWithBytes:tempThreadNetworkId length:sizeof(tempThreadNetworkId)]; - } + + NSString * ssid = CHIPGetDomainValueForKey(kCHIPToolDefaultsDomain, kNetworkSSIDDefaultsKey); + params.networkID = [ssid dataUsingEncoding:NSUTF8StringEncoding]; params.breadcrumb = @(0); __weak typeof(self) weakSelf = self; @@ -721,7 +686,7 @@ - (void)onConnectNetworkResponse:(NSError *)error [controller updateDevice:deviceId fabricId:0]; } -- (void)onAddressUpdated:(NSError * _Nullable)error +- (void)onCommissioningComplete:(NSError * _Nullable)error { if (error != nil) { NSLog(@"Error retrieving device informations over Mdns: %@", error); diff --git a/src/darwin/Framework/CHIP.xcodeproj/project.pbxproj b/src/darwin/Framework/CHIP.xcodeproj/project.pbxproj index ad51c7f8c0ef25..9c5f2f2794e573 100644 --- a/src/darwin/Framework/CHIP.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/CHIP.xcodeproj/project.pbxproj @@ -68,7 +68,9 @@ 998F286D26D55E10001846C6 /* CHIPKeypair.h in Headers */ = {isa = PBXBuildFile; fileRef = 998F286C26D55E10001846C6 /* CHIPKeypair.h */; settings = {ATTRIBUTES = (Public, ); }; }; 998F286F26D55EC5001846C6 /* CHIPP256KeypairBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 998F286E26D55EC5001846C6 /* CHIPP256KeypairBridge.h */; }; 998F287126D56940001846C6 /* CHIPP256KeypairBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 998F287026D56940001846C6 /* CHIPP256KeypairBridge.mm */; }; + 99AECC802798A57F00B6355B /* CHIPCommissioningParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = 99AECC7F2798A57E00B6355B /* CHIPCommissioningParameters.m */; }; 99C65E10267282F1003402F6 /* CHIPControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C65E0F267282F1003402F6 /* CHIPControllerTests.m */; }; + 99D466E12798936D0089A18F /* CHIPCommissioningParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 99D466E02798936D0089A18F /* CHIPCommissioningParameters.h */; settings = {ATTRIBUTES = (Public, ); }; }; B20252972459E34F00F97062 /* CHIP.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B202528D2459E34F00F97062 /* CHIP.framework */; }; B289D4212639C0D300D4E314 /* CHIPOnboardingPayloadParser.h in Headers */ = {isa = PBXBuildFile; fileRef = B289D41F2639C0D300D4E314 /* CHIPOnboardingPayloadParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; B289D4222639C0D300D4E314 /* CHIPOnboardingPayloadParser.m in Sources */ = {isa = PBXBuildFile; fileRef = B289D4202639C0D300D4E314 /* CHIPOnboardingPayloadParser.m */; }; @@ -157,7 +159,9 @@ 998F286C26D55E10001846C6 /* CHIPKeypair.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CHIPKeypair.h; sourceTree = ""; }; 998F286E26D55EC5001846C6 /* CHIPP256KeypairBridge.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CHIPP256KeypairBridge.h; sourceTree = ""; }; 998F287026D56940001846C6 /* CHIPP256KeypairBridge.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = CHIPP256KeypairBridge.mm; sourceTree = ""; }; + 99AECC7F2798A57E00B6355B /* CHIPCommissioningParameters.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CHIPCommissioningParameters.m; sourceTree = ""; }; 99C65E0F267282F1003402F6 /* CHIPControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CHIPControllerTests.m; sourceTree = ""; }; + 99D466E02798936D0089A18F /* CHIPCommissioningParameters.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CHIPCommissioningParameters.h; sourceTree = ""; }; B202528D2459E34F00F97062 /* CHIP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CHIP.framework; sourceTree = BUILT_PRODUCTS_DIR; }; B20252912459E34F00F97062 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; B20252962459E34F00F97062 /* CHIPTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CHIPTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -285,6 +289,8 @@ 997DED172695344800975E97 /* CHIPThreadOperationalDataset.h */, 2C8C8FBD253E0C2100797F05 /* CHIPPersistentStorageDelegateBridge.h */, 2C8C8FBF253E0C2100797F05 /* CHIPPersistentStorageDelegateBridge.mm */, + 99D466E02798936D0089A18F /* CHIPCommissioningParameters.h */, + 99AECC7F2798A57E00B6355B /* CHIPCommissioningParameters.m */, 2CB7163E252F731E0026E2BB /* CHIPDevicePairingDelegate.h */, 2CB71638252E8A7B0026E2BB /* CHIPDevicePairingDelegateBridge.h */, 2CB71639252E8A7B0026E2BB /* CHIPDevicePairingDelegateBridge.mm */, @@ -345,6 +351,7 @@ 2CB7163B252E8A7B0026E2BB /* CHIPDevicePairingDelegateBridge.h in Headers */, 1E16A90326B98AF100683C53 /* CHIPTestClustersObjc.h in Headers */, 2C1B027B2641DB4E00780EF1 /* CHIPOperationalCredentialsDelegate.h in Headers */, + 99D466E12798936D0089A18F /* CHIPCommissioningParameters.h in Headers */, B289D4212639C0D300D4E314 /* CHIPOnboardingPayloadParser.h in Headers */, 513DDB862761F69300DAA01A /* CHIPAttributeTLVValueDecoder_Internal.h in Headers */, 2CB7163F252F731E0026E2BB /* CHIPDevicePairingDelegate.h in Headers */, @@ -492,6 +499,7 @@ buildActionMask = 2147483647; files = ( 2C8C8FC2253E0C2100797F05 /* CHIPPersistentStorageDelegateBridge.mm in Sources */, + 99AECC802798A57F00B6355B /* CHIPCommissioningParameters.m in Sources */, 2CB7163C252E8A7C0026E2BB /* CHIPDevicePairingDelegateBridge.mm in Sources */, 997DED162695343400975E97 /* CHIPThreadOperationalDataset.mm in Sources */, 998F287126D56940001846C6 /* CHIPP256KeypairBridge.mm in Sources */, diff --git a/src/darwin/Framework/CHIP/CHIP.h b/src/darwin/Framework/CHIP/CHIP.h index 376ec2193a5a77..3fba51a63516b6 100644 --- a/src/darwin/Framework/CHIP/CHIP.h +++ b/src/darwin/Framework/CHIP/CHIP.h @@ -19,6 +19,7 @@ #import #import #import +#import #import #import #import diff --git a/src/darwin/Framework/CHIP/CHIPCommissioningParameters.h b/src/darwin/Framework/CHIP/CHIPCommissioningParameters.h new file mode 100644 index 00000000000000..5a2e65da00d13b --- /dev/null +++ b/src/darwin/Framework/CHIP/CHIPCommissioningParameters.h @@ -0,0 +1,51 @@ +/** + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * The class definition for the CHIPCommissioningParameters + * + */ +@interface CHIPCommissioningParameters : NSObject + +/** + * The CSRNonce + */ +@property (nonatomic, nullable, copy, readwrite) NSData * CSRNonce; +/** + * The AttestationNonce + */ +@property (nonatomic, nullable, copy, readwrite) NSData * attestationNonce; +/** + * The Wi-Fi SSID + */ +@property (nonatomic, nullable, copy, readwrite) NSData * wifiSSID; +/** + * The Wi-Fi Credentials + */ +@property (nonatomic, nullable, copy, readwrite) NSData * wifiCredentials; +/** + * The Thread operational dataset + */ +@property (nonatomic, nullable, copy, readwrite) NSData * threadOperationalDataset; + +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/CHIPCommissioningParameters.m b/src/darwin/Framework/CHIP/CHIPCommissioningParameters.m new file mode 100644 index 00000000000000..a4ed0d8c257a04 --- /dev/null +++ b/src/darwin/Framework/CHIP/CHIPCommissioningParameters.m @@ -0,0 +1,26 @@ +/** + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "CHIPCommissioningParameters.h" + +NS_ASSUME_NONNULL_BEGIN + +@implementation CHIPCommissioningParameters : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/CHIPDeviceController.h b/src/darwin/Framework/CHIP/CHIPDeviceController.h index bd239b55de7cd8..0d53fb0e9a37bf 100644 --- a/src/darwin/Framework/CHIP/CHIPDeviceController.h +++ b/src/darwin/Framework/CHIP/CHIPDeviceController.h @@ -28,6 +28,7 @@ NS_ASSUME_NONNULL_BEGIN typedef void (^CHIPDeviceConnectionCallback)(CHIPDevice * _Nullable device, NSError * _Nullable error); +@class CHIPCommissioningParameters; @protocol CHIPDevicePairingDelegate; @protocol CHIPPersistentStorageDelegate; @protocol CHIPKeypair; @@ -49,6 +50,9 @@ typedef void (^CHIPDeviceConnectionCallback)(CHIPDevice * _Nullable device, NSEr error:(NSError * __autoreleasing *)error; - (BOOL)pairDevice:(uint64_t)deviceID onboardingPayload:(NSString *)onboardingPayload error:(NSError * __autoreleasing *)error; +- (BOOL)commissionDevice:(uint64_t)deviceId + commissioningParams:(CHIPCommissioningParameters *)commissioningParams + error:(NSError * __autoreleasing *)error; - (void)setListenPort:(uint16_t)port; - (BOOL)unpairDevice:(uint64_t)deviceID error:(NSError * __autoreleasing *)error; diff --git a/src/darwin/Framework/CHIP/CHIPDeviceController.mm b/src/darwin/Framework/CHIP/CHIPDeviceController.mm index 7b3a14afcb55e4..ff81c56cc7947b 100644 --- a/src/darwin/Framework/CHIP/CHIPDeviceController.mm +++ b/src/darwin/Framework/CHIP/CHIPDeviceController.mm @@ -16,6 +16,7 @@ */ #import "CHIPDeviceController.h" +#import "CHIPCommissioningParameters.h" #import "CHIPDevicePairingDelegateBridge.h" #import "CHIPDevice_Internal.h" #import "CHIPError_Internal.h" @@ -352,6 +353,47 @@ - (BOOL)pairDevice:(uint64_t)deviceID onboardingPayload:(NSString *)onboardingPa return success; } +- (BOOL)commissionDevice:(uint64_t)deviceId + commissioningParams:(CHIPCommissioningParameters *)commissioningParams + error:(NSError * __autoreleasing *)error +{ + __block CHIP_ERROR errorCode = CHIP_ERROR_INCORRECT_STATE; + __block BOOL success = NO; + if (![self isRunning]) { + success = ![self checkForError:errorCode logMsg:kErrorNotRunning error:error]; + return success; + } + dispatch_sync(_chipWorkQueue, ^{ + if ([self isRunning]) { + chip::Controller::CommissioningParameters params; + if (commissioningParams.CSRNonce) { + params.SetCSRNonce( + chip::ByteSpan((uint8_t *) commissioningParams.CSRNonce.bytes, commissioningParams.CSRNonce.length)); + } + if (commissioningParams.attestationNonce) { + params.SetAttestationNonce(chip::ByteSpan( + (uint8_t *) commissioningParams.attestationNonce.bytes, commissioningParams.attestationNonce.length)); + } + if (commissioningParams.threadOperationalDataset) { + params.SetThreadOperationalDataset(chip::ByteSpan((uint8_t *) commissioningParams.threadOperationalDataset.bytes, + commissioningParams.threadOperationalDataset.length)); + } + if (commissioningParams.wifiSSID && commissioningParams.wifiCredentials) { + chip::ByteSpan ssid((uint8_t *) commissioningParams.wifiSSID.bytes, commissioningParams.wifiSSID.length); + chip::ByteSpan credentials( + (uint8_t *) commissioningParams.wifiCredentials.bytes, commissioningParams.wifiCredentials.length); + chip::Controller::WiFiCredentials wifiCreds(ssid, credentials); + params.SetWiFiCredentials(wifiCreds); + } + + _operationalCredentialsDelegate->SetDeviceID(deviceId); + errorCode = self.cppCommissioner->Commission(deviceId, params); + } + success = ![self checkForError:errorCode logMsg:kErrorPairDevice error:error]; + }); + return success; +} + - (BOOL)unpairDevice:(uint64_t)deviceID error:(NSError * __autoreleasing *)error { __block CHIP_ERROR errorCode = CHIP_ERROR_INCORRECT_STATE; diff --git a/src/darwin/Framework/CHIP/CHIPDevicePairingDelegate.h b/src/darwin/Framework/CHIP/CHIPDevicePairingDelegate.h index 1c8293c67e0e1b..1c403911955f8f 100644 --- a/src/darwin/Framework/CHIP/CHIPDevicePairingDelegate.h +++ b/src/darwin/Framework/CHIP/CHIPDevicePairingDelegate.h @@ -45,16 +45,16 @@ typedef NS_ENUM(NSUInteger, CHIPPairingStatus) { - (void)onPairingComplete:(nullable NSError *)error; /** - * Notify the delegate when pairing is deleted + * Notify the delegate when commissioning is completed * */ -- (void)onPairingDeleted:(nullable NSError *)error; +- (void)onCommissioningComplete:(nullable NSError *)error; /** - * Notify the delegate when address is updated + * Notify the delegate when pairing is deleted * */ -- (void)onAddressUpdated:(nullable NSError *)error; +- (void)onPairingDeleted:(nullable NSError *)error; @end diff --git a/src/darwin/Framework/CHIP/CHIPDevicePairingDelegateBridge.h b/src/darwin/Framework/CHIP/CHIPDevicePairingDelegateBridge.h index c7ae4779ccb0c8..85dbf70eb8272a 100644 --- a/src/darwin/Framework/CHIP/CHIPDevicePairingDelegateBridge.h +++ b/src/darwin/Framework/CHIP/CHIPDevicePairingDelegateBridge.h @@ -38,6 +38,8 @@ class CHIPDevicePairingDelegateBridge : public chip::Controller::DevicePairingDe void OnPairingDeleted(CHIP_ERROR error) override; + void OnCommissioningComplete(chip::NodeId deviceId, CHIP_ERROR error) override; + void OnAddressUpdateComplete(chip::NodeId nodeId, CHIP_ERROR error) override; private: diff --git a/src/darwin/Framework/CHIP/CHIPDevicePairingDelegateBridge.mm b/src/darwin/Framework/CHIP/CHIPDevicePairingDelegateBridge.mm index 264726caca220c..c0a69fe17cb98d 100644 --- a/src/darwin/Framework/CHIP/CHIPDevicePairingDelegateBridge.mm +++ b/src/darwin/Framework/CHIP/CHIPDevicePairingDelegateBridge.mm @@ -95,17 +95,23 @@ } } -void CHIPDevicePairingDelegateBridge::OnAddressUpdateComplete(chip::NodeId nodeId, CHIP_ERROR error) +void CHIPDevicePairingDelegateBridge::OnCommissioningComplete(chip::NodeId nodeId, CHIP_ERROR error) { - NSLog(@"OnAddressUpdateComplete. Status %s", chip::ErrorStr(error)); + NSLog(@"DevicePairingDelegate Commissioning complete. NodeId %llu Status %s", nodeId, chip::ErrorStr(error)); id strongDelegate = mDelegate; - if ([strongDelegate respondsToSelector:@selector(onAddressUpdated:)]) { + if ([strongDelegate respondsToSelector:@selector(onCommissioningComplete:)]) { if (strongDelegate && mQueue) { dispatch_async(mQueue, ^{ NSError * nsError = [CHIPError errorForCHIPErrorCode:error]; - [strongDelegate onAddressUpdated:nsError]; + [strongDelegate onCommissioningComplete:nsError]; }); } } } + +void CHIPDevicePairingDelegateBridge::OnAddressUpdateComplete(chip::NodeId nodeId, CHIP_ERROR error) +{ + // Todo, is there any benefit of exposing this anymore? + NSLog(@"OnAddressUpdateComplete. Status %s", chip::ErrorStr(error)); +} diff --git a/src/darwin/Framework/CHIP/templates/clusters-tests.zapt b/src/darwin/Framework/CHIP/templates/clusters-tests.zapt index b510811b21b636..f76727aa9c7e06 100644 --- a/src/darwin/Framework/CHIP/templates/clusters-tests.zapt +++ b/src/darwin/Framework/CHIP/templates/clusters-tests.zapt @@ -90,6 +90,13 @@ CHIPDevice * GetConnectedDevice(void) _expectation = nil; } +- (void)onCommissioningComplete:(NSError *)error +{ + XCTAssertEqual(error.code, 0); + [_expectation fulfill]; + _expectation = nil; +} + - (void)onAddressUpdated:(NSError *)error { XCTAssertEqual(error.code, 0); diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 835eb5fa2b4999..3ff04e01a59ac0 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -106,6 +106,13 @@ - (void)onPairingComplete:(NSError *)error _expectation = nil; } +- (void)onCommissioningComplete:(NSError *)error +{ + XCTAssertEqual(error.code, 0); + [_expectation fulfill]; + _expectation = nil; +} + - (void)onAddressUpdated:(NSError *)error { XCTAssertEqual(error.code, 0); From 6e99bebe61b7b658cd8df9d7ac6e95c6e65f7c2d Mon Sep 17 00:00:00 2001 From: Song GUO Date: Thu, 20 Jan 2022 14:43:51 +0800 Subject: [PATCH 079/124] [IM] Move lifecycle management of WriteClient to application (#13248) * [IM] Move ownership of WriteClient to application * Update src/app/WriteClient.cpp Co-authored-by: Boris Zbarsky * Move Init to private Co-authored-by: Boris Zbarsky --- src/app/DeviceProxy.cpp | 20 -- src/app/DeviceProxy.h | 3 - src/app/InteractionModelEngine.cpp | 47 ----- src/app/InteractionModelEngine.h | 22 --- src/app/WriteClient.cpp | 98 +++++----- src/app/WriteClient.h | 175 +++++++----------- src/app/tests/TestWriteInteraction.cpp | 50 ++--- .../tests/integration/chip_im_initiator.cpp | 12 +- src/controller/WriteInteraction.h | 24 +-- .../python/chip/clusters/attribute.cpp | 13 +- 10 files changed, 159 insertions(+), 305 deletions(-) diff --git a/src/app/DeviceProxy.cpp b/src/app/DeviceProxy.cpp index 0e374cff5bc385..b0958115a684c3 100644 --- a/src/app/DeviceProxy.cpp +++ b/src/app/DeviceProxy.cpp @@ -68,24 +68,4 @@ void DeviceProxy::CancelIMResponseHandler(void * commandObj) mCallbacksMgr.CancelResponseCallback(transactionId, 0 /* seqNum, always 0 for IM before #6559 */); } -CHIP_ERROR DeviceProxy::SendWriteAttributeRequest(app::WriteClientHandle aHandle, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - VerifyOrReturnLogError(IsSecureConnected(), CHIP_ERROR_INCORRECT_STATE); - - CHIP_ERROR err = CHIP_NO_ERROR; - - app::WriteClient * writeClient = aHandle.Get(); - - if (onSuccessCallback != nullptr || onFailureCallback != nullptr) - { - AddIMResponseHandler(writeClient, onSuccessCallback, onFailureCallback); - } - if ((err = aHandle.SendWriteRequest(GetSecureSession().Value())) != CHIP_NO_ERROR) - { - CancelIMResponseHandler(writeClient); - } - return err; -} - } // namespace chip diff --git a/src/app/DeviceProxy.h b/src/app/DeviceProxy.h index 50684140aabb54..fd7e8275d4144e 100644 --- a/src/app/DeviceProxy.h +++ b/src/app/DeviceProxy.h @@ -53,9 +53,6 @@ class DLL_EXPORT DeviceProxy virtual CHIP_ERROR ShutdownSubscriptions() { return CHIP_ERROR_NOT_IMPLEMENTED; } - virtual CHIP_ERROR SendWriteAttributeRequest(app::WriteClientHandle aHandle, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback); - virtual CHIP_ERROR SendCommands(app::CommandSender * commandObj); // Interaction model uses the object and callback interface instead of sequence number to mark different transactions. diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 8ee3ea7e957aa1..4b8ad8c596eedf 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -112,14 +112,6 @@ void InteractionModelEngine::Shutdown() // mpActiveReadClientList = nullptr; - for (auto & writeClient : mWriteClients) - { - if (!writeClient.IsFree()) - { - writeClient.Shutdown(); - } - } - for (auto & writeHandler : mWriteHandlers) { VerifyOrDie(writeHandler.IsFree()); @@ -147,21 +139,6 @@ uint32_t InteractionModelEngine::GetNumActiveReadHandlers() const return numActive; } -uint32_t InteractionModelEngine::GetNumActiveWriteClients() const -{ - uint32_t numActive = 0; - - for (auto & writeClient : mWriteClients) - { - if (!writeClient.IsFree()) - { - numActive++; - } - } - - return numActive; -} - uint32_t InteractionModelEngine::GetNumActiveWriteHandlers() const { uint32_t numActive = 0; @@ -205,25 +182,6 @@ CHIP_ERROR InteractionModelEngine::ShutdownSubscriptions(FabricIndex aFabricInde return CHIP_NO_ERROR; } -CHIP_ERROR InteractionModelEngine::NewWriteClient(WriteClientHandle & apWriteClient, WriteClient::Callback * apCallback, - const Optional & aTimedWriteTimeoutMs) -{ - apWriteClient.SetWriteClient(nullptr); - - for (auto & writeClient : mWriteClients) - { - if (!writeClient.IsFree()) - { - continue; - } - ReturnLogErrorOnFailure(writeClient.Init(mpExchangeMgr, apCallback, aTimedWriteTimeoutMs)); - apWriteClient.SetWriteClient(&writeClient); - return CHIP_NO_ERROR; - } - - return CHIP_ERROR_NO_MEMORY; -} - void InteractionModelEngine::OnDone(CommandHandler & apCommandObj) { mCommandHandlerObjs.ReleaseObject(&apCommandObj); @@ -428,11 +386,6 @@ void InteractionModelEngine::OnResponseTimeout(Messaging::ExchangeContext * ec) ChipLogValueExchange(ec)); } -uint16_t InteractionModelEngine::GetWriteClientArrayIndex(const WriteClient * const apWriteClient) const -{ - return static_cast(apWriteClient - mWriteClients); -} - uint16_t InteractionModelEngine::GetReadHandlerArrayIndex(const ReadHandler * const apReadHandler) const { return static_cast(apReadHandler - mReadHandlers); diff --git a/src/app/InteractionModelEngine.h b/src/app/InteractionModelEngine.h index e52c3c2ad85003..7f9f92d5e343a9 100644 --- a/src/app/InteractionModelEngine.h +++ b/src/app/InteractionModelEngine.h @@ -111,28 +111,9 @@ class InteractionModelEngine : public Messaging::ExchangeDelegate, public Comman */ CHIP_ERROR ShutdownSubscriptions(FabricIndex aFabricIndex, NodeId aPeerNodeId); - /** - * Retrieve a WriteClient that the SDK consumer can use to send a write. If the call succeeds, - * see WriteClient documentation for lifetime handling. - * - * The Write interaction is more like Invoke interaction (cluster specific commands) since it will include cluster specific - * payload, and may have the need to encode non-scalar values (like structs and arrays). Thus we use WriteClientHandle to - * prevent user's code from leaking WriteClients. - * - * @param[out] apWriteClient A pointer to the WriteClient object. - * - * @retval #CHIP_ERROR_NO_MEMORY If there is no WriteClient available - * @retval #CHIP_NO_ERROR On success. - */ - CHIP_ERROR NewWriteClient(WriteClientHandle & apWriteClient, WriteClient::Callback * callback, - const Optional & aTimedWriteTimeoutMs = NullOptional); - uint32_t GetNumActiveReadHandlers() const; uint32_t GetNumActiveWriteHandlers() const; - uint32_t GetNumActiveWriteClients() const; - - uint16_t GetWriteClientArrayIndex(const WriteClient * const apWriteClient) const; uint16_t GetReadHandlerArrayIndex(const ReadHandler * const apReadHandler) const; /** @@ -256,12 +237,9 @@ class InteractionModelEngine : public Messaging::ExchangeDelegate, public Comman CommandHandlerInterface * mCommandHandlerList = nullptr; - // TODO(#8006): investgate if we can disable some IM functions on some compact accessories. - // TODO(#8006): investgate if we can provide more flexible object management on devices with more resources. BitMapObjectPool mCommandHandlerObjs; BitMapObjectPool mTimedHandlers; ReadHandler mReadHandlers[CHIP_IM_MAX_NUM_READ_HANDLER]; - WriteClient mWriteClients[CHIP_IM_MAX_NUM_WRITE_CLIENT]; WriteHandler mWriteHandlers[CHIP_IM_MAX_NUM_WRITE_HANDLER]; reporting::Engine mReportingEngine; BitMapObjectPool mClusterInfoPool; diff --git a/src/app/WriteClient.cpp b/src/app/WriteClient.cpp index fb13647938d53a..fcb647adb8922b 100644 --- a/src/app/WriteClient.cpp +++ b/src/app/WriteClient.cpp @@ -31,11 +31,10 @@ namespace chip { namespace app { -CHIP_ERROR WriteClient::Init(Messaging::ExchangeManager * apExchangeMgr, Callback * apCallback, - const Optional & aTimedWriteTimeoutMs) +CHIP_ERROR WriteClient::Init() { - VerifyOrReturnError(apExchangeMgr != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(mpExchangeMgr == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mState == State::Uninitialized, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mpExchangeMgr != nullptr, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(mpExchangeCtx == nullptr, CHIP_ERROR_INCORRECT_STATE); System::PacketBufferHandle packet = System::PacketBufferHandle::New(chip::app::kMaxSecureSduLengthBytes); @@ -44,43 +43,55 @@ CHIP_ERROR WriteClient::Init(Messaging::ExchangeManager * apExchangeMgr, Callbac mMessageWriter.Init(std::move(packet)); ReturnErrorOnFailure(mWriteRequestBuilder.Init(&mMessageWriter)); - mWriteRequestBuilder.TimedRequest(aTimedWriteTimeoutMs.HasValue()); + mWriteRequestBuilder.TimedRequest(mTimedWriteTimeoutMs.HasValue()); ReturnErrorOnFailure(mWriteRequestBuilder.GetError()); mWriteRequestBuilder.CreateWriteRequests(); ReturnErrorOnFailure(mWriteRequestBuilder.GetError()); - ClearExistingExchangeContext(); - mpExchangeMgr = apExchangeMgr; - mpCallback = apCallback; - mTimedWriteTimeoutMs = aTimedWriteTimeoutMs; + MoveToState(State::Initialized); return CHIP_NO_ERROR; } -void WriteClient::Shutdown() +void WriteClient::Close() { - VerifyOrReturn(mState != State::Uninitialized); - ClearExistingExchangeContext(); - ShutdownInternal(); -} + MoveToState(State::AwaitingDestruction); -void WriteClient::ShutdownInternal() -{ - mMessageWriter.Reset(); + // OnDone below can destroy us before we unwind all the way back into the + // exchange code and it tries to close itself. Make sure that it doesn't + // try to notify us that it's closing, since we will be dead. + // + // For more details, see #10344. + if (mpExchangeCtx != nullptr) + { + mpExchangeCtx->SetDelegate(nullptr); + } - mpExchangeMgr = nullptr; mpExchangeCtx = nullptr; - ClearState(); - mpCallback->OnDone(this); + if (mpCallback) + { + mpCallback->OnDone(this); + } } -void WriteClient::ClearExistingExchangeContext() +void WriteClient::Abort() { - // Discard any existing exchange context. Effectively we can only have one IM exchange with - // a single node at any one time. + // + // If the exchange context hasn't already been gracefully closed + // (signaled by setting it to null), then we need to forcibly + // tear it down. + // if (mpExchangeCtx != nullptr) { + // We might be a delegate for this exchange, and we don't want the + // OnExchangeClosing notification in that case. Null out the delegate + // to avoid that. + // + // TODO: This makes all sorts of assumptions about what the delegate is + // (notice the "might" above!) that might not hold in practice. We + // really need a better solution here.... + mpExchangeCtx->SetDelegate(nullptr); mpExchangeCtx->Abort(); mpExchangeCtx = nullptr; } @@ -135,6 +146,10 @@ CHIP_ERROR WriteClient::ProcessWriteResponseMessage(System::PacketBufferHandle & CHIP_ERROR WriteClient::PrepareAttribute(const AttributePathParams & attributePathParams) { + if (mState == State::Uninitialized) + { + ReturnErrorOnFailure(Init()); + } VerifyOrReturnError(attributePathParams.IsValidAttributePath(), CHIP_ERROR_INVALID_PATH_LIST); AttributeDataIBs::Builder & writeRequests = mWriteRequestBuilder.GetWriteRequests(); AttributeDataIB::Builder & attributeDataIB = writeRequests.CreateAttributeDataIBBuilder(); @@ -195,6 +210,9 @@ const char * WriteClient::GetStateStr() const case State::ResponseReceived: return "ResponseReceived"; + + case State::AwaitingDestruction: + return "AwaitingDestruction"; } #endif // CHIP_DETAIL_LOGGING return "N/A"; @@ -220,10 +238,6 @@ CHIP_ERROR WriteClient::SendWriteRequest(const SessionHandle & session, System:: err = FinalizeMessage(mPendingWriteData); SuccessOrExit(err); - // Discard any existing exchange context. Effectively we can only have one exchange per WriteClient - // at any one time. - ClearExistingExchangeContext(); - // Create a new exchange context. mpExchangeCtx = mpExchangeMgr->NewContext(session, this); VerifyOrExit(mpExchangeCtx != nullptr, err = CHIP_ERROR_NO_MEMORY); @@ -246,7 +260,6 @@ CHIP_ERROR WriteClient::SendWriteRequest(const SessionHandle & session, System:: if (err != CHIP_NO_ERROR) { ChipLogError(DataManagement, "Write client failed to SendWriteRequest: %s", ErrorStr(err)); - ClearExistingExchangeContext(); } else { @@ -259,8 +272,11 @@ CHIP_ERROR WriteClient::SendWriteRequest(const SessionHandle & session, System:: // Always shutdown on Group communication ChipLogDetail(DataManagement, "Closing on group Communication "); - // onDone is called - ShutdownInternal(); + // Tell the application to release the object. + // TODO: Consumers expect to hand off ownership of the WriteClient and wait for OnDone + // after SendWriteRequest returns success. Calling OnDone before returning is weird. + // Need to refactor the code to avoid this. + Close(); } } @@ -329,7 +345,7 @@ CHIP_ERROR WriteClient::OnMessageReceived(Messaging::ExchangeContext * apExchang if (mState != State::AwaitingResponse) { - ShutdownInternal(); + Close(); } // Else we got a response to a Timed Request and just sent the write. @@ -345,7 +361,7 @@ void WriteClient::OnResponseTimeout(Messaging::ExchangeContext * apExchangeConte { mpCallback->OnError(this, StatusIB(Protocols::InteractionModel::Status::Failure), CHIP_ERROR_TIMEOUT); } - ShutdownInternal(); + Close(); } CHIP_ERROR WriteClient::ProcessAttributeStatusIB(AttributeStatusIB::Parser & aAttributeStatusIB) @@ -391,24 +407,6 @@ CHIP_ERROR WriteClient::ProcessAttributeStatusIB(AttributeStatusIB::Parser & aAt return err; } -CHIP_ERROR WriteClientHandle::SendWriteRequest(const SessionHandle & session, System::Clock::Timeout timeout) -{ - CHIP_ERROR err = mpWriteClient->SendWriteRequest(session, timeout); - - // Transferring ownership of the underlying WriteClient to the IM layer. IM will manage its lifetime. - // For groupcast writes, there is no transfer of ownership since the interaction is done upon transmission of the action - if (err == CHIP_NO_ERROR) - { - // Release the WriteClient without closing it. - mpWriteClient = nullptr; - } - else - { - SetWriteClient(nullptr); - } - return err; -} - CHIP_ERROR WriteClient::HandleTimedStatus(const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload, StatusIB & aStatusIB) { diff --git a/src/app/WriteClient.h b/src/app/WriteClient.h index e81e09d422643d..43ab35df860148 100644 --- a/src/app/WriteClient.h +++ b/src/app/WriteClient.h @@ -105,6 +105,48 @@ class WriteClient : public Messaging::ExchangeDelegate virtual void OnDone(WriteClient * apWriteClient) = 0; }; + /** + * Construct the client object. Within the lifetime + * of this instance. + * + * @param[in] apExchangeMgr A pointer to the ExchangeManager object. + * @param[in] apDelegate InteractionModelDelegate set by application. + * @param[in] aTimedWriteTimeoutMs If provided, do a timed write using this timeout. + */ + WriteClient(Messaging::ExchangeManager * apExchangeMgr, Callback * apCallback, + const Optional & aTimedWriteTimeoutMs) : + mpExchangeMgr(apExchangeMgr), + mpCallback(apCallback), mTimedWriteTimeoutMs(aTimedWriteTimeoutMs) + {} + + /** + * Encode an attribute value that can be directly encoded using TLVWriter::Put + */ + template + CHIP_ERROR EncodeAttributeWritePayload(const chip::app::AttributePathParams & attributePath, const T & value) + { + chip::TLV::TLVWriter * writer = nullptr; + + ReturnErrorOnFailure(PrepareAttribute(attributePath)); + VerifyOrReturnError((writer = GetAttributeDataIBTLVWriter()) != nullptr, CHIP_ERROR_INCORRECT_STATE); + ReturnErrorOnFailure( + DataModel::Encode(*writer, chip::TLV::ContextTag(to_underlying(chip::app::AttributeDataIB::Tag::kData)), value)); + ReturnErrorOnFailure(FinishAttribute()); + + return CHIP_NO_ERROR; + } + + /** + * Once SendWriteRequest returns successfully, the WriteClient will + * handle calling Shutdown on itself once it decides it's done with waiting + * for a response (i.e. times out or gets a response). Client can specify + * the maximum time to wait for response (in milliseconds) via timeout parameter. + * Default timeout value will be used otherwise. + * If SendWriteRequest is never called, or the call fails, the API + * consumer is responsible for calling Shutdown on the WriteClient. + */ + CHIP_ERROR SendWriteRequest(const SessionHandle & session, System::Clock::Timeout timeout = kImMessageTimeout); + /** * Shutdown the WriteClient. This terminates this instance * of the object and releases all held resources. @@ -115,6 +157,14 @@ class WriteClient : public Messaging::ExchangeDelegate CHIP_ERROR FinishAttribute(); TLV::TLVWriter * GetAttributeDataIBTLVWriter(); + /* + * Destructor - as part of destruction, it will abort the exchange context + * if a valid one still exists. + * + * See Abort() for details on when that might occur. + */ + virtual ~WriteClient() { Abort(); } + private: friend class TestWriteInteraction; friend class InteractionModelEngine; @@ -128,40 +178,18 @@ class WriteClient : public Messaging::ExchangeDelegate AwaitingTimedStatus, // Sent a Tiemd Request, waiting for response. AwaitingResponse, // The client has sent out the write request message ResponseReceived, // We have gotten a response after sending write request + AwaitingDestruction, // The object has completed its work and is awaiting destruction by the application. }; /** - * Finalize Write Request Message TLV Builder and retrieve final data from tlv builder for later sending + * The actual init function, called during encoding first attribute data. */ - CHIP_ERROR FinalizeMessage(System::PacketBufferHandle & aPacket); + CHIP_ERROR Init(); /** - * Once SendWriteRequest returns successfully, the WriteClient will - * handle calling Shutdown on itself once it decides it's done with waiting - * for a response (i.e. times out or gets a response). Client can specify - * the maximum time to wait for response (in milliseconds) via timeout parameter. - * Default timeout value will be used otherwise. - * If SendWriteRequest is never called, or the call fails, the API - * consumer is responsible for calling Shutdown on the WriteClient. - */ - CHIP_ERROR SendWriteRequest(const SessionHandle & session, System::Clock::Timeout timeout); - - /** - * Initialize the client object. Within the lifetime - * of this instance, this method is invoked once after object - * construction until a call to Shutdown is made to terminate the - * instance. - * - * @param[in] apExchangeMgr A pointer to the ExchangeManager object. - * @param[in] apDelegate InteractionModelDelegate set by application. - * @param[in] aTimedWriteTimeoutMs If provided, do a timed write using this timeout. - * @retval #CHIP_ERROR_INCORRECT_STATE incorrect state if it is already initialized - * @retval #CHIP_NO_ERROR On success. + * Finalize Write Request Message TLV Builder and retrieve final data from tlv builder for later sending */ - CHIP_ERROR Init(Messaging::ExchangeManager * apExchangeMgr, Callback * apDelegate, - const Optional & aTimedWriteTimeoutMs); - - virtual ~WriteClient() = default; + CHIP_ERROR FinalizeMessage(System::PacketBufferHandle & aPacket); CHIP_ERROR OnMessageReceived(Messaging::ExchangeContext * apExchangeContext, const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload) override; @@ -175,15 +203,23 @@ class WriteClient : public Messaging::ExchangeDelegate void MoveToState(const State aTargetState); CHIP_ERROR ProcessWriteResponseMessage(System::PacketBufferHandle && payload); CHIP_ERROR ProcessAttributeStatusIB(AttributeStatusIB::Parser & aAttributeStatusIB); - void ClearExistingExchangeContext(); const char * GetStateStr() const; void ClearState(); /** - * Internal shutdown method that we use when we know what's going on with - * our exchange and don't need to manually close it. + * Called internally to signal the completion of all work on this object, gracefully close the + * exchange (by calling into the base class) and finally, signal to the application that it's + * safe to release this object. */ - void ShutdownInternal(); + void Close(); + + /** + * This forcibly closes the exchange context if a valid one is pointed to. Such a situation does + * not arise during normal message processing flows that all normally call Close() above. This can only + * arise due to application-initiated destruction of the object when this object is handling receiving/sending + * message payloads. + */ + void Abort(); // Handle a message received when we are expecting a status response to a // Timed Request. The caller is assumed to have already checked that our @@ -213,82 +249,5 @@ class WriteClient : public Messaging::ExchangeDelegate Optional mTimedWriteTimeoutMs; }; -class WriteClientHandle -{ -public: - /** - * Construct an empty WriteClientHandle. - */ - WriteClientHandle() : mpWriteClient(nullptr) {} - WriteClientHandle(decltype(nullptr)) : mpWriteClient(nullptr) {} - - /** - * Construct a WriteClientHandle that takes ownership of a WriteClient from another. - */ - WriteClientHandle(WriteClientHandle && aOther) - { - mpWriteClient = aOther.mpWriteClient; - aOther.mpWriteClient = nullptr; - } - - ~WriteClientHandle() { SetWriteClient(nullptr); } - - /** - * Access a WriteClientHandle's public methods. - */ - WriteClient * operator->() const { return mpWriteClient; } - - WriteClient * Get() const { return mpWriteClient; } - - /** - * Finalize the message and send it to the desired node. The underlying write object will always be released, and the user - * should not use this object after calling this function. - * - * Note: In failure cases this will _synchronously_ invoke OnDone on the - * WriteClient::Callback before returning. - */ - CHIP_ERROR SendWriteRequest(const SessionHandle & session, System::Clock::Timeout timeout = kImMessageTimeout); - - /** - * Encode an attribute value that can be directly encoded using TLVWriter::Put - */ - template - CHIP_ERROR EncodeAttributeWritePayload(const chip::app::AttributePathParams & attributePath, const T & value) - { - chip::TLV::TLVWriter * writer = nullptr; - - VerifyOrReturnError(mpWriteClient != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure(mpWriteClient->PrepareAttribute(attributePath)); - VerifyOrReturnError((writer = mpWriteClient->GetAttributeDataIBTLVWriter()) != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorOnFailure( - DataModel::Encode(*writer, chip::TLV::ContextTag(to_underlying(chip::app::AttributeDataIB::Tag::kData)), value)); - ReturnErrorOnFailure(mpWriteClient->FinishAttribute()); - - return CHIP_NO_ERROR; - } - - /** - * Set the internal WriteClient of the Handler, expected to be called by InteractionModelEngline only since the user - * application does not have direct access to apWriteClient. - */ - void SetWriteClient(WriteClient * apWriteClient) - { - if (mpWriteClient != nullptr) - { - mpWriteClient->Shutdown(); - } - mpWriteClient = apWriteClient; - } - -private: - friend class TestWriteInteraction; - - WriteClientHandle(const WriteClientHandle &) = delete; - WriteClientHandle & operator=(const WriteClientHandle &) = delete; - WriteClientHandle & operator=(const WriteClientHandle &&) = delete; - - WriteClient * mpWriteClient = nullptr; -}; - } // namespace app } // namespace chip diff --git a/src/app/tests/TestWriteInteraction.cpp b/src/app/tests/TestWriteInteraction.cpp index ee167fddb16ed9..57b893372007de 100644 --- a/src/app/tests/TestWriteInteraction.cpp +++ b/src/app/tests/TestWriteInteraction.cpp @@ -50,7 +50,7 @@ class TestWriteInteraction static void TestWriteRoundtripWithClusterObjects(nlTestSuite * apSuite, void * apContext); private: - static void AddAttributeDataIB(nlTestSuite * apSuite, void * apContext, WriteClientHandle & aWriteClient); + static void AddAttributeDataIB(nlTestSuite * apSuite, void * apContext, WriteClient & aWriteClient); static void AddAttributeStatus(nlTestSuite * apSuite, void * apContext, WriteHandler & aWriteHandler); static void GenerateWriteRequest(nlTestSuite * apSuite, void * apContext, bool aIsTimedWrite, System::PacketBufferHandle & aPayload); @@ -84,7 +84,7 @@ class TestWriteClientCallback : public chip::app::WriteClient::Callback int mOnDoneCalled = 0; }; -void TestWriteInteraction::AddAttributeDataIB(nlTestSuite * apSuite, void * apContext, WriteClientHandle & aWriteClient) +void TestWriteInteraction::AddAttributeDataIB(nlTestSuite * apSuite, void * apContext, WriteClient & aWriteClient) { CHIP_ERROR err = CHIP_NO_ERROR; AttributePathParams attributePathParams; @@ -92,15 +92,15 @@ void TestWriteInteraction::AddAttributeDataIB(nlTestSuite * apSuite, void * apCo attributePathParams.mClusterId = 3; attributePathParams.mAttributeId = 4; - err = aWriteClient->PrepareAttribute(attributePathParams); + err = aWriteClient.PrepareAttribute(attributePathParams); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - chip::TLV::TLVWriter * writer = aWriteClient->GetAttributeDataIBTLVWriter(); + chip::TLV::TLVWriter * writer = aWriteClient.GetAttributeDataIBTLVWriter(); err = writer->PutBoolean(chip::TLV::ContextTag(to_underlying(AttributeDataIB::Tag::kData)), true); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - err = aWriteClient->FinishAttribute(); + err = aWriteClient.FinishAttribute(); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); } @@ -214,27 +214,21 @@ void TestWriteInteraction::TestWriteClient(nlTestSuite * apSuite, void * apConte CHIP_ERROR err = CHIP_NO_ERROR; - app::WriteClient writeClient; - app::WriteClientHandle writeClientHandle; - writeClientHandle.SetWriteClient(&writeClient); + TestWriteClientCallback callback; + app::WriteClient writeClient(&ctx.GetExchangeManager(), &callback, /* aTimedWriteTimeoutMs = */ NullOptional); System::PacketBufferHandle buf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); - TestWriteClientCallback callback; - err = writeClient.Init(&ctx.GetExchangeManager(), &callback, /* aTimedWriteTimeoutMs = */ NullOptional); - NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - AddAttributeDataIB(apSuite, apContext, writeClientHandle); + AddAttributeDataIB(apSuite, apContext, writeClient); - err = writeClientHandle.SendWriteRequest(ctx.GetSessionBobToAlice()); + err = writeClient.SendWriteRequest(ctx.GetSessionBobToAlice()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - // The internal WriteClient should be nullptr once we SendWriteRequest. - NL_TEST_ASSERT(apSuite, nullptr == writeClientHandle.mpWriteClient); GenerateWriteResponse(apSuite, apContext, buf); err = writeClient.ProcessWriteResponseMessage(std::move(buf)); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - writeClient.Shutdown(); + writeClient.Close(); Messaging::ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); NL_TEST_ASSERT(apSuite, rm->TestGetCountRetransTable() == 0); @@ -246,24 +240,20 @@ void TestWriteInteraction::TestWriteClientGroup(nlTestSuite * apSuite, void * ap CHIP_ERROR err = CHIP_NO_ERROR; - app::WriteClient writeClient; - app::WriteClientHandle writeClientHandle; - writeClientHandle.SetWriteClient(&writeClient); + TestWriteClientCallback callback; + app::WriteClient writeClient(&ctx.GetExchangeManager(), &callback, /* aTimedWriteTimeoutMs = */ NullOptional); System::PacketBufferHandle buf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); - TestWriteClientCallback callback; - err = writeClient.Init(&ctx.GetExchangeManager(), &callback, /* aTimedWriteTimeoutMs = */ NullOptional); - NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - AddAttributeDataIB(apSuite, apContext, writeClientHandle); + AddAttributeDataIB(apSuite, apContext, writeClient); SessionHandle groupSession = ctx.GetSessionBobToFriends(); NL_TEST_ASSERT(apSuite, groupSession->IsGroupSession()); - err = writeClientHandle.SendWriteRequest(groupSession); + err = writeClient.SendWriteRequest(groupSession); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - // The internal WriteClient should be shutdown once we SendWriteRequest for group. - NL_TEST_ASSERT(apSuite, nullptr == writeClientHandle.mpWriteClient); + // The WriteClient should be shutdown once we SendWriteRequest for group. + NL_TEST_ASSERT(apSuite, writeClient.mState == WriteClient::State::AwaitingDestruction); } void TestWriteInteraction::TestWriteHandler(nlTestSuite * apSuite, void * apContext) @@ -339,9 +329,7 @@ void TestWriteInteraction::TestWriteRoundtripWithClusterObjects(nlTestSuite * ap err = engine->Init(&ctx.GetExchangeManager(), nullptr); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - app::WriteClientHandle writeClient; - err = engine->NewWriteClient(writeClient, &callback); - NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + app::WriteClient writeClient(engine->GetExchangeManager(), &callback, Optional::Missing()); System::PacketBufferHandle buf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); @@ -407,9 +395,7 @@ void TestWriteInteraction::TestWriteRoundtrip(nlTestSuite * apSuite, void * apCo err = engine->Init(&ctx.GetExchangeManager(), nullptr); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); - app::WriteClientHandle writeClient; - err = engine->NewWriteClient(writeClient, &callback); - NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + app::WriteClient writeClient(engine->GetExchangeManager(), &callback, Optional::Missing()); System::PacketBufferHandle buf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); AddAttributeDataIB(apSuite, apContext, writeClient); diff --git a/src/app/tests/integration/chip_im_initiator.cpp b/src/app/tests/integration/chip_im_initiator.cpp index e00e3b8d65576d..7e84ac02f8e64d 100644 --- a/src/app/tests/integration/chip_im_initiator.cpp +++ b/src/app/tests/integration/chip_im_initiator.cpp @@ -341,7 +341,7 @@ CHIP_ERROR SendReadRequest() return err; } -CHIP_ERROR SendWriteRequest(chip::app::WriteClientHandle & apWriteClient) +CHIP_ERROR SendWriteRequest(chip::app::WriteClient & apWriteClient) { CHIP_ERROR err = CHIP_NO_ERROR; chip::TLV::TLVWriter * writer; @@ -354,13 +354,13 @@ CHIP_ERROR SendWriteRequest(chip::app::WriteClientHandle & apWriteClient) attributePathParams.mClusterId = 3; attributePathParams.mAttributeId = 4; - SuccessOrExit(err = apWriteClient->PrepareAttribute(attributePathParams)); + SuccessOrExit(err = apWriteClient.PrepareAttribute(attributePathParams)); - writer = apWriteClient->GetAttributeDataIBTLVWriter(); + writer = apWriteClient.GetAttributeDataIBTLVWriter(); SuccessOrExit(err = writer->PutBoolean(chip::TLV::ContextTag(chip::to_underlying(chip::app::AttributeDataIB::Tag::kData)), true)); - SuccessOrExit(err = apWriteClient->FinishAttribute()); + SuccessOrExit(err = apWriteClient.FinishAttribute()); SuccessOrExit(err = apWriteClient.SendWriteRequest(gSession.Get(), gMessageTimeout)); gWriteCount++; @@ -556,8 +556,8 @@ void WriteRequestTimerHandler(chip::System::Layer * systemLayer, void * appState if (gWriteRespCount < kMaxWriteMessageCount) { - chip::app::WriteClientHandle writeClient; - err = chip::app::InteractionModelEngine::GetInstance()->NewWriteClient(writeClient, &gMockDelegate); + chip::app::WriteClient writeClient(chip::app::InteractionModelEngine::GetInstance()->GetExchangeManager(), &gMockDelegate, + chip::Optional::Missing()); SuccessOrExit(err); err = SendWriteRequest(writeClient); diff --git a/src/controller/WriteInteraction.h b/src/controller/WriteInteraction.h index 4f2472b5ca27ea..09cc527f462515 100644 --- a/src/controller/WriteInteraction.h +++ b/src/controller/WriteInteraction.h @@ -78,6 +78,7 @@ class WriteCallback final : public app::WriteClient::Callback mOnDone(apWriteClient); } + chip::Platform::Delete(apWriteClient); // Always needs to be the last call chip::Platform::Delete(this); } @@ -100,29 +101,30 @@ CHIP_ERROR WriteAttribute(const SessionHandle & sessionHandle, chip::EndpointId WriteCallback::OnErrorCallbackType onErrorCb, const Optional & aTimedWriteTimeoutMs, WriteCallback::OnDoneCallbackType onDoneCb = nullptr) { - app::WriteClientHandle handle; - auto callback = Platform::MakeUnique(onSuccessCb, onErrorCb, onDoneCb); - VerifyOrReturnError(callback != nullptr, CHIP_ERROR_NO_MEMORY); - - ReturnErrorOnFailure(app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, callback.get(), aTimedWriteTimeoutMs)); + auto client = Platform::MakeUnique(app::InteractionModelEngine::GetInstance()->GetExchangeManager(), + callback.get(), aTimedWriteTimeoutMs); - // At this point the handle will ensure our callback's OnDone is always - // called. - callback.release(); + VerifyOrReturnError(callback != nullptr, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(client != nullptr, CHIP_ERROR_NO_MEMORY); if (sessionHandle->IsGroupSession()) { ReturnErrorOnFailure( - handle.EncodeAttributeWritePayload(chip::app::AttributePathParams(clusterId, attributeId), requestData)); + client->EncodeAttributeWritePayload(chip::app::AttributePathParams(clusterId, attributeId), requestData)); } else { ReturnErrorOnFailure( - handle.EncodeAttributeWritePayload(chip::app::AttributePathParams(endpointId, clusterId, attributeId), requestData)); + client->EncodeAttributeWritePayload(chip::app::AttributePathParams(endpointId, clusterId, attributeId), requestData)); } - ReturnErrorOnFailure(handle.SendWriteRequest(sessionHandle)); + ReturnErrorOnFailure(client->SendWriteRequest(sessionHandle)); + + // At this point the handle will ensure our callback's OnDone is always + // called. + client.release(); + callback.release(); return CHIP_NO_ERROR; } diff --git a/src/controller/python/chip/clusters/attribute.cpp b/src/controller/python/chip/clusters/attribute.cpp index 2953ae06651270..465448437aa7ee 100644 --- a/src/controller/python/chip/clusters/attribute.cpp +++ b/src/controller/python/chip/clusters/attribute.cpp @@ -213,7 +213,7 @@ class WriteClientCallback : public WriteClient::Callback void OnDone(WriteClient * apWriteClient) override { gOnWriteDoneCallback(mAppContext); - // delete apWriteClient; + delete apWriteClient; delete this; }; @@ -256,14 +256,14 @@ chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContex CHIP_ERROR err = CHIP_NO_ERROR; std::unique_ptr callback = std::make_unique(appContext); - app::WriteClientHandle client; + std::unique_ptr client = std::make_unique( + app::InteractionModelEngine::GetInstance()->GetExchangeManager(), callback.get(), + timedWriteTimeoutMs != 0 ? Optional(timedWriteTimeoutMs) : Optional::Missing()); va_list args; va_start(args, n); - SuccessOrExit(err = app::InteractionModelEngine::GetInstance()->NewWriteClient( - client, callback.get(), - timedWriteTimeoutMs != 0 ? Optional(timedWriteTimeoutMs) : Optional::Missing())); + VerifyOrExit(device != nullptr && device->GetSecureSession().HasValue(), err = CHIP_ERROR_INCORRECT_STATE); { for (size_t i = 0; i < n; i++) @@ -292,8 +292,9 @@ chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContex } } - SuccessOrExit(err = device->SendWriteAttributeRequest(std::move(client), nullptr, nullptr)); + SuccessOrExit(err = client->SendWriteRequest(device->GetSecureSession().Value())); + client.release(); callback.release(); exit: From 6dbf79d0b5a427f0900c8c95f7a99777423cf89f Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Thu, 20 Jan 2022 07:50:36 +0100 Subject: [PATCH 080/124] [third-party] Add third_party/jsoncpp (#13693) --- .gitmodules | 3 +++ examples/chip-tool/BUILD.gn | 2 ++ third_party/jsoncpp/BUILD.gn | 50 ++++++++++++++++++++++++++++++++++++ third_party/jsoncpp/repo | 1 + 4 files changed, 56 insertions(+) create mode 100644 third_party/jsoncpp/BUILD.gn create mode 160000 third_party/jsoncpp/repo diff --git a/.gitmodules b/.gitmodules index e90a9c72373ae2..b8f7b0832f3d99 100644 --- a/.gitmodules +++ b/.gitmodules @@ -162,3 +162,6 @@ [submodule "p6/lwip"] path = third_party/p6/p6_sdk/libs/lwip url = https://github.com/lwip-tcpip/lwip.git +[submodule "third_party/jsoncpp/repo"] + path = third_party/jsoncpp/repo + url = https://github.com/open-source-parsers/jsoncpp.git diff --git a/examples/chip-tool/BUILD.gn b/examples/chip-tool/BUILD.gn index 7b2fb7081f1d00..71b77ea34cffb1 100644 --- a/examples/chip-tool/BUILD.gn +++ b/examples/chip-tool/BUILD.gn @@ -71,6 +71,7 @@ static_library("chip-tool-utils") { "${chip_root}/src/lib", "${chip_root}/src/platform", "${chip_root}/third_party/inipp", + "${chip_root}/third_party/jsoncpp", ] cflags = [ "-Wconversion" ] @@ -96,6 +97,7 @@ executable("chip-tool") { "${chip_root}/src/lib", "${chip_root}/src/platform", "${chip_root}/third_party/inipp", + "${chip_root}/third_party/jsoncpp", ] cflags = [ "-Wconversion" ] diff --git a/third_party/jsoncpp/BUILD.gn b/third_party/jsoncpp/BUILD.gn new file mode 100644 index 00000000000000..aae8f025e2feca --- /dev/null +++ b/third_party/jsoncpp/BUILD.gn @@ -0,0 +1,50 @@ +# Copyright (c) 2022 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") + +config("jsoncpp_config") { + include_dirs = [ "repo/include" ] + + cflags = [ "-Wno-implicit-fallthrough" ] +} + +source_set("jsoncpp") { + sources = [ + "repo/include/json/allocator.h", + "repo/include/json/assertions.h", + "repo/include/json/config.h", + "repo/include/json/forwards.h", + "repo/include/json/json.h", + "repo/include/json/json_features.h", + "repo/include/json/reader.h", + "repo/include/json/value.h", + "repo/include/json/version.h", + "repo/include/json/writer.h", + "repo/src/lib_json/json_reader.cpp", + "repo/src/lib_json/json_tool.h", + "repo/src/lib_json/json_value.cpp", + "repo/src/lib_json/json_writer.cpp", + ] + + public_configs = [ ":jsoncpp_config" ] + + defines = [ + "JSON_USE_EXCEPTION=0", + "JSON_USE_NULLREF=0", + ] + + include_dirs = [ "repo/src/lib_json" ] +} diff --git a/third_party/jsoncpp/repo b/third_party/jsoncpp/repo new file mode 160000 index 00000000000000..42e892d96e47b1 --- /dev/null +++ b/third_party/jsoncpp/repo @@ -0,0 +1 @@ +Subproject commit 42e892d96e47b1f6e29844cc705e148ec4856448 From b700fb894018ea02f7bf701f66cd80f5fb6b096a Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Thu, 20 Jan 2022 08:54:25 +0100 Subject: [PATCH 081/124] [chip-tool] When sending a command fails for some reasons, chip-tool ignore the error (#13690) --- examples/chip-tool/commands/clusters/ModelCommand.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/chip-tool/commands/clusters/ModelCommand.cpp b/examples/chip-tool/commands/clusters/ModelCommand.cpp index a8e5ddd0071086..bf1af719280ae9 100644 --- a/examples/chip-tool/commands/clusters/ModelCommand.cpp +++ b/examples/chip-tool/commands/clusters/ModelCommand.cpp @@ -33,7 +33,9 @@ void ModelCommand::OnDeviceConnectedFn(void * context, ChipDevice * device) { ModelCommand * command = reinterpret_cast(context); VerifyOrReturn(command != nullptr, ChipLogError(chipTool, "OnDeviceConnectedFn: context is null")); - command->SendCommand(device, command->mEndPointId); + + CHIP_ERROR err = command->SendCommand(device, command->mEndPointId); + VerifyOrReturn(CHIP_NO_ERROR == err, command->SetCommandExitStatus(err)); } void ModelCommand::OnDeviceConnectionFailureFn(void * context, PeerId peerId, CHIP_ERROR err) From 914ba3e45c0dc9adbe7f9799787eb044a05c1ef8 Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk <66371704+kkasperczyk-no@users.noreply.github.com> Date: Thu, 20 Jan 2022 10:02:33 +0100 Subject: [PATCH 082/124] [nrfconnect] Added device type related kconfig options (#13691) There is no kconfig interface and documentation on how to enable commissionable device types and set device type value. * Added kconfig options for commissionable device types and device type * Extended examples documentation to describe the features and how to enable them --- .github/.wordlist.txt | 4 + config/zephyr/Kconfig | 14 ++++ .../nrfconnect_examples_configuration.md | 82 +++++++++++++++++++ .../nrfconnect/CHIPDevicePlatformConfig.h | 8 ++ 4 files changed, 108 insertions(+) diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 8685bab7478ec7..c811299aae330f 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -258,6 +258,7 @@ DataFrame dataset datasets dbf +DBG dBm DBUILD dbus @@ -316,6 +317,7 @@ DMM DNS Dnsmasq dnsmasqd +DNSSD DNSStubListener Dockerfile Dockerfiles @@ -650,6 +652,7 @@ MoveToSaturation MoveWithOnOff MPSL MRP +MTD MTU Multiband Multicast @@ -940,6 +943,7 @@ submodules subprocess SubscribeResponse SubscriptionId +subtype sudo svg SVR diff --git a/config/zephyr/Kconfig b/config/zephyr/Kconfig index 8ace731baac543..90c7595fe5020d 100644 --- a/config/zephyr/Kconfig +++ b/config/zephyr/Kconfig @@ -151,6 +151,20 @@ config CHIP_ROTATING_DEVICE_ID Enables rotating device identifier that provides a non-trackable identifier which is unique per device and rotates at pre-defined moments. +config CHIP_COMMISSIONABLE_DEVICE_TYPE + bool "Enable the device type subtype in commissionable node discovery record" + depends on CHIP_ENABLE_DNSSD_SRP + help + Enables including device type subtype in the commissionable node discovery record, + which allows filtering of the results to find the nodes that match the device type. + +config CHIP_DEVICE_TYPE + int "Device type" + default 65535 + range 0 65535 + help + Type of device that uses the CHIP Device Type Identifier. The default value means invalid device type. + config CHIP_OPERATIONAL_TIME_SAVE_INTERVAL int "Interval of saving node operation time to flash in hours unit" default 10 diff --git a/docs/guides/nrfconnect_examples_configuration.md b/docs/guides/nrfconnect_examples_configuration.md index f51250e9662b49..b0d94ae84540d4 100644 --- a/docs/guides/nrfconnect_examples_configuration.md +++ b/docs/guides/nrfconnect_examples_configuration.md @@ -142,3 +142,85 @@ Read the guide in the nRF Connect SDK's Zephyr documentation if you are interested in getting more advanced and detailed information about the configuration structure. + +
+ +## Configuring Matter in nRF Connect platform + +### Mandatory configuration + +To use the Matter protocol, you need to set the `CONFIG_CHIP` Kconfig option. +Setting this option enables the Matter protocol stack and other associated +Kconfig options, including `CONFIG_CHIP_ENABLE_DNSSD_SRP` that is required for +the Matter device to be discoverable using DNS-SD. + +After that, make sure to set the `CONFIG_CHIP_PROJECT_CONFIG` Kconfig option and +define the path to the configuration file that specifies Vendor ID, Product ID, +and other project-specific Matter settings. + +
+ +### Optional configuration + +After enabling the Matter protocol and defining the path to the Matter +configuration file, you can enable additional options in Kconfig. + +**Sleepy End Device support** + +You can enable the support for Thread Sleepy End Device in Matter by setting the +following Kconfig options: + +- `CONFIG_OPENTHREAD_MTD` +- `CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT` + +**Commissioning with NFC support** + +You can configure the Matter protocol to use an NFC tag for commissioning, +instead of using a QR code, which is the default configuration. + +To enable NFC for commissioning and share the onboarding payload in an NFC tag, +set the `CONFIG_CHIP_NFC_COMMISSIONING` option. + +**Logging** + +You can enable logging for both the stack and Zephyr’s +[Logging](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/reference/logging/index.html#logging-api) +API by setting the `CONFIG_LOG` option. + +Zephyr allows you to configure log levels of different software modules +independently. To change the log level configuration for the Matter module, set +one of the available options: + +- `CONFIG_MATTER_LOG_LEVEL_ERR` +- `CONFIG_MATTER_LOG_LEVEL_INFO` +- `CONFIG_MATTER_LOG_LEVEL_DBG` + +**Shell** + +You can enable the Matter shell library using the `CONFIG_CHIP_LIB_SHELL` +Kconfig option. This option lets you use the Matter specific shell commands. See +[Using CLI in nRF Connect examples](nrfconnect_examples_cli.md) for the list of +available Matter shell commands. + +**Matter device identification** + +Matter has many mandatory and optional ways to identify a specific device. These +can be used for various purposes, such as dividing devices into groups (by +function, by vendor or by location), device commissioning or vendor-specific +cases before the device was commissioned (for example, identifying factory +software version or related features). + +Only some part of these features can be configured using Kconfig options and +only those were listed below: + +- `CONFIG_CHIP_DEVICE_TYPE` - type of device that uses the Matter Device Type + Identifier, for example Door Lock (0x000A) or Dimmable Light Bulb (0x0101). +- `CONFIG_CHIP_COMMISSIONABLE_DEVICE_TYPE` - enables including optional device + type subtype in the commissionable node discovery record, which allows + filtering of the discovery results to find the nodes that match the device + type. +- `CONFIG_CHIP_ROTATING_DEVICE_ID` - enables rotating device identifier, an + optional feature that provides an additional unique identifier for each + device. This identifier is similar to the serial number, but it additionally + changes at predefined times to protect against long-term tracking of the + device. diff --git a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h index 60baa9424f4784..1097f7b2ff8fd6 100644 --- a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h +++ b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h @@ -102,3 +102,11 @@ #ifdef CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT #define CHIP_DEVICE_CONFIG_ENABLE_SED 1 #endif // CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT + +#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 From 59a61a3fa96dccd71c3a3ea871635b84cf858332 Mon Sep 17 00:00:00 2001 From: Jiacheng Guo Date: Thu, 20 Jan 2022 21:08:10 +0800 Subject: [PATCH 083/124] [app] add binding cluster support (#12981) * [app] add binding cluster support The change adds `BindingManager` class for managing the connections to bound devices and forward events on bound clusters to the application. * fix review comments & add docs * decouple client from server attributes * Use interaction engine to send On/Off commands * add group to the callback signature * fix review comments * add docs for binding callback arguments * fix unbind * modify callback signature * make BindingManager instance optional * Modify struct layout to save RAM --- .../include/binding-handler.h | 22 ++ .../src/binding-handler.cpp | 112 ++++++++++ examples/all-clusters-app/esp32/main/main.cpp | 2 + examples/all-clusters-app/linux/BUILD.gn | 7 + examples/all-clusters-app/linux/main.cpp | 2 + examples/all-clusters-app/mbed/CMakeLists.txt | 1 + examples/lighting-app/mbed/CMakeLists.txt | 1 + examples/lighting-app/telink/CMakeLists.txt | 1 + examples/lock-app/mbed/CMakeLists.txt | 1 + examples/platform/linux/AppMain.cpp | 1 + src/app/CASESessionManager.cpp | 3 +- src/app/chip_data_model.gni | 6 + src/app/clusters/bindings/BindingManager.cpp | 211 ++++++++++++++++++ src/app/clusters/bindings/BindingManager.h | 195 ++++++++++++++++ src/app/clusters/bindings/bindings.cpp | 115 ++++++---- src/app/util/types_stub.h | 36 ++- 16 files changed, 671 insertions(+), 45 deletions(-) create mode 100644 examples/all-clusters-app/all-clusters-common/include/binding-handler.h create mode 100644 examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp create mode 100644 src/app/clusters/bindings/BindingManager.cpp create mode 100644 src/app/clusters/bindings/BindingManager.h diff --git a/examples/all-clusters-app/all-clusters-common/include/binding-handler.h b/examples/all-clusters-app/all-clusters-common/include/binding-handler.h new file mode 100644 index 00000000000000..b5d6df2b2acbb0 --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/include/binding-handler.h @@ -0,0 +1,22 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "lib/core/CHIPError.h" + +CHIP_ERROR InitBindingHandlers(); diff --git a/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp b/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp new file mode 100644 index 00000000000000..020c1210806171 --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp @@ -0,0 +1,112 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "binding-handler.h" + +#include "app-common/zap-generated/ids/Clusters.h" +#include "app-common/zap-generated/ids/Commands.h" +#include "app/CommandSender.h" +#include "app/clusters/bindings/BindingManager.h" +#include "app/server/Server.h" +#include "controller/InvokeInteraction.h" +#include "lib/core/CHIPError.h" + +#if defined(ENABLE_CHIP_SHELL) +#include "lib/shell/Engine.h" + +using chip::Shell::Engine; +using chip::Shell::shell_command_t; +using chip::Shell::streamer_get; +using chip::Shell::streamer_printf; +#endif // defined(ENABLE_CHIP_SHELL) + +static bool sSwitchOnOffState = false; +#if defined(ENABLE_CHIP_SHELL) +static void ToggleSwitchOnOff(bool newState) +{ + sSwitchOnOffState = newState; + chip::BindingManager::GetInstance().NotifyBoundClusterChanged(1, chip::app::Clusters::OnOff::Id, nullptr); +} + +static CHIP_ERROR SwitchCommandHandler(int argc, char ** argv) +{ + if (argc == 1 && strcmp(argv[0], "on") == 0) + { + ToggleSwitchOnOff(true); + return CHIP_NO_ERROR; + } + if (argc == 1 && strcmp(argv[0], "off") == 0) + { + ToggleSwitchOnOff(false); + return CHIP_NO_ERROR; + } + streamer_printf(streamer_get(), "Usage: switch [on|off]"); + return CHIP_NO_ERROR; +} + +static void RegisterSwitchCommands() +{ + static const shell_command_t sSwitchCommand = { SwitchCommandHandler, "switch", "Switch commands. Usage: switch [on|off]" }; + Engine::Root().RegisterCommands(&sSwitchCommand, 1); + return; +} +#endif // defined(ENABLE_CHIP_SHELL) + +static void BoundDeviceChangedHandler(const EmberBindingTableEntry * binding, chip::DeviceProxy * peer_device, void * context) +{ + using namespace chip; + using namespace chip::app; + + if (binding->type == EMBER_MULTICAST_BINDING) + { + ChipLogError(NotSpecified, "Group binding is not supported now"); + return; + } + + if (binding->type == EMBER_UNICAST_BINDING && binding->local == 1 && binding->clusterId == Clusters::OnOff::Id) + { + auto onSuccess = [](const ConcreteCommandPath & commandPath, const StatusIB & status, const auto & dataResponse) { + ChipLogProgress(NotSpecified, "OnOff command succeeds"); + }; + auto onFailure = [](const StatusIB & status, CHIP_ERROR error) { + ChipLogError(NotSpecified, "OnOff command failed: %" CHIP_ERROR_FORMAT, error.Format()); + }; + + if (sSwitchOnOffState) + { + Clusters::OnOff::Commands::On::Type onCommand; + Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), + binding->remote, onCommand, onSuccess, onFailure); + } + else + { + Clusters::OnOff::Commands::Off::Type offCommand; + Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), + binding->remote, offCommand, onSuccess, onFailure); + } + } +} + +CHIP_ERROR InitBindingHandlers() +{ + chip::BindingManager::GetInstance().SetAppServer(&chip::Server::GetInstance()); + chip::BindingManager::GetInstance().RegisterBoundDeviceChangedHandler(BoundDeviceChangedHandler); +#if defined(ENABLE_CHIP_SHELL) + RegisterSwitchCommands(); +#endif + return CHIP_NO_ERROR; +} diff --git a/examples/all-clusters-app/esp32/main/main.cpp b/examples/all-clusters-app/esp32/main/main.cpp index 2738a4b4f9ebfb..a98e4e9f60cf54 100644 --- a/examples/all-clusters-app/esp32/main/main.cpp +++ b/examples/all-clusters-app/esp32/main/main.cpp @@ -61,6 +61,7 @@ #include #include #include +#include #include #include #include @@ -537,6 +538,7 @@ static void InitServer(intptr_t context) SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); NetWorkCommissioningInstInit(); SetupPretendDevices(); + InitBindingHandlers(); } static void InitOTARequestor(void) diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index 3e700fd1af5b5e..563c101cb91e7b 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -15,8 +15,11 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") +import("${chip_root}/src/lib/lib.gni") + executable("chip-all-clusters-app") { sources = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "include/tv-callbacks.cpp", @@ -35,6 +38,10 @@ executable("chip-all-clusters-app") { cflags = [ "-Wconversion" ] + if (chip_build_libshell) { + defines = [ "ENABLE_CHIP_SHELL" ] + } + output_dir = root_out_dir } diff --git a/examples/all-clusters-app/linux/main.cpp b/examples/all-clusters-app/linux/main.cpp index f7a58ab4e5dcfc..2c02d212ac84f9 100644 --- a/examples/all-clusters-app/linux/main.cpp +++ b/examples/all-clusters-app/linux/main.cpp @@ -24,6 +24,7 @@ #include #include "AppMain.h" +#include "binding-handler.h" using namespace chip; using namespace chip::app; @@ -110,6 +111,7 @@ void ApplicationInit() int main(int argc, char * argv[]) { VerifyOrDie(ChipLinuxAppInit(argc, argv) == 0); + VerifyOrDie(InitBindingHandlers() == CHIP_NO_ERROR); ChipLinuxAppMainLoop(); return 0; } diff --git a/examples/all-clusters-app/mbed/CMakeLists.txt b/examples/all-clusters-app/mbed/CMakeLists.txt index ca364740a9e9f2..bbb871d89943ad 100644 --- a/examples/all-clusters-app/mbed/CMakeLists.txt +++ b/examples/all-clusters-app/mbed/CMakeLists.txt @@ -86,6 +86,7 @@ target_sources(${APP_TARGET} PRIVATE ${APP_CLUSTERS}/application-basic-server/application-basic-server.cpp ${APP_CLUSTERS}/basic/basic.cpp + ${APP_CLUSTERS}/bindings/BindingManager.cpp ${APP_CLUSTERS}/bindings/bindings.cpp ${APP_CLUSTERS}/on-off-server/on-off-server.cpp ${APP_CLUSTERS}/access-control-server/access-control-server.cpp diff --git a/examples/lighting-app/mbed/CMakeLists.txt b/examples/lighting-app/mbed/CMakeLists.txt index 5a4fdf42a2d176..bfad30ece1b85f 100644 --- a/examples/lighting-app/mbed/CMakeLists.txt +++ b/examples/lighting-app/mbed/CMakeLists.txt @@ -74,6 +74,7 @@ target_sources(${APP_TARGET} PRIVATE ${CHIP_ROOT}/src/app/server/CommissioningWindowManager.cpp ${CHIP_ROOT}/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp ${CHIP_ROOT}/src/app/clusters/basic/basic.cpp + ${CHIP_ROOT}/src/app/clusters/bindings/BindingManager.cpp ${CHIP_ROOT}/src/app/clusters/bindings/bindings.cpp ${CHIP_ROOT}/src/app/clusters/descriptor/descriptor.cpp ${CHIP_ROOT}/src/app/clusters/identify-server/identify-server.cpp diff --git a/examples/lighting-app/telink/CMakeLists.txt b/examples/lighting-app/telink/CMakeLists.txt index cabca3ee2eb539..f6bb6443f127ba 100644 --- a/examples/lighting-app/telink/CMakeLists.txt +++ b/examples/lighting-app/telink/CMakeLists.txt @@ -73,6 +73,7 @@ target_sources(app PRIVATE ${CHIP_ROOT}/src/app/server/CommissioningWindowManager.cpp ${CHIP_ROOT}/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp ${CHIP_ROOT}/src/app/clusters/basic/basic.cpp + ${CHIP_ROOT}/src/app/clusters/bindings/BindingManager.cpp ${CHIP_ROOT}/src/app/clusters/bindings/bindings.cpp ${CHIP_ROOT}/src/app/clusters/descriptor/descriptor.cpp ${CHIP_ROOT}/src/app/clusters/identify-server/identify-server.cpp diff --git a/examples/lock-app/mbed/CMakeLists.txt b/examples/lock-app/mbed/CMakeLists.txt index 49fa9d1c366efe..f7326fa9822375 100644 --- a/examples/lock-app/mbed/CMakeLists.txt +++ b/examples/lock-app/mbed/CMakeLists.txt @@ -72,6 +72,7 @@ target_sources(${APP_TARGET} PRIVATE ${CHIP_ROOT}/src/app/server/CommissioningWindowManager.cpp ${CHIP_ROOT}/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp ${CHIP_ROOT}/src/app/clusters/basic/basic.cpp + ${CHIP_ROOT}/src/app/clusters/bindings/BindingManager.cpp ${CHIP_ROOT}/src/app/clusters/bindings/bindings.cpp ${CHIP_ROOT}/src/app/clusters/descriptor/descriptor.cpp ${CHIP_ROOT}/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.cpp diff --git a/examples/platform/linux/AppMain.cpp b/examples/platform/linux/AppMain.cpp index 09e1a54d48acb4..fafa5afa0c8ab9 100644 --- a/examples/platform/linux/AppMain.cpp +++ b/examples/platform/linux/AppMain.cpp @@ -397,6 +397,7 @@ DeviceCommissioner * GetDeviceCommissioner() void ChipLinuxAppMainLoop() { #if defined(ENABLE_CHIP_SHELL) + Engine::Root().Init(); std::thread shellThread([]() { Engine::Root().RunMainLoop(); }); chip::Shell::RegisterCommissioneeCommands(); #endif diff --git a/src/app/CASESessionManager.cpp b/src/app/CASESessionManager.cpp index 08d5d42ed3376a..26d7e8cf75173e 100644 --- a/src/app/CASESessionManager.cpp +++ b/src/app/CASESessionManager.cpp @@ -55,7 +55,8 @@ CHIP_ERROR CASESessionManager::FindOrEstablishSession(PeerId peerId, Callback::C CHIP_ERROR err = session->Connect(onConnection, onFailure, mConfig.dnsResolver); if (err != CHIP_NO_ERROR) { - ReleaseSession(session); + // Release the peer rather than the pointer in case the failure handler has already released the session. + ReleaseSession(peerId); } return err; diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index 3ea9d09b684dfc..0e18514f229d9a 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -154,6 +154,12 @@ template("chip_data_model") { "${_app_root}/clusters/${cluster}/BDXDownloader.h", "${_app_root}/clusters/${cluster}/OTARequestor.cpp", ] + } else if (cluster == "bindings") { + sources += [ + "${_app_root}/clusters/${cluster}/${cluster}.cpp", + "${_app_root}/clusters/${cluster}/BindingManager.cpp", + "${_app_root}/clusters/${cluster}/BindingManager.h", + ] } else { sources += [ "${_app_root}/clusters/${cluster}/${cluster}.cpp" ] } diff --git a/src/app/clusters/bindings/BindingManager.cpp b/src/app/clusters/bindings/BindingManager.cpp new file mode 100644 index 00000000000000..8198f77bfc39d9 --- /dev/null +++ b/src/app/clusters/bindings/BindingManager.cpp @@ -0,0 +1,211 @@ +/* + * + * 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 + +namespace chip { + +BindingManager BindingManager::sBindingManager; + +CHIP_ERROR BindingManager::EstablishConnection(FabricIndex fabric, NodeId node) +{ + VerifyOrReturnError(mAppServer != nullptr, CHIP_ERROR_INCORRECT_STATE); + + FabricInfo * fabricInfo = mAppServer->GetFabricTable().FindFabricWithIndex(fabric); + VerifyOrReturnError(fabricInfo != nullptr, CHIP_ERROR_NOT_FOUND); + PeerId peer = fabricInfo->GetPeerIdForNode(node); + CHIP_ERROR error = + mAppServer->GetCASESessionManager()->FindOrEstablishSession(peer, &mOnConnectedCallback, &mOnConnectionFailureCallback); + if (error == CHIP_ERROR_NO_MEMORY) + { + // Release the least recently used entry + // TODO: Some reference counting mechanism shall be added the CASESessionManager + // so that other session clients don't get accidentally closed. + PendingNotificationEntry * entry = mPendingNotificationMap.FindLRUEntry(); + if (entry != nullptr) + { + mAppServer->GetCASESessionManager()->ReleaseSession(entry->GetPeerId()); + mPendingNotificationMap.RemoveEntry(entry); + // Now retry + error = mAppServer->GetCASESessionManager()->FindOrEstablishSession(peer, &mOnConnectedCallback, + &mOnConnectionFailureCallback); + } + } + return error; +} + +CHIP_ERROR BindingManager::EnqueueUnicastNotification(FabricIndex fabric, NodeId node, EndpointId endpoint, ClusterId cluster, + void * context) +{ + VerifyOrReturnError(mAppServer != nullptr, CHIP_ERROR_INCORRECT_STATE); + + FabricInfo * fabricInfo = mAppServer->GetFabricTable().FindFabricWithIndex(fabric); + VerifyOrReturnError(fabricInfo != nullptr, CHIP_ERROR_NOT_FOUND); + PeerId peer = fabricInfo->GetPeerIdForNode(node); + return mPendingNotificationMap.AddPendingNotification(peer, endpoint, cluster, context); +} + +void BindingManager::HandleDeviceConnected(void * context, OperationalDeviceProxy * device) +{ + BindingManager * manager = static_cast(context); + manager->HandleDeviceConnected(device); +} + +void BindingManager::HandleDeviceConnected(OperationalDeviceProxy * device) +{ + mPendingNotificationMap.ForEachActiveObject([&](PendingNotificationEntry * entry) -> Loop { + if (entry->GetPeerId() == device->GetPeerId()) + { + SyncPendingNotificationsToPeer(device, entry); + } + + return Loop::Continue; + }); +} + +void BindingManager::SyncPendingNotificationsToPeer(OperationalDeviceProxy * device, PendingNotificationEntry * pendingClusters) +{ + for (const ClusterPath & path : *pendingClusters) + { + ClusterId cluster = path.cluster; + EndpointId endpoint = path.endpoint; + for (uint8_t j = 0; j < EMBER_BINDING_TABLE_SIZE; j++) + { + EmberBindingTableEntry entry; + if (emberGetBinding(j, &entry) == EMBER_SUCCESS && entry.type == EMBER_UNICAST_BINDING && entry.clusterId == cluster && + entry.local == endpoint && mBoundDeviceChangedHandler) + { + mBoundDeviceChangedHandler(&entry, device, path.context); + } + } + } + mPendingNotificationMap.RemoveEntry(pendingClusters); +} + +void BindingManager::HandleDeviceConnectionFailure(void * context, PeerId peerId, CHIP_ERROR error) +{ + BindingManager * manager = static_cast(context); + manager->HandleDeviceConnectionFailure(peerId, error); +} + +void BindingManager::HandleDeviceConnectionFailure(PeerId peerId, CHIP_ERROR error) +{ + // Simply release the entry, the connection will be re-established as needed. + ChipLogError(AppServer, "Failed to establish connection to node 0x" ChipLogFormatX64, ChipLogValueX64(peerId.GetNodeId())); + mAppServer->GetCASESessionManager()->ReleaseSession(peerId); +} + +CHIP_ERROR BindingManager::LastUnicastBindingRemoved(FabricIndex fabric, NodeId node) +{ + VerifyOrReturnError(mAppServer != nullptr, CHIP_ERROR_INCORRECT_STATE); + + FabricInfo * fabricInfo = mAppServer->GetFabricTable().FindFabricWithIndex(fabric); + VerifyOrReturnError(fabricInfo != nullptr, CHIP_ERROR_NOT_FOUND); + PeerId peer = fabricInfo->GetPeerIdForNode(node); + PendingNotificationEntry * entry = mPendingNotificationMap.FindEntry(peer); + if (entry) + { + mPendingNotificationMap.RemoveEntry(entry); + } + + mAppServer->GetCASESessionManager()->ReleaseSession(peer); + return CHIP_NO_ERROR; +} + +CHIP_ERROR BindingManager::NotifyBoundClusterChanged(EndpointId endpoint, ClusterId cluster, void * context) +{ + VerifyOrReturnError(mAppServer != nullptr, CHIP_ERROR_INCORRECT_STATE); + + for (uint8_t i = 0; i < EMBER_BINDING_TABLE_SIZE; i++) + { + EmberBindingTableEntry entry; + + if (emberGetBinding(i, &entry) == EMBER_SUCCESS && entry.type != EMBER_UNUSED_BINDING && entry.local == endpoint && + entry.clusterId == cluster) + { + if (entry.type == EMBER_UNICAST_BINDING) + { + FabricInfo * fabricInfo = mAppServer->GetFabricTable().FindFabricWithIndex(entry.fabricIndex); + VerifyOrReturnError(fabricInfo != nullptr, CHIP_ERROR_NOT_FOUND); + PeerId peer = fabricInfo->GetPeerIdForNode(entry.nodeId); + OperationalDeviceProxy * peerDevice = mAppServer->GetCASESessionManager()->FindExistingSession(peer); + if (peerDevice != nullptr && mBoundDeviceChangedHandler) + { + // We already have an active connection + mBoundDeviceChangedHandler(&entry, peerDevice, context); + } + else + { + // Enqueue pending cluster and establish connection + ReturnErrorOnFailure( + EnqueueUnicastNotification(entry.fabricIndex, entry.nodeId, entry.local, entry.clusterId, context)); + ReturnErrorOnFailure(EstablishConnection(entry.fabricIndex, entry.nodeId)); + } + } + else if (entry.type == EMBER_MULTICAST_BINDING) + { + mBoundDeviceChangedHandler(&entry, nullptr, context); + } + } + } + return CHIP_NO_ERROR; +} + +BindingManager::PendingNotificationEntry * BindingManager::PendingNotificationMap::FindLRUEntry() +{ + PendingNotificationEntry * lruEntry = nullptr; + mPendingNotificationMap.ForEachActiveObject([&](PendingNotificationEntry * entry) { + if (lruEntry == nullptr || lruEntry->GetLastUpdateTime() > entry->GetLastUpdateTime()) + { + lruEntry = entry; + } + return Loop::Continue; + }); + return lruEntry; +} + +BindingManager::PendingNotificationEntry * BindingManager::PendingNotificationMap::FindEntry(PeerId peerId) +{ + PendingNotificationEntry * foundEntry = nullptr; + mPendingNotificationMap.ForEachActiveObject([&](PendingNotificationEntry * entry) { + if (entry->GetPeerId() == peerId) + { + foundEntry = entry; + return Loop::Break; + } + return Loop::Continue; + }); + return foundEntry; +} + +CHIP_ERROR BindingManager::PendingNotificationMap::AddPendingNotification(PeerId peer, EndpointId endpoint, ClusterId cluster, + void * context) +{ + PendingNotificationEntry * entry = FindEntry(peer); + + if (entry == nullptr) + { + entry = mPendingNotificationMap.CreateObject(peer); + VerifyOrReturnError(entry != nullptr, CHIP_ERROR_NO_MEMORY); + } + entry->AddPendingNotification(endpoint, cluster, context); + entry->Touch(); + return CHIP_NO_ERROR; +} + +} // namespace chip diff --git a/src/app/clusters/bindings/BindingManager.h b/src/app/clusters/bindings/BindingManager.h new file mode 100644 index 00000000000000..8456f1ace7180e --- /dev/null +++ b/src/app/clusters/bindings/BindingManager.h @@ -0,0 +1,195 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include + +namespace chip { + +/** + * Application callback function when a cluster associated with a binding changes. + * + * The connection is managed by the stack and peer_device is guaranteed to be available. + * The application shall decide the content to be sent to the peer. + * + * For unicast bindings peer_device will be a connected peer and group will be empty. + * For multicast bindings peer_device will be nullptr. + * + * E.g. The application will send on/off commands to peer for the OnOff cluster. + * + */ +using BoundDeviceChangedHandler = void (*)(const EmberBindingTableEntry * binding, DeviceProxy * peer_device, void * context); + +/** + * + * The BindingManager class manages the connections for unicast bindings and notifies the application + * when a binding is ready to be communicated with. + * + * A CASE connection will be triggered when: + * - The binding cluster adds a unicast entry to the binding table. + * - A watched cluster changes with a unicast binding but we cannot find an active connection to the peer. + * + * The class uses an LRU mechanism to choose the connection to eliminate when there is no space for a new connection. + * The BindingManager class will not actively re-establish connection and will connect on-demand (when binding cluster + * or watched cluster is changed). + * + */ +class BindingManager +{ +public: + BindingManager() : + mOnConnectedCallback(HandleDeviceConnected, this), mOnConnectionFailureCallback(HandleDeviceConnectionFailure, this) + {} + + void RegisterBoundDeviceChangedHandler(BoundDeviceChangedHandler handler) { mBoundDeviceChangedHandler = handler; } + + void SetAppServer(Server * appServer) { mAppServer = appServer; } + + /* + * Notifies the BindingManager that a new unicast binding is created. + * + */ + CHIP_ERROR UnicastBindingCreated(FabricIndex fabric, NodeId node) { return EstablishConnection(fabric, node); } + + /* + * Notfies the BindingManager that the **last** unicast binding to a device has been removed. + * + */ + CHIP_ERROR LastUnicastBindingRemoved(FabricIndex fabric, NodeId node); + + /* + * Notify a cluster change to **all** bound devices associated with the (endpoint, cluster) tuple. + * + * For unicast bindings with an active session and multicast bindings, the BoundDeviceChangedHandler + * will be called before the function returns. + * + * For unicast bindings without an active session, the notification will be queued and a new session will + * be initiated. The BoundDeviceChangedHandler will be called once the session is established. + * + */ + CHIP_ERROR NotifyBoundClusterChanged(EndpointId endpoint, ClusterId cluster, void * context); + + static BindingManager & GetInstance() { return sBindingManager; } + +private: + static BindingManager sBindingManager; + + static constexpr uint8_t kMaxPendingNotifications = 3; + + struct ClusterPath + { + void * context; + ClusterId cluster; + EndpointId endpoint; + }; + + // A pending notification to be sent to a binding waiting for the CASE session to be established. + class PendingNotificationEntry + { + public: + PendingNotificationEntry(PeerId peerId) : mPeerId(peerId) {} + + PeerId GetPeerId() { return mPeerId; } + + System::Clock::Timestamp GetLastUpdateTime() { return mLastUpdateTime; } + void Touch() { mLastUpdateTime = System::SystemClock().GetMonotonicTimestamp(); } + + ClusterPath * begin() { return &mPendingNotifications[0]; } + ClusterPath * end() { return &mPendingNotifications[mNumPendingNotifications]; } + + void AddPendingNotification(EndpointId endpoint, ClusterId cluster, void * context) + { + for (ClusterPath & path : *this) + { + // New notifications for the same (endpoint, cluster) shall + // simply overrride the old ones + if (path.cluster == cluster && path.endpoint == endpoint) + { + path.context = context; + return; + } + } + if (mNumPendingNotifications < kMaxPendingNotifications) + { + mPendingNotifications[mNumPendingNotifications++] = { context, cluster, endpoint }; + } + else + { + mPendingNotifications[mNextToOverride] = { context, cluster, endpoint }; + mNextToOverride++; + mNextToOverride %= kMaxPendingNotifications; + } + } + + private: + PeerId mPeerId; + System::Clock::Timestamp mLastUpdateTime; + // TODO: Make the pending notifications list of binding table indecies and list of contexts + ClusterPath mPendingNotifications[kMaxPendingNotifications]; + + uint8_t mNumPendingNotifications = 0; + uint8_t mNextToOverride = 0; + }; + + // The pool for all the pending comands. + class PendingNotificationMap + { + public: + PendingNotificationEntry * FindLRUEntry(); + + PendingNotificationEntry * FindEntry(PeerId peerId); + + CHIP_ERROR AddPendingNotification(PeerId peer, EndpointId endpoint, ClusterId cluster, void * context); + + void RemoveEntry(PendingNotificationEntry * entry) { mPendingNotificationMap.ReleaseObject(entry); } + + template + Loop ForEachActiveObject(Function && function) + { + return mPendingNotificationMap.ForEachActiveObject(std::forward(function)); + } + + private: + BitMapObjectPool mPendingNotificationMap; + }; + + static void HandleDeviceConnected(void * context, OperationalDeviceProxy * device); + void HandleDeviceConnected(OperationalDeviceProxy * device); + + static void HandleDeviceConnectionFailure(void * context, PeerId peerId, CHIP_ERROR error); + void HandleDeviceConnectionFailure(PeerId peerId, CHIP_ERROR error); + + CHIP_ERROR EstablishConnection(FabricIndex fabric, NodeId node); + + // Called when CASE session is established to a peer device. Will send all the pending commands to the peer. + void SyncPendingNotificationsToPeer(OperationalDeviceProxy * device, PendingNotificationEntry * pendingClusters); + + // Called when CASE session is not established to a peer device. Will enqueue the command and initialize connection. + CHIP_ERROR EnqueueUnicastNotification(FabricIndex fabric, NodeId node, EndpointId endpoint, ClusterId cluster, void * context); + + PendingNotificationMap mPendingNotificationMap; + BoundDeviceChangedHandler mBoundDeviceChangedHandler; + Server * mAppServer = nullptr; + + Callback::Callback mOnConnectedCallback; + Callback::Callback mOnConnectionFailureCallback; +}; + +} // namespace chip diff --git a/src/app/clusters/bindings/bindings.cpp b/src/app/clusters/bindings/bindings.cpp index 73c06996717139..13bfc15d7ebb8c 100644 --- a/src/app/clusters/bindings/bindings.cpp +++ b/src/app/clusters/bindings/bindings.cpp @@ -25,41 +25,16 @@ #include #include #include +#include #include #include using namespace chip; using namespace chip::app::Clusters::Binding; -EmberStatus prepareBinding(EmberBindingTableEntry & binding, NodeId nodeId, GroupId groupId, EndpointId endpointId, - ClusterId clusterId) -{ - if (groupId && nodeId) - { - return EMBER_BAD_ARGUMENT; - } - - binding.clusterId = clusterId; - binding.local = emberAfCurrentCommand()->apsFrame->destinationEndpoint; - binding.networkIndex = 0; - - if (groupId) - { - binding.type = EMBER_MULTICAST_BINDING; - binding.groupId = groupId; - binding.remote = 0; - } - else - { - binding.type = EMBER_UNICAST_BINDING; - binding.nodeId = nodeId; - binding.remote = endpointId; - } - - return EMBER_SUCCESS; -} +// TODO: add binding table to the persistent storage -EmberStatus getBindingIndex(EmberBindingTableEntry & newEntry, uint8_t * bindingIndex) +static EmberStatus getBindingIndex(EmberBindingTableEntry & newEntry, uint8_t * bindingIndex) { EmberBindingTableEntry currentEntry; for (uint8_t i = 0; i < EMBER_BINDING_TABLE_SIZE; i++) @@ -75,7 +50,7 @@ EmberStatus getBindingIndex(EmberBindingTableEntry & newEntry, uint8_t * binding return EMBER_NOT_FOUND; } -EmberStatus getUnusedBindingIndex(uint8_t * bindingIndex) +static EmberStatus getUnusedBindingIndex(uint8_t * bindingIndex) { EmberBindingTableEntry currentEntry; for (uint8_t i = 0; i < EMBER_BINDING_TABLE_SIZE; i++) @@ -94,20 +69,32 @@ EmberStatus getUnusedBindingIndex(uint8_t * bindingIndex) bool emberAfBindingClusterBindCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::Bind::DecodableType & commandData) { - auto & nodeId = commandData.nodeId; - auto & groupId = commandData.groupId; - auto & endpointId = commandData.endpointId; - auto & clusterId = commandData.clusterId; + NodeId nodeId = commandData.nodeId; + GroupId groupId = commandData.groupId; + ClusterId clusterId = commandData.clusterId; + EndpointId remoteEndpoint = commandData.endpointId; + EndpointId localEndpoint = commandPath.mEndpointId; + FabricIndex fabricIndex = commandObj->GetAccessingFabricIndex(); + EmberBindingTableEntry bindingEntry; ChipLogDetail(Zcl, "RX: BindCallback"); - EmberBindingTableEntry bindingEntry; - if (prepareBinding(bindingEntry, nodeId, groupId, endpointId, clusterId) != EMBER_SUCCESS) + if ((groupId != 0 && nodeId != 0) || (groupId == 0 && nodeId == 0) || (groupId != 0 && remoteEndpoint != 0)) { + ChipLogError(Zcl, "Binding: Invalid request"); emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_MALFORMED_COMMAND); return true; } + if (groupId) + { + bindingEntry = EmberBindingTableEntry::ForGroup(fabricIndex, groupId, localEndpoint, clusterId); + } + else + { + bindingEntry = EmberBindingTableEntry::ForNode(fabricIndex, nodeId, localEndpoint, remoteEndpoint, clusterId); + } + uint8_t bindingIndex; if (getBindingIndex(bindingEntry, &bindingIndex) != EMBER_NOT_FOUND) { @@ -121,27 +108,63 @@ bool emberAfBindingClusterBindCallback(app::CommandHandler * commandObj, const a return true; } + if (nodeId) + { + CHIP_ERROR err = BindingManager::GetInstance().UnicastBindingCreated(fabricIndex, nodeId); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress( + Zcl, "Binding: Failed to create session for unicast binding to device " ChipLogFormatX64 ": %" CHIP_ERROR_FORMAT, + ChipLogValueX64(nodeId), err.Format()); + } + } emberSetBinding(bindingIndex, &bindingEntry); emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_SUCCESS); return true; } +static uint8_t GetNumberOfUnicastBindingForNode(FabricIndex fabric, NodeId node) +{ + uint8_t numBinding = 0; + EmberBindingTableEntry entry; + for (uint8_t i = 0; i < EMBER_BINDING_TABLE_SIZE; i++) + { + if (emberGetBinding(i, &entry) == EMBER_SUCCESS && entry.type == EMBER_UNICAST_BINDING && entry.fabricIndex == fabric && + entry.nodeId == node) + { + numBinding++; + } + } + return numBinding; +} + bool emberAfBindingClusterUnbindCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::Unbind::DecodableType & commandData) { - auto & nodeId = commandData.nodeId; - auto & groupId = commandData.groupId; - auto & endpointId = commandData.endpointId; - auto & clusterId = commandData.clusterId; + NodeId nodeId = commandData.nodeId; + GroupId groupId = commandData.groupId; + ClusterId clusterId = commandData.clusterId; + EndpointId remoteEndpoint = commandData.endpointId; + EndpointId localEndpoint = commandPath.mEndpointId; + FabricIndex fabricIndex = commandObj->GetAccessingFabricIndex(); + EmberBindingTableEntry bindingEntry; ChipLogDetail(Zcl, "RX: UnbindCallback"); - EmberBindingTableEntry bindingEntry; - if (prepareBinding(bindingEntry, nodeId, groupId, endpointId, clusterId) != EMBER_SUCCESS) + if ((groupId != 0 && nodeId != 0) || (groupId == 0 && nodeId == 0)) { + ChipLogError(Zcl, "Binding: Invalid request"); emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_MALFORMED_COMMAND); return true; } + if (groupId) + { + bindingEntry = EmberBindingTableEntry::ForGroup(fabricIndex, groupId, localEndpoint, clusterId); + } + else + { + bindingEntry = EmberBindingTableEntry::ForNode(fabricIndex, nodeId, localEndpoint, remoteEndpoint, clusterId); + } uint8_t bindingIndex; if (getBindingIndex(bindingEntry, &bindingIndex) != EMBER_SUCCESS) @@ -151,6 +174,16 @@ bool emberAfBindingClusterUnbindCallback(app::CommandHandler * commandObj, const } emberDeleteBinding(bindingIndex); + if (nodeId != 0 && GetNumberOfUnicastBindingForNode(fabricIndex, nodeId) == 0) + { + CHIP_ERROR err = BindingManager::GetInstance().LastUnicastBindingRemoved(fabricIndex, nodeId); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Binding: Failed to disconnect device " ChipLogFormatX64 ": %s", ChipLogValueX64(nodeId), + err.AsString()); + } + } + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_SUCCESS); return true; } diff --git a/src/app/util/types_stub.h b/src/app/util/types_stub.h index 6410c6c032e8f9..ba97c524f74eab 100644 --- a/src/app/util/types_stub.h +++ b/src/app/util/types_stub.h @@ -495,8 +495,40 @@ enum */ struct EmberBindingTableEntry { + EmberBindingTableEntry() = default; + + static EmberBindingTableEntry ForNode(chip::FabricIndex fabric, chip::NodeId node, chip::EndpointId localEndpoint, + chip::EndpointId remoteEndpoint, chip::ClusterId cluster) + { + EmberBindingTableEntry entry = { + .type = EMBER_UNICAST_BINDING, + .fabricIndex = fabric, + .local = localEndpoint, + .clusterId = cluster, + .remote = remoteEndpoint, + .nodeId = node, + }; + return entry; + } + + static EmberBindingTableEntry ForGroup(chip::FabricIndex fabric, chip::GroupId group, chip::EndpointId localEndpoint, + chip::ClusterId cluster) + { + EmberBindingTableEntry entry = { + .type = EMBER_MULTICAST_BINDING, + .fabricIndex = fabric, + .local = localEndpoint, + .clusterId = cluster, + .remote = 0, + .groupId = group, + }; + return entry; + } + /** The type of binding. */ EmberBindingType type; + + chip::FabricIndex fabricIndex; /** The endpoint on the local node. */ chip::EndpointId local; /** A cluster ID that matches one from the local endpoint's simple descriptor. @@ -519,8 +551,6 @@ struct EmberBindingTableEntry chip::NodeId nodeId; chip::GroupId groupId; }; - /** The index of the network the binding belongs to. */ - uint8_t networkIndex; bool operator==(EmberBindingTableEntry const & other) const { @@ -539,7 +569,7 @@ struct EmberBindingTableEntry return false; } - return local == other.local && clusterId == other.clusterId && remote == other.remote && networkIndex == other.networkIndex; + return fabricIndex == other.fabricIndex && local == other.local && clusterId == other.clusterId && remote == other.remote; } }; From a41573636ba726383a3722906f68dbc86559b6f7 Mon Sep 17 00:00:00 2001 From: Austin Hsieh <77706079+austinh0@users.noreply.github.com> Date: Thu, 20 Jan 2022 05:34:54 -0800 Subject: [PATCH 084/124] Remove x86/x64 builds in Android CI (#13741) --- .github/workflows/android.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index 2737de15bd9bac..4a7f1ef868a564 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -57,7 +57,7 @@ jobs: - name: Build Android CHIPTool and CHIPTest run: | ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-{arm,arm64,x64,x86}-chip-*' build" + "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-{arm,arm64}-chip-*' build" # - name: Build Android Studio build (arm64 only) # run: | # ./scripts/run_in_build_env.sh \ From f765050ea223a084aec97eed813e84e2c70c6e34 Mon Sep 17 00:00:00 2001 From: Marc Lepage <67919234+mlepage-google@users.noreply.github.com> Date: Thu, 20 Jan 2022 08:36:26 -0500 Subject: [PATCH 085/124] Migrate PASE session to newly created fabric (#13712) * Place PASESession on new fabric PASE sessions start with no fabric, but during commissioning, after OperationalCredentialsCluster::AddNOC, they should be placed on the newly commissioned fabric so administrative actions pertaining to the newly commissioned fabric can be performed over the PASE session, if desired. Work towards issue #10242 * Change SecureSession::NewFabric to alter mFabric This makes it easier to also have it be the accessing fabric after the change. --- .../operational-credentials-server.cpp | 3 +++ src/transport/SecureSession.cpp | 6 ++--- src/transport/SecureSession.h | 22 ++++++++++++++++++- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp index aa4f268b21604c..becb7d9a2b42d8 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -453,6 +453,9 @@ bool emberAfOperationalCredentialsClusterAddNOCCallback(app::CommandHandler * co err = Server::GetInstance().GetFabricTable().Store(fabricIndex); VerifyOrExit(err == CHIP_NO_ERROR, nocResponse = ConvertToNOCResponseStatus(err)); + // Notify the secure session of the new fabric. + commandObj->GetExchangeContext()->GetSessionHandle()->AsSecureSession()->NewFabric(fabricIndex); + // We might have a new operational identity, so we should start advertising it right away. app::DnssdServer::Instance().AdvertiseOperational(); diff --git a/src/transport/SecureSession.cpp b/src/transport/SecureSession.cpp index 3a9be04d8912e6..67e4378ba4e0e0 100644 --- a/src/transport/SecureSession.cpp +++ b/src/transport/SecureSession.cpp @@ -32,9 +32,9 @@ Access::SubjectDescriptor SecureSession::GetSubjectDescriptor() const } else if (IsPAKEKeyId(mPeerNodeId)) { - subjectDescriptor.authMode = Access::AuthMode::kPase; - subjectDescriptor.subject = mPeerNodeId; - // TODO(#10242): PASE *can* have fabric in some situations + subjectDescriptor.authMode = Access::AuthMode::kPase; + subjectDescriptor.subject = mPeerNodeId; + subjectDescriptor.fabricIndex = mFabric; } else { diff --git a/src/transport/SecureSession.h b/src/transport/SecureSession.h index 05efecc190ae32..5edcac726f96d2 100644 --- a/src/transport/SecureSession.h +++ b/src/transport/SecureSession.h @@ -114,6 +114,23 @@ class SecureSession : public Session uint16_t GetPeerSessionId() const { return mPeerSessionId; } FabricIndex GetFabricIndex() const { return mFabric; } + // Should only be called for PASE sessions, which start with undefined fabric, + // to migrate to a newly commissioned fabric after successful + // OperationalCredentialsCluster::AddNOC + CHIP_ERROR NewFabric(FabricIndex fabricIndex) + { +#if 0 + // TODO(#13711): this check won't work until the issue is addressed + if (mSecureSessionType == Type::kPASE) + { + mFabric = fabricIndex; + } +#else + mFabric = fabricIndex; +#endif + return CHIP_NO_ERROR; + } + System::Clock::Timestamp GetLastActivityTime() const { return mLastActivityTime; } void MarkActive() { mLastActivityTime = System::SystemClock().GetMonotonicTimestamp(); } @@ -139,7 +156,10 @@ class SecureSession : public Session const CATValues mPeerCATs; const uint16_t mLocalSessionId; const uint16_t mPeerSessionId; - const FabricIndex mFabric; + + // PASE sessions start with undefined fabric, but are migrated to a newly + // commissioned fabric after successful OperationalCredentialsCluster::AddNOC + FabricIndex mFabric; PeerAddress mPeerAddress; System::Clock::Timestamp mLastActivityTime; From d0d6dda77fed3b38864553e85b29465d6a32e56a Mon Sep 17 00:00:00 2001 From: Carol Yang Date: Thu, 20 Jan 2022 05:37:01 -0800 Subject: [PATCH 086/124] [OTA] Implement event support for OTA Requestor cluster (#13727) --- .../all-clusters-app.matter | 2 +- .../lighting-common/lighting-app.matter | 2 +- .../ota-requestor-app.matter | 2 +- .../clusters/ota-requestor/BDXDownloader.cpp | 23 ++-- .../clusters/ota-requestor/BDXDownloader.h | 9 +- .../clusters/ota-requestor/OTADownloader.h | 2 +- .../clusters/ota-requestor/OTARequestor.cpp | 130 ++++++++++++------ src/app/clusters/ota-requestor/OTARequestor.h | 38 +++-- .../ota-requestor/ota-requestor-server.cpp | 66 ++++++++- .../ota-requestor/ota-requestor-server.h | 12 +- src/app/data-model/Nullable.h | 3 + .../zcl/data-model/chip/chip-ota.xml | 2 +- .../data_model/controller-clusters.matter | 2 +- .../python/chip/clusters/Objects.py | 4 +- src/include/platform/OTAImageProcessor.h | 28 +++- src/include/platform/OTARequestorInterface.h | 2 +- src/platform/Linux/OTAImageProcessorImpl.cpp | 8 +- .../zap-generated/cluster-objects.h | 4 +- 18 files changed, 253 insertions(+), 86 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index bfda8a92abea9b..7d45a27ddda64f 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 @@ -1993,7 +1993,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { info event DownloadError = 2 { INT32U softwareVersion = 0; INT64U bytesDownloaded = 1; - INT8U progressPercent = 2; + nullable INT8U progressPercent = 2; nullable INT64S platformCode = 3; } diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 9c420c30815022..fc086b5b065a5a 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -905,7 +905,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { info event DownloadError = 2 { INT32U softwareVersion = 0; INT64U bytesDownloaded = 1; - INT8U progressPercent = 2; + nullable INT8U progressPercent = 2; nullable INT64S platformCode = 3; } 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 56dd3f7db5369c..2bc81307e23d6c 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 @@ -337,7 +337,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { info event DownloadError = 2 { INT32U softwareVersion = 0; INT64U bytesDownloaded = 1; - INT8U progressPercent = 2; + nullable INT8U progressPercent = 2; nullable INT64S platformCode = 3; } diff --git a/src/app/clusters/ota-requestor/BDXDownloader.cpp b/src/app/clusters/ota-requestor/BDXDownloader.cpp index 69297107afdf17..31a77fdfef2c55 100644 --- a/src/app/clusters/ota-requestor/BDXDownloader.cpp +++ b/src/app/clusters/ota-requestor/BDXDownloader.cpp @@ -18,6 +18,7 @@ #include "BDXDownloader.h" +#include #include #include #include @@ -28,6 +29,8 @@ #include using chip::OTADownloader; +using chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAChangeReasonEnum; +using chip::app::DataModel::Nullable; using chip::bdx::TransferSession; namespace chip { @@ -68,7 +71,7 @@ CHIP_ERROR BDXDownloader::BeginPrepareDownload() VerifyOrReturnError(mImageProcessor != nullptr, CHIP_ERROR_INCORRECT_STATE); ReturnErrorOnFailure(mImageProcessor->PrepareDownload()); - SetState(State::kPreparing); + SetState(State::kPreparing, OTAChangeReasonEnum::kSuccess); return CHIP_NO_ERROR; } @@ -79,7 +82,7 @@ CHIP_ERROR BDXDownloader::OnPreparedForDownload(CHIP_ERROR status) if (status == CHIP_NO_ERROR) { - SetState(State::kInProgress); + SetState(State::kInProgress, OTAChangeReasonEnum::kSuccess); // Must call here because StartTransfer() should have prepared a ReceiveInit message, and now we should send it. PollTransferSession(); @@ -88,7 +91,7 @@ CHIP_ERROR BDXDownloader::OnPreparedForDownload(CHIP_ERROR status) { ChipLogError(BDX, "failed to prepare download: %" CHIP_ERROR_FORMAT, status.Format()); mBdxTransfer.Reset(); - SetState(State::kIdle); + SetState(State::kIdle, OTAChangeReasonEnum::kFailure); } return CHIP_NO_ERROR; @@ -113,7 +116,7 @@ void BDXDownloader::OnDownloadTimeout() { mImageProcessor->Abort(); } - SetState(State::kIdle); + SetState(State::kIdle, OTAChangeReasonEnum::kTimeOut); } else { @@ -131,7 +134,7 @@ void BDXDownloader::EndDownload(CHIP_ERROR reason) { mImageProcessor->Abort(); } - SetState(State::kIdle); + SetState(State::kIdle, OTAChangeReasonEnum::kSuccess); // Because AbortTransfer() will generate a StatusReport to send. PollTransferSession(); @@ -174,14 +177,16 @@ CHIP_ERROR BDXDownloader::HandleBdxEvent(const chip::bdx::TransferSession::Outpu if (outEvent.msgTypeData.HasMessageType(chip::bdx::MessageType::BlockAckEOF)) { // BDX transfer is not complete until BlockAckEOF has been sent - SetState(State::kComplete); + SetState(State::kComplete, OTAChangeReasonEnum::kSuccess); } break; } case TransferSession::OutputEventType::kBlockReceived: { chip::ByteSpan blockData(outEvent.blockdata.Data, outEvent.blockdata.Length); ReturnErrorOnFailure(mImageProcessor->ProcessBlock(blockData)); - mStateDelegate->OnUpdateProgressChanged(mImageProcessor->GetPercentComplete()); + Nullable percent; + mImageProcessor->GetPercentComplete(percent); + mStateDelegate->OnUpdateProgressChanged(percent); // TODO: this will cause problems if Finalize() is not guaranteed to do its work after ProcessBlock(). if (outEvent.blockdata.IsEof) @@ -219,13 +224,13 @@ CHIP_ERROR BDXDownloader::HandleBdxEvent(const chip::bdx::TransferSession::Outpu return CHIP_NO_ERROR; } -void BDXDownloader::SetState(State state) +void BDXDownloader::SetState(State state, OTAChangeReasonEnum reason) { mState = state; if (mStateDelegate) { - mStateDelegate->OnDownloadStateChanged(state); + mStateDelegate->OnDownloadStateChanged(state, reason); } } diff --git a/src/app/clusters/ota-requestor/BDXDownloader.h b/src/app/clusters/ota-requestor/BDXDownloader.h index d783662c5a38fc..96c63d941d9180 100644 --- a/src/app/clusters/ota-requestor/BDXDownloader.h +++ b/src/app/clusters/ota-requestor/BDXDownloader.h @@ -26,6 +26,7 @@ #include "OTADownloader.h" +#include #include #include #include @@ -49,10 +50,10 @@ class BDXDownloader : public chip::OTADownloader { public: // Handle download state change - virtual void OnDownloadStateChanged(State state) = 0; + virtual void OnDownloadStateChanged(State state, app::Clusters::OtaSoftwareUpdateRequestor::OTAChangeReasonEnum reason) = 0; // Handle update progress change - virtual void OnUpdateProgressChanged(uint8_t percent) = 0; - virtual ~StateDelegate() = default; + virtual void OnUpdateProgressChanged(app::DataModel::Nullable percent) = 0; + virtual ~StateDelegate() = default; }; // To be called when there is an incoming message to handle (of any protocol type) @@ -77,7 +78,7 @@ class BDXDownloader : public chip::OTADownloader private: void PollTransferSession(); CHIP_ERROR HandleBdxEvent(const chip::bdx::TransferSession::OutputEvent & outEvent); - void SetState(State state); + void SetState(State state, app::Clusters::OtaSoftwareUpdateRequestor::OTAChangeReasonEnum reason); chip::bdx::TransferSession mBdxTransfer; MessagingDelegate * mMsgDelegate = nullptr; diff --git a/src/app/clusters/ota-requestor/OTADownloader.h b/src/app/clusters/ota-requestor/OTADownloader.h index b77514c35b53b2..fa12bbce77a07e 100644 --- a/src/app/clusters/ota-requestor/OTADownloader.h +++ b/src/app/clusters/ota-requestor/OTADownloader.h @@ -75,7 +75,7 @@ class OTADownloader virtual ~OTADownloader() = default; protected: - OTAImageProcessorInterface * mImageProcessor; + OTAImageProcessorInterface * mImageProcessor = nullptr; State mState; }; diff --git a/src/app/clusters/ota-requestor/OTARequestor.cpp b/src/app/clusters/ota-requestor/OTARequestor.cpp index 616e259069ecfc..c44d8a1754fb61 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.cpp +++ b/src/app/clusters/ota-requestor/OTARequestor.cpp @@ -36,6 +36,7 @@ using namespace app::Clusters::OtaSoftwareUpdateProvider; using namespace app::Clusters::OtaSoftwareUpdateProvider::Commands; using namespace app::Clusters::OtaSoftwareUpdateRequestor; using namespace app::Clusters::OtaSoftwareUpdateRequestor::Commands; +using app::DataModel::Nullable; using bdx::TransferSession; // Global instance of the OTARequestorInterface. @@ -87,17 +88,6 @@ static void LogApplyUpdateResponse(const ApplyUpdateResponse::DecodableType & re ChipLogDetail(SoftwareUpdate, " delayedActionTime: %" PRIu32 " seconds", response.delayedActionTime); } -static void SetUpdateStateAttribute(OTAUpdateStateEnum state) -{ - OtaRequestorServerSetUpdateState(state); - - // The UpdateStateProgress attribute only applies to the querying state - if (state != OTAUpdateStateEnum::kQuerying) - { - OtaRequestorServerSetUpdateStateProgress(0); - } -} - void StartDelayTimerHandler(System::Layer * systemLayer, void * appState) { VerifyOrReturn(appState != nullptr); @@ -129,13 +119,13 @@ void OTARequestor::OnQueryImageResponse(void * context, const QueryImageResponse if (err != CHIP_NO_ERROR) { - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kQuerying, err); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kQuerying, err); return; } MutableByteSpan updateToken(requestorCore->mUpdateTokenBuffer); CopySpanToMutableSpan(update.updateToken, updateToken); - requestorCore->mUpdateVersion = update.softwareVersion; + requestorCore->mTargetVersion = update.softwareVersion; requestorCore->mUpdateToken = updateToken; requestorCore->mOtaRequestorDriver->UpdateAvailable(update, @@ -145,16 +135,15 @@ void OTARequestor::OnQueryImageResponse(void * context, const QueryImageResponse case OTAQueryStatus::kBusy: requestorCore->mOtaRequestorDriver->UpdateNotFound(UpdateNotFoundReason::Busy, System::Clock::Seconds32(response.delayedActionTime.ValueOr(0))); - SetUpdateStateAttribute(OTAUpdateStateEnum::kDelayedOnQuery); + requestorCore->RecordNewUpdateState(OTAUpdateStateEnum::kDelayedOnQuery, OTAChangeReasonEnum::kDelayByProvider); break; case OTAQueryStatus::kNotAvailable: requestorCore->mOtaRequestorDriver->UpdateNotFound(UpdateNotFoundReason::NotAvailable, System::Clock::Seconds32(response.delayedActionTime.ValueOr(0))); - SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + requestorCore->RecordNewUpdateState(OTAUpdateStateEnum::kIdle, OTAChangeReasonEnum::kSuccess); break; default: - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kQuerying, CHIP_ERROR_BAD_REQUEST); - SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kQuerying, CHIP_ERROR_BAD_REQUEST); break; } } @@ -165,8 +154,7 @@ void OTARequestor::OnQueryImageFailure(void * context, EmberAfStatus status) VerifyOrDie(requestorCore != nullptr); ChipLogDetail(SoftwareUpdate, "QueryImage failure response %" PRIu8, status); - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kQuerying, CHIP_ERROR_BAD_REQUEST); - SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kQuerying, CHIP_ERROR_BAD_REQUEST); } void OTARequestor::OnApplyUpdateResponse(void * context, const ApplyUpdateResponse::DecodableType & response) @@ -183,11 +171,11 @@ void OTARequestor::OnApplyUpdateResponse(void * context, const ApplyUpdateRespon break; case OTAApplyUpdateAction::kAwaitNextAction: requestorCore->mOtaRequestorDriver->UpdateSuspended(System::Clock::Seconds32(response.delayedActionTime)); - SetUpdateStateAttribute(OTAUpdateStateEnum::kDelayedOnApply); + requestorCore->RecordNewUpdateState(OTAUpdateStateEnum::kDelayedOnApply, OTAChangeReasonEnum::kDelayByProvider); break; case OTAApplyUpdateAction::kDiscontinue: requestorCore->mOtaRequestorDriver->UpdateDiscontinued(); - SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + requestorCore->RecordNewUpdateState(OTAUpdateStateEnum::kIdle, OTAChangeReasonEnum::kSuccess); break; } } @@ -198,8 +186,7 @@ void OTARequestor::OnApplyUpdateFailure(void * context, EmberAfStatus status) VerifyOrDie(requestorCore != nullptr); ChipLogDetail(SoftwareUpdate, "ApplyUpdate failure response %" PRIu8, status); - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kApplying, CHIP_ERROR_BAD_REQUEST); - SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kApplying, CHIP_ERROR_BAD_REQUEST); } void OTARequestor::OnNotifyUpdateAppliedResponse(void * context, const app::DataModel::NullObjectType & response) {} @@ -210,8 +197,7 @@ void OTARequestor::OnNotifyUpdateAppliedFailure(void * context, EmberAfStatus st VerifyOrDie(requestorCore != nullptr); ChipLogDetail(SoftwareUpdate, "NotifyUpdateApplied failure response %" PRIu8, status); - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kNotifying, CHIP_ERROR_BAD_REQUEST); - SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kNotifying, CHIP_ERROR_BAD_REQUEST); } EmberAfStatus OTARequestor::HandleAnnounceOTAProvider(app::CommandHandler * commandObj, @@ -299,11 +285,11 @@ void OTARequestor::OnConnected(void * context, OperationalDeviceProxy * devicePr if (err != CHIP_NO_ERROR) { ChipLogError(SoftwareUpdate, "Failed to send QueryImage command: %" CHIP_ERROR_FORMAT, err.Format()); - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kQuerying, err); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kQuerying, err); return; } - SetUpdateStateAttribute(OTAUpdateStateEnum::kQuerying); + requestorCore->RecordNewUpdateState(OTAUpdateStateEnum::kQuerying, OTAChangeReasonEnum::kSuccess); break; } case kStartBDX: { @@ -312,12 +298,11 @@ void OTARequestor::OnConnected(void * context, OperationalDeviceProxy * devicePr if (err != CHIP_NO_ERROR) { ChipLogError(SoftwareUpdate, "Failed to start download: %" CHIP_ERROR_FORMAT, err.Format()); - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kDownloading, err); - SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kDownloading, err); return; } - SetUpdateStateAttribute(OTAUpdateStateEnum::kDownloading); + requestorCore->RecordNewUpdateState(OTAUpdateStateEnum::kDownloading, OTAChangeReasonEnum::kSuccess); break; } case kApplyUpdate: { @@ -326,12 +311,11 @@ void OTARequestor::OnConnected(void * context, OperationalDeviceProxy * devicePr if (err != CHIP_NO_ERROR) { ChipLogError(SoftwareUpdate, "Failed to send ApplyUpdate command: %" CHIP_ERROR_FORMAT, err.Format()); - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kApplying, err); - SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kApplying, err); return; } - SetUpdateStateAttribute(OTAUpdateStateEnum::kApplying); + requestorCore->RecordNewUpdateState(OTAUpdateStateEnum::kApplying, OTAChangeReasonEnum::kSuccess); break; } case kNotifyUpdateApplied: { @@ -340,12 +324,11 @@ void OTARequestor::OnConnected(void * context, OperationalDeviceProxy * devicePr if (err != CHIP_NO_ERROR) { ChipLogError(SoftwareUpdate, "Failed to send NotifyUpdateApplied command: %" CHIP_ERROR_FORMAT, err.Format()); - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kNotifying, err); - SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kNotifying, err); return; } - SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + requestorCore->RecordNewUpdateState(OTAUpdateStateEnum::kIdle, OTAChangeReasonEnum::kSuccess); break; } default: @@ -365,13 +348,13 @@ void OTARequestor::OnConnectionFailure(void * context, PeerId peerId, CHIP_ERROR switch (requestorCore->mOnConnectedAction) { case kQueryImage: - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kQuerying, error); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kQuerying, error); break; case kStartBDX: - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kDownloading, error); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kDownloading, error); break; case kApplyUpdate: - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kApplying, error); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kApplying, error); break; default: break; @@ -402,12 +385,21 @@ void OTARequestor::ApplyUpdate() ConnectToProvider(kApplyUpdate); } -void OTARequestor::NotifyUpdateApplied() +void OTARequestor::NotifyUpdateApplied(uint32_t version) { + // New version is executing so update where applicable + VerifyOrReturn(Basic::Attributes::SoftwareVersion::Set(kRootEndpointId, version) == EMBER_ZCL_STATUS_SUCCESS); + mCurrentVersion = version; + + // Log the VersionApplied event + uint16_t productId; + VerifyOrReturn(Basic::Attributes::ProductID::Get(kRootEndpointId, &productId) == EMBER_ZCL_STATUS_SUCCESS); + OtaRequestorServerOnVersionApplied(version, productId); + ConnectToProvider(kNotifyUpdateApplied); } -void OTARequestor::OnDownloadStateChanged(OTADownloader::State state) +void OTARequestor::OnDownloadStateChanged(OTADownloader::State state, OTAChangeReasonEnum reason) { VerifyOrReturn(mOtaRequestorDriver != nullptr); @@ -417,18 +409,66 @@ void OTARequestor::OnDownloadStateChanged(OTADownloader::State state) mOtaRequestorDriver->UpdateDownloaded(); break; case OTADownloader::State::kIdle: - mOtaRequestorDriver->HandleError(UpdateFailureState::kDownloading, CHIP_ERROR_CONNECTION_ABORTED); + if (reason != OTAChangeReasonEnum::kSuccess) + { + RecordErrorUpdateState(UpdateFailureState::kDownloading, CHIP_ERROR_CONNECTION_ABORTED, reason); + } + break; default: break; } } -void OTARequestor::OnUpdateProgressChanged(uint8_t percent) +void OTARequestor::OnUpdateProgressChanged(Nullable percent) { OtaRequestorServerSetUpdateStateProgress(percent); } +void OTARequestor::RecordNewUpdateState(OTAUpdateStateEnum newState, OTAChangeReasonEnum reason) +{ + // Set server UpdateState attribute + OtaRequestorServerSetUpdateState(newState); + + // The UpdateStateProgress attribute only applies to the downloading state + if (newState != OTAUpdateStateEnum::kDownloading) + { + app::DataModel::Nullable percent; + percent.SetNull(); + OtaRequestorServerSetUpdateStateProgress(percent); + } + + // Log the StateTransition event + Nullable previousState; + previousState.SetNonNull(mCurrentUpdateState); + Nullable targetSoftwareVersion; + if ((newState == OTAUpdateStateEnum::kDownloading) || (newState == OTAUpdateStateEnum::kApplying) || + (newState == OTAUpdateStateEnum::kRollingBack)) + { + targetSoftwareVersion.SetNonNull(mTargetVersion); + } + OtaRequestorServerOnStateTransition(previousState, newState, reason, targetSoftwareVersion); + + mCurrentUpdateState = newState; +} + +void OTARequestor::RecordErrorUpdateState(UpdateFailureState failureState, CHIP_ERROR error, OTAChangeReasonEnum reason) +{ + // Inform driver of the error + mOtaRequestorDriver->HandleError(failureState, error); + + // Log the DownloadError event + OTAImageProcessorInterface * imageProcessor = mBdxDownloader->GetImageProcessorDelegate(); + VerifyOrReturn(imageProcessor != nullptr); + Nullable progressPercent; + imageProcessor->GetPercentComplete(progressPercent); + Nullable platformCode; + OtaRequestorServerOnDownloadError(mTargetVersion, imageProcessor->GetBytesDownloaded(), progressPercent, platformCode); + + // Whenever an error occurs, always reset to Idle state + RecordNewUpdateState(OTAUpdateStateEnum::kIdle, reason); +} + CHIP_ERROR OTARequestor::GenerateUpdateToken() { if (mUpdateToken.empty()) @@ -540,7 +580,7 @@ CHIP_ERROR OTARequestor::SendApplyUpdateRequest(OperationalDeviceProxy & deviceP ApplyUpdateRequest::Type args; args.updateToken = mUpdateToken; - args.newVersion = mUpdateVersion; + args.newVersion = mTargetVersion; Controller::OtaSoftwareUpdateProviderCluster cluster; cluster.Associate(&deviceProxy, mProviderEndpointId); @@ -554,7 +594,7 @@ CHIP_ERROR OTARequestor::SendNotifyUpdateAppliedRequest(OperationalDeviceProxy & NotifyUpdateApplied::Type args; args.updateToken = mUpdateToken; - args.softwareVersion = mUpdateVersion; + args.softwareVersion = mCurrentVersion; Controller::OtaSoftwareUpdateProviderCluster cluster; cluster.Associate(&deviceProxy, mProviderEndpointId); diff --git a/src/app/clusters/ota-requestor/OTARequestor.h b/src/app/clusters/ota-requestor/OTARequestor.h index fc70e83fab975c..0f650f78ddd618 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.h +++ b/src/app/clusters/ota-requestor/OTARequestor.h @@ -63,12 +63,13 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe // Send ApplyImage void ApplyUpdate() override; - // Send NotifyUpdateApplied - void NotifyUpdateApplied() override; + // Send NotifyUpdateApplied, update Basic cluster SoftwareVersion attribute, log the VersionApplied event + void NotifyUpdateApplied(uint32_t version) override; //////////// BDXDownloader::StateDelegate Implementation /////////////// - void OnDownloadStateChanged(OTADownloader::State state) override; - void OnUpdateProgressChanged(uint8_t percent) override; + void OnDownloadStateChanged(OTADownloader::State state, + app::Clusters::OtaSoftwareUpdateRequestor::OTAChangeReasonEnum reason) override; + void OnUpdateProgressChanged(app::DataModel::Nullable percent) override; /** * Called to perform some initialization including: @@ -84,8 +85,14 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe mOtaRequestorDriver = driver; mBdxDownloader = downloader; - OtaRequestorServerSetUpdateState(app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum::kIdle); - OtaRequestorServerSetUpdateStateProgress(0); + uint32_t version; + VerifyOrDie(app::Clusters::Basic::Attributes::SoftwareVersion::Get(kRootEndpointId, &version) == EMBER_ZCL_STATUS_SUCCESS); + mCurrentVersion = version; + + OtaRequestorServerSetUpdateState(mCurrentUpdateState); + app::DataModel::Nullable percent; + percent.SetNull(); + OtaRequestorServerSetUpdateStateProgress(percent); } /** @@ -122,6 +129,8 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe private: using QueryImageResponseDecodableType = app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType; using ApplyUpdateResponseDecodableType = app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType; + using OTAUpdateStateEnum = app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum; + using OTAChangeReasonEnum = app::Clusters::OtaSoftwareUpdateRequestor::OTAChangeReasonEnum; static constexpr size_t kMaxUpdateTokenLen = 32; @@ -192,6 +201,17 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe chip::BDXDownloader * mDownloader; }; + /** + * Record the new update state by updating the corresponding server attribute and logging a StateTransition event + */ + void RecordNewUpdateState(OTAUpdateStateEnum newState, OTAChangeReasonEnum reason); + + /** + * Record the error update state by informing the driver of the error and calling `RecordNewUpdateState` + */ + void RecordErrorUpdateState(UpdateFailureState failureState, CHIP_ERROR error, + OTAChangeReasonEnum reason = OTAChangeReasonEnum::kFailure); + /** * Generate an update token using the operational node ID in case of token lost, received in QueryImageResponse */ @@ -260,8 +280,10 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe BDXMessenger mBdxMessenger; // TODO: ideally this is held by the application uint8_t mUpdateTokenBuffer[kMaxUpdateTokenLen]; ByteSpan mUpdateToken; - uint32_t mUpdateVersion = 0; - Server * mServer = nullptr; + uint32_t mCurrentVersion = 0; + uint32_t mTargetVersion = 0; + OTAUpdateStateEnum mCurrentUpdateState = OTAUpdateStateEnum::kIdle; + Server * mServer = nullptr; }; } // namespace chip diff --git a/src/app/clusters/ota-requestor/ota-requestor-server.cpp b/src/app/clusters/ota-requestor/ota-requestor-server.cpp index 0fc2bffba7ce45..e87339bfe040ed 100644 --- a/src/app/clusters/ota-requestor/ota-requestor-server.cpp +++ b/src/app/clusters/ota-requestor/ota-requestor-server.cpp @@ -21,6 +21,7 @@ */ #include +#include #include #include #include @@ -85,7 +86,7 @@ EmberAfStatus OtaRequestorServerSetUpdateState(OTAUpdateStateEnum value) { EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS; - // Find all endpoints that has OtaSoftwareUpdateRequestor implemented + // Find all endpoints that have OtaSoftwareUpdateRequestor implemented for (auto endpoint : EnabledEndpointsWithServerCluster(OtaSoftwareUpdateRequestor::Id)) { OTAUpdateStateEnum currentValue; @@ -102,17 +103,18 @@ EmberAfStatus OtaRequestorServerSetUpdateState(OTAUpdateStateEnum value) return status; } -EmberAfStatus OtaRequestorServerSetUpdateStateProgress(uint8_t value) +EmberAfStatus OtaRequestorServerSetUpdateStateProgress(app::DataModel::Nullable value) { EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS; - // Find all endpoints that has OtaSoftwareUpdateRequestor implemented + // Find all endpoints that have OtaSoftwareUpdateRequestor implemented for (auto endpoint : EnabledEndpointsWithServerCluster(OtaSoftwareUpdateRequestor::Id)) { app::DataModel::Nullable currentValue; status = Attributes::UpdateStateProgress::Get(endpoint, currentValue); VerifyOrDie(EMBER_ZCL_STATUS_SUCCESS == status); - if (currentValue.IsNull() || currentValue.Value() != value) + + if (currentValue != value) { status = Attributes::UpdateStateProgress::Set(endpoint, value); VerifyOrDie(EMBER_ZCL_STATUS_SUCCESS == status); @@ -122,6 +124,62 @@ EmberAfStatus OtaRequestorServerSetUpdateStateProgress(uint8_t value) return status; } +void OtaRequestorServerOnStateTransition(DataModel::Nullable previousState, OTAUpdateStateEnum newState, + OTAChangeReasonEnum reason, DataModel::Nullable const & targetSoftwareVersion) +{ + if (!previousState.IsNull() && previousState.Value() == newState) + { + ChipLogError(Zcl, "Previous state and new state are the same, no event to log"); + return; + } + + // Find all endpoints that have OtaSoftwareUpdateRequestor implemented + for (auto endpoint : EnabledEndpointsWithServerCluster(OtaSoftwareUpdateRequestor::Id)) + { + Events::StateTransition::Type event{ previousState, newState, reason, targetSoftwareVersion }; + EventNumber eventNumber; + + CHIP_ERROR err = LogEvent(event, endpoint, eventNumber); + if (CHIP_NO_ERROR != err) + { + ChipLogError(Zcl, "Failed to record StateTransition event: %" CHIP_ERROR_FORMAT, err.Format()); + } + } +} + +void OtaRequestorServerOnVersionApplied(uint32_t softwareVersion, uint16_t productId) +{ + // Find all endpoints that have OtaSoftwareUpdateRequestor implemented + for (auto endpoint : EnabledEndpointsWithServerCluster(OtaSoftwareUpdateRequestor::Id)) + { + Events::VersionApplied::Type event{ softwareVersion, productId }; + EventNumber eventNumber; + + CHIP_ERROR err = LogEvent(event, endpoint, eventNumber); + if (CHIP_NO_ERROR != err) + { + ChipLogError(Zcl, "Failed to record VersionApplied event: %" CHIP_ERROR_FORMAT, err.Format()); + } + } +} + +void OtaRequestorServerOnDownloadError(uint32_t softwareVersion, uint64_t bytesDownloaded, + DataModel::Nullable progressPercent, DataModel::Nullable platformCode) +{ + // Find all endpoints that have OtaSoftwareUpdateRequestor implemented + for (auto endpoint : EnabledEndpointsWithServerCluster(OtaSoftwareUpdateRequestor::Id)) + { + Events::DownloadError::Type event{ softwareVersion, bytesDownloaded, progressPercent, platformCode }; + EventNumber eventNumber; + + CHIP_ERROR err = LogEvent(event, endpoint, eventNumber); + if (CHIP_NO_ERROR != err) + { + ChipLogError(Zcl, "Failed to record DownloadError event: %" CHIP_ERROR_FORMAT, err.Format()); + } + } +} + // ----------------------------------------------------------------------------- // Callbacks implementation diff --git a/src/app/clusters/ota-requestor/ota-requestor-server.h b/src/app/clusters/ota-requestor/ota-requestor-server.h index 9a5afcfc193979..ad0ecdd94e41b9 100644 --- a/src/app/clusters/ota-requestor/ota-requestor-server.h +++ b/src/app/clusters/ota-requestor/ota-requestor-server.h @@ -21,4 +21,14 @@ #include EmberAfStatus OtaRequestorServerSetUpdateState(chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum value); -EmberAfStatus OtaRequestorServerSetUpdateStateProgress(uint8_t value); +EmberAfStatus OtaRequestorServerSetUpdateStateProgress(chip::app::DataModel::Nullable value); + +void OtaRequestorServerOnStateTransition( + chip::app::DataModel::Nullable previousState, + chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum newState, + chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAChangeReasonEnum reason, + chip::app::DataModel::Nullable const & targetSoftwareVersion); +void OtaRequestorServerOnVersionApplied(uint32_t softwareVersion, uint16_t productId); +void OtaRequestorServerOnDownloadError(uint32_t softwareVersion, uint64_t bytesDownloaded, + chip::app::DataModel::Nullable progressPercent, + chip::app::DataModel::Nullable platformCode); diff --git a/src/app/data-model/Nullable.h b/src/app/data-model/Nullable.h index e8bf8c5ae2d1a1..c6d279b0e0310e 100644 --- a/src/app/data-model/Nullable.h +++ b/src/app/data-model/Nullable.h @@ -73,6 +73,9 @@ struct Nullable : protected Optional { return true; } + + bool operator==(const Nullable & other) const { return Optional::operator==(other); } + bool operator!=(const Nullable & other) const { return !(*this == other); } }; } // namespace DataModel diff --git a/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml b/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml index 906c0c5cd4786c..c83bff37b74dbc 100644 --- a/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml +++ b/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml @@ -150,7 +150,7 @@ limitations under the License. This event SHALL be generated whenever an error occurs during OTA Requestor download operation. - + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 531239332d6c6a..66d713dfd6d375 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -2209,7 +2209,7 @@ client cluster OtaSoftwareUpdateRequestor = 42 { info event DownloadError = 2 { INT32U softwareVersion = 0; INT64U bytesDownloaded = 1; - INT8U progressPercent = 2; + nullable INT8U progressPercent = 2; nullable INT64S platformCode = 3; } diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index e1dfcb274b8e43..d82addc4d86d75 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -7031,13 +7031,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ClusterObjectFieldDescriptor(Label="softwareVersion", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="bytesDownloaded", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="progressPercent", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="progressPercent", Tag=2, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="platformCode", Tag=3, Type=typing.Union[Nullable, int]), ]) softwareVersion: 'uint' = 0 bytesDownloaded: 'uint' = 0 - progressPercent: 'uint' = 0 + progressPercent: 'typing.Union[Nullable, uint]' = NullValue platformCode: 'typing.Union[Nullable, int]' = NullValue diff --git a/src/include/platform/OTAImageProcessor.h b/src/include/platform/OTAImageProcessor.h index b5954394add880..95815230bc3136 100644 --- a/src/include/platform/OTAImageProcessor.h +++ b/src/include/platform/OTAImageProcessor.h @@ -18,6 +18,7 @@ #pragma once +#include #include #include #include @@ -32,6 +33,21 @@ struct OTAImageProcessorParams uint64_t totalFileBytes = 0; }; +// TODO: Parse the header when the image is received +struct OTAImageProcessorHeader +{ + uint16_t vendorId; + uint16_t productId; + uint32_t softwareVersion; + CharSpan softwareVersionString; + uint64_t payloadSize; + uint16_t minApplicableSoftwareVersion; + uint16_t maxApplicableSoftwareVersion; + CharSpan releaseNotesUrl; + uint8_t imageDigestType; + ByteSpan imageDigest; +}; + /** * @class OTAImageProcessorInterface * @@ -83,20 +99,26 @@ class DLL_EXPORT OTAImageProcessorInterface /** * Called to check the current download status of the OTA image download. */ - virtual uint8_t GetPercentComplete() + virtual void GetPercentComplete(app::DataModel::Nullable & percent) { if (mParams.totalFileBytes == 0) { - return 0; + percent.SetNull(); } else { - return static_cast((mParams.downloadedBytes * 100) / mParams.totalFileBytes); + percent.SetNonNull(static_cast((mParams.downloadedBytes * 100) / mParams.totalFileBytes)); } } + /** + * Called to check the current number of bytes that have been downloaded of the OTA image + */ + virtual uint64_t GetBytesDownloaded() { return mParams.downloadedBytes; } + protected: OTAImageProcessorParams mParams; + OTAImageProcessorHeader mHeader; }; } // namespace chip diff --git a/src/include/platform/OTARequestorInterface.h b/src/include/platform/OTARequestorInterface.h index 7825eb1fde35c8..28febbfac64afe 100644 --- a/src/include/platform/OTARequestorInterface.h +++ b/src/include/platform/OTARequestorInterface.h @@ -65,7 +65,7 @@ class OTARequestorInterface virtual void ApplyUpdate() = 0; // Send NotifyUpdateApplied command - virtual void NotifyUpdateApplied() = 0; + virtual void NotifyUpdateApplied(uint32_t version) = 0; // Manually set OTA Provider parameters virtual void TestModeSetProviderParameters(NodeId nodeId, FabricIndex fabIndex, EndpointId endpointId) = 0; diff --git a/src/platform/Linux/OTAImageProcessorImpl.cpp b/src/platform/Linux/OTAImageProcessorImpl.cpp index 5c2fa16486ff8c..afcff9f326cfc1 100644 --- a/src/platform/Linux/OTAImageProcessorImpl.cpp +++ b/src/platform/Linux/OTAImageProcessorImpl.cpp @@ -125,10 +125,16 @@ void OTAImageProcessorImpl::HandleFinalize(intptr_t context) void OTAImageProcessorImpl::HandleApply(intptr_t context) { + auto * imageProcessor = reinterpret_cast(context); + if (imageProcessor == nullptr) + { + return; + } + OTARequestorInterface * requestor = chip::GetRequestorInstance(); if (requestor != nullptr) { - requestor->NotifyUpdateApplied(); + requestor->NotifyUpdateApplied(imageProcessor->mHeader.softwareVersion); } } 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 c504ead4c10204..6228724c9a6232 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 @@ -8919,7 +8919,7 @@ struct Type uint32_t softwareVersion = static_cast(0); uint64_t bytesDownloaded = static_cast(0); - uint8_t progressPercent = static_cast(0); + DataModel::Nullable progressPercent; DataModel::Nullable platformCode; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -8934,7 +8934,7 @@ struct DecodableType uint32_t softwareVersion = static_cast(0); uint64_t bytesDownloaded = static_cast(0); - uint8_t progressPercent = static_cast(0); + DataModel::Nullable progressPercent; DataModel::Nullable platformCode; CHIP_ERROR Decode(TLV::TLVReader & reader); From a3409d620c4437d2ab5aa09b08d76f75f66bb52d Mon Sep 17 00:00:00 2001 From: Michael Spang Date: Thu, 20 Jan 2022 08:38:56 -0500 Subject: [PATCH 087/124] Set valid device types for application endpoints (#13634) Several samples are using the root node device type for application endpoints. This prevents proper identification of the device. Add types to all non-root endpoints in examples/. all-clusters-app does not correspond well with any single device type. This sets it to on/off light. It may be useful to reorganize this sample into additional endpoints each with a coherent device type. Multiple root nodes is not compliant. From the spec, "Endpoint Composition" section: There SHALL be only one root node endpoint for the node. --- .../all-clusters-common/all-clusters-app.zap | 20 +++++++++---------- .../esp32/main/temperature-measurement.zap | 12 +++++------ .../tv-casting-common/tv-casting-app.zap | 20 +++++++++---------- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- .../zap-generated/endpoint_config.h | 2 +- 6 files changed, 29 insertions(+), 29 deletions(-) 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 94a3240c27969d..29a874b0118ef9 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 @@ -7204,9 +7204,9 @@ ] }, { - "name": "MA-rootdevice", - "deviceTypeName": "MA-rootdevice", - "deviceTypeCode": 22, + "name": "MA-onofflight", + "deviceTypeName": "MA-onofflight", + "deviceTypeCode": 256, "deviceTypeProfileId": 259, "clusters": [ { @@ -17119,9 +17119,9 @@ ] }, { - "name": "MA-rootdevice", - "deviceTypeName": "MA-rootdevice", - "deviceTypeCode": 22, + "name": "MA-onofflight", + "deviceTypeName": "MA-onofflight", + "deviceTypeCode": 256, "deviceTypeProfileId": 259, "clusters": [ { @@ -20121,22 +20121,22 @@ "deviceIdentifier": 22 }, { - "endpointTypeName": "MA-rootdevice", + "endpointTypeName": "MA-onofflight", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, "networkId": 0, "endpointVersion": 1, - "deviceIdentifier": 22 + "deviceIdentifier": 256 }, { - "endpointTypeName": "MA-rootdevice", + "endpointTypeName": "MA-onofflight", "endpointTypeIndex": 2, "profileId": 259, "endpointId": 2, "networkId": 0, "endpointVersion": 1, - "deviceIdentifier": 22 + "deviceIdentifier": 256 } ] } diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap b/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap index 34c598b17e0028..8a2b672613c4f7 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap @@ -2471,10 +2471,10 @@ ] }, { - "name": "MA-rootdevice", - "deviceTypeName": "MA-rootdevice", + "name": "MA-tempsensor", + "deviceTypeName": "MA-tempsensor", "deviceTypeCode": 22, - "deviceTypeProfileId": 259, + "deviceTypeProfileId": 770, "clusters": [ { "name": "Power Configuration", @@ -3400,13 +3400,13 @@ "deviceIdentifier": 22 }, { - "endpointTypeName": "MA-rootdevice", + "endpointTypeName": "MA-tempsensor", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, "networkId": 0, "endpointVersion": 1, - "deviceIdentifier": 22 + "deviceIdentifier": 770 } ] -} \ No newline at end of file +} 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 18c2a7b5f589a4..a0a56f806f7c10 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 @@ -6536,9 +6536,9 @@ ] }, { - "name": "MA-rootdevice", - "deviceTypeName": "MA-rootdevice", - "deviceTypeCode": 22, + "name": "MA-videoplayer", + "deviceTypeName": "MA-videoplayer", + "deviceTypeCode": 35, "deviceTypeProfileId": 259, "clusters": [ { @@ -13559,9 +13559,9 @@ ] }, { - "name": "Anonymous Endpoint Type", - "deviceTypeName": "MA-rootdevice", - "deviceTypeCode": 22, + "name": "MA-occupancysensor", + "deviceTypeName": "MA-occupancysensor", + "deviceTypeCode": 263, "deviceTypeProfileId": 259, "clusters": [ { @@ -16486,22 +16486,22 @@ "deviceIdentifier": 22 }, { - "endpointTypeName": "MA-rootdevice", + "endpointTypeName": "MA-videoplayer", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, "networkId": 0, "endpointVersion": 1, - "deviceIdentifier": 22 + "deviceIdentifier": 35 }, { - "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeName": "MA-occupancysensor", "endpointTypeIndex": 2, "profileId": 259, "endpointId": 2, "networkId": 0, "endpointVersion": 1, - "deviceIdentifier": 22 + "deviceIdentifier": 263 } ] } diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 7a87e98863a0e6..78d315b0e03d0b 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -2764,7 +2764,7 @@ // Array of device ids #define FIXED_DEVICE_IDS \ { \ - 22, 22, 22 \ + 22, 256, 256 \ } // Array of device versions diff --git a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h index 4ecaf943a36fda..066d3a52866df9 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h @@ -524,7 +524,7 @@ // Array of device ids #define FIXED_DEVICE_IDS \ { \ - 22, 22 \ + 22, 770 \ } // Array of device versions diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index 40e6a557093dd6..d70ab91f201378 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -1757,7 +1757,7 @@ // Array of device ids #define FIXED_DEVICE_IDS \ { \ - 22, 22, 22 \ + 22, 35, 263 \ } // Array of device versions From 786fdfa89f3101ce4fa8567d686c6e997b5f7a35 Mon Sep 17 00:00:00 2001 From: hnnajh <72513572+hnnajh@users.noreply.github.com> Date: Thu, 20 Jan 2022 05:40:39 -0800 Subject: [PATCH 088/124] Increment lifetime counter on advertisement (#13598) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * RotatingId: version0 * RotatingId: version1 * RotatingId: version0 * RotatingId: version1 * Fix Darwin host build (#3990) #### Problem Some conversions to use PacketBufferHandle (#3909) broke Darwin builds, which aren't currently run in CI. #### Summary of Changes Fix src/platform/Darwin/BleConnectionDelegateImpl.mm to match the API change in #3909. * Add '-Wextra' to compiler flags (#3902) * Implement Level Control Cluster (#3806) * New seekbar in Android CHIPTool * Sample usage in lighting-app/nrfconnect Signed-off-by: Markus Becker * Fix Rendezvous over BLE after recent changes (#4012) PR #3704 introduced a change that the BLE transport in RendezvousSession is only initialized when PeerAddress in RendezvousParams is of type BLE. However, PeerAddress isn't initialized anywhere. As a result Rendezvous over BLE stopped working between Android CHIPTool and accessories. Btw, remove an assert related to the storage delegate as it seems an optional member of the device controller. * [thread] fix invalid configuration of active dataset (#4008) * Fix data loss or crash in TCPEndPoint with LwIP (#4022) * Fix data loss or crash in TCPEndPoint with LwIP #### Problem Under the configuration CHIP_SYSTEM_CONFIG_USE_LWIP, in some cases where the data size exceeds the TCP window size, TCPEndPoint can either die or lose data when accounting of un-acked data falls out of sync. #### Summary of Changes Imported fix from Weave: * This change removes separate accounting of the unsent data position and replaces it with simple counting of sent-but-not-acked data and a skip-loop at the start of DriveSending(). Fixes #4013 - Data loss or crash in TCPEndPoint with LwIP * Restyled by clang-format Co-authored-by: Restyled.io * Update lighting-app gen/ folder with ZAP generated content (#4010) * Fix segmentation fault error in response echo message (#3984) * Add back Android default build coverage & fix the build (#3966) mDNS doesn't build with no device layer. Remove it from the build and add back the coverage that would catch this that was lost in #3340. * Update all-clusters-app gen/ folder with ZAP generated content (#3963) * Move src/inet/tests to auto-test-driver generation (#3997) * Rename TestUtils to UnitTestRegistration. (#4021) Looking to remove usage of 'Utils' unless we have really no choice. 'UnitTestRegistration' seems clearer in what it does compared to 'TestUtils'. * Update src/lib/core/tests to auto-test-driver generation (#3991) * Cleanup zap chip-helper.js (#3973) * Cleanup zap chip-helper.js * Restyled by clang-format Co-authored-by: Restyled.io * Move src/transport/tests to auto-test-driver generation (#3999) * Move src/transport/tests to auto-test-driver generation * Add relevant libraries (and more test-capable libs) to nrf. * Refactor inet test helpers (to not include actual inet tests), try to make qemu allow better linkage but still failed for transport tests so disabled for now * Added more tests on esp32 qemu * Restyle fixes * Fix cast errors in InetCommon * Disable raw tests from zephyr: somehow they fail running out of endpoints * Disable DNS test on zephyr * Remove inet endpoint test from zephyr * Remove inet endpoint test from zephyr - fix again * Modify gitignore * Restyle fixes * Use CHIPDeviceController instead of CHIPDeviceController_deprecated (#3979) * Implement the missing part of Exchange Header in Transport layer (#4017) * Implement the missing part of Exchange Header in Transport layer * Revert comment 'if' back to 'iff'("if and only if") * Remove duplicated send flag defines and put ExchangeMgr/ExchangeConte… (#3994) * Remove duplicated send flag defines and put ExchangeMgr/ExchangeContext under the same namespace as CRMP * Rename kSendFlag_Default to kSendFlag_None * Move src/lib/asn1/tests and src/ble/tests to auto-test-driver generation (#3998) * Move src/lib/asn1/tests and src/ble/tests to auto-test-driver generation * Remove one more unused file * Attempt to enable asn1 and ble tests in esp32 - see if they pass or not * Fix merge error * Update include header for ASN1 test * Include ASN1 in libCHIP * Some conversions to use PacketBufferHandle (#4011) * Some conversions to use PacketBufferHandle #### Problem Code should use `PacketBufferHandle` rather than `PacketBuffer *`. #### Summary of Changes - Converts remaining receive path in //src/inet and //src/transport. - Converts most of //src/ble. - Introduces Handle versions of the `AddToEnd`/`DetachTail` pair. Part of issue #2707 - Figure out a way to express PacketBuffer ownership in the type system * Restyled by clang-format * review * revive BtpEngine::Clear[TR]xPacket() * simplify conditional * (void) message.DetachTail() → message.FreeHead() * remove ExchangeContext::kSendFlag_RetainBuffer * missed pBuf.IsNull() * DetachHead() → PopTail() * typos Co-authored-by: Restyled.io * Move src/system/tests to auto-test-driver generation (#4000) * Move src/system/tests to auto-test-driver generation * Remove a TCP/IP init call that was killing qemu * Remove explicit "all" target from root build file (#3967) The "all" target exists implicitly and contains everything. We don't need to specify one, and it's misleading to do so specifying deps has no effect. * Make src/setup_payload compile with -Werror=conversion (#4032) * Add SSID and password to chip-tool pairing (#4054) * Get temperature-measurement and all-clusters-app to use examples/common/chip-app-server (#4039) #### Problem PR #3704 introduced a change where a `PeerAddress` is now required in order to start `RendezvousSession`. Sadly the multiple code paths bootstrapping `RendezvousSession` has not been updated. PR #4012 add a fix for some of the `examples/` but not for the `all-clusters-app` nor the `temperature-measurement-app`. To avoid such situation, this PR merge `examples/common/chip-app-server` and the custom code from `all-clusters-app` and `temperature-measurement-app`. One of the more discutable change of this PR (imo) is the code that moves the custom `Echo` mechanism from the `all-clusters-app` to `chip-app-server`. I was hoping to get rid of it before doing this change but the `all-clusters-app` and the `temperature-measurement-app` are broken since #3704 and this PR should fix that. Also I have a PR (mostly) ready once #3979 lands to get rid of this `Echo` specific code and replace it by a manufacturer specific `ping` command. #### Summary of Changes * Remove `EchoServer.cpp`, `RendezvousDeviceDelegate.cpp` and `include/RendezvousDeviceDelegate.h` from `all-clusters-app` * Remove `ResponseServer.cpp`, `RendezvousDeviceDelegate.cpp` and `include/RendezvousDeviceDelegate.h` from `temperature-measurement-app` * Introduce `chip-app-server/include/AppDelegate.h` in order to keep the behavior the `all-clusters-app` that turns on/off leds on different events. Maybe it should be converted to some types of `ChipDeviceEvent` or `CHIPCallback` at some point. * Fix `chip-app-server` to accomodate for the specifics of `all-clusters-app` * Add all Thread ULA addresses to the lwip interface (#4053) ULA prefixes will used for CHIP network so we need to add all these addresses to the interface. * Remove src/lib/message. (#4055) * Remove src/lib/message. Updated messaging implementation lives in src/messaging and the src/lib/message is not currently compiled or linked in. This saves us from looking at this code when some refactoring is needed (e.g. the SystemPacketBuffer changes). * Remove one more unused file * [ChipTool] Add Payload Parse Command (#3696) * [ChipTool] Add Payload Parse Command * [ChipTool] Add Payload Parse Command * [ChipTool] Restyle issues resolved * Restyled by whitespace * Resolve build errors caused by Command.h schema change Co-authored-by: lijayaku Co-authored-by: Restyled.io * rename ParseCommand to QRCodeParseCommand * adding AdditionalDataParseCommand version 0 * Adding parsing logic + logging * adding another parsing method * Basic Parsing is DONE * fixing memory issue * removing some logs * removing more logs * minor update * Add RotatingDeviceId to DNS-SD * Revert "Merge pull request #4 from hnnajh/rotating-id-test" This reverts commit 0235d05b52dbbc050f1ebfe7fa2b9d2f2a9a9018, reversing changes made to 3e1a4b960d3e0e0e861b4364d2bd3193e7b45ae8. * increment lifetime counter * Incrementing lifetime counter at each BLE/MDNS advertisement * address comments * Update src/include/platform/ConfigurationManager.h Co-authored-by: Boris Zbarsky * removing unnecessary lines * nit * Update src/app/server/Dnssd.cpp Co-authored-by: chrisdecenzo <61757564+chrisdecenzo@users.noreply.github.com> * restyling * Update src/app/server/Dnssd.cpp Co-authored-by: chrisdecenzo <61757564+chrisdecenzo@users.noreply.github.com> * Update src/app/server/Dnssd.cpp Co-authored-by: chrisdecenzo <61757564+chrisdecenzo@users.noreply.github.com> * fix comments * incrementing lifetimecounter once * remove unnecessary include Co-authored-by: Kevin Schoedel <67607049+kpschoedel@users.noreply.github.com> Co-authored-by: Vivien Nicolas Co-authored-by: Markus Becker Co-authored-by: Damian Królik <66667989+Damian-Nordic@users.noreply.github.com> Co-authored-by: Łukasz Duda Co-authored-by: Restyled.io Co-authored-by: Yufeng Wang <44623591+yufengwangca@users.noreply.github.com> Co-authored-by: Michael Spang Co-authored-by: Andrei Litvin Co-authored-by: jepenven-silabs <67962328+jepenven-silabs@users.noreply.github.com> Co-authored-by: Boris Zbarsky Co-authored-by: Jiacheng Guo Co-authored-by: Liju Jayakumar <26148162+lijujayakumar@users.noreply.github.com> Co-authored-by: lijayaku Co-authored-by: chrisdecenzo <61757564+chrisdecenzo@users.noreply.github.com> --- src/app/server/CommissioningWindowManager.cpp | 5 +++++ src/include/platform/ConfigurationManager.h | 7 +++++++ .../platform/internal/GenericConfigurationManagerImpl.cpp | 7 ++++++- .../platform/internal/GenericConfigurationManagerImpl.h | 5 +++++ src/platform/Zephyr/BLEManagerImpl.cpp | 5 ----- 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/app/server/CommissioningWindowManager.cpp b/src/app/server/CommissioningWindowManager.cpp index d5d519581d568a..91a92c4dafd758 100644 --- a/src/app/server/CommissioningWindowManager.cpp +++ b/src/app/server/CommissioningWindowManager.cpp @@ -270,6 +270,11 @@ void CommissioningWindowManager::CloseCommissioningWindow() CHIP_ERROR CommissioningWindowManager::StartAdvertisement() { +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING + // notify device layer that advertisement is beginning (to do work such as increment rotating id) + DeviceLayer::ConfigurationMgr().NotifyOfAdvertisementStart(); +#endif + if (mIsBLE) { ReturnErrorOnFailure(chip::DeviceLayer::ConnectivityMgr().SetBLEAdvertisingEnabled(true)); diff --git a/src/include/platform/ConfigurationManager.h b/src/include/platform/ConfigurationManager.h index 28b044ee896e9b..a8977307b14aee 100644 --- a/src/include/platform/ConfigurationManager.h +++ b/src/include/platform/ConfigurationManager.h @@ -136,6 +136,13 @@ class ConfigurationManager virtual bool IsFullyProvisioned() = 0; virtual void InitiateFactoryReset() = 0; + // Gets called when starting BLE/DNS-SD advertisement +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING + virtual void NotifyOfAdvertisementStart() {} +#else + void NotifyOfAdvertisementStart() {} +#endif + virtual void LogDeviceConfig() = 0; virtual bool IsCommissionableDeviceTypeEnabled() = 0; diff --git a/src/include/platform/internal/GenericConfigurationManagerImpl.cpp b/src/include/platform/internal/GenericConfigurationManagerImpl.cpp index 72d5875abbe21e..e327da4cfd38d3 100644 --- a/src/include/platform/internal/GenericConfigurationManagerImpl.cpp +++ b/src/include/platform/internal/GenericConfigurationManagerImpl.cpp @@ -248,11 +248,16 @@ CHIP_ERROR GenericConfigurationManagerImpl::StoreManufacturingDate( template void GenericConfigurationManagerImpl::InitiateFactoryReset() +{} + +template +void GenericConfigurationManagerImpl::NotifyOfAdvertisementStart() { #if CHIP_ENABLE_ROTATING_DEVICE_ID + // Increment life time counter to protect against long-term tracking of rotating device ID. IncrementLifetimeCounter(); -#endif // Inheriting classes should call this method so the lifetime counter is updated if necessary. +#endif } template diff --git a/src/include/platform/internal/GenericConfigurationManagerImpl.h b/src/include/platform/internal/GenericConfigurationManagerImpl.h index 7fb9554ae0737c..e498eb0e60854e 100644 --- a/src/include/platform/internal/GenericConfigurationManagerImpl.h +++ b/src/include/platform/internal/GenericConfigurationManagerImpl.h @@ -113,6 +113,11 @@ class GenericConfigurationManagerImpl : public ConfigurationManager CHIP_ERROR RunUnitTests(void) override; bool IsFullyProvisioned() override; void InitiateFactoryReset() override; +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING + void NotifyOfAdvertisementStart() override; +#else + void NotifyOfAdvertisementStart(); +#endif void LogDeviceConfig() override; virtual ~GenericConfigurationManagerImpl() = default; diff --git a/src/platform/Zephyr/BLEManagerImpl.cpp b/src/platform/Zephyr/BLEManagerImpl.cpp index f6f392ee1ceca7..c21134e33e5b83 100644 --- a/src/platform/Zephyr/BLEManagerImpl.cpp +++ b/src/platform/Zephyr/BLEManagerImpl.cpp @@ -359,11 +359,6 @@ CHIP_ERROR BLEManagerImpl::StopAdvertising(void) ChipLogProgress(DeviceLayer, "CHIPoBLE advertising stopped"); -#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING - // Increment life time counter to protect against long-term tracking of rotating device ID. - ReturnErrorOnFailure(ConfigurationMgr().IncrementLifetimeCounter()); -#endif - // Post a CHIPoBLEAdvertisingChange(Stopped) event. { ChipDeviceEvent advChange; From fa0b36f6a1aca0b8ac73d86c3620ba7f832135c2 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Thu, 20 Jan 2022 16:36:15 +0100 Subject: [PATCH 089/124] [chip-tool] Register reportable commands for attributes of type list (#13759) --- examples/chip-tool/templates/commands.zapt | 2 - .../zap-generated/cluster/Commands.h | 191 +++++++++++++----- 2 files changed, 146 insertions(+), 47 deletions(-) diff --git a/examples/chip-tool/templates/commands.zapt b/examples/chip-tool/templates/commands.zapt index 7592969a5c1ad0..a7f619a272e723 100644 --- a/examples/chip-tool/templates/commands.zapt +++ b/examples/chip-tool/templates/commands.zapt @@ -531,9 +531,7 @@ void registerCluster{{asUpperCamelCase name}}(Commands & commands) {{/unless}} {{/if}} {{#if isReportableAttribute}} - {{#unless isList}} make_unique(), // - {{/unless}} {{/if}} {{/unless}} {{/chip_server_cluster_attributes}} diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index cc180ac9db53c4..ae37228af5445b 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -60144,8 +60144,11 @@ void registerClusterAccessControl(Commands & commands) commands_list clusterCommands = { make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -60165,6 +60168,7 @@ void registerClusterAccountLogin(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60186,6 +60190,7 @@ void registerClusterAdministratorCommissioning(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60210,7 +60215,9 @@ void registerClusterApplicationBasic(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60222,13 +60229,15 @@ void registerClusterApplicationLauncher(Commands & commands) const char * clusterName = "ApplicationLauncher"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -60241,9 +60250,11 @@ void registerClusterAudioOutput(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60266,6 +60277,7 @@ void registerClusterBarrierControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60320,6 +60332,7 @@ void registerClusterBasic(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -60348,6 +60361,7 @@ void registerClusterBinaryInputBasic(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60362,6 +60376,7 @@ void registerClusterBinding(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60376,6 +60391,7 @@ void registerClusterBooleanState(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -60402,10 +60418,13 @@ void registerClusterBridgedActions(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -60422,6 +60441,7 @@ void registerClusterBridgedDeviceBasic(Commands & commands) commands_list clusterCommands = { make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60437,7 +60457,9 @@ void registerClusterChannel(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60586,6 +60608,7 @@ void registerClusterColorControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60600,10 +60623,12 @@ void registerClusterContentLauncher(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60616,10 +60641,15 @@ void registerClusterDescriptor(Commands & commands) commands_list clusterCommands = { make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60633,6 +60663,7 @@ void registerClusterDiagnosticLogs(Commands & commands) commands_list clusterCommands = { make_unique(), // make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -60690,6 +60721,7 @@ void registerClusterDoorLock(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -60734,6 +60766,7 @@ void registerClusterElectricalMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60765,6 +60798,7 @@ void registerClusterEthernetNetworkDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -60779,7 +60813,9 @@ void registerClusterFixedLabel(Commands & commands) commands_list clusterCommands = { make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60800,6 +60836,7 @@ void registerClusterFlowMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60811,20 +60848,22 @@ void registerClusterGeneralCommissioning(Commands & commands) const char * clusterName = "GeneralCommissioning"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -60835,6 +60874,7 @@ void registerClusterGeneralDiagnostics(Commands & commands) commands_list clusterCommands = { make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -60844,9 +60884,13 @@ void registerClusterGeneralDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -60871,12 +60915,15 @@ void registerClusterGroupKeyManagement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60897,6 +60944,7 @@ void registerClusterGroups(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60917,6 +60965,7 @@ void registerClusterIdentify(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60939,6 +60988,7 @@ void registerClusterIlluminanceMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60952,6 +61002,7 @@ void registerClusterKeypadInput(Commands & commands) commands_list clusterCommands = { make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61007,6 +61058,7 @@ void registerClusterLevelControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61020,10 +61072,11 @@ void registerClusterLocalizationConfiguration(Commands & commands) const char * clusterName = "LocalizationConfiguration"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -61035,6 +61088,7 @@ void registerClusterLowPower(Commands & commands) commands_list clusterCommands = { make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61051,9 +61105,11 @@ void registerClusterMediaInput(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61089,6 +61145,7 @@ void registerClusterMediaPlayback(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61104,6 +61161,7 @@ void registerClusterModeSelect(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61112,6 +61170,7 @@ void registerClusterModeSelect(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61132,6 +61191,7 @@ void registerClusterNetworkCommissioning(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61162,6 +61222,7 @@ void registerClusterOtaSoftwareUpdateProvider(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61175,6 +61236,7 @@ void registerClusterOtaSoftwareUpdateRequestor(Commands & commands) commands_list clusterCommands = { make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61182,6 +61244,7 @@ void registerClusterOtaSoftwareUpdateRequestor(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61206,6 +61269,7 @@ void registerClusterOccupancySensing(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61237,6 +61301,7 @@ void registerClusterOnOff(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61256,6 +61321,7 @@ void registerClusterOnOffSwitchConfiguration(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61267,26 +61333,29 @@ void registerClusterOperationalCredentials(Commands & commands) const char * clusterName = "OperationalCredentials"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -61311,9 +61380,11 @@ void registerClusterPowerSource(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61328,7 +61399,9 @@ void registerClusterPowerSourceConfiguration(Commands & commands) commands_list clusterCommands = { make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61347,6 +61420,7 @@ void registerClusterPressureMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61411,6 +61485,7 @@ void registerClusterPumpConfigurationAndControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61467,6 +61542,7 @@ void registerClusterRelativeHumidityMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61496,6 +61572,7 @@ void registerClusterScenes(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61509,6 +61586,7 @@ void registerClusterSoftwareDiagnostics(Commands & commands) commands_list clusterCommands = { make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61516,6 +61594,7 @@ void registerClusterSoftwareDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61538,6 +61617,7 @@ void registerClusterSwitch(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61567,9 +61647,11 @@ void registerClusterTargetNavigator(Commands & commands) commands_list clusterCommands = { make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61590,6 +61672,7 @@ void registerClusterTemperatureMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61698,8 +61781,11 @@ void registerClusterTestCluster(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61719,6 +61805,7 @@ void registerClusterTestCluster(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61735,6 +61822,7 @@ void registerClusterTestCluster(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61838,6 +61926,7 @@ void registerClusterTestCluster(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61900,6 +61989,7 @@ void registerClusterThermostat(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61923,6 +62013,7 @@ void registerClusterThermostatUserInterfaceConfiguration(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61950,7 +62041,9 @@ void registerClusterThreadNetworkDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -62052,11 +62145,15 @@ void registerClusterThreadNetworkDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -62073,6 +62170,7 @@ void registerClusterUserLabel(Commands & commands) commands_list clusterCommands = { make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -62087,6 +62185,7 @@ void registerClusterWakeOnLan(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -62126,6 +62225,7 @@ void registerClusterWiFiNetworkDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -62190,6 +62290,7 @@ void registerClusterWindowCovering(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // From fd815cda6e3734deef30b421122554385b51a197 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Thu, 20 Jan 2022 10:26:41 -0800 Subject: [PATCH 090/124] Implement NOCs attribute in Node Operational Credentials Cluster (#13563) * Implement NOCs attribute in Node Operational Credentials Cluster * Run codegen --- .../all-clusters-app.matter | 9 +- .../all-clusters-common/all-clusters-app.zap | 15 ++ .../bridge-common/bridge-app.matter | 9 +- .../bridge-app/bridge-common/bridge-app.zap | 15 ++ .../door-lock-common/door-lock-app.matter | 9 +- .../door-lock-common/door-lock-app.zap | 15 ++ .../lighting-common/lighting-app.matter | 9 +- .../lighting-common/lighting-app.zap | 15 ++ examples/lock-app/lock-common/lock-app.matter | 9 +- examples/lock-app/lock-common/lock-app.zap | 15 ++ .../log-source-common/log-source-app.matter | 2 +- .../ota-provider-app.matter | 9 +- .../ota-provider-common/ota-provider-app.zap | 15 ++ .../ota-requestor-app.matter | 9 +- .../ota-requestor-app.zap | 15 ++ .../placeholder/linux/apps/app1/config.matter | 2 +- .../placeholder/linux/apps/app2/config.matter | 2 +- examples/pump-app/pump-common/pump-app.matter | 9 +- examples/pump-app/pump-common/pump-app.zap | 15 ++ .../pump-controller-app.matter | 9 +- .../pump-controller-app.zap | 15 ++ .../esp32/main/temperature-measurement.matter | 9 +- .../esp32/main/temperature-measurement.zap | 15 ++ .../thermostat-common/thermostat.matter | 9 +- .../thermostat-common/thermostat.zap | 15 ++ examples/tv-app/tv-common/tv-app.matter | 18 ++- examples/tv-app/tv-common/tv-app.zap | 15 ++ .../tv-casting-common/tv-casting-app.matter | 9 +- .../tv-casting-common/tv-casting-app.zap | 17 ++- examples/window-app/common/window-app.matter | 9 +- examples/window-app/common/window-app.zap | 15 ++ .../operational-credentials-server.cpp | 31 ++++ .../chip/operational-credentials-cluster.xml | 6 +- .../data_model/controller-clusters.matter | 9 +- .../data_model/controller-clusters.zap | 30 ++++ .../java/zap-generated/CHIPCallbackTypes.h | 2 + .../zap-generated/CHIPClustersRead-JNI.cpp | 36 +++++ .../java/zap-generated/CHIPReadCallbacks.cpp | 133 +++++++++++++++++- .../java/zap-generated/CHIPReadCallbacks.h | 33 +++++ .../chip/devicecontroller/ChipClusters.java | 44 ++++++ .../devicecontroller/ClusterInfoMapping.java | 28 ++++ .../devicecontroller/ClusterReadMapping.java | 15 ++ .../python/chip/clusters/CHIPClusters.py | 5 + .../python/chip/clusters/Objects.py | 20 +++ src/credentials/FabricTable.h | 4 +- .../CHIPAttributeTLVValueDecoder.mm | 29 ++++ .../CHIP/zap-generated/CHIPCallbackBridge.mm | 43 ++++++ .../CHIPCallbackBridge_internal.h | 31 ++++ .../CHIP/zap-generated/CHIPClustersObjc.h | 2 + .../CHIP/zap-generated/CHIPClustersObjc.mm | 11 ++ .../CHIP/zap-generated/CHIPStructsObjc.h | 1 + .../CHIP/zap-generated/CHIPStructsObjc.mm | 2 + .../CHIP/zap-generated/CHIPTestClustersObjc.h | 1 + .../zap-generated/CHIPTestClustersObjc.mm | 41 ++++++ .../Framework/CHIPTests/CHIPClustersTests.m | 25 ++++ .../zap-generated/endpoint_config.h | 115 +++++++-------- .../app-common/zap-generated/af-structs.h | 5 +- .../app-common/zap-generated/attribute-id.h | 1 + .../zap-generated/cluster-objects.cpp | 7 + .../zap-generated/cluster-objects.h | 23 ++- .../app-common/zap-generated/ids/Attributes.h | 4 + .../zap-generated/endpoint_config.h | 19 +-- .../zap-generated/cluster/Commands.h | 43 ++++++ .../zap-generated/CHIPClientCallbacks.cpp | 21 +++ .../zap-generated/CHIPClientCallbacks.h | 7 + .../zap-generated/endpoint_config.h | 15 +- .../zap-generated/endpoint_config.h | 25 ++-- .../lock-app/zap-generated/endpoint_config.h | 15 +- .../zap-generated/endpoint_config.h | 9 +- .../zap-generated/endpoint_config.h | 9 +- .../pump-app/zap-generated/endpoint_config.h | 29 ++-- .../zap-generated/endpoint_config.h | 21 +-- .../zap-generated/endpoint_config.h | 13 +- .../zap-generated/endpoint_config.h | 23 +-- .../zap-generated/CHIPClientCallbacks.cpp | 21 +++ .../zap-generated/CHIPClientCallbacks.h | 7 + .../tv-app/zap-generated/endpoint_config.h | 61 ++++---- .../zap-generated/endpoint_config.h | 85 +++++------ .../zap-generated/endpoint_config.h | 19 +-- 79 files changed, 1281 insertions(+), 251 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 7d45a27ddda64f..ffff2220bcbc6f 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 @@ -2084,8 +2084,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -2093,6 +2099,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; 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 29a874b0118ef9..90ddac7d87f30d 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 @@ -4355,6 +4355,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 34a1202bebc03e..4a52bd4ce5ccc5 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -536,8 +536,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -545,6 +551,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 074fef3c6e5c3b..ceab47a82bb9be 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -2918,6 +2918,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, diff --git a/examples/door-lock-app/door-lock-common/door-lock-app.matter b/examples/door-lock-app/door-lock-common/door-lock-app.matter index fa43a261912543..f06dc83c1b8c3e 100644 --- a/examples/door-lock-app/door-lock-common/door-lock-app.matter +++ b/examples/door-lock-app/door-lock-common/door-lock-app.matter @@ -764,8 +764,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -773,6 +779,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/door-lock-app/door-lock-common/door-lock-app.zap b/examples/door-lock-app/door-lock-common/door-lock-app.zap index e0811fbe202f99..1a7e40362e00b4 100644 --- a/examples/door-lock-app/door-lock-common/door-lock-app.zap +++ b/examples/door-lock-app/door-lock-common/door-lock-app.zap @@ -3885,6 +3885,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index fc086b5b065a5a..eea92f58f086ee 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1021,8 +1021,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -1030,6 +1036,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 5c63eaa227ffbb..fb1e68cb44bec1 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -4143,6 +4143,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index e85295ff9102d2..68d68747fa3d1b 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -460,8 +460,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -469,6 +475,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 0365ec7275c95e..08b8f6614b3cbb 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -3885,6 +3885,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index 62dbefcd91ee51..118db74926951c 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -235,7 +235,7 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; 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 8a30d8e8a4bfd7..362dc798456791 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 @@ -272,8 +272,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -281,6 +287,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; 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 f806fa5a73f4f7..c447385b451e87 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 @@ -1721,6 +1721,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, 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 2bc81307e23d6c..483e85870e6687 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 @@ -372,8 +372,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -381,6 +387,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; 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 364b27439619af..9f9ca70a12c219 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 @@ -1820,6 +1820,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index caf234bea8612d..764bbe9a482b79 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -507,7 +507,7 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index caf234bea8612d..764bbe9a482b79 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -507,7 +507,7 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index db69dedc026746..86eac98eddf62d 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -511,8 +511,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -520,6 +526,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/pump-app/pump-common/pump-app.zap b/examples/pump-app/pump-common/pump-app.zap index 547b2575f3240a..27899b8e60278c 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -3661,6 +3661,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, 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 acb4a4dc9fcb9b..7d0b9ce9b97746 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 @@ -531,8 +531,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -540,6 +546,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; 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 dac6c8c62b9387..a3f8134ecae07f 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 @@ -3661,6 +3661,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index 7b7b62695f6224..905bde4e91c56c 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -425,8 +425,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -434,6 +440,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap b/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap index 8a2b672613c4f7..018ede5303867b 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap @@ -2274,6 +2274,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 751c3ff075cb4e..9019756ebabaa4 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -684,8 +684,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -693,6 +699,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index c4f33595c982f9..705464718d4a8c 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -3991,6 +3991,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index d11460df97aead..fab11b136b0664 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -1330,8 +1330,14 @@ client cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -1339,6 +1345,7 @@ client cluster OperationalCredentials = 62 { CHAR_STRING label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; @@ -1421,8 +1428,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -1430,6 +1443,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index 819488c416eb25..437564af70bcc5 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -4006,6 +4006,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, 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 0b1d04c09b2e31..b380967a5dbdc1 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 @@ -1852,8 +1852,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -1861,6 +1867,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; 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 a0a56f806f7c10..e9050524569460 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 @@ -3991,6 +3991,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, @@ -16504,4 +16519,4 @@ "deviceIdentifier": 263 } ] -} +} \ 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 0007a094b4f681..36bfd10e7adadf 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -453,8 +453,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -462,6 +468,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index 847536871850f5..11b170b5edaf53 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -3666,6 +3666,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, diff --git a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp index becb7d9a2b42d8..3842fbd4eb0d47 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -70,12 +70,40 @@ class OperationalCredentialsAttrAccess : public AttributeAccessInterface CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; private: + CHIP_ERROR ReadNOCs(EndpointId endpoint, AttributeValueEncoder & aEncoder); CHIP_ERROR ReadSupportedFabrics(EndpointId endpoint, AttributeValueEncoder & aEncoder); CHIP_ERROR ReadCommissionedFabrics(EndpointId endpoint, AttributeValueEncoder & aEncoder); CHIP_ERROR ReadFabricsList(EndpointId endpoint, AttributeValueEncoder & aEncoder); CHIP_ERROR ReadRootCertificates(EndpointId endpoint, AttributeValueEncoder & aEncoder); }; +CHIP_ERROR OperationalCredentialsAttrAccess::ReadNOCs(EndpointId endpoint, AttributeValueEncoder & aEncoder) +{ + auto accessingFabricIndex = aEncoder.AccessingFabricIndex(); + + return aEncoder.EncodeList([accessingFabricIndex](const auto & encoder) -> CHIP_ERROR { + for (auto & fabricInfo : Server::GetInstance().GetFabricTable()) + { + Clusters::OperationalCredentials::Structs::NOCStruct::Type noc; + + if (!fabricInfo.IsInitialized()) + continue; + + noc.fabricIndex = fabricInfo.GetFabricIndex(); + + if (accessingFabricIndex == fabricInfo.GetFabricIndex()) + { + ReturnErrorOnFailure(fabricInfo.GetNOCCert(noc.noc)); + ReturnErrorOnFailure(fabricInfo.GetICACert(noc.icac)); + } + + ReturnErrorOnFailure(encoder.Encode(noc)); + } + + return CHIP_NO_ERROR; + }); +} + CHIP_ERROR OperationalCredentialsAttrAccess::ReadSupportedFabrics(EndpointId endpoint, AttributeValueEncoder & aEncoder) { uint8_t fabricCount = CHIP_CONFIG_MAX_DEVICE_ADMINS; @@ -142,6 +170,9 @@ CHIP_ERROR OperationalCredentialsAttrAccess::Read(const ConcreteReadAttributePat switch (aPath.mAttributeId) { + case Attributes::NOCs::Id: { + return ReadNOCs(aPath.mEndpointId, aEncoder); + } case Attributes::SupportedFabrics::Id: { return ReadSupportedFabrics(aPath.mEndpointId, aEncoder); } diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml index a6e0012cd14dec..f24ff35b33539a 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml @@ -19,7 +19,7 @@ limitations under the License. - + @@ -43,8 +43,9 @@ limitations under the License. - + + @@ -54,6 +55,7 @@ limitations under the License. OPERATIONAL_CREDENTIALS_CLUSTER This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. + NOCs fabrics list SupportedFabrics CommissionedFabrics diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 66d713dfd6d375..680a495df9f7f7 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -2304,8 +2304,14 @@ client cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -2313,6 +2319,7 @@ client cluster OperationalCredentials = 62 { CHAR_STRING label = 5; } + readonly nosubscribe attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 482e0223506022..f0bf6fbcaa7517 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -6139,6 +6139,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, @@ -6229,6 +6244,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h index d295e248dbbdf5..1d80c1906e923a 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -733,6 +733,8 @@ typedef void (*CHIPOperationalCredentialsClusterNOCResponseCallbackType)( typedef void (*CHIPOperationalCredentialsClusterOpCSRResponseCallbackType)( void *, const chip::app::Clusters::OperationalCredentials::Commands::OpCSRResponse::DecodableType &); +typedef void (*CHIPOperationalCredentialsClusterNOCsAttributeCallbackType)( + void *, const chip::app::Clusters::OperationalCredentials::Attributes::NOCs::TypeInfo::DecodableType &); typedef void (*CHIPOperationalCredentialsClusterFabricsListAttributeCallbackType)( void *, const chip::app::Clusters::OperationalCredentials::Attributes::FabricsList::TypeInfo::DecodableType &); typedef void (*CHIPOperationalCredentialsClusterSupportedFabricsAttributeCallbackType)( diff --git a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp index 6a33054bc7d72e..c616359d6a1b60 100644 --- a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp @@ -10800,6 +10800,42 @@ JNI_METHOD(void, OnOffSwitchConfigurationCluster, readClusterRevisionAttribute) onFailure.release(); } +JNI_METHOD(void, OperationalCredentialsCluster, readNOCsAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::OperationalCredentials::Attributes::NOCs::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::OperationalCredentialsCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could 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, OperationalCredentialsCluster, readFabricsListAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index ddf7dfa5ba8e37..95e39a8076ad99 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -8174,6 +8174,137 @@ void CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::CallbackFn( 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.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jclass attributeClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$OperationalCredentialsCluster$NOCsAttribute", attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$OperationalCredentialsCluster$NOCsAttribute")); + chip::JniClass attributeJniClass(attributeClass); + jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;[B[B)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find NOCsAttribute constructor")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + (void) entry; + bool fabricIndexNull = false; + bool fabricIndexHasValue = true; + + chip::FabricIndex fabricIndexValue = entry.fabricIndex; + + jobject fabricIndex = nullptr; + if (!fabricIndexNull && fabricIndexHasValue) + { + jclass fabricIndexEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", fabricIndexEntryCls); + chip::JniClass fabricIndexJniClass(fabricIndexEntryCls); + jmethodID fabricIndexEntryTypeCtor = env->GetMethodID(fabricIndexEntryCls, "", "(I)V"); + fabricIndex = env->NewObject(fabricIndexEntryCls, fabricIndexEntryTypeCtor, fabricIndexValue); + } + + bool nocNull = false; + bool nocHasValue = true; + + chip::ByteSpan nocValue = entry.noc; + + jbyteArray noc = nullptr; + if (!nocNull && nocHasValue) + { + noc = env->NewByteArray(nocValue.size()); + env->SetByteArrayRegion(noc, 0, nocValue.size(), reinterpret_cast(nocValue.data())); + } + + bool icacNull = false; + bool icacHasValue = true; + + chip::ByteSpan icacValue = entry.icac; + + jbyteArray icac = nullptr; + if (!icacNull && icacHasValue) + { + icac = env->NewByteArray(icacValue.size()); + env->SetByteArrayRegion(icac, 0, icacValue.size(), reinterpret_cast(icacValue.data())); + } + + jobject attributeObj = env->NewObject(attributeClass, attributeCtor, fabricIndex, noc, icac); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create NOCsAttribute object")); + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + } + VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding NOCsAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + CHIPOperationalCredentialsFabricsListAttributeCallback::CHIPOperationalCredentialsFabricsListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), @@ -8259,7 +8390,7 @@ void CHIPOperationalCredentialsFabricsListAttributeCallback::CallbackFn( bool fabricIndexNull = false; bool fabricIndexHasValue = true; - uint8_t fabricIndexValue = entry.fabricIndex; + chip::FabricIndex fabricIndexValue = entry.fabricIndex; jobject fabricIndex = nullptr; if (!fabricIndexNull && fabricIndexHasValue) diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index 11baa808a14808..9cbc0f40ac76e0 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -2825,6 +2825,39 @@ class CHIPOnOffSwitchConfigurationAttributeListAttributeCallback bool keepAlive; }; +class CHIPOperationalCredentialsNOCsAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPOperationalCredentialsNOCsAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPOperationalCredentialsNOCsAttributeCallback(); + + static void maybeDestroy(CHIPOperationalCredentialsNOCsAttributeCallback * 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_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPOperationalCredentialsFabricsListAttributeCallback : public chip::Callback::Callback { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 0c0a20087a6019..3ccf41825d1d7c 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -9838,6 +9838,44 @@ public interface OpCSRResponseCallback { void onError(Exception error); } + public static class NOCsAttribute { + public Integer fabricIndex; + public byte[] noc; + public byte[] icac; + + public NOCsAttribute(Integer fabricIndex, byte[] noc, byte[] icac) { + this.fabricIndex = fabricIndex; + this.noc = noc; + this.icac = icac; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(""); + output.append("int fabricIndex: "); + output.append(this.fabricIndex); + output.append("\n"); + + output.append("byte[] "); + output.append(Arrays.toString(noc)); + output.append("\n"); + + output.append("byte[] "); + output.append(Arrays.toString(icac)); + output.append("\n"); + + return output.toString(); + } + } + + public interface NOCsAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + public static class FabricsListAttribute { public Integer fabricIndex; public byte[] rootPublicKey; @@ -9924,6 +9962,10 @@ public interface AttributeListAttributeCallback { default void onSubscriptionEstablished() {} } + public void readNOCsAttribute(NOCsAttributeCallback callback) { + readNOCsAttribute(chipClusterPtr, callback); + } + public void readFabricsListAttribute(FabricsListAttributeCallback callback) { readFabricsListAttribute(chipClusterPtr, callback); } @@ -9973,6 +10015,8 @@ public void subscribeClusterRevisionAttribute( subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); } + private native void readNOCsAttribute(long chipClusterPtr, NOCsAttributeCallback callback); + private native void readFabricsListAttribute( long chipClusterPtr, FabricsListAttributeCallback callback); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 0d7e27d584b738..200d72746744e9 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -2767,6 +2767,34 @@ public void onError(Exception error) { } } + public static class DelegatedOperationalCredentialsClusterNOCsAttributeCallback + implements ChipClusters.OperationalCredentialsCluster.NOCsAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess( + List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = + new CommandResponseInfo( + "valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedOperationalCredentialsClusterFabricsListAttributeCallback implements ChipClusters.OperationalCredentialsCluster.FabricsListAttributeCallback, DelegatedClusterCallback { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index 5ff4ce3b2470aa..1485c805c5f3b2 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -4147,6 +4147,21 @@ public Map> getReadAttributeMap() { readOnOffSwitchConfigurationClusterRevisionAttributeInteractionInfo); readAttributeMap.put("onOffSwitchConfiguration", readOnOffSwitchConfigurationInteractionInfo); Map readOperationalCredentialsInteractionInfo = new LinkedHashMap<>(); + Map readOperationalCredentialsNOCsCommandParams = + new LinkedHashMap(); + InteractionInfo readOperationalCredentialsNOCsAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OperationalCredentialsCluster) cluster) + .readNOCsAttribute( + (ChipClusters.OperationalCredentialsCluster.NOCsAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping + .DelegatedOperationalCredentialsClusterNOCsAttributeCallback(), + readOperationalCredentialsNOCsCommandParams); + readOperationalCredentialsInteractionInfo.put( + "readNOCsAttribute", readOperationalCredentialsNOCsAttributeInteractionInfo); Map readOperationalCredentialsFabricsListCommandParams = new LinkedHashMap(); InteractionInfo readOperationalCredentialsFabricsListAttributeInteractionInfo = diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 37d158c20d8c85..0677aec9022146 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -3317,6 +3317,11 @@ class ChipClusters: }, }, "attributes": { + 0x00000000: { + "attributeName": "NOCs", + "attributeId": 0x00000000, + "type": "", + }, 0x00000001: { "attributeName": "FabricsList", "attributeId": 0x00000001, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index d82addc4d86d75..51247828185d9f 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -12419,6 +12419,7 @@ class OperationalCredentials(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ + ClusterObjectFieldDescriptor(Label="NOCs", Tag=0x00000000, Type=typing.List[OperationalCredentials.Structs.NOCStruct]), ClusterObjectFieldDescriptor(Label="fabricsList", Tag=0x00000001, Type=typing.List[OperationalCredentials.Structs.FabricDescriptor]), ClusterObjectFieldDescriptor(Label="supportedFabrics", Tag=0x00000002, Type=uint), ClusterObjectFieldDescriptor(Label="commissionedFabrics", Tag=0x00000003, Type=uint), @@ -12429,6 +12430,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) + NOCs: 'typing.List[OperationalCredentials.Structs.NOCStruct]' = None fabricsList: 'typing.List[OperationalCredentials.Structs.FabricDescriptor]' = None supportedFabrics: 'uint' = None commissionedFabrics: 'uint' = None @@ -12482,10 +12484,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="noc", Tag=1, Type=bytes), + ClusterObjectFieldDescriptor(Label="icac", Tag=2, Type=bytes), ]) fabricIndex: 'uint' = 0 noc: 'bytes' = b"" + icac: 'bytes' = b"" @@ -12705,6 +12709,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Attributes: + @dataclass + class NOCs(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x003E + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[OperationalCredentials.Structs.NOCStruct]) + + value: 'typing.List[OperationalCredentials.Structs.NOCStruct]' = field(default_factory=lambda: []) + @dataclass class FabricsList(ClusterAttributeDescriptor): @ChipUtility.classproperty diff --git a/src/credentials/FabricTable.h b/src/credentials/FabricTable.h index 7457b2f4b28e55..02f984666f8914 100644 --- a/src/credentials/FabricTable.h +++ b/src/credentials/FabricTable.h @@ -200,13 +200,13 @@ class DLL_EXPORT FabricInfo return CHIP_NO_ERROR; } - CHIP_ERROR GetICACert(ByteSpan & cert) + CHIP_ERROR GetICACert(ByteSpan & cert) const { cert = mICACert; return CHIP_NO_ERROR; } - CHIP_ERROR GetNOCCert(ByteSpan & cert) + CHIP_ERROR GetNOCCert(ByteSpan & cert) const { ReturnErrorCodeIf(mNOCCert.empty(), CHIP_ERROR_INCORRECT_STATE); cert = mNOCCert; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index de0f93cb807d52..6569d7296e278e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -4977,6 +4977,35 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader case Clusters::OperationalCredentials::Id: { using namespace Clusters::OperationalCredentials; switch (aPath.mAttributeId) { + case Attributes::NOCs::Id: { + using TypeInfo = Attributes::NOCs::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPOperationalCredentialsClusterNOCStruct * newElement_0; + newElement_0 = [CHIPOperationalCredentialsClusterNOCStruct new]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + newElement_0.noc = [NSData dataWithBytes:entry_0.noc.data() length:entry_0.noc.size()]; + newElement_0.icac = [NSData dataWithBytes:entry_0.icac.data() length:entry_0.icac.size()]; + [array_0 addObject:newElement_0]; + } + { // Scope for the error so we will know what it's named + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + } + value = array_0; + return value; + } case Attributes::FabricsList::Id: { using TypeInfo = Attributes::FabricsList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index a7ea7adbf96324..8532c3a5483e9d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -3480,6 +3480,49 @@ } } +void CHIPOperationalCredentialsNOCsListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & + value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPOperationalCredentialsClusterNOCStruct * newElement_0; + newElement_0 = [CHIPOperationalCredentialsClusterNOCStruct new]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + newElement_0.noc = [NSData dataWithBytes:entry_0.noc.data() length:entry_0.noc.size()]; + newElement_0.icac = [NSData dataWithBytes:entry_0.icac.data() length:entry_0.icac.size()]; + [array_0 addObject:newElement_0]; + } + { // Scope for the error so we will know what it's named + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPOperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + void CHIPOperationalCredentialsFabricsListListAttributeCallbackBridge::OnSuccessFn(void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & value) diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h index 620ea3a3457f9d..45d5978b975e86 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h @@ -3113,6 +3113,37 @@ class CHIPOnOffSwitchConfigurationAttributeListListAttributeCallbackSubscription SubscriptionEstablishedHandler mEstablishedHandler; }; +class CHIPOperationalCredentialsNOCsListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPOperationalCredentialsNOCsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn( + void * context, + const chip::app::DataModel::DecodableList & + value); +}; + +class CHIPOperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge + : public CHIPOperationalCredentialsNOCsListAttributeCallbackBridge +{ +public: + CHIPOperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPOperationalCredentialsNOCsListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + class CHIPOperationalCredentialsFabricsListListAttributeCallbackBridge : public CHIPCallbackBridge { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index 7b2994d30fbcb4..64cfc7056c090f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -3103,6 +3103,8 @@ NS_ASSUME_NONNULL_BEGIN completionHandler:(void (^)(CHIPOperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)readAttributeNOCsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeFabricsListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeFabricsListWithMinInterval:(uint16_t)minInterval diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index badc4ce2bd589c..9eaee739ff51d5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -12958,6 +12958,17 @@ new CHIPOperationalCredentialsClusterNOCResponseCallbackBridge( }); } +- (void)readAttributeNOCsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOperationalCredentialsNOCsListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeFabricsListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h index 77d89dd91468fd..fae3b526054ef3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h @@ -234,6 +234,7 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPOperationalCredentialsClusterNOCStruct : NSObject @property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; @property (strong, nonatomic) NSData * _Nonnull noc; +@property (strong, nonatomic) NSData * _Nonnull icac; - (instancetype)init; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm index de4f4843d9b2d4..5ce12df0edc4d6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm @@ -466,6 +466,8 @@ - (instancetype)init _fabricIndex = @(0); _noc = [NSData data]; + + _icac = [NSData data]; } return self; } diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h index 971945764cfe7b..245028aea67762 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -686,6 +686,7 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPTestOperationalCredentials : CHIPOperationalCredentials +- (void)writeAttributeNOCsWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeFabricsListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeSupportedFabricsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeCommissionedFabricsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index 228f1b8ecd1b12..b4d1325d837cec 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -6715,6 +6715,47 @@ @implementation CHIPTestOperationalCredentials return &_cppCluster; } +- (void)writeAttributeNOCsWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPOperationalCredentialsClusterNOCStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (CHIPOperationalCredentialsClusterNOCStruct *) value[i_0]; + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + listHolder_0->mList[i_0].noc = [self asByteSpan:element_0.noc]; + listHolder_0->mList[i_0].icac = [self asByteSpan:element_0.icac]; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeFabricsListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 3ff04e01a59ac0..0ac11afb64aa39 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -48937,6 +48937,31 @@ - (void)testSendClusterOnOffSwitchConfigurationReadAttributeClusterRevisionWithC [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterOperationalCredentialsReadAttributeNOCsWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPOperationalCredentials * cluster = [[CHIPOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"OperationalCredentialsReadAttributeNOCsWithCompletionHandler"]; + + [cluster readAttributeNOCsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"OperationalCredentials NOCs Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterOperationalCredentialsReadAttributeFabricsListWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 78d315b0e03d0b..570907f9c84f7b 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -1484,7 +1484,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 615 +#define GENERATED_ATTRIBUTE_COUNT 616 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1713,6 +1713,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -2508,220 +2509,220 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(166), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(170), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(170), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0000003F, ZAP_ATTRIBUTE_INDEX(176), 5, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003F, ZAP_ATTRIBUTE_INDEX(177), 5, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(181), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(182), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(183), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(184), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x00000405, ZAP_ATTRIBUTE_INDEX(185), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000405, ZAP_ATTRIBUTE_INDEX(186), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ { 0x00000003, \ - ZAP_ATTRIBUTE_INDEX(189), \ + ZAP_ATTRIBUTE_INDEX(190), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { 0x00000004, \ - ZAP_ATTRIBUTE_INDEX(192), \ + ZAP_ATTRIBUTE_INDEX(193), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x00000005, \ - ZAP_ATTRIBUTE_INDEX(194), \ + ZAP_ATTRIBUTE_INDEX(195), \ 6, \ 8, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayScenesServer }, /* Endpoint: 1, Cluster: Scenes (server) */ \ { 0x00000006, \ - ZAP_ATTRIBUTE_INDEX(200), \ + ZAP_ATTRIBUTE_INDEX(201), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { \ - 0x00000007, ZAP_ATTRIBUTE_INDEX(207), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000007, ZAP_ATTRIBUTE_INDEX(208), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ { 0x00000008, \ - ZAP_ATTRIBUTE_INDEX(210), \ + ZAP_ATTRIBUTE_INDEX(211), \ 16, \ 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x0000000F, ZAP_ATTRIBUTE_INDEX(226), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000000F, ZAP_ATTRIBUTE_INDEX(227), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(230), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(231), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0000001E, ZAP_ATTRIBUTE_INDEX(235), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001E, ZAP_ATTRIBUTE_INDEX(236), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { \ - 0x00000025, ZAP_ATTRIBUTE_INDEX(236), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000025, ZAP_ATTRIBUTE_INDEX(237), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ { \ - 0x0000002B, ZAP_ATTRIBUTE_INDEX(240), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002B, ZAP_ATTRIBUTE_INDEX(241), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Localization Configuration (server) */ \ { \ - 0x0000002F, ZAP_ATTRIBUTE_INDEX(242), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002F, ZAP_ATTRIBUTE_INDEX(243), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ { \ - 0x00000031, ZAP_ATTRIBUTE_INDEX(253), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(254), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { \ - 0x00000039, ZAP_ATTRIBUTE_INDEX(263), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000039, ZAP_ATTRIBUTE_INDEX(264), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ { \ - 0x0000003B, ZAP_ATTRIBUTE_INDEX(264), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003B, ZAP_ATTRIBUTE_INDEX(265), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(269), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(270), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(271), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(272), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: User Label (server) */ \ { \ - 0x00000045, ZAP_ATTRIBUTE_INDEX(273), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000045, ZAP_ATTRIBUTE_INDEX(274), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Boolean State (server) */ \ { \ - 0x00000050, ZAP_ATTRIBUTE_INDEX(275), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000050, ZAP_ATTRIBUTE_INDEX(276), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Mode Select (server) */ \ { 0x00000101, \ - ZAP_ATTRIBUTE_INDEX(281), \ + ZAP_ATTRIBUTE_INDEX(282), \ 28, \ 49, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x00000102, ZAP_ATTRIBUTE_INDEX(309), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000102, ZAP_ATTRIBUTE_INDEX(310), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x00000103, ZAP_ATTRIBUTE_INDEX(329), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000103, ZAP_ATTRIBUTE_INDEX(330), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { \ 0x00000200, \ - ZAP_ATTRIBUTE_INDEX(334), \ + ZAP_ATTRIBUTE_INDEX(335), \ 26, \ 54, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayPumpConfigurationAndControlServer \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ { 0x00000201, \ - ZAP_ATTRIBUTE_INDEX(360), \ + ZAP_ATTRIBUTE_INDEX(361), \ 19, \ 34, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayThermostatServer }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { \ 0x00000204, \ - ZAP_ATTRIBUTE_INDEX(379), \ + ZAP_ATTRIBUTE_INDEX(380), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayThermostatUserInterfaceConfigurationServer \ }, /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ { 0x00000300, \ - ZAP_ATTRIBUTE_INDEX(383), \ + ZAP_ATTRIBUTE_INDEX(384), \ 53, \ 341, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x00000400, ZAP_ATTRIBUTE_INDEX(436), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000400, ZAP_ATTRIBUTE_INDEX(437), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ { \ - 0x00000402, ZAP_ATTRIBUTE_INDEX(442), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(443), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x00000403, ZAP_ATTRIBUTE_INDEX(447), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000403, ZAP_ATTRIBUTE_INDEX(448), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x00000404, ZAP_ATTRIBUTE_INDEX(451), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000404, ZAP_ATTRIBUTE_INDEX(452), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ { \ - 0x00000405, ZAP_ATTRIBUTE_INDEX(456), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000405, ZAP_ATTRIBUTE_INDEX(457), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ { 0x00000406, \ - ZAP_ATTRIBUTE_INDEX(461), \ + ZAP_ATTRIBUTE_INDEX(462), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { 0x00000500, \ - ZAP_ATTRIBUTE_INDEX(465), \ + ZAP_ATTRIBUTE_INDEX(466), \ 6, \ 16, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ chipFuncArrayIasZoneServer }, /* Endpoint: 1, Cluster: IAS Zone (server) */ \ { \ - 0x00000503, ZAP_ATTRIBUTE_INDEX(471), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000503, ZAP_ATTRIBUTE_INDEX(472), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x00000504, ZAP_ATTRIBUTE_INDEX(473), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000504, ZAP_ATTRIBUTE_INDEX(474), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Channel (server) */ \ { \ - 0x00000505, ZAP_ATTRIBUTE_INDEX(475), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000505, ZAP_ATTRIBUTE_INDEX(476), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x00000506, ZAP_ATTRIBUTE_INDEX(478), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000506, ZAP_ATTRIBUTE_INDEX(479), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (server) */ \ { \ - 0x00000507, ZAP_ATTRIBUTE_INDEX(485), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000507, ZAP_ATTRIBUTE_INDEX(486), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x00000508, ZAP_ATTRIBUTE_INDEX(488), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000508, ZAP_ATTRIBUTE_INDEX(489), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x00000509, ZAP_ATTRIBUTE_INDEX(489), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000509, ZAP_ATTRIBUTE_INDEX(490), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x0000050A, ZAP_ATTRIBUTE_INDEX(490), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050A, ZAP_ATTRIBUTE_INDEX(491), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x0000050B, ZAP_ATTRIBUTE_INDEX(493), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050B, ZAP_ATTRIBUTE_INDEX(494), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x0000050C, ZAP_ATTRIBUTE_INDEX(496), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050C, ZAP_ATTRIBUTE_INDEX(497), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x0000050D, ZAP_ATTRIBUTE_INDEX(498), 8, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050D, ZAP_ATTRIBUTE_INDEX(499), 8, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x0000050E, ZAP_ATTRIBUTE_INDEX(506), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050E, ZAP_ATTRIBUTE_INDEX(507), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x0000050F, ZAP_ATTRIBUTE_INDEX(507), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050F, ZAP_ATTRIBUTE_INDEX(508), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ - 0x00000B04, ZAP_ATTRIBUTE_INDEX(585), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000B04, ZAP_ATTRIBUTE_INDEX(586), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ { 0x00000004, \ - ZAP_ATTRIBUTE_INDEX(597), \ + ZAP_ATTRIBUTE_INDEX(598), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 2, Cluster: Groups (server) */ \ { 0x00000006, \ - ZAP_ATTRIBUTE_INDEX(599), \ + ZAP_ATTRIBUTE_INDEX(600), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(606), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(607), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x00000406, \ - ZAP_ATTRIBUTE_INDEX(611), \ + ZAP_ATTRIBUTE_INDEX(612), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ diff --git a/zzz_generated/app-common/app-common/zap-generated/af-structs.h b/zzz_generated/app-common/app-common/zap-generated/af-structs.h index 0631b180ff8857..171a2b2391d09b 100644 --- a/zzz_generated/app-common/app-common/zap-generated/af-structs.h +++ b/zzz_generated/app-common/app-common/zap-generated/af-structs.h @@ -245,7 +245,7 @@ typedef struct _ExtensionEntry // Struct for FabricDescriptor typedef struct _FabricDescriptor { - uint8_t FabricIndex; + chip::FabricIndex FabricIndex; chip::ByteSpan RootPublicKey; uint16_t VendorId; chip::FabricId FabricId; @@ -326,8 +326,9 @@ typedef struct _ModeOptionStruct // Struct for NOCStruct typedef struct _NOCStruct { - uint8_t FabricIndex; + chip::FabricIndex FabricIndex; chip::ByteSpan NOC; + chip::ByteSpan ICAC; } NOCStruct; // Struct for NeighborTable diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h index aea2d23d566967..905dc465a1e454 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h @@ -590,6 +590,7 @@ // Client attributes // Server attributes +#define ZCL_NOCS_ATTRIBUTE_ID (0x0000) #define ZCL_FABRICS_ATTRIBUTE_ID (0x0001) #define ZCL_SUPPORTED_FABRICS_ATTRIBUTE_ID (0x0002) #define ZCL_COMMISSIONED_FABRICS_ATTRIBUTE_ID (0x0003) 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 4afd56afd3ff67..67403a7b9719f1 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 @@ -9785,6 +9785,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricIndex)), fabricIndex)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNoc)), noc)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kIcac)), icac)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9807,6 +9808,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kNoc): ReturnErrorOnFailure(DataModel::Decode(reader, noc)); break; + case to_underlying(Fields::kIcac): + ReturnErrorOnFailure(DataModel::Decode(reader, icac)); + break; default: break; } @@ -10309,6 +10313,9 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { + case Attributes::NOCs::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, NOCs)); + break; case Attributes::FabricsList::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, fabricsList)); break; 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 6228724c9a6232..e1c1702ff69d82 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 @@ -14410,7 +14410,7 @@ enum class Fields struct Type { public: - uint8_t fabricIndex = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); chip::ByteSpan rootPublicKey; uint16_t vendorId = static_cast(0); chip::FabricId fabricId = static_cast(0); @@ -14419,6 +14419,7 @@ struct Type CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); + bool MatchesFabricIndex(FabricIndex fabricIndex_) const { return fabricIndex == fabricIndex_; } }; using DecodableType = Type; @@ -14429,16 +14430,19 @@ enum class Fields { kFabricIndex = 0, kNoc = 1, + kIcac = 2, }; struct Type { public: - uint8_t fabricIndex = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); chip::ByteSpan noc; + chip::ByteSpan icac; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); + bool MatchesFabricIndex(FabricIndex fabricIndex_) const { return fabricIndex == fabricIndex_; } }; using DecodableType = Type; @@ -14964,6 +14968,20 @@ struct DecodableType namespace Attributes { +namespace NOCs { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NOCs::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace NOCs namespace FabricsList { struct TypeInfo { @@ -15071,6 +15089,7 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + Attributes::NOCs::TypeInfo::DecodableType NOCs; Attributes::FabricsList::TypeInfo::DecodableType fabricsList; Attributes::SupportedFabrics::TypeInfo::DecodableType supportedFabrics = static_cast(0); Attributes::CommissionedFabrics::TypeInfo::DecodableType commissionedFabrics = static_cast(0); 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 b852d6334c9776..863167478b4ac1 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 @@ -2050,6 +2050,10 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace OperationalCredentials { namespace Attributes { +namespace NOCs { +static constexpr AttributeId Id = 0x00000000; +} // namespace NOCs + namespace FabricsList { static constexpr AttributeId Id = 0x00000001; } // namespace FabricsList diff --git a/zzz_generated/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index eb70159b55a413..cd1593d2b6d88a 100644 --- a/zzz_generated/bridge-app/zap-generated/endpoint_config.h +++ b/zzz_generated/bridge-app/zap-generated/endpoint_config.h @@ -614,7 +614,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 185 +#define GENERATED_ATTRIBUTE_COUNT 186 #define GENERATED_ATTRIBUTES \ { \ \ @@ -796,6 +796,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -923,34 +924,34 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(141), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(145), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(145), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(151), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(152), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(153), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(154), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { 0x00000006, \ - ZAP_ATTRIBUTE_INDEX(155), \ + ZAP_ATTRIBUTE_INDEX(156), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x00000008, \ - ZAP_ATTRIBUTE_INDEX(157), \ + ZAP_ATTRIBUTE_INDEX(158), \ 16, \ 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(173), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(174), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0000003B, ZAP_ATTRIBUTE_INDEX(178), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003B, ZAP_ATTRIBUTE_INDEX(179), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(183), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(184), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index ae37228af5445b..7cf3c6f4105a1e 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -1514,6 +1514,14 @@ CHIP_ERROR LogValue(const char * label, size_t indent, return err; } } + { + CHIP_ERROR err = LogValue("Icac", indent + 1, value.icac); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Icac'", IndentStr(indent + 1).c_str()); + return err; + } + } ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); return CHIP_NO_ERROR; } @@ -32513,6 +32521,7 @@ class ReportOnOffSwitchConfigurationClusterRevision : public ModelCommand | * UpdateNOC | 0x07 | |------------------------------------------------------------------------------| | Attributes: | | +| * NOCs | 0x0000 | | * FabricsList | 0x0001 | | * SupportedFabrics | 0x0002 | | * CommissionedFabrics | 0x0003 | @@ -32745,6 +32754,39 @@ class OperationalCredentialsUpdateNOC : public ModelCommand chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type mRequest; }; +/* + * Attribute NOCs + */ +class ReadOperationalCredentialsNOCs : public ModelCommand +{ +public: + ReadOperationalCredentialsNOCs() : ModelCommand("read") + { + AddArgument("attr-name", "nocs"); + ModelCommand::AddArguments(); + } + + ~ReadOperationalCredentialsNOCs() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x003E) ReadAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::OperationalCredentialsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList & + value) + { + OnGeneralAttributeEventResponse(context, "OperationalCredentials.NOCs response", value); + } +}; + /* * Attribute FabricsList */ @@ -61342,6 +61384,7 @@ void registerClusterOperationalCredentials(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp index fecc36d4c81cda..170715059f035b 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp @@ -1535,6 +1535,27 @@ void OnOffSwitchConfigurationClusterAttributeListListAttributeFilter(TLV::TLVRea cb->mCall(cb->mContext, list); } +void OperationalCredentialsClusterNOCsListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + void OperationalCredentialsClusterFabricsListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h index ec54dfcb20c4bd..5d65cea0bd2746 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h @@ -443,6 +443,13 @@ void OnOffSwitchConfigurationClusterAttributeListListAttributeFilter(chip::TLV:: chip::Callback::Cancelable * onFailureCallback); typedef void (*OnOffSwitchConfigurationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void OperationalCredentialsClusterNOCsListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*OperationalCredentialsNOCsListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); void OperationalCredentialsClusterFabricsListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); diff --git a/zzz_generated/door-lock-app/zap-generated/endpoint_config.h b/zzz_generated/door-lock-app/zap-generated/endpoint_config.h index b2ed6f1aae5f7d..7a0994d8865813 100644 --- a/zzz_generated/door-lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/door-lock-app/zap-generated/endpoint_config.h @@ -615,7 +615,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 196 +#define GENERATED_ATTRIBUTE_COUNT 197 #define GENERATED_ATTRIBUTES \ { \ \ @@ -809,6 +809,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -937,22 +938,22 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(149), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(153), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(153), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(159), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(160), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(161), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(162), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(163), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(164), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0000002F, ZAP_ATTRIBUTE_INDEX(168), 9, 133, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002F, ZAP_ATTRIBUTE_INDEX(169), 9, 133, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ { 0x00000101, \ - ZAP_ATTRIBUTE_INDEX(177), \ + ZAP_ATTRIBUTE_INDEX(178), \ 19, \ 29, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | \ diff --git a/zzz_generated/lighting-app/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/zap-generated/endpoint_config.h index e4d89535e5a70c..5e86e95c68f629 100644 --- a/zzz_generated/lighting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lighting-app/zap-generated/endpoint_config.h @@ -587,7 +587,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 230 +#define GENERATED_ATTRIBUTE_COUNT 231 #define GENERATED_ATTRIBUTES \ { \ \ @@ -789,6 +789,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -977,52 +978,52 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(155), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(159), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(159), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(165), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(166), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(167), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(168), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { 0x00000003, \ - ZAP_ATTRIBUTE_INDEX(169), \ + ZAP_ATTRIBUTE_INDEX(170), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { 0x00000006, \ - ZAP_ATTRIBUTE_INDEX(172), \ + ZAP_ATTRIBUTE_INDEX(173), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x00000008, \ - ZAP_ATTRIBUTE_INDEX(179), \ + ZAP_ATTRIBUTE_INDEX(180), \ 16, \ 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(195), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(196), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x00000300, \ - ZAP_ATTRIBUTE_INDEX(200), \ + ZAP_ATTRIBUTE_INDEX(201), \ 22, \ 36, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { 0x00000406, \ - ZAP_ATTRIBUTE_INDEX(222), \ + ZAP_ATTRIBUTE_INDEX(223), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { \ - 0x00000006, ZAP_ATTRIBUTE_INDEX(226), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000006, ZAP_ATTRIBUTE_INDEX(227), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 2, Cluster: On/Off (client) */ \ { \ - 0x00000007, ZAP_ATTRIBUTE_INDEX(227), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000007, ZAP_ATTRIBUTE_INDEX(228), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: On/off Switch Configuration (server) */ \ } diff --git a/zzz_generated/lock-app/zap-generated/endpoint_config.h b/zzz_generated/lock-app/zap-generated/endpoint_config.h index 940cd4d5f04bc2..cff3acdf5af1ee 100644 --- a/zzz_generated/lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lock-app/zap-generated/endpoint_config.h @@ -601,7 +601,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 184 +#define GENERATED_ATTRIBUTE_COUNT 185 #define GENERATED_ATTRIBUTES \ { \ \ @@ -795,6 +795,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -904,25 +905,25 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(149), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(153), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(153), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(159), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(160), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(161), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(162), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { 0x00000006, \ - ZAP_ATTRIBUTE_INDEX(163), \ + ZAP_ATTRIBUTE_INDEX(164), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(170), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(171), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0000002F, ZAP_ATTRIBUTE_INDEX(175), 9, 133, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002F, ZAP_ATTRIBUTE_INDEX(176), 9, 133, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ } diff --git a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h index 0f0dec8d2fdaed..54f0aa2703303d 100644 --- a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h @@ -133,7 +133,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 29 +#define GENERATED_ATTRIBUTE_COUNT 30 #define GENERATED_ATTRIBUTES \ { \ \ @@ -166,6 +166,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -208,13 +209,13 @@ 0x00000031, ZAP_ATTRIBUTE_INDEX(9), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(19), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(19), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(25), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(26), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(27), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(28), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ } diff --git a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h index b6ff7cb435d086..beb34abee0e70f 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h @@ -143,7 +143,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 46 +#define GENERATED_ATTRIBUTE_COUNT 47 #define GENERATED_ATTRIBUTES \ { \ \ @@ -202,6 +202,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -256,13 +257,13 @@ 0x00000031, ZAP_ATTRIBUTE_INDEX(26), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(36), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(36), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(42), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(43), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(44), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(45), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ } diff --git a/zzz_generated/pump-app/zap-generated/endpoint_config.h b/zzz_generated/pump-app/zap-generated/endpoint_config.h index 104762c2e4798d..26c3e57ce4d65c 100644 --- a/zzz_generated/pump-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-app/zap-generated/endpoint_config.h @@ -483,7 +483,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 179 +#define GENERATED_ATTRIBUTE_COUNT 180 #define GENERATED_ATTRIBUTES \ { \ \ @@ -635,6 +635,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -786,54 +787,54 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(115), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(119), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(119), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(125), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(126), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(127), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(128), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { 0x00000006, \ - ZAP_ATTRIBUTE_INDEX(129), \ + ZAP_ATTRIBUTE_INDEX(130), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x00000008, \ - ZAP_ATTRIBUTE_INDEX(131), \ + ZAP_ATTRIBUTE_INDEX(132), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(133), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(134), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ 0x00000200, \ - ZAP_ATTRIBUTE_INDEX(138), \ + ZAP_ATTRIBUTE_INDEX(139), \ 26, \ 54, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayPumpConfigurationAndControlServer \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ { \ - 0x00000402, ZAP_ATTRIBUTE_INDEX(164), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(165), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ { \ - 0x00000402, ZAP_ATTRIBUTE_INDEX(165), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(166), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x00000403, ZAP_ATTRIBUTE_INDEX(169), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000403, ZAP_ATTRIBUTE_INDEX(170), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (client) */ \ { \ - 0x00000403, ZAP_ATTRIBUTE_INDEX(170), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000403, ZAP_ATTRIBUTE_INDEX(171), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x00000404, ZAP_ATTRIBUTE_INDEX(174), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000404, ZAP_ATTRIBUTE_INDEX(175), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (client) */ \ { \ - 0x00000404, ZAP_ATTRIBUTE_INDEX(175), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000404, ZAP_ATTRIBUTE_INDEX(176), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ } diff --git a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h index afa75ebd00f201..ca3bd1b79a8d1f 100644 --- a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h @@ -553,7 +553,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 166 +#define GENERATED_ATTRIBUTE_COUNT 167 #define GENERATED_ATTRIBUTES \ { \ \ @@ -738,6 +738,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -836,31 +837,31 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(142), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(146), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(146), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(152), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(153), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(154), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(155), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x00000006, ZAP_ATTRIBUTE_INDEX(156), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000006, ZAP_ATTRIBUTE_INDEX(157), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: On/Off (client) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(157), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(158), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x00000200, ZAP_ATTRIBUTE_INDEX(162), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000200, ZAP_ATTRIBUTE_INDEX(163), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (client) */ \ { \ - 0x00000402, ZAP_ATTRIBUTE_INDEX(163), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(164), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ { \ - 0x00000403, ZAP_ATTRIBUTE_INDEX(164), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000403, ZAP_ATTRIBUTE_INDEX(165), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (client) */ \ { \ - 0x00000404, ZAP_ATTRIBUTE_INDEX(165), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000404, ZAP_ATTRIBUTE_INDEX(166), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (client) */ \ } diff --git a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h index 066d3a52866df9..a7f70cecbdeab3 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h @@ -279,7 +279,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 96 +#define GENERATED_ATTRIBUTE_COUNT 97 #define GENERATED_ATTRIBUTES \ { \ \ @@ -389,6 +389,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -472,19 +473,19 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(73), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(77), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(77), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(83), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(84), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(85), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(86), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(87), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(88), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x00000402, ZAP_ATTRIBUTE_INDEX(92), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(93), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ } diff --git a/zzz_generated/thermostat/zap-generated/endpoint_config.h b/zzz_generated/thermostat/zap-generated/endpoint_config.h index e2cb98a185e315..a8389277489a12 100644 --- a/zzz_generated/thermostat/zap-generated/endpoint_config.h +++ b/zzz_generated/thermostat/zap-generated/endpoint_config.h @@ -664,7 +664,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 213 +#define GENERATED_ATTRIBUTE_COUNT 214 #define GENERATED_ATTRIBUTES \ { \ \ @@ -868,6 +868,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -1040,46 +1041,46 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(153), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(157), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(157), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0000003F, ZAP_ATTRIBUTE_INDEX(163), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003F, ZAP_ATTRIBUTE_INDEX(164), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(166), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(167), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(168), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(169), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x00000003, ZAP_ATTRIBUTE_INDEX(170), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000003, ZAP_ATTRIBUTE_INDEX(171), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Identify (client) */ \ { 0x00000003, \ - ZAP_ATTRIBUTE_INDEX(171), \ + ZAP_ATTRIBUTE_INDEX(172), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { 0x00000004, \ - ZAP_ATTRIBUTE_INDEX(174), \ + ZAP_ATTRIBUTE_INDEX(175), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x00000005, \ - ZAP_ATTRIBUTE_INDEX(176), \ + ZAP_ATTRIBUTE_INDEX(177), \ 6, \ 8, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayScenesServer }, /* Endpoint: 1, Cluster: Scenes (server) */ \ { 0x00000028, \ - ZAP_ATTRIBUTE_INDEX(182), \ + ZAP_ATTRIBUTE_INDEX(183), \ 12, \ 246, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 1, Cluster: Basic (server) */ \ { 0x00000201, \ - ZAP_ATTRIBUTE_INDEX(194), \ + ZAP_ATTRIBUTE_INDEX(195), \ 19, \ 34, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ diff --git a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp index 364d524c96cbaf..72365cba8d105e 100644 --- a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp @@ -176,6 +176,27 @@ void NetworkCommissioningClusterNetworksListAttributeFilter(TLV::TLVReader * tlv cb->mCall(cb->mContext, list); } +void OperationalCredentialsClusterNOCsListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + void OperationalCredentialsClusterFabricsListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { diff --git a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.h index 56c4b1679dbc74..2506041e81c1fc 100644 --- a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.h @@ -71,6 +71,13 @@ typedef void (*NetworkCommissioningNetworksListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void OperationalCredentialsClusterNOCsListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*OperationalCredentialsNOCsListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); void OperationalCredentialsClusterFabricsListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index 0cdf900844b192..c89f89f8827223 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -1010,7 +1010,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 285 +#define GENERATED_ATTRIBUTE_COUNT 286 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1219,6 +1219,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -1506,100 +1507,100 @@ 0x0000003E, ZAP_ATTRIBUTE_INDEX(158), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (client) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(159), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(159), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0000003F, ZAP_ATTRIBUTE_INDEX(165), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003F, ZAP_ATTRIBUTE_INDEX(166), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(168), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(169), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(170), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(171), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x00000405, ZAP_ATTRIBUTE_INDEX(172), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000405, ZAP_ATTRIBUTE_INDEX(173), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ { 0x00000006, \ - ZAP_ATTRIBUTE_INDEX(176), \ + ZAP_ATTRIBUTE_INDEX(177), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(178), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(179), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x00000503, ZAP_ATTRIBUTE_INDEX(183), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000503, ZAP_ATTRIBUTE_INDEX(184), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x00000504, ZAP_ATTRIBUTE_INDEX(185), 4, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000504, ZAP_ATTRIBUTE_INDEX(186), 4, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Channel (server) */ \ { \ - 0x00000505, ZAP_ATTRIBUTE_INDEX(189), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000505, ZAP_ATTRIBUTE_INDEX(190), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x00000507, ZAP_ATTRIBUTE_INDEX(192), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000507, ZAP_ATTRIBUTE_INDEX(193), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x00000508, ZAP_ATTRIBUTE_INDEX(195), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000508, ZAP_ATTRIBUTE_INDEX(196), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x00000509, ZAP_ATTRIBUTE_INDEX(196), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000509, ZAP_ATTRIBUTE_INDEX(197), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x0000050A, ZAP_ATTRIBUTE_INDEX(197), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050A, ZAP_ATTRIBUTE_INDEX(198), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x0000050C, ZAP_ATTRIBUTE_INDEX(200), 3, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050C, ZAP_ATTRIBUTE_INDEX(201), 3, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { 0x00000006, \ - ZAP_ATTRIBUTE_INDEX(203), \ + ZAP_ATTRIBUTE_INDEX(204), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { 0x00000008, \ - ZAP_ATTRIBUTE_INDEX(205), \ + ZAP_ATTRIBUTE_INDEX(206), \ 16, \ 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 2, Cluster: Level Control (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(221), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(222), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { \ - 0x0000050B, ZAP_ATTRIBUTE_INDEX(226), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050B, ZAP_ATTRIBUTE_INDEX(227), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Audio Output (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(229), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(230), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Descriptor (server) */ \ { \ - 0x00000506, ZAP_ATTRIBUTE_INDEX(234), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000506, ZAP_ATTRIBUTE_INDEX(235), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Media Playback (server) */ \ { \ - 0x0000050A, ZAP_ATTRIBUTE_INDEX(242), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050A, ZAP_ATTRIBUTE_INDEX(243), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Content Launcher (server) */ \ { \ - 0x0000050D, ZAP_ATTRIBUTE_INDEX(245), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050D, ZAP_ATTRIBUTE_INDEX(246), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Application Basic (server) */ \ { \ - 0x0000050E, ZAP_ATTRIBUTE_INDEX(254), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050E, ZAP_ATTRIBUTE_INDEX(255), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Account Login (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(255), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(256), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Descriptor (server) */ \ { \ - 0x0000050A, ZAP_ATTRIBUTE_INDEX(260), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050A, ZAP_ATTRIBUTE_INDEX(261), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Content Launcher (server) */ \ { \ - 0x0000050D, ZAP_ATTRIBUTE_INDEX(263), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050D, ZAP_ATTRIBUTE_INDEX(264), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Application Basic (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(272), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(273), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Descriptor (server) */ \ { \ - 0x0000050D, ZAP_ATTRIBUTE_INDEX(277), 8, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050D, ZAP_ATTRIBUTE_INDEX(278), 8, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Application Basic (server) */ \ } diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index d70ab91f201378..d3430300c1c3dd 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -876,7 +876,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 413 +#define GENERATED_ATTRIBUTE_COUNT 414 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1075,6 +1075,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -1562,159 +1563,159 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(151), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(155), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(155), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0000003F, ZAP_ATTRIBUTE_INDEX(161), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003F, ZAP_ATTRIBUTE_INDEX(162), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(164), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(165), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(166), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(167), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x00000405, ZAP_ATTRIBUTE_INDEX(168), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000405, ZAP_ATTRIBUTE_INDEX(169), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ { 0x00000003, \ - ZAP_ATTRIBUTE_INDEX(172), \ + ZAP_ATTRIBUTE_INDEX(173), \ 2, \ 4, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { 0x00000004, \ - ZAP_ATTRIBUTE_INDEX(174), \ + ZAP_ATTRIBUTE_INDEX(175), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x00000005, \ - ZAP_ATTRIBUTE_INDEX(176), \ + ZAP_ATTRIBUTE_INDEX(177), \ 6, \ 8, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayScenesServer }, /* Endpoint: 1, Cluster: Scenes (server) */ \ { 0x00000006, \ - ZAP_ATTRIBUTE_INDEX(182), \ + ZAP_ATTRIBUTE_INDEX(183), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x00000008, \ - ZAP_ATTRIBUTE_INDEX(189), \ + ZAP_ATTRIBUTE_INDEX(190), \ 15, \ 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x0000000F, ZAP_ATTRIBUTE_INDEX(204), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000000F, ZAP_ATTRIBUTE_INDEX(205), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(208), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(209), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0000001E, ZAP_ATTRIBUTE_INDEX(213), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001E, ZAP_ATTRIBUTE_INDEX(214), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { \ - 0x00000039, ZAP_ATTRIBUTE_INDEX(214), 15, 646, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000039, ZAP_ATTRIBUTE_INDEX(215), 15, 646, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ { \ - 0x0000003B, ZAP_ATTRIBUTE_INDEX(229), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003B, ZAP_ATTRIBUTE_INDEX(230), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(232), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(233), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { 0x00000101, \ - ZAP_ATTRIBUTE_INDEX(234), \ + ZAP_ATTRIBUTE_INDEX(235), \ 28, \ 49, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x00000102, ZAP_ATTRIBUTE_INDEX(262), 19, 31, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000102, ZAP_ATTRIBUTE_INDEX(263), 19, 31, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x00000103, ZAP_ATTRIBUTE_INDEX(281), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000103, ZAP_ATTRIBUTE_INDEX(282), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { 0x00000201, \ - ZAP_ATTRIBUTE_INDEX(286), \ + ZAP_ATTRIBUTE_INDEX(287), \ 10, \ 17, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayThermostatServer }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { 0x00000300, \ - ZAP_ATTRIBUTE_INDEX(296), \ + ZAP_ATTRIBUTE_INDEX(297), \ 51, \ 337, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x00000402, ZAP_ATTRIBUTE_INDEX(347), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(348), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x00000403, ZAP_ATTRIBUTE_INDEX(351), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000403, ZAP_ATTRIBUTE_INDEX(352), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x00000404, ZAP_ATTRIBUTE_INDEX(355), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000404, ZAP_ATTRIBUTE_INDEX(356), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ { \ - 0x00000405, ZAP_ATTRIBUTE_INDEX(359), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000405, ZAP_ATTRIBUTE_INDEX(360), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ { 0x00000500, \ - ZAP_ATTRIBUTE_INDEX(363), \ + ZAP_ATTRIBUTE_INDEX(364), \ 6, \ 16, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ chipFuncArrayIasZoneServer }, /* Endpoint: 1, Cluster: IAS Zone (server) */ \ { \ - 0x00000503, ZAP_ATTRIBUTE_INDEX(369), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000503, ZAP_ATTRIBUTE_INDEX(370), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x00000504, ZAP_ATTRIBUTE_INDEX(371), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000504, ZAP_ATTRIBUTE_INDEX(372), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Channel (client) */ \ { \ - 0x00000505, ZAP_ATTRIBUTE_INDEX(372), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000505, ZAP_ATTRIBUTE_INDEX(373), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (client) */ \ { \ - 0x00000506, ZAP_ATTRIBUTE_INDEX(373), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000506, ZAP_ATTRIBUTE_INDEX(374), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (client) */ \ { \ - 0x00000507, ZAP_ATTRIBUTE_INDEX(374), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000507, ZAP_ATTRIBUTE_INDEX(375), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Input (client) */ \ { \ - 0x00000509, ZAP_ATTRIBUTE_INDEX(375), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000509, ZAP_ATTRIBUTE_INDEX(376), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (client) */ \ { \ - 0x0000050A, ZAP_ATTRIBUTE_INDEX(376), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000050A, ZAP_ATTRIBUTE_INDEX(377), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (client) */ \ { \ - 0x0000050B, ZAP_ATTRIBUTE_INDEX(377), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000050B, ZAP_ATTRIBUTE_INDEX(378), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (client) */ \ { \ - 0x0000050C, ZAP_ATTRIBUTE_INDEX(378), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000050C, ZAP_ATTRIBUTE_INDEX(379), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (client) */ \ { \ - 0x0000050D, ZAP_ATTRIBUTE_INDEX(379), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000050D, ZAP_ATTRIBUTE_INDEX(380), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (client) */ \ { \ - 0x0000050E, ZAP_ATTRIBUTE_INDEX(380), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000050E, ZAP_ATTRIBUTE_INDEX(381), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Account Login (client) */ \ { \ - 0x0000050F, ZAP_ATTRIBUTE_INDEX(381), 21, 1582, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050F, ZAP_ATTRIBUTE_INDEX(382), 21, 1582, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { 0x00000006, \ - ZAP_ATTRIBUTE_INDEX(402), \ + ZAP_ATTRIBUTE_INDEX(403), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(404), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(405), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x00000406, \ - ZAP_ATTRIBUTE_INDEX(409), \ + ZAP_ATTRIBUTE_INDEX(410), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ diff --git a/zzz_generated/window-app/zap-generated/endpoint_config.h b/zzz_generated/window-app/zap-generated/endpoint_config.h index 02a0ad09110f03..516a745035ddbb 100644 --- a/zzz_generated/window-app/zap-generated/endpoint_config.h +++ b/zzz_generated/window-app/zap-generated/endpoint_config.h @@ -609,7 +609,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 226 +#define GENERATED_ATTRIBUTE_COUNT 227 #define GENERATED_ATTRIBUTES \ { \ \ @@ -812,6 +812,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -972,31 +973,31 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(159), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(163), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(163), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(169), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(170), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(171), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(172), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { 0x00000003, \ - ZAP_ATTRIBUTE_INDEX(173), \ + ZAP_ATTRIBUTE_INDEX(174), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(176), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(177), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x00000102, ZAP_ATTRIBUTE_INDEX(181), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000102, ZAP_ATTRIBUTE_INDEX(182), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(201), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(202), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { \ - 0x00000102, ZAP_ATTRIBUTE_INDEX(206), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000102, ZAP_ATTRIBUTE_INDEX(207), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Window Covering (server) */ \ } From c750f4b20e9dff0b564da5e8eb2347206e9c1010 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 20 Jan 2022 14:45:22 -0500 Subject: [PATCH 091/124] Disambiguate type names in cluster-objects initializers. (#13744) In most places, where we are assigning to something of type {{zapTypeToDecodableClusterObjectType type}} to start with, what we had was not a problem. But in the DecodableType for the cluster-wide struct, which is inside namespace chip::app::Clusters::ClusterName::Attributes, we could get an ambiguity when an attribute and an enum had the same name (e.g. HourFormat). Then the bareword HourFormat instead of being treated as ClusterName::HourFormat would get treated as ClusterName::Attributes::HourFormat, which is a namespace, not a type name, and after that things would fail to compile. The fix is to, at this one callsite, pass in the cluster name as the namespace, so we generate fully qualified names for enums. --- .../partials/cluster-objects-field-init.zapt | 2 +- .../templates/app/cluster-objects.zapt | 2 +- .../zap-generated/cluster-objects.h | 31 +++++++++++-------- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/app/zap-templates/partials/cluster-objects-field-init.zapt b/src/app/zap-templates/partials/cluster-objects-field-init.zapt index b6729e7eac3d7e..70d55789aabd44 100644 --- a/src/app/zap-templates/partials/cluster-objects-field-init.zapt +++ b/src/app/zap-templates/partials/cluster-objects-field-init.zapt @@ -8,7 +8,7 @@ {{~#if_is_struct type}} {{! Structs have their own initializers }} {{~else~}} - = static_cast<{{zapTypeToEncodableClusterObjectType type}}>(0) + = static_cast<{{zapTypeToEncodableClusterObjectType type ns=ns}}>(0) {{~/if_is_struct}} {{~/unless}} {{~/unless}} diff --git a/src/app/zap-templates/templates/app/cluster-objects.zapt b/src/app/zap-templates/templates/app/cluster-objects.zapt index b2b4bed4051e3e..79090e851e4ed3 100644 --- a/src/app/zap-templates/templates/app/cluster-objects.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects.zapt @@ -176,7 +176,7 @@ struct TypeInfo {{#zcl_attributes_server}} {{! isOptional=false because optional attributes don't get represented as Optional types here. }} - Attributes::{{asUpperCamelCase label}}::TypeInfo::DecodableType {{asLowerCamelCase label}}{{> cluster_objects_field_init isOptional=false}}; + Attributes::{{asUpperCamelCase label}}::TypeInfo::DecodableType {{asLowerCamelCase label}}{{> cluster_objects_field_init ns=parent.name isOptional=false}}; {{/zcl_attributes_server}} }; }; 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 e1c1702ff69d82..73b7ac9929b77d 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 @@ -8811,7 +8811,8 @@ struct TypeInfo Attributes::DefaultOtaProviders::TypeInfo::DecodableType defaultOtaProviders; Attributes::UpdatePossible::TypeInfo::DecodableType updatePossible = static_cast(0); - Attributes::UpdateState::TypeInfo::DecodableType updateState = static_cast(0); + Attributes::UpdateState::TypeInfo::DecodableType updateState = + static_cast(0); Attributes::UpdateStateProgress::TypeInfo::DecodableType updateStateProgress; Attributes::AttributeList::TypeInfo::DecodableType attributeList; Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); @@ -10719,7 +10720,8 @@ struct TypeInfo Attributes::ScanMaxTimeSeconds::TypeInfo::DecodableType scanMaxTimeSeconds = static_cast(0); Attributes::ConnectMaxTimeSeconds::TypeInfo::DecodableType connectMaxTimeSeconds = static_cast(0); Attributes::InterfaceEnabled::TypeInfo::DecodableType interfaceEnabled = static_cast(0); - Attributes::LastNetworkingStatus::TypeInfo::DecodableType lastNetworkingStatus = static_cast(0); + Attributes::LastNetworkingStatus::TypeInfo::DecodableType lastNetworkingStatus = + static_cast(0); Attributes::LastNetworkID::TypeInfo::DecodableType lastNetworkID; Attributes::LastConnectErrorValue::TypeInfo::DecodableType lastConnectErrorValue = static_cast(0); Attributes::AttributeList::TypeInfo::DecodableType attributeList; @@ -19196,7 +19198,7 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::LockState::TypeInfo::DecodableType lockState; - Attributes::LockType::TypeInfo::DecodableType lockType = static_cast(0); + Attributes::LockType::TypeInfo::DecodableType lockType = static_cast(0); Attributes::ActuatorEnabled::TypeInfo::DecodableType actuatorEnabled = static_cast(0); Attributes::DoorState::TypeInfo::DecodableType doorState; Attributes::DoorOpenEvents::TypeInfo::DecodableType doorOpenEvents = static_cast(0); @@ -19219,11 +19221,12 @@ struct TypeInfo Attributes::CredentialRulesSupport::TypeInfo::DecodableType credentialRulesSupport = static_cast(0); Attributes::EnableLogging::TypeInfo::DecodableType enableLogging = static_cast(0); Attributes::Language::TypeInfo::DecodableType language; - Attributes::LEDSettings::TypeInfo::DecodableType LEDSettings = static_cast(0); - Attributes::AutoRelockTime::TypeInfo::DecodableType autoRelockTime = static_cast(0); - Attributes::SoundVolume::TypeInfo::DecodableType soundVolume = static_cast(0); - Attributes::OperatingMode::TypeInfo::DecodableType operatingMode = static_cast(0); - Attributes::SupportedOperatingModes::TypeInfo::DecodableType supportedOperatingModes = static_cast(0); + Attributes::LEDSettings::TypeInfo::DecodableType LEDSettings = static_cast(0); + Attributes::AutoRelockTime::TypeInfo::DecodableType autoRelockTime = static_cast(0); + Attributes::SoundVolume::TypeInfo::DecodableType soundVolume = static_cast(0); + Attributes::OperatingMode::TypeInfo::DecodableType operatingMode = + static_cast(0); + Attributes::SupportedOperatingModes::TypeInfo::DecodableType supportedOperatingModes = static_cast(0); Attributes::DefaultConfigurationRegister::TypeInfo::DecodableType defaultConfigurationRegister = static_cast(0); Attributes::EnableLocalProgramming::TypeInfo::DecodableType enableLocalProgramming = static_cast(0); Attributes::EnableOneTouchLocking::TypeInfo::DecodableType enableOneTouchLocking = static_cast(0); @@ -31514,9 +31517,10 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::PlaybackState::TypeInfo::DecodableType playbackState = static_cast(0); - Attributes::StartTime::TypeInfo::DecodableType startTime = static_cast(0); - Attributes::Duration::TypeInfo::DecodableType duration = static_cast(0); + Attributes::PlaybackState::TypeInfo::DecodableType playbackState = + static_cast(0); + Attributes::StartTime::TypeInfo::DecodableType startTime = static_cast(0); + Attributes::Duration::TypeInfo::DecodableType duration = static_cast(0); Attributes::Position::TypeInfo::DecodableType position; Attributes::PlaybackSpeed::TypeInfo::DecodableType playbackSpeed = static_cast(0); Attributes::SeekRangeEnd::TypeInfo::DecodableType seekRangeEnd = static_cast(0); @@ -33253,7 +33257,8 @@ struct TypeInfo Attributes::ApplicationName::TypeInfo::DecodableType applicationName; Attributes::ProductId::TypeInfo::DecodableType productId = static_cast(0); Attributes::ApplicationApp::TypeInfo::DecodableType applicationApp; - Attributes::ApplicationStatus::TypeInfo::DecodableType applicationStatus = static_cast(0); + Attributes::ApplicationStatus::TypeInfo::DecodableType applicationStatus = + static_cast(0); Attributes::ApplicationVersion::TypeInfo::DecodableType applicationVersion; Attributes::AllowedVendorList::TypeInfo::DecodableType allowedVendorList; Attributes::AttributeList::TypeInfo::DecodableType attributeList; @@ -36050,7 +36055,7 @@ struct TypeInfo Attributes::EpochS::TypeInfo::DecodableType epochS = static_cast(0); Attributes::VendorId::TypeInfo::DecodableType vendorId = static_cast(0); Attributes::ListNullablesAndOptionalsStruct::TypeInfo::DecodableType listNullablesAndOptionalsStruct; - Attributes::EnumAttr::TypeInfo::DecodableType enumAttr = static_cast(0); + Attributes::EnumAttr::TypeInfo::DecodableType enumAttr = static_cast(0); Attributes::StructAttr::TypeInfo::DecodableType structAttr; Attributes::RangeRestrictedInt8u::TypeInfo::DecodableType rangeRestrictedInt8u = static_cast(0); Attributes::RangeRestrictedInt8s::TypeInfo::DecodableType rangeRestrictedInt8s = static_cast(0); From 4ac926ad392cbd4cb3dacaa77b4792ca4c1a5476 Mon Sep 17 00:00:00 2001 From: manjunathambiger23 Date: Fri, 21 Jan 2022 01:30:48 +0530 Subject: [PATCH 092/124] Added YAML Test Cases - Jan 19th (#13700) * Adding following testcases 1.TC_BRAC_1_1 2.TC_ETHDIAG_1_1 3.TC_ETHDIAG_2_1 4.TC_PS_1_1 5.TC_SWTCH_2_1 6.TC_SWTCH_2_2 7.TC_WIFIDIAG_1_1 8.TC_WIFIDIAG_3_1 * Adding auto generated files --- examples/chip-tool/templates/tests.js | 28 + .../certification/Test_TC_BRAC_1_1.yaml | 37 + .../certification/Test_TC_ETHDIAG_1_1.yaml | 162 ++ .../certification/Test_TC_ETHDIAG_2_1.yaml | 64 + .../suites/certification/Test_TC_PS_1_1.yaml | 94 ++ .../certification/Test_TC_SWTCH_2_1.yaml | 66 + .../certification/Test_TC_SWTCH_2_2.yaml | 514 ++++++ .../certification/Test_TC_WIFIDIAG_1_1.yaml | 216 +++ .../certification/Test_TC_WIFIDIAG_3_1.yaml | 72 + src/darwin/Framework/CHIP/templates/tests.js | 28 + .../Framework/CHIPTests/CHIPClustersTests.m | 880 +++++++++- .../chip-tool/zap-generated/test/Commands.h | 1484 +++++++++++++++++ 12 files changed, 3585 insertions(+), 60 deletions(-) create mode 100644 src/app/tests/suites/certification/Test_TC_BRAC_1_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_ETHDIAG_1_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_ETHDIAG_2_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_PS_1_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_SWTCH_2_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_WIFIDIAG_1_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_WIFIDIAG_3_1.yaml diff --git a/examples/chip-tool/templates/tests.js b/examples/chip-tool/templates/tests.js index 2a8a71863dfa33..a85b63d25dc961 100644 --- a/examples/chip-tool/templates/tests.js +++ b/examples/chip-tool/templates/tests.js @@ -28,6 +28,10 @@ function getTests() 'Test_TC_BOOL_2_1', ]; + const BridgedActions = [ + 'Test_TC_BRAC_1_1', + ]; + const ColorControl = [ 'Test_TC_CC_1_1', 'Test_TC_CC_2_1', @@ -72,6 +76,11 @@ function getTests() 'Test_TC_EMR_1_1', ]; + const EthernetNetworkDiagnostics = [ + 'Test_TC_ETHDIAG_1_1', + 'Test_TC_ETHDIAG_2_1', + ]; + const FlowMeasurement = [ 'Test_TC_FLW_1_1', 'Test_TC_FLW_2_1', @@ -132,6 +141,10 @@ function getTests() 'Test_TC_OO_2_3', ]; + const PowerSource = [ + 'Test_TC_PS_1_1', + ]; + const PressureMeasurement = [ 'Test_TC_PRS_1_1', 'Test_TC_PRS_2_1', @@ -150,6 +163,11 @@ function getTests() 'Test_TC_RH_2_2', ]; + const Switch = [ + 'Test_TC_SWTCH_2_1', + 'Test_TC_SWTCH_2_2', + ]; + const TemperatureMeasurement = [ 'Test_TC_TM_1_1', 'Test_TC_TM_2_1', @@ -172,6 +190,11 @@ function getTests() 'Test_TC_DIAGTH_1_1', ]; + const WiFiNetworkDiagnostics = [ + 'Test_TC_WIFIDIAG_1_1', + 'Test_TC_WIFIDIAG_3_1', + ]; + const WindowCovering = [ 'Test_TC_WNCV_1_1', 'Test_TC_WNCV_2_1', @@ -229,23 +252,28 @@ function getTests() const tests = [ BinaryInput, // BooleanState, // + BridgedActions, // ColorControl, // DeviceDiscovery, // DeviceManagement, // ElectricalMeasurement, // + EthernetNetworkDiagnostics, // FlowMeasurement, // IlluminanceMeasurement, // LevelControl, // MediaControl, // OccupancySensing, // OnOff, // + PowerSource, // PressureMeasurement, // PumpConfigurationControl, // RelativeHumidityMeasurement, // + Switch, // TemperatureMeasurement, // Thermostat, // ThermostatUserConfiguration, // ThreadNetworkDiagnostics, // + WiFiNetworkDiagnostics, // WindowCovering, // TV, // Others, // diff --git a/src/app/tests/suites/certification/Test_TC_BRAC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BRAC_1_1.yaml new file mode 100644 index 00000000000000..7cb7fcc9e8a35a --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_BRAC_1_1.yaml @@ -0,0 +1,37 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 77.1.1. [TC-BRAC-1.1] Global attributes with server as DUT + +config: + cluster: "Bridged Actions" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + + - label: "Read the global attribute: ClusterRevision" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + + - label: "Read the global attribute constraints: ClusterRevision" + command: "readAttribute" + attribute: "ClusterRevision" + response: + constraints: + type: uint16 diff --git a/src/app/tests/suites/certification/Test_TC_ETHDIAG_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ETHDIAG_1_1.yaml new file mode 100644 index 00000000000000..c919838d9881fe --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_ETHDIAG_1_1.yaml @@ -0,0 +1,162 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 48.1.1. [TC-ETHDIAG-1.1] Attributes with server as DUT + +config: + cluster: "Ethernet Network Diagnostics" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + + #Disabled due to issue #11670 and #13648 + - label: "Read PHYRate attribute" + disabled: true + command: "readAttribute" + attribute: "PHYRate" + response: + value: null + + - label: "Read PHYRate attribute constraints" + disabled: true + command: "readAttribute" + attribute: "PHYRate" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: "Read FullDuplex attribute" + disabled: true + command: "readAttribute" + attribute: "FullDuplex" + response: + value: null + + - label: "Read FullDuplex attribute constraints" + disabled: true + command: "readAttribute" + attribute: "FullDuplex" + response: + constraints: + type: bool + + - label: "Read PacketRxCount attribute" + disabled: true + command: "readAttribute" + attribute: "PacketRxCount" + response: + value: 0 + + - label: "Read PacketRxCount attribute constraints" + disabled: true + command: "readAttribute" + attribute: "PacketRxCount" + response: + constraints: + type: uint64 + + - label: "Read PacketTxCount attribute" + disabled: true + command: "readAttribute" + attribute: "PacketTxCount" + response: + value: 0 + + - label: "Read PacketTxCount attribute constraints" + disabled: true + command: "readAttribute" + attribute: "PacketTxCount" + response: + constraints: + type: uint64 + + - label: "Read TxErrCount attribute" + disabled: true + command: "readAttribute" + attribute: "TxErrCount" + response: + value: 0 + + - label: "Read TxErrCount attribute constraints" + disabled: true + command: "readAttribute" + attribute: "TxErrCount" + response: + constraints: + type: uint64 + + - label: "Read CollisionCount attribute" + disabled: true + command: "readAttribute" + attribute: "CollisionCount" + response: + value: 0 + + - label: "Read CollisionCount attribute constraints" + disabled: true + command: "readAttribute" + attribute: "CollisionCount" + response: + constraints: + type: uint64 + + - label: "Read OverrunCount attribute" + disabled: true + command: "readAttribute" + attribute: "OverrunCount" + response: + value: 0 + + - label: "Read OverrunCount attribute constraints" + disabled: true + command: "readAttribute" + attribute: "OverrunCount" + response: + constraints: + type: uint64 + + - label: "Read CarrierDetect attribute" + disabled: true + command: "readAttribute" + attribute: "CarrierDetect" + response: + value: null + + - label: "Read CarrierDetect attribute constraints" + disabled: true + command: "readAttribute" + attribute: "CarrierDetect" + response: + constraints: + type: bool + + - label: "Read TimeSinceReset attribute" + disabled: true + command: "readAttribute" + attribute: "TimeSinceReset" + response: + value: 0 + + - label: "Read TimeSinceReset attribute constraints" + disabled: true + command: "readAttribute" + attribute: "TimeSinceReset" + response: + constraints: + type: uint64 diff --git a/src/app/tests/suites/certification/Test_TC_ETHDIAG_2_1.yaml b/src/app/tests/suites/certification/Test_TC_ETHDIAG_2_1.yaml new file mode 100644 index 00000000000000..a488632be2eeff --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_ETHDIAG_2_1.yaml @@ -0,0 +1,64 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 48.1.3. [TC-ETHDIAG-2.1] Command received functionality with server as DUT + +config: + cluster: "Ethernet Network Diagnostics" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + + #Below steps disabled due to issue #13648 + - label: "Sends ResetCounts command" + disabled: true + command: "ResetCounts" + + - label: "Read the PacketRxCount attribute" + disabled: true + command: "readAttribute" + attribute: "PacketRxCount" + response: + value: 0 + + - label: "Read the PacketTxCount attribute" + disabled: true + command: "readAttribute" + attribute: "PacketTxCount" + response: + value: 0 + + - label: "Read the TxErrCount attribute" + disabled: true + command: "readAttribute" + attribute: "TxErrCount" + response: + value: 0 + + - label: "Read the CollisionCount attribute" + disabled: true + command: "readAttribute" + attribute: "CollisionCount" + response: + value: 0 + + - label: "Read the OverrunCount attribute" + disabled: true + command: "readAttribute" + attribute: "OverrunCount" + response: + value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml new file mode 100644 index 00000000000000..061aba72bef687 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml @@ -0,0 +1,94 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 62.1.1. [TC-PS-1.1] Global attributes with server as DUT + +config: + cluster: "Power Source" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + + - label: "read the global attribute: ClusterRevision" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + + - label: "Read the global attribute constraints: ClusterRevision" + command: "readAttribute" + attribute: "ClusterRevision" + response: + constraints: + type: uint16 + + - label: + "write the default values to mandatory global attribute: + ClusterRevision" + command: "writeAttribute" + attribute: "ClusterRevision" + arguments: + value: 1 + response: + error: UNSUPPORTED_WRITE + + - label: "reads back global attribute: ClusterRevision" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + + - label: "Read the global attribute: AttributeList" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + + #issue #11053 disabled steps below Global attributes missing from YAML framework + - label: "Read the global attribute: EventList" + disabled: true + command: "readAttribute" + attribute: "EventList" + response: + constraints: + type: list + + - label: "Read the global attribute: ClientGeneratedCommandList" + disabled: true + command: "readAttribute" + attribute: "ClientGeneratedCommandList" + response: + constraints: + type: list + + - label: "Read the global attribute: ServerGeneratedCommandList" + disabled: true + command: "readAttribute" + attribute: "ServerGeneratedCommandList" + response: + constraints: + type: list + + #disabled due to issue #13442 + - label: "Read the optional global attribute : FeatureMap" + disabled: true + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: map32 diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_2_1.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_2_1.yaml new file mode 100644 index 00000000000000..e112b0da7cfbce --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_SWTCH_2_1.yaml @@ -0,0 +1,66 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 74.2.1. [TC-SWTCH-2.1] Attributes with server as DUT + +config: + cluster: "Switch" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + + - label: "Read NumberOfPositions attribute" + command: "readAttribute" + attribute: "number of positions" + response: + value: 2 + + - label: "Read NumberOfPositions attribute" + command: "readAttribute" + attribute: "number of positions" + response: + constraints: + type: uint8 + minValue: 2 + + - label: "Read CurrentPosition attribute" + command: "readAttribute" + attribute: "current position" + response: + value: 0 + + - label: "Read CurrentPosition attribute" + command: "readAttribute" + attribute: "current position" + response: + constraints: + type: uint8 + minValue: 0 + + - label: "Read MultiPressMax attribute" + command: "readAttribute" + attribute: "multi press max" + response: + value: 2 + + - label: "Read MultiPressMax attribute" + command: "readAttribute" + attribute: "multi press max" + response: + constraints: + type: uint8 + minValue: 2 diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml new file mode 100644 index 00000000000000..71f7849f2d39d8 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml @@ -0,0 +1,514 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 74.2.2. [TC-SWTCH-2.2] Primary functionality with server as DUT + +config: + cluster: "Switch" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + + #### 2: tests for Latching Switch + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Set up subscription to SwitchLatched event" + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator sets switch to first position" + + - label: "Read CurrentPosition attribute" + command: "readAttribute" + attribute: "current position" + response: + value: 0 + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator sets switch to second position" + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "SwitchLatched event with NewPosition set to 1" + disabled: true + + - label: "Read CurrentPosition attribute" + disabled: true + command: "readAttribute" + attribute: "current position" + response: + value: 1 + + #Disabled due to issue #11343 -- Event verification not implemented + - label: + "SwitchLatched event with NewPosition set to 1 higher than in previous + event" + disabled: true + + - label: "Read CurrentPosition attribute" + disabled: true + command: "readAttribute" + attribute: "current position" + response: + value: 2 + + #Disabled due to issue #11343 -- Event verification not implemented + - label: + "SwitchLatched event with NewPosition set to 1 higher than in previous + event" + disabled: true + + - label: "Read CurrentPosition attribute" + disabled: true + command: "readAttribute" + attribute: "current position" + response: + value: 3 + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "SwitchLatched event with NewPosition set to 0" + disabled: true + + - label: "Read CurrentPosition attribute" + disabled: true + command: "readAttribute" + attribute: "current position" + response: + value: 0 + + ### 3: tests for Momentary Switch + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Set up subscription to InitialPress event" + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator does not operate switch" + + - label: "Read CurrentPosition attribute" + command: "readAttribute" + attribute: "current position" + response: + value: 0 + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator sets switch to second position" + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "InitialPress event with NewPosition set to 1" + disabled: true + + - label: "Read CurrentPosition attribute" + disabled: true + command: "readAttribute" + attribute: "current position" + response: + value: 1 + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator does not operate switch (release switch)" + + - label: "Read CurrentPosition attribute" + disabled: true + command: "readAttribute" + attribute: "current position" + response: + value: 0 + + ## 4: tests for Momentary Switch with release capability but not long press capabilities + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: + "Set up subscription to InitialPress and ShortRelease events" + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator does not operate switch" + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator operates switch (press briefly)" + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "InitialPress event with NewPosition set to 1" + disabled: true + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator releases switch" + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "ShortRelease event with PreviousPosition set to 1" + disabled: true + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator operates switch for 5 seconds" + + - label: "Wait 3000ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 3000 + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "InitialPress event with NewPosition set to 1" + disabled: true + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator releases switch" + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "ShortRelease event with PreviousPosition set to 1" + disabled: true + + ## 5: tests for Momentary Switch with release and long press capabilitie + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: + "Set up subscription to InitialPress, LongPress, + ShortRelease, LongRelease events" + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator does not operate switch" + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator operates switch (press briefly)" + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "InitialPress event with NewPosition set to 1" + disabled: true + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator releases switch" + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "ShortRelease event with PreviousPosition set to 1" + disabled: true + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator operates switch for 5 seconds" + + - label: "Wait 3000ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 3000 + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "InitialPress event with NewPosition set to 1" + disabled: true + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "LongPress event with NewPosition set to 1" + disabled: true + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator releases switch" + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "LongRelease event with PreviousPosition set to 1" + disabled: true + + ## 6: tests for Momentary Switch with multi-press capabilities + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: + "Set up subscription to InitialPress, ShortRelease, + MultiPressOngoing, MultiPressComplete events" + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator does not operate switch" + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator operates switch (press briefly)" + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "InitialPress event with NewPosition set to 1" + disabled: true + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator releases switch" + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "ShortRelease event with PreviousPosition set to 1" + disabled: true + + #Disabled due to issue #11343 -- Event verification not implemented + - label: + "MultiPressComplete event with PreviousPosition set to 1 and + TotalNumberOfPressesCounted set to 1" + disabled: true + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator operates switch (press briefly)" + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "InitialPress event with NewPosition set to 1" + disabled: true + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator releases switch" + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "ShortRelease event with PreviousPosition set to 1" + disabled: true + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator operates switch again (press briefly)" + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "InitialPress event with NewPosition set to 1" + disabled: true + + #Disabled due to issue #11343 -- Event verification not implemented + - label: + "MultiPressComplete event with PreviousPosition set to 1 and + TotalNumberOfPressesCounted set to 2" + disabled: true + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator releases switch" + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "ShortRelease event with PreviousPosition set to 1" + disabled: true + + #Disabled due to issue #11343 -- Event verification not implemented + - label: + "MultiPressComplete event with PreviousPosition set to 1 and + TotalNumberOfPressesCounted set to 1" + disabled: true + + # 6i + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator operates switch again (press briefly)" + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "InitialPress event with NewPosition set to 1" + disabled: true + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator releases switch" + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "ShortRelease event with PreviousPosition set to 1" + disabled: true + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator operates switch again (press briefly)" + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "InitialPress event with NewPosition set to 1" + disabled: true + + #Disabled due to issue #11343 -- Event verification not implemented + - label: + "MultiPressOngoing event with NewPosition set to 1 and + CurrentNumberOfPressesCounted set to 2" + disabled: true + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator releases switch" + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "ShortRelease event with PreviousPosition set to 1" + disabled: true + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator operates switch again (press briefly)" + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "InitialPress event with NewPosition set to 1" + disabled: true + + #Disabled due to issue #11343 -- Event verification not implemented + - label: + "MultiPressOngoing event with NewPosition set to 1 and + CurrentNumberOfPressesCounted set to 3" + disabled: true + + - label: "User interaction needed" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "Operator releases switch" + + #Disabled due to issue #11343 -- Event verification not implemented + - label: "ShortRelease event with PreviousPosition set to 1" + disabled: true + + #Disabled due to issue #11343 -- Event verification not implemented + - label: + "MultiPressComplete event with PreviousPosition set to 1 and + TotalNumberOfPressesCounted set to 3" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_WIFIDIAG_1_1.yaml b/src/app/tests/suites/certification/Test_TC_WIFIDIAG_1_1.yaml new file mode 100644 index 00000000000000..6258d1750d4ac3 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_WIFIDIAG_1_1.yaml @@ -0,0 +1,216 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 54.1.1. [TC-WIFIDIAG-1.1] Attributes with server as DUT + +config: + cluster: "WiFi Network Diagnostics" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + + #Below steps disabled due to issue #13645 and 11670 + - label: "Reads NetworkInterface structure attribute from DUT" + disabled: true + cluster: "General Diagnostics" + command: "readAttribute" + attribute: "NetworkInterfaces" + response: + constraints: + type: list + + - label: "Reads SecurityType attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "SecurityType" + response: + value: null + + - label: "Reads SecurityType attribute constraints" + disabled: true + command: "readAttribute" + attribute: "SecurityType" + response: + constraints: + type: enum + + - label: "Reads WiFiVersion attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "WiFiVersion" + response: + value: null + + - label: "Reads WiFiVersion attribute constraints" + disabled: true + command: "readAttribute" + attribute: "WiFiVersion" + response: + constraints: + type: enum + + - label: "Reads ChannelNumber attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "ChannelNumber" + response: + value: null + + - label: "Reads ChannelNumber attribute constraints" + disabled: true + command: "readAttribute" + attribute: "ChannelNumber" + response: + constraints: + type: uint16 + + - label: "Reads RSSI attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "RSSI" + response: + value: null + + - label: "Reads RSSI attribute constraints" + disabled: true + command: "readAttribute" + attribute: "RSSI" + response: + constraints: + type: int8 + minValue: -120 + maxValue: 0 + + - label: "Reads BeaconLostCount attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "BeaconLostCount" + response: + value: 0 + + - label: "Reads BeaconLostCount attribute constraints" + disabled: true + command: "readAttribute" + attribute: "BeaconLostCount" + response: + constraints: + type: uint32 + + - label: "Reads BeaconRxCount attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "BeaconRxCount" + response: + value: 0 + + - label: "Reads BeaconRxCount attribute constraints" + disabled: true + command: "readAttribute" + attribute: "BeaconRxCount" + response: + constraints: + type: uint32 + + - label: "Reads PacketMulticastRxCount attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "PacketMulticastRxCount" + response: + value: 0 + + - label: "Reads PacketMulticastRxCount attribute constraints" + disabled: true + command: "readAttribute" + attribute: "PacketMulticastRxCount" + response: + constraints: + type: uint32 + + - label: "Reads PacketMulticastTxCount attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "PacketMulticastTxCount" + response: + value: 0 + + - label: "Reads PacketMulticastTxCount attribute constraints" + disabled: true + command: "readAttribute" + attribute: "PacketMulticastTxCount" + response: + constraints: + type: uint32 + + - label: "Reads PacketUnicastRxCount attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "PacketUnicastRxCount" + response: + value: 0 + + - label: "Reads PacketUnicastRxCount attribute constraints" + disabled: true + command: "readAttribute" + attribute: "PacketUnicastRxCount" + response: + constraints: + type: uint32 + + - label: "Reads PacketUnicastTxCount attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "PacketUnicastTxCount" + response: + value: 0 + + - label: "Reads PacketUnicastTxCount attribute constraints" + disabled: true + command: "readAttribute" + attribute: "PacketUnicastTxCount" + response: + constraints: + type: uint32 + + - label: "Reads CurrentMaxRate attribute from DUT" + optional: true + command: "readAttribute" + attribute: "CurrentMaxRate" + response: + value: 0 + + - label: "Reads CurrentMaxRate attribute constraints" + optional: true + command: "readAttribute" + attribute: "CurrentMaxRate" + response: + constraints: + type: uint64 + + - label: "Reads OverrunCount attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "OverrunCount" + response: + value: 0 + + - label: "Reads OverrunCount attribute constraints" + disabled: true + command: "readAttribute" + attribute: "OverrunCount" + response: + constraints: + type: uint64 diff --git a/src/app/tests/suites/certification/Test_TC_WIFIDIAG_3_1.yaml b/src/app/tests/suites/certification/Test_TC_WIFIDIAG_3_1.yaml new file mode 100644 index 00000000000000..ba69ea1d0917c7 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_WIFIDIAG_3_1.yaml @@ -0,0 +1,72 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: + 54.2.3. [TC-WIFIDIAG-3.1] Command received functionality with server as DUT + +config: + cluster: "WiFi Network Diagnostics" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + + #Below steps disabled due to issue #13645 + - label: "TH sends ResetCounts command to DUT" + disabled: true + command: "ResetCounts" + + - label: "Reads BeaconLostCount attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "BeaconLostCount" + response: + value: 0 + + - label: "Reads BeaconRxCount attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "BeaconRxCount" + response: + value: 0 + + - label: "Reads PacketMulticastRxCount attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "PacketMulticastRxCount" + response: + value: 0 + + - label: "Reads PacketMulticastTxCount attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "PacketMulticastTxCount" + response: + value: 0 + + - label: "Reads PacketUnicastRxCount attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "PacketUnicastRxCount" + response: + value: 0 + + - label: "Reads PacketUnicastTxCount attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "PacketUnicastTxCount" + response: + value: 0 diff --git a/src/darwin/Framework/CHIP/templates/tests.js b/src/darwin/Framework/CHIP/templates/tests.js index 09c410c0bbfd22..acbd8c6b86a8e5 100644 --- a/src/darwin/Framework/CHIP/templates/tests.js +++ b/src/darwin/Framework/CHIP/templates/tests.js @@ -28,6 +28,10 @@ function getTests() 'Test_TC_BOOL_2_1', ]; + const BridgedActions = [ + 'Test_TC_BRAC_1_1', + ]; + const ColorControl = [ 'Test_TC_CC_1_1', 'Test_TC_CC_2_1', @@ -71,6 +75,11 @@ function getTests() 'Test_TC_EMR_1_1', ]; + const EthernetNetworkDiagnostics = [ + 'Test_TC_ETHDIAG_1_1', + 'Test_TC_ETHDIAG_2_1', + ]; + const FlowMeasurement = [ 'Test_TC_FLW_1_1', 'Test_TC_FLW_2_1', @@ -131,6 +140,10 @@ function getTests() 'Test_TC_OO_2_3', ]; + const PowerSource = [ + 'Test_TC_PS_1_1', + ]; + const PressureMeasurement = [ 'Test_TC_PRS_1_1', 'Test_TC_PRS_2_1', @@ -149,6 +162,11 @@ function getTests() 'Test_TC_RH_2_2', ]; + const Switch = [ + 'Test_TC_SWTCH_2_1', + 'Test_TC_SWTCH_2_2', + ]; + const TemperatureMeasurement = [ 'Test_TC_TM_1_1', 'Test_TC_TM_2_1', @@ -171,6 +189,11 @@ function getTests() 'Test_TC_DIAGTH_1_1', ]; + const WiFiNetworkDiagnostics = [ + 'Test_TC_WIFIDIAG_1_1', + 'Test_TC_WIFIDIAG_3_1', + ]; + const WindowCovering = [ 'Test_TC_WNCV_1_1', 'Test_TC_WNCV_2_1', @@ -210,23 +233,28 @@ function getTests() const tests = [ BinaryInput, // BooleanState, // + BridgedActions, // ColorControl, // DeviceDiscovery, // DeviceManagement, // ElectricalMeasurement, // + EthernetNetworkDiagnostics, // FlowMeasurement, // IlluminanceMeasurement, // LevelControl, // MediaControl, // OccupancySensing, // OnOff, // + PowerSource, // PressureMeasurement, // PumpConfigurationControl, // RelativeHumidityMeasurement, // + Switch, // TemperatureMeasurement, // Thermostat, // ThermostatUserConfiguration, // ThreadNetworkDiagnostics, // + WiFiNetworkDiagnostics, // WindowCovering, // Others, // SoftwareDiagnostics, // diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 0ac11afb64aa39..784f77cfc82a02 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -1001,6 +1001,58 @@ - (void)testSendClusterTest_TC_BOOL_2_1_000004_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_BRAC_1_1_000000_WaitForCommissionee +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForCommissionee(expectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_BRAC_1_1_000001_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: ClusterRevision"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestBridgedActions * cluster = [[CHIPTestBridgedActions alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 1U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_BRAC_1_1_000002_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute constraints: ClusterRevision"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestBridgedActions * cluster = [[CHIPTestBridgedActions alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterTest_TC_CC_1_1_000000_WaitForCommissionee { XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; @@ -10424,6 +10476,24 @@ - (void)testSendClusterTest_TC_EMR_1_1_000004_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_ETHDIAG_1_1_000000_WaitForCommissionee +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForCommissionee(expectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterTest_TC_ETHDIAG_2_1_000000_WaitForCommissionee +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForCommissionee(expectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterTest_TC_FLW_1_1_000000_WaitForCommissionee { XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; @@ -15939,6 +16009,124 @@ - (void)testSendClusterTest_TC_OO_2_3_000046_Off [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_PS_1_1_000000_WaitForCommissionee +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForCommissionee(expectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PS_1_1_000001_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 1U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PS_1_1_000002_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute constraints: ClusterRevision"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PS_1_1_000003_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id clusterRevisionArgument; + clusterRevisionArgument = [NSNumber numberWithUnsignedShort:1U]; + [cluster + writeAttributeClusterRevisionWithValue:clusterRevisionArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PS_1_1_000004_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"reads back global attribute: ClusterRevision"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 1U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_PS_1_1_000005_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AttributeList"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterTest_TC_PRS_1_1_000000_WaitForCommissionee { XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; @@ -18111,7 +18299,7 @@ - (void)testSendClusterTest_TC_RH_2_2_000002_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TM_1_1_000000_WaitForCommissionee +- (void)testSendClusterTest_TC_SWTCH_2_1_000000_WaitForCommissionee { XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; @@ -18119,25 +18307,23 @@ - (void)testSendClusterTest_TC_TM_1_1_000000_WaitForCommissionee WaitForCommissionee(expectation, queue); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TM_1_1_000001_ReadAttribute +- (void)testSendClusterTest_TC_SWTCH_2_1_000001_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read NumberOfPositions attribute"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device - endpoint:1 - queue:queue]; + CHIPTestSwitch * cluster = [[CHIPTestSwitch alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeNumberOfPositionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read NumberOfPositions attribute Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { id actualValue = value; - XCTAssertEqual([actualValue unsignedShortValue], 3U); + XCTAssertEqual([actualValue unsignedCharValue], 2); } [expectation fulfill]; @@ -18145,71 +18331,75 @@ - (void)testSendClusterTest_TC_TM_1_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TM_1_1_000002_ReadAttribute +- (void)testSendClusterTest_TC_SWTCH_2_1_000002_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute constraints: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read NumberOfPositions attribute"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device - endpoint:1 - queue:queue]; + CHIPTestSwitch * cluster = [[CHIPTestSwitch alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); + [cluster readAttributeNumberOfPositionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read NumberOfPositions attribute Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 2); + } + } + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TM_1_1_000003_WriteAttribute +- (void)testSendClusterTest_TC_SWTCH_2_1_000003_ReadAttribute { - XCTestExpectation * expectation = - [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read CurrentPosition attribute"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device - endpoint:1 - queue:queue]; + CHIPTestSwitch * cluster = [[CHIPTestSwitch alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:3U]; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeCurrentPositionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read CurrentPosition attribute Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } + + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TM_1_1_000004_ReadAttribute +- (void)testSendClusterTest_TC_SWTCH_2_1_000004_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"reads back global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read CurrentPosition attribute"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device - endpoint:1 - queue:queue]; + CHIPTestSwitch * cluster = [[CHIPTestSwitch alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeCurrentPositionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read CurrentPosition attribute Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { id actualValue = value; - XCTAssertEqual([actualValue unsignedShortValue], 3U); + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } } [expectation fulfill]; @@ -18217,45 +18407,540 @@ - (void)testSendClusterTest_TC_TM_1_1_000004_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - -- (void)testSendClusterTest_TC_TM_2_1_000000_WaitForCommissionee -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; - - dispatch_queue_t queue = dispatch_get_main_queue(); - WaitForCommissionee(expectation, queue); - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TM_2_1_000001_ReadAttribute +- (void)testSendClusterTest_TC_SWTCH_2_1_000005_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MeasuredValue"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read MultiPressMax attribute"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device - endpoint:1 - queue:queue]; + CHIPTestSwitch * cluster = [[CHIPTestSwitch alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: MeasuredValue Error: %@", err); + [cluster readAttributeMultiPressMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read MultiPressMax attribute Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 2); + } + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TM_2_1_000002_ReadAttribute +- (void)testSendClusterTest_TC_SWTCH_2_1_000006_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: Tolerance"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read MultiPressMax attribute"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device - endpoint:1 - queue:queue]; + CHIPTestSwitch * cluster = [[CHIPTestSwitch alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMultiPressMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read MultiPressMax attribute Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 2); + } + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterTest_TC_SWTCH_2_2_000000_WaitForCommissionee +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForCommissionee(expectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000001_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Set up subscription to SwitchLatched event"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000002_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator sets switch to first position"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000003_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read CurrentPosition attribute"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestSwitch * cluster = [[CHIPTestSwitch alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCurrentPositionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read CurrentPosition attribute Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000004_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator sets switch to second position"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000005_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Set up subscription to InitialPress event"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000006_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator does not operate switch"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000007_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read CurrentPosition attribute"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestSwitch * cluster = [[CHIPTestSwitch alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCurrentPositionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read CurrentPosition attribute Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 0); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000008_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator sets switch to second position"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000009_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator does not operate switch (release switch)"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000010_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Set up subscription to InitialPress and ShortRelease events"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000011_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator does not operate switch"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000012_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator operates switch (press briefly)"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000013_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator releases switch"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000014_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator operates switch for 5 seconds"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000015_WaitForMs +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 3000ms"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForMs(expectation, queue, 3000); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000016_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator releases switch"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000017_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Set up subscription to InitialPress, LongPress, ShortRelease, LongRelease events"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000018_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator does not operate switch"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000019_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator operates switch (press briefly)"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000020_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator releases switch"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000021_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator operates switch for 5 seconds"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000022_WaitForMs +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 3000ms"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForMs(expectation, queue, 3000); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000023_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator releases switch"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000024_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt( + expectation, queue, @"Set up subscription to InitialPress, ShortRelease, MultiPressOngoing, MultiPressComplete events"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000025_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator does not operate switch"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000026_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator operates switch (press briefly)"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000027_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator releases switch"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000028_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator operates switch (press briefly)"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000029_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator releases switch"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000030_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator operates switch again (press briefly)"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000031_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator releases switch"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000032_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator operates switch again (press briefly)"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000033_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator releases switch"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000034_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator operates switch again (press briefly)"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000035_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator releases switch"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000036_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator operates switch again (press briefly)"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_SWTCH_2_2_000037_UserPrompt +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"User interaction needed"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + UserPrompt(expectation, queue, @"Operator releases switch"); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterTest_TC_TM_1_1_000000_WaitForCommissionee +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForCommissionee(expectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TM_1_1_000001_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 3U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TM_1_1_000002_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute constraints: ClusterRevision"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TM_1_1_000003_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + id clusterRevisionArgument; + clusterRevisionArgument = [NSNumber numberWithUnsignedShort:3U]; + [cluster + writeAttributeClusterRevisionWithValue:clusterRevisionArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TM_1_1_000004_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"reads back global attribute: ClusterRevision"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 3U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterTest_TC_TM_2_1_000000_WaitForCommissionee +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForCommissionee(expectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TM_2_1_000001_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the mandatory attribute: MeasuredValue"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the mandatory attribute: MeasuredValue Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TM_2_1_000002_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the optional attribute: Tolerance"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; XCTAssertNotNil(cluster); [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -22133,6 +22818,81 @@ - (void)testSendClusterTest_TC_DIAGTH_1_1_000004_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_WIFIDIAG_1_1_000000_WaitForCommissionee +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForCommissionee(expectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_WIFIDIAG_1_1_000001_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads CurrentMaxRate attribute from DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestWiFiNetworkDiagnostics * cluster = [[CHIPTestWiFiNetworkDiagnostics alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCurrentMaxRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads CurrentMaxRate attribute from DUT Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedLongLongValue], 0ULL); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_WIFIDIAG_1_1_000002_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads CurrentMaxRate attribute constraints"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestWiFiNetworkDiagnostics * cluster = [[CHIPTestWiFiNetworkDiagnostics alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeCurrentMaxRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads CurrentMaxRate attribute constraints Error: %@", err); + + if (err.code == CHIPErrorCodeUnsupportedAttribute) { + [expectation fulfill]; + return; + } + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterTest_TC_WIFIDIAG_3_1_000000_WaitForCommissionee +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForCommissionee(expectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterTest_TC_WNCV_1_1_000000_WaitForCommissionee { XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index bff0c88cffa561..1b9df2687ea5d3 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -37,6 +37,7 @@ class TestList : public Command printf("Test_TC_BI_2_2\n"); printf("Test_TC_BOOL_1_1\n"); printf("Test_TC_BOOL_2_1\n"); + printf("Test_TC_BRAC_1_1\n"); printf("Test_TC_CC_1_1\n"); printf("Test_TC_CC_2_1\n"); printf("Test_TC_CC_3_1\n"); @@ -69,6 +70,8 @@ class TestList : public Command printf("Test_TC_DM_3_1\n"); printf("Test_TC_DM_2_2\n"); printf("Test_TC_EMR_1_1\n"); + printf("Test_TC_ETHDIAG_1_1\n"); + printf("Test_TC_ETHDIAG_2_1\n"); printf("Test_TC_FLW_1_1\n"); printf("Test_TC_FLW_2_1\n"); printf("Test_TC_FLW_2_2\n"); @@ -111,6 +114,7 @@ class TestList : public Command printf("Test_TC_OO_2_1\n"); printf("Test_TC_OO_2_2\n"); printf("Test_TC_OO_2_3\n"); + printf("Test_TC_PS_1_1\n"); printf("Test_TC_PRS_1_1\n"); printf("Test_TC_PRS_2_1\n"); printf("Test_TC_PCC_1_1\n"); @@ -120,6 +124,8 @@ class TestList : public Command printf("Test_TC_RH_1_1\n"); printf("Test_TC_RH_2_1\n"); printf("Test_TC_RH_2_2\n"); + printf("Test_TC_SWTCH_2_1\n"); + printf("Test_TC_SWTCH_2_2\n"); printf("Test_TC_TM_1_1\n"); printf("Test_TC_TM_2_1\n"); printf("Test_TC_TM_2_2\n"); @@ -130,6 +136,8 @@ class TestList : public Command printf("Test_TC_TSUIC_2_1\n"); printf("Test_TC_TSUIC_2_2\n"); printf("Test_TC_DIAGTH_1_1\n"); + printf("Test_TC_WIFIDIAG_1_1\n"); + printf("Test_TC_WIFIDIAG_3_1\n"); printf("Test_TC_WNCV_1_1\n"); printf("Test_TC_WNCV_2_1\n"); printf("Test_TC_WNCV_2_2\n"); @@ -1591,6 +1599,140 @@ class Test_TC_BOOL_2_1 : public TestCommand } }; +class Test_TC_BRAC_1_1 : public TestCommand +{ +public: + Test_TC_BRAC_1_1() : TestCommand("Test_TC_BRAC_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + ~Test_TC_BRAC_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_BRAC_1_1\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BRAC_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + break; + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 3; + + chip::Optional mCluster; + chip::Optional mEndpoint; + + static void OnFailureCallback_1(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_1(status); + } + + static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) + { + (static_cast(context))->OnSuccessResponse_1(clusterRevision); + } + + static void OnFailureCallback_2(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_2(status); + } + + static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) + { + (static_cast(context))->OnSuccessResponse_2(clusterRevision); + } + + // + // Tests methods + // + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + SetIdentity(kIdentityAlpha); + return WaitForCommissionee(); + } + + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::BridgedActionsClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_1(uint16_t clusterRevision) + { + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 1U)); + + NextTest(); + } + + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::BridgedActionsClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_2(uint16_t clusterRevision) + { + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + NextTest(); + } +}; + class Test_TC_CC_1_1 : public TestCommand { public: @@ -16338,6 +16480,140 @@ class Test_TC_EMR_1_1 : public TestCommand } }; +class Test_TC_ETHDIAG_1_1 : public TestCommand +{ +public: + Test_TC_ETHDIAG_1_1() : TestCommand("Test_TC_ETHDIAG_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + ~Test_TC_ETHDIAG_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ETHDIAG_1_1\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ETHDIAG_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 1; + + chip::Optional mCluster; + chip::Optional mEndpoint; + + // + // Tests methods + // + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + SetIdentity(kIdentityAlpha); + return WaitForCommissionee(); + } +}; + +class Test_TC_ETHDIAG_2_1 : public TestCommand +{ +public: + Test_TC_ETHDIAG_2_1() : TestCommand("Test_TC_ETHDIAG_2_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + ~Test_TC_ETHDIAG_2_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ETHDIAG_2_1\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ETHDIAG_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 1; + + chip::Optional mCluster; + chip::Optional mEndpoint; + + // + // Tests methods + // + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + SetIdentity(kIdentityAlpha); + return WaitForCommissionee(); + } +}; + class Test_TC_FLW_1_1 : public TestCommand { public: @@ -26599,6 +26875,241 @@ class Test_TC_OO_2_3 : public TestCommand void OnSuccessResponse_46() { NextTest(); } }; +class Test_TC_PS_1_1 : public TestCommand +{ +public: + Test_TC_PS_1_1() : TestCommand("Test_TC_PS_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + ~Test_TC_PS_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PS_1_1\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PS_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + break; + case 3: + ChipLogProgress(chipTool, + " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); + err = TestReadsBackGlobalAttributeClusterRevision_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_5(); + break; + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 6; + + chip::Optional mCluster; + chip::Optional mEndpoint; + + static void OnFailureCallback_1(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_1(status); + } + + static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) + { + (static_cast(context))->OnSuccessResponse_1(clusterRevision); + } + + static void OnFailureCallback_2(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_2(status); + } + + static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) + { + (static_cast(context))->OnSuccessResponse_2(clusterRevision); + } + + static void OnFailureCallback_3(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_3(status); + } + + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } + + static void OnFailureCallback_4(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_4(status); + } + + static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) + { + (static_cast(context))->OnSuccessResponse_4(clusterRevision); + } + + static void OnFailureCallback_5(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_5(status); + } + + static void OnSuccessCallback_5(void * context, const chip::app::DataModel::DecodableList & attributeList) + { + (static_cast(context))->OnSuccessResponse_5(attributeList); + } + + // + // Tests methods + // + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + SetIdentity(kIdentityAlpha); + return WaitForCommissionee(); + } + + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PowerSourceClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_1(uint16_t clusterRevision) + { + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 1U)); + + NextTest(); + } + + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PowerSourceClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_2(uint16_t clusterRevision) + { + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + NextTest(); + } + + CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PowerSourceClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint16_t clusterRevisionArgument; + clusterRevisionArgument = 1U; + + ReturnErrorOnFailure(cluster.WriteAttribute( + clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_3(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + } + + void OnSuccessResponse_3() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PowerSourceClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_4(uint16_t clusterRevision) + { + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 1U)); + + NextTest(); + } + + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::PowerSourceClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_5(const chip::app::DataModel::DecodableList & attributeList) + { + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + NextTest(); + } +}; + class Test_TC_PRS_1_1 : public TestCommand { public: @@ -30182,6 +30693,762 @@ class Test_TC_RH_2_2 : public TestCommand } }; +class Test_TC_SWTCH_2_1 : public TestCommand +{ +public: + Test_TC_SWTCH_2_1() : TestCommand("Test_TC_SWTCH_2_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + ~Test_TC_SWTCH_2_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWTCH_2_1\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWTCH_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read NumberOfPositions attribute\n"); + err = TestReadNumberOfPositionsAttribute_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read NumberOfPositions attribute\n"); + err = TestReadNumberOfPositionsAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read CurrentPosition attribute\n"); + err = TestReadCurrentPositionAttribute_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read CurrentPosition attribute\n"); + err = TestReadCurrentPositionAttribute_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read MultiPressMax attribute\n"); + err = TestReadMultiPressMaxAttribute_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read MultiPressMax attribute\n"); + err = TestReadMultiPressMaxAttribute_6(); + break; + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 7; + + chip::Optional mCluster; + chip::Optional mEndpoint; + + static void OnFailureCallback_1(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_1(status); + } + + static void OnSuccessCallback_1(void * context, uint8_t numberOfPositions) + { + (static_cast(context))->OnSuccessResponse_1(numberOfPositions); + } + + static void OnFailureCallback_2(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_2(status); + } + + static void OnSuccessCallback_2(void * context, uint8_t numberOfPositions) + { + (static_cast(context))->OnSuccessResponse_2(numberOfPositions); + } + + static void OnFailureCallback_3(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_3(status); + } + + static void OnSuccessCallback_3(void * context, uint8_t currentPosition) + { + (static_cast(context))->OnSuccessResponse_3(currentPosition); + } + + static void OnFailureCallback_4(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_4(status); + } + + static void OnSuccessCallback_4(void * context, uint8_t currentPosition) + { + (static_cast(context))->OnSuccessResponse_4(currentPosition); + } + + static void OnFailureCallback_5(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_5(status); + } + + static void OnSuccessCallback_5(void * context, uint8_t multiPressMax) + { + (static_cast(context))->OnSuccessResponse_5(multiPressMax); + } + + static void OnFailureCallback_6(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_6(status); + } + + static void OnSuccessCallback_6(void * context, uint8_t multiPressMax) + { + (static_cast(context))->OnSuccessResponse_6(multiPressMax); + } + + // + // Tests methods + // + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + SetIdentity(kIdentityAlpha); + return WaitForCommissionee(); + } + + CHIP_ERROR TestReadNumberOfPositionsAttribute_1() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::SwitchClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_1(uint8_t numberOfPositions) + { + VerifyOrReturn(CheckValue("numberOfPositions", numberOfPositions, 2)); + + NextTest(); + } + + CHIP_ERROR TestReadNumberOfPositionsAttribute_2() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::SwitchClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_2(uint8_t numberOfPositions) + { + VerifyOrReturn(CheckConstraintType("numberOfPositions", "", "uint8")); + VerifyOrReturn(CheckConstraintMinValue("numberOfPositions", numberOfPositions, 2)); + NextTest(); + } + + CHIP_ERROR TestReadCurrentPositionAttribute_3() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::SwitchClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_3(uint8_t currentPosition) + { + VerifyOrReturn(CheckValue("currentPosition", currentPosition, 0)); + + NextTest(); + } + + CHIP_ERROR TestReadCurrentPositionAttribute_4() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::SwitchClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_4(uint8_t currentPosition) + { + VerifyOrReturn(CheckConstraintType("currentPosition", "", "uint8")); + VerifyOrReturn(CheckConstraintMinValue("currentPosition", currentPosition, 0)); + NextTest(); + } + + CHIP_ERROR TestReadMultiPressMaxAttribute_5() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::SwitchClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_5(uint8_t multiPressMax) + { + VerifyOrReturn(CheckValue("multiPressMax", multiPressMax, 2)); + + NextTest(); + } + + CHIP_ERROR TestReadMultiPressMaxAttribute_6() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::SwitchClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_6(uint8_t multiPressMax) + { + VerifyOrReturn(CheckConstraintType("multiPressMax", "", "uint8")); + VerifyOrReturn(CheckConstraintMinValue("multiPressMax", multiPressMax, 2)); + NextTest(); + } +}; + +class Test_TC_SWTCH_2_2 : public TestCommand +{ +public: + Test_TC_SWTCH_2_2() : TestCommand("Test_TC_SWTCH_2_2"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + ~Test_TC_SWTCH_2_2() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWTCH_2_2\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWTCH_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : User interaction needed\n"); + err = TestUserInteractionNeeded_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : User interaction needed\n"); + err = TestUserInteractionNeeded_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read CurrentPosition attribute\n"); + err = TestReadCurrentPositionAttribute_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : User interaction needed\n"); + err = TestUserInteractionNeeded_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : User interaction needed\n"); + err = TestUserInteractionNeeded_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : User interaction needed\n"); + err = TestUserInteractionNeeded_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read CurrentPosition attribute\n"); + err = TestReadCurrentPositionAttribute_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : User interaction needed\n"); + err = TestUserInteractionNeeded_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : User interaction needed\n"); + err = TestUserInteractionNeeded_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : User interaction needed\n"); + err = TestUserInteractionNeeded_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : User interaction needed\n"); + err = TestUserInteractionNeeded_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : User interaction needed\n"); + err = TestUserInteractionNeeded_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : User interaction needed\n"); + err = TestUserInteractionNeeded_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : User interaction needed\n"); + err = TestUserInteractionNeeded_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 3000ms\n"); + err = TestWait3000ms_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : User interaction needed\n"); + err = TestUserInteractionNeeded_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : User interaction needed\n"); + err = TestUserInteractionNeeded_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : User interaction needed\n"); + err = TestUserInteractionNeeded_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : User interaction needed\n"); + err = TestUserInteractionNeeded_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : User interaction needed\n"); + err = TestUserInteractionNeeded_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : User interaction needed\n"); + err = TestUserInteractionNeeded_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 3000ms\n"); + err = TestWait3000ms_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : User interaction needed\n"); + err = TestUserInteractionNeeded_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : User interaction needed\n"); + err = TestUserInteractionNeeded_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : User interaction needed\n"); + err = TestUserInteractionNeeded_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : User interaction needed\n"); + err = TestUserInteractionNeeded_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : User interaction needed\n"); + err = TestUserInteractionNeeded_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : User interaction needed\n"); + err = TestUserInteractionNeeded_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : User interaction needed\n"); + err = TestUserInteractionNeeded_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : User interaction needed\n"); + err = TestUserInteractionNeeded_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : User interaction needed\n"); + err = TestUserInteractionNeeded_31(); + break; + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : User interaction needed\n"); + err = TestUserInteractionNeeded_32(); + break; + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : User interaction needed\n"); + err = TestUserInteractionNeeded_33(); + break; + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : User interaction needed\n"); + err = TestUserInteractionNeeded_34(); + break; + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : User interaction needed\n"); + err = TestUserInteractionNeeded_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : User interaction needed\n"); + err = TestUserInteractionNeeded_36(); + break; + case 37: + ChipLogProgress(chipTool, " ***** Test Step 37 : User interaction needed\n"); + err = TestUserInteractionNeeded_37(); + break; + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 38; + + chip::Optional mCluster; + chip::Optional mEndpoint; + + static void OnFailureCallback_3(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_3(status); + } + + static void OnSuccessCallback_3(void * context, uint8_t currentPosition) + { + (static_cast(context))->OnSuccessResponse_3(currentPosition); + } + + static void OnFailureCallback_7(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_7(status); + } + + static void OnSuccessCallback_7(void * context, uint8_t currentPosition) + { + (static_cast(context))->OnSuccessResponse_7(currentPosition); + } + + // + // Tests methods + // + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + SetIdentity(kIdentityAlpha); + return WaitForCommissionee(); + } + + CHIP_ERROR TestUserInteractionNeeded_1() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Set up subscription to SwitchLatched event"); + } + + CHIP_ERROR TestUserInteractionNeeded_2() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator sets switch to first position"); + } + + CHIP_ERROR TestReadCurrentPositionAttribute_3() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::SwitchClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_3, OnFailureCallback_3)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_3(uint8_t currentPosition) + { + VerifyOrReturn(CheckValue("currentPosition", currentPosition, 0)); + + NextTest(); + } + + CHIP_ERROR TestUserInteractionNeeded_4() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator sets switch to second position"); + } + + CHIP_ERROR TestUserInteractionNeeded_5() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Set up subscription to InitialPress event"); + } + + CHIP_ERROR TestUserInteractionNeeded_6() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator does not operate switch"); + } + + CHIP_ERROR TestReadCurrentPositionAttribute_7() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::SwitchClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_7, OnFailureCallback_7)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_7(uint8_t currentPosition) + { + VerifyOrReturn(CheckValue("currentPosition", currentPosition, 0)); + + NextTest(); + } + + CHIP_ERROR TestUserInteractionNeeded_8() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator sets switch to second position"); + } + + CHIP_ERROR TestUserInteractionNeeded_9() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator does not operate switch (release switch)"); + } + + CHIP_ERROR TestUserInteractionNeeded_10() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Set up subscription to InitialPress and ShortRelease events"); + } + + CHIP_ERROR TestUserInteractionNeeded_11() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator does not operate switch"); + } + + CHIP_ERROR TestUserInteractionNeeded_12() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator operates switch (press briefly)"); + } + + CHIP_ERROR TestUserInteractionNeeded_13() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator releases switch"); + } + + CHIP_ERROR TestUserInteractionNeeded_14() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator operates switch for 5 seconds"); + } + + CHIP_ERROR TestWait3000ms_15() + { + SetIdentity(kIdentityAlpha); + return WaitForMs(3000); + } + + CHIP_ERROR TestUserInteractionNeeded_16() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator releases switch"); + } + + CHIP_ERROR TestUserInteractionNeeded_17() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Set up subscription to InitialPress, LongPress, ShortRelease, LongRelease events"); + } + + CHIP_ERROR TestUserInteractionNeeded_18() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator does not operate switch"); + } + + CHIP_ERROR TestUserInteractionNeeded_19() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator operates switch (press briefly)"); + } + + CHIP_ERROR TestUserInteractionNeeded_20() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator releases switch"); + } + + CHIP_ERROR TestUserInteractionNeeded_21() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator operates switch for 5 seconds"); + } + + CHIP_ERROR TestWait3000ms_22() + { + SetIdentity(kIdentityAlpha); + return WaitForMs(3000); + } + + CHIP_ERROR TestUserInteractionNeeded_23() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator releases switch"); + } + + CHIP_ERROR TestUserInteractionNeeded_24() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Set up subscription to InitialPress, ShortRelease, MultiPressOngoing, MultiPressComplete events"); + } + + CHIP_ERROR TestUserInteractionNeeded_25() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator does not operate switch"); + } + + CHIP_ERROR TestUserInteractionNeeded_26() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator operates switch (press briefly)"); + } + + CHIP_ERROR TestUserInteractionNeeded_27() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator releases switch"); + } + + CHIP_ERROR TestUserInteractionNeeded_28() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator operates switch (press briefly)"); + } + + CHIP_ERROR TestUserInteractionNeeded_29() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator releases switch"); + } + + CHIP_ERROR TestUserInteractionNeeded_30() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator operates switch again (press briefly)"); + } + + CHIP_ERROR TestUserInteractionNeeded_31() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator releases switch"); + } + + CHIP_ERROR TestUserInteractionNeeded_32() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator operates switch again (press briefly)"); + } + + CHIP_ERROR TestUserInteractionNeeded_33() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator releases switch"); + } + + CHIP_ERROR TestUserInteractionNeeded_34() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator operates switch again (press briefly)"); + } + + CHIP_ERROR TestUserInteractionNeeded_35() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator releases switch"); + } + + CHIP_ERROR TestUserInteractionNeeded_36() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator operates switch again (press briefly)"); + } + + CHIP_ERROR TestUserInteractionNeeded_37() + { + SetIdentity(kIdentityAlpha); + return UserPrompt("Operator releases switch"); + } +}; + class Test_TC_TM_1_1 : public TestCommand { public: @@ -36216,6 +37483,215 @@ class Test_TC_DIAGTH_1_1 : public TestCommand } }; +class Test_TC_WIFIDIAG_1_1 : public TestCommand +{ +public: + Test_TC_WIFIDIAG_1_1() : TestCommand("Test_TC_WIFIDIAG_1_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + ~Test_TC_WIFIDIAG_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WIFIDIAG_1_1\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WIFIDIAG_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads CurrentMaxRate attribute from DUT\n"); + err = TestReadsCurrentMaxRateAttributeFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads CurrentMaxRate attribute constraints\n"); + err = TestReadsCurrentMaxRateAttributeConstraints_2(); + break; + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 3; + + chip::Optional mCluster; + chip::Optional mEndpoint; + + static void OnFailureCallback_1(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_1(status); + } + + static void OnSuccessCallback_1(void * context, uint64_t currentMaxRate) + { + (static_cast(context))->OnSuccessResponse_1(currentMaxRate); + } + + static void OnFailureCallback_2(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_2(status); + } + + static void OnSuccessCallback_2(void * context, uint64_t currentMaxRate) + { + (static_cast(context))->OnSuccessResponse_2(currentMaxRate); + } + + // + // Tests methods + // + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + SetIdentity(kIdentityAlpha); + return WaitForCommissionee(); + } + + CHIP_ERROR TestReadsCurrentMaxRateAttributeFromDut_1() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::WiFiNetworkDiagnosticsClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_1, OnFailureCallback_1)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_1(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_1(uint64_t currentMaxRate) + { + VerifyOrReturn(CheckValue("currentMaxRate", currentMaxRate, 0ULL)); + + NextTest(); + } + + CHIP_ERROR TestReadsCurrentMaxRateAttributeConstraints_2() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::WiFiNetworkDiagnosticsClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure( + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(EmberAfStatus status) + { + (status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : ThrowFailureResponse(); + } + + void OnSuccessResponse_2(uint64_t currentMaxRate) + { + VerifyOrReturn(CheckConstraintType("currentMaxRate", "", "uint64")); + NextTest(); + } +}; + +class Test_TC_WIFIDIAG_3_1 : public TestCommand +{ +public: + Test_TC_WIFIDIAG_3_1() : TestCommand("Test_TC_WIFIDIAG_3_1"), mTestIndex(0) + { + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + ~Test_TC_WIFIDIAG_3_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WIFIDIAG_3_1\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WIFIDIAG_3_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 1; + + chip::Optional mCluster; + chip::Optional mEndpoint; + + // + // Tests methods + // + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + SetIdentity(kIdentityAlpha); + return WaitForCommissionee(); + } +}; + class Test_TC_WNCV_1_1 : public TestCommand { public: @@ -66594,6 +68070,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -66626,6 +68103,8 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -66668,6 +68147,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -66677,6 +68157,8 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -66687,6 +68169,8 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), From 6d6d73380bccc9efb79d813c16fd49eacccc65de Mon Sep 17 00:00:00 2001 From: Narayan Mohanram Date: Thu, 20 Jan 2022 13:34:39 -0800 Subject: [PATCH 093/124] Silabs wifi - chip support for EFR32 - Using WF200 and RS911x (#13193) * EFR32+SiLabs WiFi port - using lock app * Changed Wiseconnect SDK to relative symbolic link * Moved WiFi stuff to efr32_sdk/repo/matter/wifi * added Lighting app to silabs_wifi * Silabs_wifi Lighting-app removed some junk files * Update for building with scripts/examples/gn_efr32_example.sh * Rebased to master - Fixes to AppTask.cpp+BUILD.gn * Merged Thread and WiFi apps (Lighting and Windows) into examples/xxx-app/efr32 * Updated lock-app/efr32 to include WiFi build * Fixes to ifdef's in lock-app for efr32 * Removed examples/xx-app/silabs_wifi. Merged into examples/xx-app/efr32 * updated build-script for efr32 to use wifi * WiFi fixes to initialize RS911X for EFR32 * Update for WiFi port to sync with SiLabs work * WiFi - Added saving SSID/PSK/Security * Cleaned up comments in BUILD.gn * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Restyled by shellharden * Restyled by shfmt * Restyled by clang-format * include file reference was changed to * Added WF200 files and changed Defines to match master * Fixed issue with build script that does not handle ARG3/4 Co-authored-by: Restyled.io --- .github/workflows/examples-efr32.yaml | 2 +- config/efr32/toolchain/BUILD.gn | 6 + examples/lighting-app/efr32/BUILD.gn | 110 +++- .../efr32/build_for_wifi_args.gni | 22 + .../efr32/build_for_wifi_gnfile.gn | 28 + .../lighting-app/efr32/include/AppConfig.h | 2 +- .../efr32/include/FreeRTOSConfig.h | 4 + examples/lighting-app/efr32/src/AppTask.cpp | 60 ++- examples/lighting-app/efr32/src/main.cpp | 23 +- examples/lighting-app/efr32/with_pw_rpc.gni | 1 - examples/lock-app/efr32/BUILD.gn | 108 +++- .../lock-app/efr32/build_for_wifi_args.gni | 22 + .../lock-app/efr32/build_for_wifi_gnfile.gn | 28 + examples/lock-app/efr32/include/AppConfig.h | 2 +- examples/lock-app/efr32/src/AppTask.cpp | 57 +- examples/lock-app/efr32/src/main.cpp | 13 +- examples/platform/efr32/uart.cpp | 8 +- .../window-app/common/include/WindowApp.h | 9 +- examples/window-app/common/src/WindowApp.cpp | 16 +- examples/window-app/efr32/BUILD.gn | 115 ++++- .../window-app/efr32/build_for_wifi_args.gni | 22 + .../window-app/efr32/build_for_wifi_gnfile.gn | 28 + .../window-app/efr32/src/WindowAppImpl.cpp | 38 +- examples/window-app/efr32/src/main.cpp | 17 +- scripts/examples/gn_efr32_example.sh | 85 ++- src/lwip/efr32/lwipopts-rs911x.h | 203 ++++++++ src/lwip/efr32/lwipopts-thread.h | 182 +++++++ src/lwip/efr32/lwipopts-wf200.h | 203 ++++++++ src/lwip/efr32/lwipopts.h | 185 +------ src/platform/EFR32/BUILD.gn | 8 +- src/platform/EFR32/CHIPDevicePlatformConfig.h | 11 +- src/platform/EFR32/CHIPDevicePlatformEvent.h | 41 +- .../EFR32/ConfigurationManagerImpl.cpp | 20 + src/platform/EFR32/ConfigurationManagerImpl.h | 2 + src/platform/EFR32/ConnectivityManagerImpl.h | 95 ++++ .../EFR32/ConnectivityManagerImpl_WIFI.cpp | 485 ++++++++++++++++++ .../DeviceNetworkProvisioningDelegateImpl.cpp | 19 + .../DeviceNetworkProvisioningDelegateImpl.h | 4 + .../EFR32/DiagnosticDataProviderImpl.cpp | 8 +- src/platform/EFR32/EFR32Config.h | 7 +- src/platform/EFR32/InetPlatformConfig.h | 15 +- src/platform/EFR32/PlatformManagerImpl.cpp | 68 +++ src/platform/EFR32/PlatformManagerImpl.h | 6 + src/platform/EFR32/ServiceProvisioning.cpp | 56 ++ src/platform/EFR32/ServiceProvisioning.h | 25 + src/platform/EFR32/wifi_args.gni | 46 ++ third_party/efr32_sdk/efr32_sdk.gni | 23 + third_party/wiseconnect-wifi-bt-sdk | 1 + 48 files changed, 2230 insertions(+), 309 deletions(-) create mode 100644 examples/lighting-app/efr32/build_for_wifi_args.gni create mode 100644 examples/lighting-app/efr32/build_for_wifi_gnfile.gn create mode 100644 examples/lock-app/efr32/build_for_wifi_args.gni create mode 100644 examples/lock-app/efr32/build_for_wifi_gnfile.gn create mode 100644 examples/window-app/efr32/build_for_wifi_args.gni create mode 100644 examples/window-app/efr32/build_for_wifi_gnfile.gn create mode 100644 src/lwip/efr32/lwipopts-rs911x.h create mode 100644 src/lwip/efr32/lwipopts-thread.h create mode 100644 src/lwip/efr32/lwipopts-wf200.h create mode 100644 src/platform/EFR32/ConnectivityManagerImpl_WIFI.cpp create mode 100644 src/platform/EFR32/ServiceProvisioning.cpp create mode 100644 src/platform/EFR32/ServiceProvisioning.h create mode 100644 src/platform/EFR32/wifi_args.gni create mode 120000 third_party/wiseconnect-wifi-bt-sdk diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index cebd9102383422..88818ec8693c55 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -82,7 +82,7 @@ jobs: timeout-minutes: 10 run: | scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/lighting_app_debug_rpc BRD4161A \ - -args='import("//with_pw_rpc.gni")' + 'import("//with_pw_rpc.gni")' .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+rpc lighting-app \ out/lighting_app_debug_rpc/BRD4161A/chip-efr32-lighting-example.out /tmp/bloat_reports/ - name: Build example EFR32 Window Covering for BRD4161A diff --git a/config/efr32/toolchain/BUILD.gn b/config/efr32/toolchain/BUILD.gn index 76747ede876a5c..8f448eb44838b9 100644 --- a/config/efr32/toolchain/BUILD.gn +++ b/config/efr32/toolchain/BUILD.gn @@ -37,3 +37,9 @@ arm_toolchain("efr32_window_app") { import("${chip_root}/examples/window-app/efr32/args.gni") } } +arm_toolchain("rs911x_lock_app") { + toolchain_args = { + current_os = "freertos" + import("${chip_root}/examples/lock-app/rs911x/args.gni") + } +} diff --git a/examples/lighting-app/efr32/BUILD.gn b/examples/lighting-app/efr32/BUILD.gn index a248836a3f7efa..b9bbca9a8dc80f 100644 --- a/examples/lighting-app/efr32/BUILD.gn +++ b/examples/lighting-app/efr32/BUILD.gn @@ -44,6 +44,13 @@ declare_args() { # Monitor & log memory usage at runtime. enable_heap_monitoring = false + + # Wifi related stuff - they are overriden by gn -args="use_wf200=true" + use_wf200 = false + use_rs911x = false + use_rs911x_sockets = false + sl_wfx_config_softap = false + sl_wfx_config_scan = false } show_qr_code = true @@ -52,6 +59,26 @@ show_qr_code = true if (efr32_board == "BRD4166A" || efr32_board == "BRD4180A") { show_qr_code = false } +if (use_rs911x || use_wf200) { + wifi_sdk_dir = "${chip_root}/third_party/efr32_sdk/repo/matter/wifi" + if (use_rs911x) { + wiseconnect_sdk_root = "${chip_root}/third_party/wiseconnect-wifi-bt-sdk" + import("${wifi_sdk_dir}/rs911x/rs911x.gni") + } else { + import("${wifi_sdk_dir}/wf200/wf200.gni") + } +} +efr32_lwip_defs = [ "LWIP_NETIF_API=1" ] +if (use_rs911x || use_wf200) { + efr32_lwip_defs += [ + "LWIP_IPV4=1", + "LWIP_ARP=1", + "LWIP_ICMP=1", + "LWIP_DHCP=1", + "LWIP_IPV6_ND=1", + "LWIP_IGMP=1", + ] +} efr32_sdk("sdk") { sources = [ @@ -63,6 +90,7 @@ efr32_sdk("sdk") { "${chip_root}/src/platform/EFR32", "${efr32_project_dir}/include", "${examples_plat_dir}", + "${chip_root}/src/lib", ] defines = [ @@ -77,10 +105,36 @@ efr32_sdk("sdk") { "PW_RPC_ENABLED", ] } + if (use_rs911x) { + defines += rs911x_defs + include_dirs += rs911x_plat_incs + } else if (use_wf200) { + defines += wf200_defs + include_dirs += wf200_plat_incs + } else { + defines += [ "SL_HEAP_SIZE=20480" ] + } + if (use_rs911x_sockets) { + include_dirs += [ "${examples_plat_dir}/wifi/rsi-sockets" ] + defines += rs911x_sock_defs + } else { + # Using LWIP instead of the native TCP/IP stack + # Thread also uses LWIP + # + defines += efr32_lwip_defs + } + if (sl_wfx_config_softap) { + defines += "SL_WFX_CONFIG_SOFTAP" + } + if (sl_wfx_config_scan) { + defines += "SL_WFX_CONFIG_SCAN" + } } efr32_executable("lighting_app") { output_name = "chip-efr32-lighting-example.out" + include_dirs = [ "include" ] + defines = [] sources = [ "${examples_plat_dir}/LEDWidget.cpp", @@ -99,26 +153,50 @@ efr32_executable("lighting_app") { "${chip_root}/examples/lighting-app/lighting-common", "${chip_root}/src/lib", "${chip_root}/src/setup_payload", - "${chip_root}/third_party/openthread/platforms:libopenthread-platform", - "${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils", - "${examples_plat_dir}:efr-matter-shell", ] - - if (chip_openthread_ftd) { - deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd", - "${chip_root}/third_party/openthread/repo:libopenthread-ftd", - ] - } else { + if (!use_rs911x && !use_wf200) { deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd", - "${chip_root}/third_party/openthread/repo:libopenthread-mtd", + "${chip_root}/third_party/openthread/platforms:libopenthread-platform", + "${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils", + "${examples_plat_dir}:efr-matter-shell", ] + if (chip_openthread_ftd) { + deps += [ + "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd", + "${chip_root}/third_party/openthread/repo:libopenthread-ftd", + ] + } else { + deps += [ + "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd", + "${chip_root}/third_party/openthread/repo:libopenthread-mtd", + ] + } + } + if (use_rs911x) { + sources += rs911x_src_plat + + # All the stuff from wiseconnect + sources += rs911x_src_sapi + + # Apparently - the rsi library needs this (though we may not use use it) + sources += rs911x_src_sock + include_dirs += rs911x_inc_plat + + if (use_rs911x_sockets) { + # + # Using native sockets inside RS911x + # + include_dirs += rs911x_sock_inc + } else { + # + # We use LWIP - not built-in sockets + # + sources += rs911x_src_lwip + } + } else if (use_wf200) { + sources += wf200_plat_src + include_dirs += wf200_plat_incs } - - include_dirs = [ "include" ] - - defines = [] if (show_qr_code) { sources += [ "${examples_plat_dir}/display/lcd.c" ] diff --git a/examples/lighting-app/efr32/build_for_wifi_args.gni b/examples/lighting-app/efr32/build_for_wifi_args.gni new file mode 100644 index 00000000000000..04529fddd2076a --- /dev/null +++ b/examples/lighting-app/efr32/build_for_wifi_args.gni @@ -0,0 +1,22 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//build_overrides/chip.gni") +import("//build_overrides/pigweed.gni") + +efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") +chip_enable_openthread = false +import("${chip_root}/src/platform/EFR32/wifi_args.gni") + +pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" +pw_assert_BACKEND = "$dir_pw_assert_log" diff --git a/examples/lighting-app/efr32/build_for_wifi_gnfile.gn b/examples/lighting-app/efr32/build_for_wifi_gnfile.gn new file mode 100644 index 00000000000000..9752ee73e7c91d --- /dev/null +++ b/examples/lighting-app/efr32/build_for_wifi_gnfile.gn @@ -0,0 +1,28 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + use_thread = false + import("//build_for_wifi_args.gni") +} diff --git a/examples/lighting-app/efr32/include/AppConfig.h b/examples/lighting-app/efr32/include/AppConfig.h index efe17b3b39288f..91501d889a6234 100644 --- a/examples/lighting-app/efr32/include/AppConfig.h +++ b/examples/lighting-app/efr32/include/AppConfig.h @@ -21,7 +21,7 @@ // ---- Lighting Example App Config ---- -#define APP_TASK_NAME "APP" +#define APP_TASK_NAME "Lit" // Time it takes in ms for the simulated actuator to move from one // state to another. diff --git a/examples/lighting-app/efr32/include/FreeRTOSConfig.h b/examples/lighting-app/efr32/include/FreeRTOSConfig.h index 3d241f9a24ce0e..17bc3975fe19af 100644 --- a/examples/lighting-app/efr32/include/FreeRTOSConfig.h +++ b/examples/lighting-app/efr32/include/FreeRTOSConfig.h @@ -237,7 +237,11 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ #define configENABLE_BACKWARD_COMPATIBILITY (1) #define configSUPPORT_STATIC_ALLOCATION (1) #define configSUPPORT_DYNAMIC_ALLOCATION (1) +#ifdef SL_WIFI +#define configTOTAL_HEAP_SIZE ((size_t)(28 * 1024)) +#else #define configTOTAL_HEAP_SIZE ((size_t)(20 * 1024)) +#endif /* Optional functions - most linkers will remove unused functions anyway. */ #define INCLUDE_vTaskPrioritySet (1) diff --git a/examples/lighting-app/efr32/src/AppTask.cpp b/examples/lighting-app/efr32/src/AppTask.cpp index 778acda0bd3fc9..acdf7f8c78ea4d 100644 --- a/examples/lighting-app/efr32/src/AppTask.cpp +++ b/examples/lighting-app/efr32/src/AppTask.cpp @@ -51,6 +51,9 @@ #include #include #endif +#ifdef SL_WIFI +#include "wfx_host_events.h" +#endif /* SL_WIFI */ #define FACTORY_RESET_TRIGGER_TIMEOUT 3000 #define FACTORY_RESET_CANCEL_WINDOW_TIMEOUT 3000 @@ -73,9 +76,17 @@ QueueHandle_t sAppEventQueue; LEDWidget sStatusLED; LEDWidget sLightLED; +#ifdef SL_WIFI +bool sIsWiFiProvisioned = false; +bool sIsWiFiEnabled = false; +bool sIsWiFiAttached = false; +#endif /* SL_WIFI */ + +#if CHIP_ENABLE_OPENTHREAD bool sIsThreadProvisioned = false; bool sIsThreadEnabled = false; -bool sHaveBLEConnections = false; +#endif /* CHIP_ENABLE_OPENTHREAD */ +bool sHaveBLEConnections = false; EmberAfIdentifyEffectIdentifier sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; @@ -88,6 +99,7 @@ StaticTask_t appTaskStruct; /********************************************************** * Identify Callbacks *********************************************************/ + namespace { void OnTriggerIdentifyEffectCompleted(chip::System::Layer * systemLayer, void * appState) { @@ -208,6 +220,18 @@ CHIP_ERROR AppTask::Init() { CHIP_ERROR err = CHIP_NO_ERROR; +#ifdef SL_WIFI + /* + * Wait for the WiFi to be initialized + */ + EFR32_LOG("APP: Wait WiFi Init"); + while (!wfx_hw_ready()) + { + vTaskDelay(10); + } + EFR32_LOG("APP: Done WiFi Init"); + /* We will init server when we get IP */ +#endif // Init ZCL Data Model chip::Server::GetInstance().Init(); @@ -294,9 +318,16 @@ void AppTask::AppTaskMain(void * pvParameter) // when the CHIP task is busy (e.g. with a long crypto operation). if (PlatformMgr().TryLockChipStack()) { +#ifdef SL_WIFI + sIsWiFiProvisioned = ConnectivityMgr().IsWiFiStationProvisioned(); + sIsWiFiEnabled = ConnectivityMgr().IsWiFiStationEnabled(); + sIsWiFiAttached = ConnectivityMgr().IsWiFiStationConnected(); +#endif /* SL_WIFI */ +#if CHIP_ENABLE_OPENTHREAD sIsThreadProvisioned = ConnectivityMgr().IsThreadProvisioned(); sIsThreadEnabled = ConnectivityMgr().IsThreadEnabled(); - sHaveBLEConnections = (ConnectivityMgr().NumBLEConnections() != 0); +#endif /* CHIP_ENABLE_OPENTHREAD */ + sHaveBLEConnections = (ConnectivityMgr().NumBLEConnections() != 0); PlatformMgr().UnlockChipStack(); } @@ -333,18 +364,16 @@ void AppTask::AppTaskMain(void * pvParameter) sStatusLED.Blink(300, 700); } } - else if (sIsThreadProvisioned && sIsThreadEnabled) +#if CHIP_ENABLE_OPENTHREAD + if (sIsThreadProvisioned && sIsThreadEnabled) +#else + if (sIsWiFiProvisioned && sIsWiFiEnabled && !sIsWiFiAttached) +#endif { sStatusLED.Blink(950, 50); } - else if (sHaveBLEConnections) - { - sStatusLED.Blink(100, 100); - } - else - { - sStatusLED.Blink(50, 950); - } + else if (sHaveBLEConnections) { sStatusLED.Blink(100, 100); } + else { sStatusLED.Blink(50, 950); } } sStatusLED.Animate(); @@ -484,16 +513,17 @@ void AppTask::FunctionHandler(AppEvent * aEvent) sAppTask.CancelTimer(); sAppTask.mFunction = kFunction_NoneSelected; +#ifdef SL_WIFI + if (!ConnectivityMgr().IsWiFiStationProvisioned()) +#else if (!ConnectivityMgr().IsThreadProvisioned()) +#endif /* !SL_WIFI */ { // Enable BLE advertisements ConnectivityMgr().SetBLEAdvertisingEnabled(true); ConnectivityMgr().SetBLEAdvertisingMode(ConnectivityMgr().kFastAdvertising); } - else - { - EFR32_LOG("Network is already provisioned, Ble advertissement not enabled"); - } + else { EFR32_LOG("Network is already provisioned, Ble advertissement not enabled"); } } else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_FactoryReset) { diff --git a/examples/lighting-app/efr32/src/main.cpp b/examples/lighting-app/efr32/src/main.cpp index 943f0993a7af35..297601ac6f8670 100644 --- a/examples/lighting-app/efr32/src/main.cpp +++ b/examples/lighting-app/efr32/src/main.cpp @@ -48,8 +48,8 @@ #include "lcd.h" #endif -#if CHIP_ENABLE_OPENTHREAD #include +#if CHIP_ENABLE_OPENTHREAD #include #include #include @@ -62,6 +62,10 @@ #include #endif // CHIP_ENABLE_OPENTHREAD +#if defined(RS911X_WIFI) || defined(WF200_WIFI) +#include "wfx_host_events.h" +#endif /* RS911X_WIFI */ + #if PW_RPC_ENABLED #include "Rpc.h" #endif @@ -70,6 +74,7 @@ #include "matter_shell.h" #endif +#define BLE_DEV_NAME "SiLabs-Light" using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::DeviceLayer; @@ -135,7 +140,7 @@ int main(void) EFR32_LOG("PlatformMgr().InitChipStack() failed"); appError(ret); } - chip::DeviceLayer::ConnectivityMgr().SetBLEDeviceName("EFR32_LIGHT"); + chip::DeviceLayer::ConnectivityMgr().SetBLEDeviceName(BLE_DEV_NAME); #if CHIP_ENABLE_OPENTHREAD EFR32_LOG("Initializing OpenThread stack"); ret = ThreadStackMgr().InitThreadStack(); @@ -160,6 +165,13 @@ int main(void) EFR32_LOG("PlatformMgr().StartEventLoopTask() failed"); appError(ret); } +#ifdef WF200_WIFI + // Start wfx bus communication task. + wfx_bus_start(); +#ifdef SL_WFX_USE_SECURE_LINK + wfx_securelink_task_start(); // start securelink key renegotiation task +#endif // SL_WFX_USE_SECURE_LINK +#endif /* WF200_WIFI */ #if CHIP_ENABLE_OPENTHREAD EFR32_LOG("Starting OpenThread task"); @@ -172,6 +184,13 @@ int main(void) appError(ret); } #endif // CHIP_ENABLE_OPENTHREAD +#ifdef RS911X_WIFI + /* + * Start up any RSI interface stuff + * (Not required) - Note that wfx_wifi_start will deal with + * starting up a rsi task - which will initialize the SPI interface. + */ +#endif EFR32_LOG("Starting App Task"); ret = GetAppTask().StartAppTask(); diff --git a/examples/lighting-app/efr32/with_pw_rpc.gni b/examples/lighting-app/efr32/with_pw_rpc.gni index d0a8f2c0485f06..3922567d5b071a 100644 --- a/examples/lighting-app/efr32/with_pw_rpc.gni +++ b/examples/lighting-app/efr32/with_pw_rpc.gni @@ -23,6 +23,5 @@ efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_pw_rpc = true chip_enable_openthread = true -chip_openthread_ftd = true cpp_standard = "gnu++17" diff --git a/examples/lock-app/efr32/BUILD.gn b/examples/lock-app/efr32/BUILD.gn index 534ce5343e2dde..7dcc8802659fdc 100644 --- a/examples/lock-app/efr32/BUILD.gn +++ b/examples/lock-app/efr32/BUILD.gn @@ -43,6 +43,13 @@ declare_args() { # Monitor & log memory usage at runtime. enable_heap_monitoring = false + + # Wifi related stuff - they are overriden by gn -args="use_wf200=true" + use_wf200 = false + use_rs911x = false + use_rs911x_sockets = false + sl_wfx_config_softap = false + sl_wfx_config_scan = false } show_qr_code = true @@ -51,6 +58,26 @@ show_qr_code = true if (efr32_board == "BRD4166A" || efr32_board == "BRD4180A") { show_qr_code = false } +if (use_rs911x || use_wf200) { + wifi_sdk_dir = "${chip_root}/third_party/efr32_sdk/repo/matter/wifi" + if (use_rs911x) { + wiseconnect_sdk_root = "${chip_root}/third_party/wiseconnect-wifi-bt-sdk" + import("${wifi_sdk_dir}/rs911x/rs911x.gni") + } else { + import("${wifi_sdk_dir}/wf200/wf200.gni") + } +} +efr32_lwip_defs = [ "LWIP_NETIF_API=1" ] +if (use_rs911x || use_wf200) { + efr32_lwip_defs += [ + "LWIP_IPV4=1", + "LWIP_ARP=1", + "LWIP_ICMP=1", + "LWIP_DHCP=1", + "LWIP_IPV6_ND=1", + "LWIP_IGMP=1", + ] +} efr32_sdk("sdk") { sources = [ @@ -62,6 +89,7 @@ efr32_sdk("sdk") { "${chip_root}/src/platform/EFR32", "${efr32_project_dir}/include", "${examples_plat_dir}", + "${chip_root}/src/lib", ] defines = [ @@ -75,10 +103,37 @@ efr32_sdk("sdk") { "PW_RPC_ENABLED", ] } + if (use_rs911x) { + defines += rs911x_defs + include_dirs += rs911x_plat_incs + } else if (use_wf200) { + defines += wf200_defs + include_dirs += wf200_plat_incs + } else { + defines += [ "SL_HEAP_SIZE=20480" ] + } + if (use_rs911x_sockets) { + include_dirs += [ "${examples_plat_dir}/wifi/rsi-sockets" ] + defines += rs911x_sock_defs + } else { + # Using LWIP instead of the native TCP/IP stack + # Thread also uses LWIP + # + defines += efr32_lwip_defs + } + if (sl_wfx_config_softap) { + defines += "SL_WFX_CONFIG_SOFTAP" + } + if (sl_wfx_config_scan) { + defines += "SL_WFX_CONFIG_SCAN" + } } efr32_executable("lock_app") { output_name = "chip-efr32-lock-example.out" + include_dirs = [ "include" ] + + defines = [] sources = [ "${examples_plat_dir}/LEDWidget.cpp", @@ -101,22 +156,49 @@ efr32_executable("lock_app") { "${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils", "${examples_plat_dir}:efr-matter-shell", ] - - if (chip_openthread_ftd) { - deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd", - "${chip_root}/third_party/openthread/repo:libopenthread-ftd", - ] - } else { + if (!use_rs911x && !use_wf200) { deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd", - "${chip_root}/third_party/openthread/repo:libopenthread-mtd", + "${chip_root}/third_party/openthread/platforms:libopenthread-platform", + "${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils", + "${examples_plat_dir}:efr-matter-shell", ] + if (chip_openthread_ftd) { + deps += [ + "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd", + "${chip_root}/third_party/openthread/repo:libopenthread-ftd", + ] + } else { + deps += [ + "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd", + "${chip_root}/third_party/openthread/repo:libopenthread-mtd", + ] + } + } + if (use_rs911x) { + sources += rs911x_src_plat + + # All the stuff from wiseconnect + sources += rs911x_src_sapi + + # Apparently - the rsi library needs this (though we may not use use it) + sources += rs911x_src_sock + include_dirs += rs911x_inc_plat + + if (use_rs911x_sockets) { + # + # Using native sockets inside RS911x + # + include_dirs += rs911x_sock_inc + } else { + # + # We use LWIP - not built-in sockets + # + sources += rs911x_src_lwip + } + } else if (use_wf200) { + sources += wf200_plat_src + include_dirs += wf200_plat_incs } - - include_dirs = [ "include" ] - - defines = [] if (show_qr_code) { sources += [ "${examples_plat_dir}/display/lcd.c" ] diff --git a/examples/lock-app/efr32/build_for_wifi_args.gni b/examples/lock-app/efr32/build_for_wifi_args.gni new file mode 100644 index 00000000000000..04529fddd2076a --- /dev/null +++ b/examples/lock-app/efr32/build_for_wifi_args.gni @@ -0,0 +1,22 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//build_overrides/chip.gni") +import("//build_overrides/pigweed.gni") + +efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") +chip_enable_openthread = false +import("${chip_root}/src/platform/EFR32/wifi_args.gni") + +pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" +pw_assert_BACKEND = "$dir_pw_assert_log" diff --git a/examples/lock-app/efr32/build_for_wifi_gnfile.gn b/examples/lock-app/efr32/build_for_wifi_gnfile.gn new file mode 100644 index 00000000000000..9752ee73e7c91d --- /dev/null +++ b/examples/lock-app/efr32/build_for_wifi_gnfile.gn @@ -0,0 +1,28 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + use_thread = false + import("//build_for_wifi_args.gni") +} diff --git a/examples/lock-app/efr32/include/AppConfig.h b/examples/lock-app/efr32/include/AppConfig.h index 77223889639fb1..84b588c4997970 100644 --- a/examples/lock-app/efr32/include/AppConfig.h +++ b/examples/lock-app/efr32/include/AppConfig.h @@ -21,7 +21,7 @@ // ---- Lock Example App Config ---- -#define APP_TASK_NAME "APP" +#define APP_TASK_NAME "Lck" // Time it takes in ms for the simulated actuator to move from one // state to another. diff --git a/examples/lock-app/efr32/src/AppTask.cpp b/examples/lock-app/efr32/src/AppTask.cpp index 0a67f008a94317..a02b834ca0e9eb 100644 --- a/examples/lock-app/efr32/src/AppTask.cpp +++ b/examples/lock-app/efr32/src/AppTask.cpp @@ -47,6 +47,9 @@ #include #include #endif +#ifdef SL_WIFI +#include "wfx_host_events.h" +#endif #define FACTORY_RESET_TRIGGER_TIMEOUT 3000 #define FACTORY_RESET_CANCEL_WINDOW_TIMEOUT 3000 @@ -68,9 +71,17 @@ QueueHandle_t sAppEventQueue; LEDWidget sStatusLED; LEDWidget sLockLED; +#ifdef SL_WIFI +bool sIsWiFiProvisioned = false; +bool sIsWiFiEnabled = false; +bool sIsWiFiAttached = false; +#endif + +#if CHIP_ENABLE_OPENTHREAD bool sIsThreadProvisioned = false; bool sIsThreadEnabled = false; -bool sHaveBLEConnections = false; +#endif +bool sHaveBLEConnections = false; StackType_t appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)]; StaticTask_t appTaskStruct; @@ -98,6 +109,18 @@ CHIP_ERROR AppTask::StartAppTask() CHIP_ERROR AppTask::Init() { +#ifdef SL_WIFI + /* + * Wait for the WiFi to be initialized + */ + EFR32_LOG("APP: Wait WiFi Init"); + while (!wfx_hw_ready()) + { + vTaskDelay(10); + } + EFR32_LOG("APP: Done WiFi Init"); + /* We will init server when we get IP */ +#endif // Init ZCL Data Model chip::Server::GetInstance().Init(); @@ -185,9 +208,16 @@ void AppTask::AppTaskMain(void * pvParameter) // when the CHIP task is busy (e.g. with a long crypto operation). if (PlatformMgr().TryLockChipStack()) { +#ifdef SL_WIFI + sIsWiFiProvisioned = ConnectivityMgr().IsWiFiStationProvisioned(); + sIsWiFiEnabled = ConnectivityMgr().IsWiFiStationEnabled(); + sIsWiFiAttached = ConnectivityMgr().IsWiFiStationConnected(); +#endif +#if CHIP_ENABLE_OPENTHREAD sIsThreadProvisioned = ConnectivityMgr().IsThreadProvisioned(); sIsThreadEnabled = ConnectivityMgr().IsThreadEnabled(); - sHaveBLEConnections = (ConnectivityMgr().NumBLEConnections() != 0); +#endif + sHaveBLEConnections = (ConnectivityMgr().NumBLEConnections() != 0); PlatformMgr().UnlockChipStack(); } @@ -205,18 +235,16 @@ void AppTask::AppTaskMain(void * pvParameter) // Otherwise, blink the LED ON for a very short time. if (sAppTask.mFunction != kFunction_FactoryReset) { +#if CHIP_ENABLE_OPENTHREAD if (sIsThreadProvisioned && sIsThreadEnabled) +#else + if (sIsWiFiProvisioned && sIsWiFiEnabled && !sIsWiFiAttached) +#endif { sStatusLED.Blink(950, 50); } - else if (sHaveBLEConnections) - { - sStatusLED.Blink(100, 100); - } - else - { - sStatusLED.Blink(50, 950); - } + else if (sHaveBLEConnections) { sStatusLED.Blink(100, 100); } + else { sStatusLED.Blink(50, 950); } } sStatusLED.Animate(); @@ -356,16 +384,17 @@ void AppTask::FunctionHandler(AppEvent * aEvent) sAppTask.CancelTimer(); sAppTask.mFunction = kFunction_NoneSelected; +#ifdef SL_WIFI + if (!ConnectivityMgr().IsWiFiStationProvisioned()) +#else if (!ConnectivityMgr().IsThreadProvisioned()) +#endif { // Enable BLE advertisements ConnectivityMgr().SetBLEAdvertisingEnabled(true); ConnectivityMgr().SetBLEAdvertisingMode(ConnectivityMgr().kFastAdvertising); } - else - { - EFR32_LOG("Network is already provisioned, Ble advertissement not enabled"); - } + else { EFR32_LOG("Network is already provisioned, Ble advertissement not enabled"); } } else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_FactoryReset) { diff --git a/examples/lock-app/efr32/src/main.cpp b/examples/lock-app/efr32/src/main.cpp index c92b9e71c8b7d5..7e25365142199d 100644 --- a/examples/lock-app/efr32/src/main.cpp +++ b/examples/lock-app/efr32/src/main.cpp @@ -56,8 +56,8 @@ #include "matter_shell.h" #endif -#if CHIP_ENABLE_OPENTHREAD #include +#if CHIP_ENABLE_OPENTHREAD #include #include #include @@ -70,6 +70,10 @@ #include #endif // CHIP_ENABLE_OPENTHREAD +#if defined(RS911X_WIFI) || defined(WF200_WIFI) +#include "wfx_host_events.h" +#endif /* RS911X_WIFI */ + using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::DeviceLayer; @@ -169,6 +173,13 @@ int main(void) appError(ret); } #endif // CHIP_ENABLE_OPENTHREAD +#ifdef WF200_WIFI + // Start wfx bus communication task. + wfx_bus_start(); +#ifdef SL_WFX_USE_SECURE_LINK + wfx_securelink_task_start(); // start securelink key renegotiation task +#endif // SL_WFX_USE_SECURE_LINK +#endif /* WF200_WIFI */ EFR32_LOG("Starting App Task"); ret = GetAppTask().StartAppTask(); diff --git a/examples/platform/efr32/uart.cpp b/examples/platform/efr32/uart.cpp index 9d3cbc2b1d966d..8d384a9ac657b4 100644 --- a/examples/platform/efr32/uart.cpp +++ b/examples/platform/efr32/uart.cpp @@ -200,7 +200,9 @@ void USART_IRQHandler(void) #ifdef ENABLE_CHIP_SHELL chip::NotifyShellProcessFromISR(); #endif -#ifndef PW_RPC_ENABLED +#if defined(SL_WIFI) + /* TODO */ +#elif !defined(PW_RPC_ENABLED) otSysEventSignalPending(); #endif } @@ -224,7 +226,9 @@ static void UART_rx_callback(UARTDRV_Handle_t handle, Ecode_t transferStatus, ui #ifdef ENABLE_CHIP_SHELL chip::NotifyShellProcessFromISR(); #endif -#ifndef PW_RPC_ENABLED +#if defined(SL_WIFI) + /* TODO */ +#elif !defined(PW_RPC_ENABLED) otSysEventSignalPending(); #endif } diff --git a/examples/window-app/common/include/WindowApp.h b/examples/window-app/common/include/WindowApp.h index e8184e21103b40..f5dc1f582ba35a 100644 --- a/examples/window-app/common/include/WindowApp.h +++ b/examples/window-app/common/include/WindowApp.h @@ -135,10 +135,15 @@ class WindowApp protected: struct StateFlags { +#if CHIP_ENABLE_OPENTHREAD bool isThreadProvisioned = false; bool isThreadEnabled = false; - bool haveBLEConnections = false; - bool isWinking = false; +#else + bool isWiFiProvisioned = false; + bool isWiFiEnabled = false; +#endif + bool haveBLEConnections = false; + bool isWinking = false; }; Cover & GetCover(); diff --git a/examples/window-app/common/src/WindowApp.cpp b/examples/window-app/common/src/WindowApp.cpp index 813ad816a156ad..d69e128257e9f2 100644 --- a/examples/window-app/common/src/WindowApp.cpp +++ b/examples/window-app/common/src/WindowApp.cpp @@ -138,8 +138,11 @@ CHIP_ERROR WindowApp::Run() { StateFlags oldState; +#if CHIP_ENABLE_OPENTHREAD oldState.isThreadProvisioned = !ConnectivityMgr().IsThreadProvisioned(); - +#else + oldState.isWiFiProvisioned = !ConnectivityMgr().IsWiFiStationProvisioned(); +#endif while (true) { ProcessEvents(); @@ -151,13 +154,22 @@ CHIP_ERROR WindowApp::Run() // when the CHIP task is busy (e.g. with a long crypto operation). if (PlatformMgr().TryLockChipStack()) { +#if CHIP_ENABLE_OPENTHREAD mState.isThreadProvisioned = ConnectivityMgr().IsThreadProvisioned(); mState.isThreadEnabled = ConnectivityMgr().IsThreadEnabled(); - mState.haveBLEConnections = (ConnectivityMgr().NumBLEConnections() != 0); +#else + mState.isWiFiProvisioned = ConnectivityMgr().IsWiFiStationProvisioned(); + mState.isWiFiEnabled = ConnectivityMgr().IsWiFiStationEnabled(); +#endif + mState.haveBLEConnections = (ConnectivityMgr().NumBLEConnections() != 0); PlatformMgr().UnlockChipStack(); } +#if CHIP_ENABLE_OPENTHREAD if (mState.isThreadProvisioned != oldState.isThreadProvisioned) +#else + if (mState.isWiFiProvisioned != oldState.isWiFiProvisioned) +#endif { // Provisioned state changed DispatchEvent(EventId::ProvisionedStateChanged); diff --git a/examples/window-app/efr32/BUILD.gn b/examples/window-app/efr32/BUILD.gn index 40bf9abe5f4545..2f3c814e4a83cb 100644 --- a/examples/window-app/efr32/BUILD.gn +++ b/examples/window-app/efr32/BUILD.gn @@ -37,6 +37,13 @@ declare_args() { # Monitor & log memory usage at runtime. enable_heap_monitoring = false + + # Wifi related stuff - they are overriden by gn -args="use_wf200=true" + use_wf200 = false + use_rs911x = false + use_rs911x_sockets = false + sl_wfx_config_softap = false + sl_wfx_config_scan = false } show_qr_code = true @@ -45,6 +52,26 @@ show_qr_code = true if (efr32_board == "BRD4166A" || efr32_board == "BRD4180A") { show_qr_code = false } +if (use_rs911x || use_wf200) { + wifi_sdk_dir = "${chip_root}/third_party/efr32_sdk/repo/matter/wifi" + if (use_rs911x) { + wiseconnect_sdk_root = "${chip_root}/third_party/wiseconnect-wifi-bt-sdk" + import("${wifi_sdk_dir}/rs911x/rs911x.gni") + } else { + import("${wifi_sdk_dir}/wf200/wf200.gni") + } +} +efr32_lwip_defs = [ "LWIP_NETIF_API=1" ] +if (use_rs911x || use_wf200) { + efr32_lwip_defs += [ + "LWIP_IPV4=1", + "LWIP_ARP=1", + "LWIP_ICMP=1", + "LWIP_DHCP=1", + "LWIP_IPV6_ND=1", + "LWIP_IGMP=1", + ] +} efr32_sdk("sdk") { sources = [ @@ -56,17 +83,47 @@ efr32_sdk("sdk") { "${chip_root}/src/platform/EFR32", "${efr32_project_dir}/include", "${examples_plat_dir}", + "${chip_root}/src/lib", ] defines = [ "BOARD_ID=${efr32_board}", "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setupPinCode}", ] + if (use_rs911x) { + defines += rs911x_defs + include_dirs += rs911x_plat_incs + } else if (use_wf200) { + defines += wf200_defs + include_dirs += wf200_plat_incs + } else { + defines += [ "SL_HEAP_SIZE=20480" ] + } + if (use_rs911x_sockets) { + include_dirs += [ "${examples_plat_dir}/wifi/rsi-sockets" ] + defines += rs911x_sock_defs + } else { + # Using LWIP instead of the native TCP/IP stack + # Thread also uses LWIP + # + defines += efr32_lwip_defs + } + if (sl_wfx_config_softap) { + defines += "SL_WFX_CONFIG_SOFTAP" + } + if (sl_wfx_config_scan) { + defines += "SL_WFX_CONFIG_SCAN" + } } efr32_executable("window_app") { output_name = "chip-efr32-window-example.out" output_dir = root_out_dir + include_dirs = [ + "include", + "${project_dir}/common/include", + ] + defines = [] sources = [ "${examples_plat_dir}/LEDWidget.cpp", @@ -79,36 +136,58 @@ efr32_executable("window_app") { "src/main.cpp", ] + if (use_rs911x) { + sources += rs911x_src_plat + + # All the stuff from wiseconnect + sources += rs911x_src_sapi + + # Apparently - the rsi library needs this (though we may not use use it) + sources += rs911x_src_sock + include_dirs += rs911x_inc_plat + + if (use_rs911x_sockets) { + # + # Using native sockets inside RS911x + # + include_dirs += rs911x_sock_inc + } else { + # + # We use LWIP - not built-in sockets + # + sources += rs911x_src_lwip + } + } else if (use_wf200) { + sources += wf200_plat_src + include_dirs += wf200_plat_incs + } deps = [ ":sdk", "${chip_root}/examples/common/QRCode", "${chip_root}/examples/window-app/common:window-common", "${chip_root}/src/lib", "${chip_root}/src/setup_payload", - "${chip_root}/third_party/openthread/platforms:libopenthread-platform", - "${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils", - "${examples_plat_dir}:efr-matter-shell", ] - if (chip_openthread_ftd) { - deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd", - "${chip_root}/third_party/openthread/repo:libopenthread-ftd", - ] - } else { + if (!use_rs911x && !use_wf200) { deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd", - "${chip_root}/third_party/openthread/repo:libopenthread-mtd", + "${chip_root}/third_party/openthread/platforms:libopenthread-platform", + "${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils", + "${examples_plat_dir}:efr-matter-shell", ] + if (chip_openthread_ftd) { + deps += [ + "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd", + "${chip_root}/third_party/openthread/repo:libopenthread-ftd", + ] + } else { + deps += [ + "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd", + "${chip_root}/third_party/openthread/repo:libopenthread-mtd", + ] + } } - include_dirs = [ - "include", - "${project_dir}/common/include", - ] - - defines = [] - if (show_qr_code) { sources += [ "${examples_plat_dir}/display/lcd.c", diff --git a/examples/window-app/efr32/build_for_wifi_args.gni b/examples/window-app/efr32/build_for_wifi_args.gni new file mode 100644 index 00000000000000..04529fddd2076a --- /dev/null +++ b/examples/window-app/efr32/build_for_wifi_args.gni @@ -0,0 +1,22 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//build_overrides/chip.gni") +import("//build_overrides/pigweed.gni") + +efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") +chip_enable_openthread = false +import("${chip_root}/src/platform/EFR32/wifi_args.gni") + +pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" +pw_assert_BACKEND = "$dir_pw_assert_log" diff --git a/examples/window-app/efr32/build_for_wifi_gnfile.gn b/examples/window-app/efr32/build_for_wifi_gnfile.gn new file mode 100644 index 00000000000000..9752ee73e7c91d --- /dev/null +++ b/examples/window-app/efr32/build_for_wifi_gnfile.gn @@ -0,0 +1,28 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + use_thread = false + import("//build_for_wifi_args.gni") +} diff --git a/examples/window-app/efr32/src/WindowAppImpl.cpp b/examples/window-app/efr32/src/WindowAppImpl.cpp index 6a294c941b5261..7bff2706e5b5cb 100644 --- a/examples/window-app/efr32/src/WindowAppImpl.cpp +++ b/examples/window-app/efr32/src/WindowAppImpl.cpp @@ -31,6 +31,10 @@ #include #include +#ifdef SL_WIFI +#include "wfx_host_events.h" +#endif + #define APP_TASK_STACK_SIZE (4096) #define APP_TASK_PRIORITY 2 #define APP_EVENT_QUEUE_SIZE 10 @@ -143,6 +147,18 @@ void WindowAppImpl::OnIconTimeout(WindowApp::Timer & timer) CHIP_ERROR WindowAppImpl::Init() { +#ifdef SL_WIFI + /* + * Wait for the WiFi to be initialized + */ + EFR32_LOG("APP: Wait WiFi Init"); + while (!wfx_hw_ready()) + { + vTaskDelay(10); + } + EFR32_LOG("APP: Done WiFi Init"); + /* We will init server when we get IP */ +#endif WindowApp::Init(); // Initialize App Task @@ -308,18 +324,18 @@ void WindowAppImpl::UpdateLEDs() { mStatusLED.Blink(200, 200); } - else if (mState.isThreadProvisioned && mState.isThreadEnabled) - { - mStatusLED.Blink(950, 50); - } - else if (mState.haveBLEConnections) - { - mStatusLED.Blink(100, 100); - } else +#if CHIP_ENABLE_OPENTHREAD + if (mState.isThreadProvisioned && mState.isThreadEnabled) +#else + if (mState.isWiFiProvisioned && mState.isWiFiEnabled) +#endif + { - mStatusLED.Blink(50, 950); + mStatusLED.Blink(950, 50); } + else if (mState.haveBLEConnections) { mStatusLED.Blink(100, 100); } + else { mStatusLED.Blink(50, 950); } // Action LED @@ -346,7 +362,11 @@ void WindowAppImpl::UpdateLCD() { // Update LCD #ifdef DISPLAY_ENABLED +#if CHIP_ENABLE_OPENTHREAD if (mState.isThreadProvisioned) +#else + if (mState.isWiFiProvisioned) +#endif { Cover & cover = GetCover(); EmberAfWcType type = TypeGet(cover.mEndpoint); diff --git a/examples/window-app/efr32/src/main.cpp b/examples/window-app/efr32/src/main.cpp index b9d4e3070a4d01..2a8704b949dc9d 100644 --- a/examples/window-app/efr32/src/main.cpp +++ b/examples/window-app/efr32/src/main.cpp @@ -28,8 +28,8 @@ #include #include -#if CHIP_ENABLE_OPENTHREAD #include +#if CHIP_ENABLE_OPENTHREAD #include #include #include @@ -42,6 +42,10 @@ #include #endif // CHIP_ENABLE_OPENTHREAD +#if defined(RS911X_WIFI) || defined(WF200_WIFI) +#include "wfx_host_events.h" +#endif /* RS911X_WIFI */ + #if PW_RPC_ENABLED #include #endif @@ -50,6 +54,7 @@ #include "matter_shell.h" #endif +#define BLE_DEV_NAME "EFR32_WINDOW" using namespace ::chip::DeviceLayer; // ================================================================================ @@ -107,7 +112,7 @@ int main(void) EFR32_LOG("PlatformMgr().InitChipStack() failed"); appError(err); } - chip::DeviceLayer::ConnectivityMgr().SetBLEDeviceName("EFR32_WINDOW"); + chip::DeviceLayer::ConnectivityMgr().SetBLEDeviceName(BLE_DEV_NAME); EFR32_LOG("Starting Platform Manager Event Loop"); err = PlatformMgr().StartEventLoopTask(); @@ -144,6 +149,14 @@ int main(void) } #endif // CHIP_ENABLE_OPENTHREAD +#ifdef WF200_WIFI + // Start wfx bus communication task. + wfx_bus_start(); +#ifdef SL_WFX_USE_SECURE_LINK + wfx_securelink_task_start(); // start securelink key renegotiation task +#endif // SL_WFX_USE_SECURE_LINK +#endif /* WF200_WIFI */ + #ifdef ENABLE_CHIP_SHELL chip::startShellTask(); #endif diff --git a/scripts/examples/gn_efr32_example.sh b/scripts/examples/gn_efr32_example.sh index 1054dbaa184d49..ed0cc22502bfff 100755 --- a/scripts/examples/gn_efr32_example.sh +++ b/scripts/examples/gn_efr32_example.sh @@ -16,27 +16,86 @@ # limitations under the License. # -set -e - # Build script for GN EFT32 examples GitHub workflow. +set -e source "$(dirname "$0")/../../scripts/activate.sh" set -x env +USE_WF200=0 +USE_RS911X=0 +USE_WIFI=0 + +ROOT=$1 +arg2=$2 +shift +shift +while [ $# -gt 0 ]; do + case $1 in + --wifi) + if [ -z "$2" ]; then + echo "--efr requires BRDxxxx" + exit 1 + fi + if [ X"$2" = "Xrs911x" ]; then + WIFI_ARGS="use_rs911x=true" + elif [ "$2" = wf200 ]; then + WIFI_ARGS="use_wf200=true" + else + echo "Wifi usage: --wifi rs911x|wf200" + exit 1 + fi + shift + shift -if [ -z "$3" ]; then - gn gen --check --fail-on-unused-args --root="$1" --args="" "$2"/"$EFR32_BOARD"/ - ninja -v -C "$2"/"$EFR32_BOARD"/ - #print stats - arm-none-eabi-size -A "$2"/"$EFR32_BOARD"/*.out + ;; + --efr) + if [ -z "$2" ]; then + echo "--efr requires BRDxxxx" + exit 1 + fi + EFR32_BOARD=$2 + shift + shift + ;; + + --gnargs) + echo "-gnargs - Not yet implemented" + exit 1 + GNARGS=$2 + shift + shift + ;; + + *) + EFR32_BOARD=$1 + shift + if [ X"$1" != "X" ]; then + GNARGS=$1 + shift + fi + ;; + esac +done + +if [ X"$EFR32_BOARD" = "X" ]; then + echo "EFR32_BOARD not defined" + exit 1 +fi +BUILD_DIR=$arg2/$EFR32_BOARD +echo BUILD_DIR="$BUILD_DIR" +if [ "X$WIFI_ARGS" != "X" ]; then + gn gen --check --fail-on-unused-args --root="$ROOT" --dotfile="$ROOT"/build_for_wifi_gnfile.gn --args="efr32_board=\"$EFR32_BOARD\" $WIFI_ARGS" "$BUILD_DIR" else - if [ -z "$4" ]; then - gn gen --check --fail-on-unused-args --root="$1" --args="efr32_board=\"$3\"" "$2/$3" + # thread build + # + if [ -z "$GNARGS" ]; then + gn gen --check --fail-on-unused-args --root="$ROOT" --args="efr32_board=\"$EFR32_BOARD\"" "$BUILD_DIR" else - gn gen --check --fail-on-unused-args --root="$1" --args="efr32_board=\"$3\"" "$2/$3" "$4" + gn gen --check --fail-on-unused-args --root="$ROOT" --args="efr32_board=\"$EFR32_BOARD\" $GNARGS" "$BUILD_DIR" fi - ninja -v -C "$2/$3" - #print stats - arm-none-eabi-size -A "$2"/"$3"/*.out fi +ninja -v -C "$BUILD_DIR"/ +#print stats +arm-none-eabi-size -A "$BUILD_DIR"/*.out diff --git a/src/lwip/efr32/lwipopts-rs911x.h b/src/lwip/efr32/lwipopts-rs911x.h new file mode 100644 index 00000000000000..9be70a784da48c --- /dev/null +++ b/src/lwip/efr32/lwipopts-rs911x.h @@ -0,0 +1,203 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Compile-time configuration for LwIP on EFR32 platforms using the + * Silicon Labs EFR32 SDK. + * + */ + +#ifndef __LWIPOPTS_H__ +#define __LWIPOPTS_H__ + +#if CHIP_HAVE_CONFIG_H +#include +#endif + +#include + +#define NO_SYS 0 +#define MEM_ALIGNMENT (4) +#define MEMP_NUM_TCP_SEG (TCP_SND_QUEUELEN + 1) +#define LWIP_TIMEVAL_PRIVATE (0) +#if 1 +#define MEM_LIBC_MALLOC (1) +#define mem_clib_free vPortFree +#define mem_clib_malloc pvPortMalloc +#else +#define MEM_LIBC_MALLOC (0) +#endif + +#define LWIP_COMPAT_MUTEX (0) +#define SYS_LIGHTWEIGHT_PROT (1) +#define LWIP_AUTOIP (0) +#define LWIP_DHCP_AUTOIP_COOP (0) +#define LWIP_SOCKET_SET_ERRNO 0 +#define IP_REASS_MAX_PBUFS 0 +#define IP_REASSEMBLY 0 +#define MEMP_NUM_REASSDATA 0 +#define LWIP_SO_RCVTIMEO 0 +#define SO_REUSE (1) +#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS (1) +#define LWIP_STATS (0) +#define LWIP_TCPIP_CORE_LOCKING 1 +#define TCP_QUEUE_OOSEQ 0 +#define ARP_QUEUEING (0) +#define TCPIP_THREAD_NAME "LWIP" + +#define LWIP_SOCKET 0 + +#define LWIP_FREERTOS_USE_STATIC_TCPIP_TASK 1 + +#define LWIP_RAW 1 +#define MEMP_NUM_RAW_PCB (4) + +#define MEMP_NUM_UDP_PCB (7) + +#define LWIP_HAVE_LOOPIF (0) + +// TODO: not sure why this is disabled +#define LWIP_NETIF_LOOPBACK (0) + +#define MEMP_NUM_NETCONN (0) + +#ifndef LWIP_IPV4 +#define LWIP_IPV4 1 +#endif +#ifndef LWIP_IPV6 +#define LWIP_IPV6 1 +#endif +#ifndef LWIP_ARP +#define LWIP_ARP (1) +#endif +#define LWIP_DNS (0) +#ifndef LWIP_ICMP +#define LWIP_ICMP (1) +#endif +#ifndef LWIP_IGMP +#define LWIP_IGMP (1) +#endif +#ifndef LWIP_DHCP +#define LWIP_DHCP (1) +#endif +#define LWIP_IPV6_REASS (0) +#define LWIP_IPV6_DHCP6 0 +#define LWIP_IPV6_AUTOCONFIG (1) +#define LWIP_IPV6_ROUTER_SUPPORT 1 +#define LWIP_ND6_LISTEN_RA 1 + +#define LWIP_ND6_NUM_NEIGHBORS (2) +#define LWIP_ND6_NUM_DESTINATIONS (3) +#define LWIP_ND6_NUM_PREFIXES (2) +#define LWIP_ND6_NUM_ROUTERS (2) +#define LWIP_ND6_MAX_MULTICAST_SOLICIT (2) +#define LWIP_ND6_MAX_UNICAST_SOLICIT (2) +#define LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT (3) +#define LWIP_ND6_TCP_REACHABILITY_HINTS (0) +#define LWIP_ND6_ALLOW_RA_UPDATES 1 + +#if defined(EFR32MG21) +#define MEMP_SEPARATE_POOLS (1) +#define LWIP_PBUF_FROM_CUSTOM_POOLS (0) +#define MEMP_USE_CUSTOM_POOLS (0) +#define PBUF_POOL_SIZE (5) +#define PBUF_POOL_BUFSIZE (1280) +#define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL) +#define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE) +#else +#define MEMP_SEPARATE_POOLS (1) +#define LWIP_PBUF_FROM_CUSTOM_POOLS (0) +#define MEMP_USE_CUSTOM_POOLS (0) +#define PBUF_POOL_SIZE (8) +#define PBUF_POOL_BUFSIZE (1280) +#define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL) +#define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE) +#endif + +#define TCP_MSS (1152) +#define TCP_SND_BUF (2 * TCP_MSS) +#define TCP_LISTEN_BACKLOG (1) + +#define ETH_PAD_SIZE (0) +#define SUB_ETHERNET_HEADER_SPACE (0) +#define PBUF_LINK_HLEN (14) + +#if defined(EFR32MG21) +#define TCPIP_THREAD_STACKSIZE (1536) +#else +#define TCPIP_THREAD_STACKSIZE (2048) +#endif + +#define TCPIP_THREAD_PRIO (2) + +#define NETIF_MAX_HWADDR_LEN 8U + +#define LWIP_IPV6_NUM_ADDRESSES 5 + +#ifndef LWIP_IPV6_ND +#define LWIP_IPV6_ND 1 +#endif +#define LWIP_ND6_QUEUEING 1 +#define LWIP_NUM_ND6_QUEUE 3 + +#define LWIP_MULTICAST_PING 0 + +#define TCPIP_MBOX_SIZE 6 +#define DEFAULT_RAW_RECVMBOX_SIZE 6 +#define DEFAULT_UDP_RECVMBOX_SIZE 6 +#define DEFAULT_TCP_RECVMBOX_SIZE 6 + +#ifdef LWIP_DEBUG + +#define MEMP_OVERFLOW_CHECK (0) +#define MEMP_SANITY_CHECK (0) +#define MEM_DEBUG (LWIP_DBG_OFF) +#define MEMP_DEBUG (LWIP_DBG_OFF) +#define PBUF_DEBUG (LWIP_DBG_OFF) +#define API_LIB_DEBUG (LWIP_DBG_OFF) +#define API_MSG_DEBUG (LWIP_DBG_OFF) +#define TCPIP_DEBUG (LWIP_DBG_OFF) +#define NETIF_DEBUG (LWIP_DBG_OFF) +#define SOCKETS_DEBUG (LWIP_DBG_OFF) +#define DEMO_DEBUG (LWIP_DBG_OFF) +#define DHCP_DEBUG (LWIP_DBG_OFF) +#define AUTOIP_DEBUG (LWIP_DBG_OFF) +#define ETHARP_DEBUG (LWIP_DBG_OFF) +#define IP_DEBUG (LWIP_DBG_OFF) +#define IP_REASS_DEBUG (LWIP_DBG_OFF) +#define IP6_DEBUG (LWIP_DBG_OFF) +#define RAW_DEBUG (LWIP_DBG_OFF) +#define ICMP_DEBUG (LWIP_DBG_OFF) +#define UDP_DEBUG (LWIP_DBG_OFF) +#define TCP_DEBUG (LWIP_DBG_OFF) +#define TCP_INPUT_DEBUG (LWIP_DBG_OFF) +#define TCP_OUTPUT_DEBUG (LWIP_DBG_OFF) +#define TCP_RTO_DEBUG (LWIP_DBG_OFF) +#define TCP_CWND_DEBUG (LWIP_DBG_OFF) +#define TCP_WND_DEBUG (LWIP_DBG_OFF) +#define TCP_FR_DEBUG (LWIP_DBG_OFF) +#define TCP_QLEN_DEBUG (LWIP_DBG_OFF) +#define TCP_RST_DEBUG (LWIP_DBG_OFF) +#define PPP_DEBUG (LWIP_DBG_OFF) +#endif + +#define LWIP_DBG_TYPES_ON \ + (LWIP_DBG_ON | LWIP_DBG_TRACE) /* (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT) */ + +#endif /* __LWIPOPTS_H__ */ diff --git a/src/lwip/efr32/lwipopts-thread.h b/src/lwip/efr32/lwipopts-thread.h new file mode 100644 index 00000000000000..f667e5bb3a8f27 --- /dev/null +++ b/src/lwip/efr32/lwipopts-thread.h @@ -0,0 +1,182 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Compile-time configuration for LwIP on EFR32 platforms using the + * Silicon Labs EFR32 SDK. + * + */ + +#ifndef __LWIPOPTS_H__ +#define __LWIPOPTS_H__ + +#if CHIP_HAVE_CONFIG_H +#include +#endif + +#include + +#define NO_SYS 0 +#define MEM_ALIGNMENT (4) +#define MEMP_NUM_TCP_SEG (TCP_SND_QUEUELEN + 1) +#define LWIP_TIMEVAL_PRIVATE (0) +#define MEM_LIBC_MALLOC (0) +#define LWIP_COMPAT_MUTEX (0) +#define SYS_LIGHTWEIGHT_PROT (1) +#define LWIP_AUTOIP (0) +#define LWIP_DHCP_AUTOIP_COOP (0) +#define LWIP_SOCKET_SET_ERRNO 0 +#define IP_REASS_MAX_PBUFS 0 +#define IP_REASSEMBLY 0 +#define MEMP_NUM_REASSDATA 0 +#define LWIP_SO_RCVTIMEO 0 +#define SO_REUSE (1) +#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS (1) +#define LWIP_STATS (0) +#define LWIP_TCPIP_CORE_LOCKING 1 +#define TCP_QUEUE_OOSEQ 0 +#define ARP_QUEUEING (0) +#define TCPIP_THREAD_NAME "LWIP" + +#define LWIP_SOCKET 0 + +#define LWIP_FREERTOS_USE_STATIC_TCPIP_TASK 1 + +#define LWIP_RAW 1 +#define MEMP_NUM_RAW_PCB (4) + +#define MEMP_NUM_UDP_PCB (5) + +#define LWIP_HAVE_LOOPIF (0) + +// TODO: not sure why this is disabled +#define LWIP_NETIF_LOOPBACK (0) + +#define MEMP_NUM_NETCONN (0) + +#define LWIP_IPV4 0 + +#define LWIP_IPV6 1 +#define LWIP_IPV6_ROUTE_TABLE_SUPPORT 1 +#define LWIP_ARP (0) +#define LWIP_DNS (0) +#define LWIP_ICMP (0) +#define LWIP_IGMP (0) +#define LWIP_DHCP (0) +#define LWIP_IPV6_REASS (0) +#define LWIP_IPV6_DHCP6 0 +#define LWIP_IPV6_AUTOCONFIG (0) +#define LWIP_IPV6_ROUTER_SUPPORT 0 +#define LWIP_ND6_LISTEN_RA 0 + +#define LWIP_ND6_NUM_NEIGHBORS (0) +#define LWIP_ND6_NUM_DESTINATIONS (0) +#define LWIP_ND6_NUM_PREFIXES (0) +#define LWIP_ND6_NUM_ROUTERS (0) +#define LWIP_ND6_MAX_MULTICAST_SOLICIT (0) +#define LWIP_ND6_MAX_UNICAST_SOLICIT (0) +#define LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT (0) +#define LWIP_ND6_TCP_REACHABILITY_HINTS (0) + +#if defined(EFR32MG21) +#define MEMP_SEPARATE_POOLS (1) +#define LWIP_PBUF_FROM_CUSTOM_POOLS (0) +#define MEMP_USE_CUSTOM_POOLS (0) +#define PBUF_POOL_SIZE (5) +#define PBUF_POOL_BUFSIZE (1280) +#define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL) +#define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE) +#else +#define MEMP_SEPARATE_POOLS (1) +#define LWIP_PBUF_FROM_CUSTOM_POOLS (0) +#define MEMP_USE_CUSTOM_POOLS (0) +#define PBUF_POOL_SIZE (8) +#define PBUF_POOL_BUFSIZE (1280) +#define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL) +#define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE) +#endif + +#define TCP_MSS (1152) +#define TCP_SND_BUF (2 * TCP_MSS) +#define TCP_LISTEN_BACKLOG (1) + +#define ETH_PAD_SIZE (0) +#define SUB_ETHERNET_HEADER_SPACE (0) +#define PBUF_LINK_HLEN (0) + +#if defined(EFR32MG21) +#define TCPIP_THREAD_STACKSIZE (1536) +#else +#define TCPIP_THREAD_STACKSIZE (2048) +#endif + +#define TCPIP_THREAD_PRIO (2) + +#define NETIF_MAX_HWADDR_LEN 8U + +#define LWIP_IPV6_NUM_ADDRESSES 5 + +#define LWIP_IPV6_ND 0 +#define LWIP_ND6_QUEUEING 0 + +#define LWIP_MULTICAST_PING 0 + +#define TCPIP_MBOX_SIZE 6 +#define DEFAULT_RAW_RECVMBOX_SIZE 6 +#define DEFAULT_UDP_RECVMBOX_SIZE 6 +#define DEFAULT_TCP_RECVMBOX_SIZE 6 + +#ifdef LWIP_DEBUG + +#define MEMP_OVERFLOW_CHECK (0) +#define MEMP_SANITY_CHECK (0) +#define MEM_DEBUG (LWIP_DBG_OFF) +#define MEMP_DEBUG (LWIP_DBG_OFF) +#define PBUF_DEBUG (LWIP_DBG_OFF) +#define API_LIB_DEBUG (LWIP_DBG_OFF) +#define API_MSG_DEBUG (LWIP_DBG_OFF) +#define TCPIP_DEBUG (LWIP_DBG_OFF) +#define NETIF_DEBUG (LWIP_DBG_OFF) +#define SOCKETS_DEBUG (LWIP_DBG_OFF) +#define DEMO_DEBUG (LWIP_DBG_OFF) +#define DHCP_DEBUG (LWIP_DBG_OFF) +#define AUTOIP_DEBUG (LWIP_DBG_OFF) +#define ETHARP_DEBUG (LWIP_DBG_OFF) +#define IP_DEBUG (LWIP_DBG_OFF) +#define IP_REASS_DEBUG (LWIP_DBG_OFF) +#define IP6_DEBUG (LWIP_DBG_OFF) +#define RAW_DEBUG (LWIP_DBG_OFF) +#define ICMP_DEBUG (LWIP_DBG_OFF) +#define UDP_DEBUG (LWIP_DBG_OFF) +#define TCP_DEBUG (LWIP_DBG_OFF) +#define TCP_INPUT_DEBUG (LWIP_DBG_OFF) +#define TCP_OUTPUT_DEBUG (LWIP_DBG_OFF) +#define TCP_RTO_DEBUG (LWIP_DBG_OFF) +#define TCP_CWND_DEBUG (LWIP_DBG_OFF) +#define TCP_WND_DEBUG (LWIP_DBG_OFF) +#define TCP_FR_DEBUG (LWIP_DBG_OFF) +#define TCP_QLEN_DEBUG (LWIP_DBG_OFF) +#define TCP_RST_DEBUG (LWIP_DBG_OFF) +#define PPP_DEBUG (LWIP_DBG_OFF) +#endif + +#define LWIP_DBG_TYPES_ON \ + (LWIP_DBG_ON | LWIP_DBG_TRACE) /* (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT) */ + +#endif /* __LWIPOPTS_H__ */ diff --git a/src/lwip/efr32/lwipopts-wf200.h b/src/lwip/efr32/lwipopts-wf200.h new file mode 100644 index 00000000000000..31dbf793c3b8c9 --- /dev/null +++ b/src/lwip/efr32/lwipopts-wf200.h @@ -0,0 +1,203 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Compile-time configuration for LwIP on EFR32 platforms using the + * Silicon Labs EFR32 SDK. + * + */ + +#ifndef __LWIPOPTS_H__ +#define __LWIPOPTS_H__ + +#if CHIP_HAVE_CONFIG_H +#include +#endif + +#include + +#define NO_SYS 0 +#define MEM_ALIGNMENT (4) +#define MEMP_NUM_TCP_SEG (TCP_SND_QUEUELEN + 1) +#define LWIP_TIMEVAL_PRIVATE (0) +#if 1 +#define MEM_LIBC_MALLOC (1) +#define mem_clib_free vPortFree +#define mem_clib_malloc pvPortMalloc +#else +#define MEM_LIBC_MALLOC (0) +#endif + +#define LWIP_COMPAT_MUTEX (0) +#define SYS_LIGHTWEIGHT_PROT (1) +#define LWIP_AUTOIP (0) +#define LWIP_DHCP_AUTOIP_COOP (0) +#define LWIP_SOCKET_SET_ERRNO 0 +#define IP_REASS_MAX_PBUFS 0 +#define IP_REASSEMBLY 0 +#define MEMP_NUM_REASSDATA 0 +#define LWIP_SO_RCVTIMEO 0 +#define SO_REUSE (1) +#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS (1) +#define LWIP_STATS (0) +#define LWIP_TCPIP_CORE_LOCKING 1 +#define TCP_QUEUE_OOSEQ 0 +#define ARP_QUEUEING (0) +#define TCPIP_THREAD_NAME "LWIP" + +#define LWIP_SOCKET 0 + +#define LWIP_FREERTOS_USE_STATIC_TCPIP_TASK 1 + +#define LWIP_RAW 1 +#define MEMP_NUM_RAW_PCB (4) + +#define MEMP_NUM_UDP_PCB (5) + +#define LWIP_HAVE_LOOPIF (0) + +// TODO: not sure why this is disabled +#define LWIP_NETIF_LOOPBACK (0) + +#define MEMP_NUM_NETCONN (0) + +#ifndef LWIP_IPV4 +#define LWIP_IPV4 0 +#endif +#ifndef LWIP_IPV6 +#define LWIP_IPV6 1 +#endif +#ifndef LWIP_ARP +#define LWIP_ARP (0) +#endif +#define LWIP_DNS (0) +#ifndef LWIP_ICMP +#define LWIP_ICMP (1) +#endif +#ifndef LWIP_IGMP +#define LWIP_IGMP (0) +#endif +#ifndef LWIP_DHCP +#define LWIP_DHCP (0) +#endif +#define LWIP_IPV6_REASS (0) +#define LWIP_IPV6_DHCP6 0 +#define LWIP_IPV6_AUTOCONFIG (1) +#define LWIP_IPV6_ROUTER_SUPPORT 1 +#define LWIP_ND6_LISTEN_RA 1 + +#define LWIP_ND6_NUM_NEIGHBORS (2) +#define LWIP_ND6_NUM_DESTINATIONS (3) +#define LWIP_ND6_NUM_PREFIXES (2) +#define LWIP_ND6_NUM_ROUTERS (2) +#define LWIP_ND6_MAX_MULTICAST_SOLICIT (2) +#define LWIP_ND6_MAX_UNICAST_SOLICIT (2) +#define LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT (3) +#define LWIP_ND6_TCP_REACHABILITY_HINTS (0) +#define LWIP_ND6_ALLOW_RA_UPDATES 1 + +#if defined(EFR32MG21) +#define MEMP_SEPARATE_POOLS (1) +#define LWIP_PBUF_FROM_CUSTOM_POOLS (0) +#define MEMP_USE_CUSTOM_POOLS (0) +#define PBUF_POOL_SIZE (5) +#define PBUF_POOL_BUFSIZE (1280) +#define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL) +#define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE) +#else +#define MEMP_SEPARATE_POOLS (1) +#define LWIP_PBUF_FROM_CUSTOM_POOLS (0) +#define MEMP_USE_CUSTOM_POOLS (0) +#define PBUF_POOL_SIZE (8) +#define PBUF_POOL_BUFSIZE (1280) +#define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL) +#define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE) +#endif + +#define TCP_MSS (1152) +#define TCP_SND_BUF (2 * TCP_MSS) +#define TCP_LISTEN_BACKLOG (1) + +#define ETH_PAD_SIZE (0) +#define SUB_ETHERNET_HEADER_SPACE (0) +#define PBUF_LINK_HLEN (14) + +#if defined(EFR32MG21) +#define TCPIP_THREAD_STACKSIZE (1536) +#else +#define TCPIP_THREAD_STACKSIZE (2048) +#endif + +#define TCPIP_THREAD_PRIO (2) + +#define NETIF_MAX_HWADDR_LEN 8U + +#define LWIP_IPV6_NUM_ADDRESSES 5 + +#ifndef LWIP_IPV6_ND +#define LWIP_IPV6_ND 0 +#endif +#define LWIP_ND6_QUEUEING 1 +#define LWIP_NUM_ND6_QUEUE 3 + +#define LWIP_MULTICAST_PING 0 + +#define TCPIP_MBOX_SIZE 6 +#define DEFAULT_RAW_RECVMBOX_SIZE 6 +#define DEFAULT_UDP_RECVMBOX_SIZE 6 +#define DEFAULT_TCP_RECVMBOX_SIZE 6 + +#ifdef LWIP_DEBUG + +#define MEMP_OVERFLOW_CHECK (0) +#define MEMP_SANITY_CHECK (0) +#define MEM_DEBUG (LWIP_DBG_OFF) +#define MEMP_DEBUG (LWIP_DBG_OFF) +#define PBUF_DEBUG (LWIP_DBG_OFF) +#define API_LIB_DEBUG (LWIP_DBG_OFF) +#define API_MSG_DEBUG (LWIP_DBG_OFF) +#define TCPIP_DEBUG (LWIP_DBG_OFF) +#define NETIF_DEBUG (LWIP_DBG_OFF) +#define SOCKETS_DEBUG (LWIP_DBG_OFF) +#define DEMO_DEBUG (LWIP_DBG_OFF) +#define DHCP_DEBUG (LWIP_DBG_OFF) +#define AUTOIP_DEBUG (LWIP_DBG_OFF) +#define ETHARP_DEBUG (LWIP_DBG_OFF) +#define IP_DEBUG (LWIP_DBG_OFF) +#define IP_REASS_DEBUG (LWIP_DBG_OFF) +#define IP6_DEBUG (LWIP_DBG_OFF) +#define RAW_DEBUG (LWIP_DBG_OFF) +#define ICMP_DEBUG (LWIP_DBG_OFF) +#define UDP_DEBUG (LWIP_DBG_OFF) +#define TCP_DEBUG (LWIP_DBG_OFF) +#define TCP_INPUT_DEBUG (LWIP_DBG_OFF) +#define TCP_OUTPUT_DEBUG (LWIP_DBG_OFF) +#define TCP_RTO_DEBUG (LWIP_DBG_OFF) +#define TCP_CWND_DEBUG (LWIP_DBG_OFF) +#define TCP_WND_DEBUG (LWIP_DBG_OFF) +#define TCP_FR_DEBUG (LWIP_DBG_OFF) +#define TCP_QLEN_DEBUG (LWIP_DBG_OFF) +#define TCP_RST_DEBUG (LWIP_DBG_OFF) +#define PPP_DEBUG (LWIP_DBG_OFF) +#endif + +#define LWIP_DBG_TYPES_ON \ + (LWIP_DBG_ON | LWIP_DBG_TRACE) /* (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT) */ + +#endif /* __LWIPOPTS_H__ */ diff --git a/src/lwip/efr32/lwipopts.h b/src/lwip/efr32/lwipopts.h index f667e5bb3a8f27..499e11d4700c19 100644 --- a/src/lwip/efr32/lwipopts.h +++ b/src/lwip/efr32/lwipopts.h @@ -1,182 +1,7 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Nest Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * Compile-time configuration for LwIP on EFR32 platforms using the - * Silicon Labs EFR32 SDK. - * - */ - -#ifndef __LWIPOPTS_H__ -#define __LWIPOPTS_H__ - -#if CHIP_HAVE_CONFIG_H -#include -#endif - -#include - -#define NO_SYS 0 -#define MEM_ALIGNMENT (4) -#define MEMP_NUM_TCP_SEG (TCP_SND_QUEUELEN + 1) -#define LWIP_TIMEVAL_PRIVATE (0) -#define MEM_LIBC_MALLOC (0) -#define LWIP_COMPAT_MUTEX (0) -#define SYS_LIGHTWEIGHT_PROT (1) -#define LWIP_AUTOIP (0) -#define LWIP_DHCP_AUTOIP_COOP (0) -#define LWIP_SOCKET_SET_ERRNO 0 -#define IP_REASS_MAX_PBUFS 0 -#define IP_REASSEMBLY 0 -#define MEMP_NUM_REASSDATA 0 -#define LWIP_SO_RCVTIMEO 0 -#define SO_REUSE (1) -#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS (1) -#define LWIP_STATS (0) -#define LWIP_TCPIP_CORE_LOCKING 1 -#define TCP_QUEUE_OOSEQ 0 -#define ARP_QUEUEING (0) -#define TCPIP_THREAD_NAME "LWIP" - -#define LWIP_SOCKET 0 - -#define LWIP_FREERTOS_USE_STATIC_TCPIP_TASK 1 - -#define LWIP_RAW 1 -#define MEMP_NUM_RAW_PCB (4) - -#define MEMP_NUM_UDP_PCB (5) - -#define LWIP_HAVE_LOOPIF (0) - -// TODO: not sure why this is disabled -#define LWIP_NETIF_LOOPBACK (0) - -#define MEMP_NUM_NETCONN (0) - -#define LWIP_IPV4 0 - -#define LWIP_IPV6 1 -#define LWIP_IPV6_ROUTE_TABLE_SUPPORT 1 -#define LWIP_ARP (0) -#define LWIP_DNS (0) -#define LWIP_ICMP (0) -#define LWIP_IGMP (0) -#define LWIP_DHCP (0) -#define LWIP_IPV6_REASS (0) -#define LWIP_IPV6_DHCP6 0 -#define LWIP_IPV6_AUTOCONFIG (0) -#define LWIP_IPV6_ROUTER_SUPPORT 0 -#define LWIP_ND6_LISTEN_RA 0 - -#define LWIP_ND6_NUM_NEIGHBORS (0) -#define LWIP_ND6_NUM_DESTINATIONS (0) -#define LWIP_ND6_NUM_PREFIXES (0) -#define LWIP_ND6_NUM_ROUTERS (0) -#define LWIP_ND6_MAX_MULTICAST_SOLICIT (0) -#define LWIP_ND6_MAX_UNICAST_SOLICIT (0) -#define LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT (0) -#define LWIP_ND6_TCP_REACHABILITY_HINTS (0) - -#if defined(EFR32MG21) -#define MEMP_SEPARATE_POOLS (1) -#define LWIP_PBUF_FROM_CUSTOM_POOLS (0) -#define MEMP_USE_CUSTOM_POOLS (0) -#define PBUF_POOL_SIZE (5) -#define PBUF_POOL_BUFSIZE (1280) -#define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL) -#define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE) -#else -#define MEMP_SEPARATE_POOLS (1) -#define LWIP_PBUF_FROM_CUSTOM_POOLS (0) -#define MEMP_USE_CUSTOM_POOLS (0) -#define PBUF_POOL_SIZE (8) -#define PBUF_POOL_BUFSIZE (1280) -#define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL) -#define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE) -#endif - -#define TCP_MSS (1152) -#define TCP_SND_BUF (2 * TCP_MSS) -#define TCP_LISTEN_BACKLOG (1) - -#define ETH_PAD_SIZE (0) -#define SUB_ETHERNET_HEADER_SPACE (0) -#define PBUF_LINK_HLEN (0) - -#if defined(EFR32MG21) -#define TCPIP_THREAD_STACKSIZE (1536) +#if defined(WF200_WIFI) +#include "lwipopts-wf200.h" +#elif defined(RS911X_WIFI) +#include "lwipopts-rs911x.h" #else -#define TCPIP_THREAD_STACKSIZE (2048) -#endif - -#define TCPIP_THREAD_PRIO (2) - -#define NETIF_MAX_HWADDR_LEN 8U - -#define LWIP_IPV6_NUM_ADDRESSES 5 - -#define LWIP_IPV6_ND 0 -#define LWIP_ND6_QUEUEING 0 - -#define LWIP_MULTICAST_PING 0 - -#define TCPIP_MBOX_SIZE 6 -#define DEFAULT_RAW_RECVMBOX_SIZE 6 -#define DEFAULT_UDP_RECVMBOX_SIZE 6 -#define DEFAULT_TCP_RECVMBOX_SIZE 6 - -#ifdef LWIP_DEBUG - -#define MEMP_OVERFLOW_CHECK (0) -#define MEMP_SANITY_CHECK (0) -#define MEM_DEBUG (LWIP_DBG_OFF) -#define MEMP_DEBUG (LWIP_DBG_OFF) -#define PBUF_DEBUG (LWIP_DBG_OFF) -#define API_LIB_DEBUG (LWIP_DBG_OFF) -#define API_MSG_DEBUG (LWIP_DBG_OFF) -#define TCPIP_DEBUG (LWIP_DBG_OFF) -#define NETIF_DEBUG (LWIP_DBG_OFF) -#define SOCKETS_DEBUG (LWIP_DBG_OFF) -#define DEMO_DEBUG (LWIP_DBG_OFF) -#define DHCP_DEBUG (LWIP_DBG_OFF) -#define AUTOIP_DEBUG (LWIP_DBG_OFF) -#define ETHARP_DEBUG (LWIP_DBG_OFF) -#define IP_DEBUG (LWIP_DBG_OFF) -#define IP_REASS_DEBUG (LWIP_DBG_OFF) -#define IP6_DEBUG (LWIP_DBG_OFF) -#define RAW_DEBUG (LWIP_DBG_OFF) -#define ICMP_DEBUG (LWIP_DBG_OFF) -#define UDP_DEBUG (LWIP_DBG_OFF) -#define TCP_DEBUG (LWIP_DBG_OFF) -#define TCP_INPUT_DEBUG (LWIP_DBG_OFF) -#define TCP_OUTPUT_DEBUG (LWIP_DBG_OFF) -#define TCP_RTO_DEBUG (LWIP_DBG_OFF) -#define TCP_CWND_DEBUG (LWIP_DBG_OFF) -#define TCP_WND_DEBUG (LWIP_DBG_OFF) -#define TCP_FR_DEBUG (LWIP_DBG_OFF) -#define TCP_QLEN_DEBUG (LWIP_DBG_OFF) -#define TCP_RST_DEBUG (LWIP_DBG_OFF) -#define PPP_DEBUG (LWIP_DBG_OFF) +#include "lwipopts-thread.h" #endif - -#define LWIP_DBG_TYPES_ON \ - (LWIP_DBG_ON | LWIP_DBG_TRACE) /* (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT) */ - -#endif /* __LWIPOPTS_H__ */ diff --git a/src/platform/EFR32/BUILD.gn b/src/platform/EFR32/BUILD.gn index 5efbf9e4c733e7..00469606e03597 100644 --- a/src/platform/EFR32/BUILD.gn +++ b/src/platform/EFR32/BUILD.gn @@ -36,7 +36,6 @@ static_library("EFR32") { "CHIPPlatformConfig.h", "ConfigurationManagerImpl.cpp", "ConfigurationManagerImpl.h", - "ConnectivityManagerImpl.cpp", "ConnectivityManagerImpl.h", "DeviceNetworkProvisioningDelegateImpl.cpp", "DeviceNetworkProvisioningDelegateImpl.h", @@ -87,6 +86,7 @@ static_library("EFR32") { sources += [ "../OpenThread/OpenThreadUtils.cpp", + "ConnectivityManagerImpl.cpp", "ThreadStackManagerImpl.cpp", "ThreadStackManagerImpl.h", ] @@ -95,5 +95,11 @@ static_library("EFR32") { sources += [ "../OpenThread/DnssdImpl.cpp" ] deps += [ "${chip_root}/src/lib/dnssd:platform_header" ] } + } else { + sources += [ + "ConnectivityManagerImpl_WIFI.cpp", + "ServiceProvisioning.cpp", + "ServiceProvisioning.h", + ] } } diff --git a/src/platform/EFR32/CHIPDevicePlatformConfig.h b/src/platform/EFR32/CHIPDevicePlatformConfig.h index 36ea40f8ebe700..74521d1da33f60 100644 --- a/src/platform/EFR32/CHIPDevicePlatformConfig.h +++ b/src/platform/EFR32/CHIPDevicePlatformConfig.h @@ -29,17 +29,18 @@ #define CHIP_DEVICE_CONFIG_EFR32_NVM3_ERROR_MIN 0xB00000 #define CHIP_DEVICE_CONFIG_EFR32_BLE_ERROR_MIN 0xC00000 +#if defined(SL_WIFI) +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 1 +#elif CHIP_ENABLE_OPENTHREAD + #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 0 #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 0 - -#if CHIP_ENABLE_OPENTHREAD #define CHIP_DEVICE_CONFIG_ENABLE_THREAD 1 -#define CHIP_DEVICE_CONFIG_ENABLE_DNSSD 1 #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT 1 -#endif - #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_DNS_CLIENT 1 #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_COMMISSIONABLE_DISCOVERY 1 +#define CHIP_DEVICE_CONFIG_ENABLE_DNSSD 1 +#endif /* CHIP_ENABLE_OPENTHREAD */ #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 #define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DISCOVERY 1 diff --git a/src/platform/EFR32/CHIPDevicePlatformEvent.h b/src/platform/EFR32/CHIPDevicePlatformEvent.h index d2ae1b7c65ff35..1252e16064dd89 100644 --- a/src/platform/EFR32/CHIPDevicePlatformEvent.h +++ b/src/platform/EFR32/CHIPDevicePlatformEvent.h @@ -25,6 +25,9 @@ #pragma once #include +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION +#include "wfx_host_events.h" +#endif namespace chip { namespace DeviceLayer { @@ -44,7 +47,7 @@ enum PublicPlatformSpecificEventTypes */ enum InternalPlatformSpecificEventTypes { - /* None currently defined */ + kWFXSystemEvent = kRange_InternalPlatformSpecific, }; } // namespace DeviceEventType @@ -57,9 +60,39 @@ struct ChipDevicePlatformEvent final { union { - /* None currently defined */ +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + struct + { + wfx_event_base_t eventBase; + union + { + sl_wfx_generic_message_t genericMsgEvent; + sl_wfx_startup_ind_t startupEvent; + sl_wfx_connect_ind_t connectEvent; + sl_wfx_disconnect_ind_t disconnectEvent; + + /* + * NOT CURRENTLY USED + *Some structs might be bigger in size than the one we use + * so we reduce the union size by commenting them out. + * Keep for possible future implementation. + */ + + // sl_wfx_generic_ind_t genericEvent; + // sl_wfx_exception_ind_t exceptionEvent; + // sl_wfx_error_ind_t errorEvent; + // sl_wfx_received_ind_t receivedEvent; + // sl_wfx_scan_result_ind_t scanResultEvent; + // sl_wfx_scan_complete_ind_t scanCompleteEvent; + // sl_wfx_start_ap_ind_t startApEvent; + // sl_wfx_stop_ap_ind_t stopApEvent; + // sl_wfx_ap_client_connected_ind_t apClientConnectedEvent; + // sl_wfx_ap_client_rejected_ind_t apClientRejectedEvent; + // sl_wfx_ap_client_disconnected_ind_t apClientDisconnectedEvent; + } data; + } WFXSystemEvent; +#endif }; }; - -} // namespace DeviceLayer +}; // namespace DeviceLayer } // namespace chip diff --git a/src/platform/EFR32/ConfigurationManagerImpl.cpp b/src/platform/EFR32/ConfigurationManagerImpl.cpp index f550516e28b5a3..fccf7f6fd0f4de 100644 --- a/src/platform/EFR32/ConfigurationManagerImpl.cpp +++ b/src/platform/EFR32/ConfigurationManagerImpl.cpp @@ -32,6 +32,10 @@ #include "em_rmu.h" +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION +#include "wfx_host_events.h" +#endif + namespace chip { namespace DeviceLayer { @@ -291,10 +295,26 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) PersistedStorage::KeyValueStoreMgrImpl().ErasePartition(); #endif // CHIP_KVS_AVAILABLE +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + ChipLogProgress(DeviceLayer, "Clearing WiFi provision"); + wfx_clear_wifi_provision(); +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + // Restart the system. ChipLogProgress(DeviceLayer, "System restarting"); NVIC_SystemReset(); } +#ifdef SL_WIFI +CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * buf) +{ + sl_wfx_mac_address_t macaddr; + wfx_get_wifi_mac_addr(SL_WFX_STA_INTERFACE, &macaddr); + memcpy(buf, &macaddr.octet[0], sizeof(macaddr.octet)); + + return CHIP_NO_ERROR; +} +#endif + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/EFR32/ConfigurationManagerImpl.h b/src/platform/EFR32/ConfigurationManagerImpl.h index a638abc425f5f0..7a157ccc3b7fac 100644 --- a/src/platform/EFR32/ConfigurationManagerImpl.h +++ b/src/platform/EFR32/ConfigurationManagerImpl.h @@ -77,10 +77,12 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp static void DoFactoryReset(intptr_t arg); }; +#ifndef SL_WIFI inline CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * buf) { return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } +#endif /* SL_WIFI */ } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/EFR32/ConnectivityManagerImpl.h b/src/platform/EFR32/ConnectivityManagerImpl.h index 02e1c11c8c7cb9..7e817ad4da743c 100644 --- a/src/platform/EFR32/ConnectivityManagerImpl.h +++ b/src/platform/EFR32/ConnectivityManagerImpl.h @@ -30,7 +30,11 @@ #else #include #endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION +#include +#else #include +#endif namespace Inet { class IPAddress; @@ -39,6 +43,8 @@ class IPAddress; namespace chip { namespace DeviceLayer { +class PlatformManagerImpl; + /** * Concrete implementation of the ConnectivityManager singleton object for Silicon Labs EFR32 platforms. */ @@ -54,7 +60,11 @@ class ConnectivityManagerImpl final : public ConnectivityManager, #else public Internal::GenericConnectivityManagerImpl_NoThread, #endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + public Internal::GenericConnectivityManagerImpl_WiFi +#else public Internal::GenericConnectivityManagerImpl_NoWiFi +#endif { // Allow the ConnectivityManager interface class to delegate method calls to // the implementation methods provided by this class. @@ -63,18 +73,103 @@ class ConnectivityManagerImpl final : public ConnectivityManager, private: // ===== Members that implement the ConnectivityManager abstract interface. + bool _HaveIPv4InternetConnectivity(void); + bool _HaveIPv6InternetConnectivity(void); +#if 0 // CHIP_DEVICE_CONFIG_ENABLE_THREAD + bool _HaveServiceConnectivity(void); +#endif CHIP_ERROR _Init(void); void _OnPlatformEvent(const ChipDeviceEvent * event); +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + using Flags = GenericConnectivityManagerImpl_WiFi::ConnectivityFlags; + WiFiStationMode _GetWiFiStationMode(void); + CHIP_ERROR _SetWiFiStationMode(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(); +#endif // ===== Members for internal use by the following friends. friend ConnectivityManager & ConnectivityMgr(void); friend ConnectivityManagerImpl & ConnectivityMgrImpl(void); static ConnectivityManagerImpl sInstance; + + // ===== Private members reserved for use by this class only. +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + System::Clock::Timestamp mLastStationConnectFailTime; + WiFiStationMode mWiFiStationMode; + WiFiStationState mWiFiStationState; + System::Clock::Timeout mWiFiStationReconnectInterval; + BitFlags mFlags; + + void DriveStationState(void); + void OnStationConnected(void); + void OnStationDisconnected(void); + void ChangeWiFiStationState(WiFiStationState newState); + static void DriveStationState(::chip::System::Layer * aLayer, void * aAppState); + + void UpdateInternetConnectivityState(void); +#endif }; +inline bool ConnectivityManagerImpl::_HaveIPv4InternetConnectivity(void) +{ +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + return mFlags.Has(Flags::kHaveIPv4InternetConnectivity); +#else + return false; +#endif +} + +inline bool ConnectivityManagerImpl::_HaveIPv6InternetConnectivity(void) +{ +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + return mFlags.Has(Flags::kHaveIPv6InternetConnectivity); +#else + return false; +#endif +} + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION +inline bool ConnectivityManagerImpl::_IsWiFiStationApplicationControlled(void) +{ + return mWiFiStationMode == kWiFiStationMode_ApplicationControlled; +} + +inline bool ConnectivityManagerImpl::_IsWiFiStationConnected(void) +{ + return mWiFiStationState == kWiFiStationState_Connected; +} + +inline System::Clock::Timeout ConnectivityManagerImpl::_GetWiFiStationReconnectInterval(void) +{ + return mWiFiStationReconnectInterval; +} + +inline bool ConnectivityManagerImpl::_CanStartWiFiScan() +{ + return mWiFiStationState != kWiFiStationState_Connecting; +} +#endif +#if 0 // CHIP_DEVICE_CONFIG_ENABLE_THREAD +inline bool ConnectivityManagerImpl::_HaveServiceConnectivity(void) +{ + return _HaveServiceConnectivityViaThread(); +} +#endif + /** + * * Returns the public interface of the ConnectivityManager singleton object. * * Chip applications should use this to access features of the ConnectivityManager object diff --git a/src/platform/EFR32/ConnectivityManagerImpl_WIFI.cpp b/src/platform/EFR32/ConnectivityManagerImpl_WIFI.cpp new file mode 100644 index 00000000000000..bbae58753acf5b --- /dev/null +++ b/src/platform/EFR32/ConnectivityManagerImpl_WIFI.cpp @@ -0,0 +1,485 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Nest Labs, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* this file behaves like a config.h, comes first */ +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#include +#endif + +#include "wfx_host_events.h" + +using namespace ::chip; +using namespace ::chip::Inet; +using namespace ::chip::System; +using namespace ::chip::TLV; +using namespace ::chip::DeviceLayer::Internal; + +namespace chip { +namespace DeviceLayer { + +ConnectivityManagerImpl ConnectivityManagerImpl::sInstance; + +CHIP_ERROR ConnectivityManagerImpl::_Init() +{ + CHIP_ERROR err; + // Queue work items to bootstrap the AP and station state machines once the Chip event loop is running. + mWiFiStationMode = kWiFiStationMode_Disabled; + mWiFiStationState = kWiFiStationState_NotConnected; + mLastStationConnectFailTime = System::Clock::kZero; + mWiFiStationReconnectInterval = System::Clock::Milliseconds32(CHIP_DEVICE_CONFIG_WIFI_STATION_RECONNECT_INTERVAL); + mFlags.ClearAll(); + + // TODO Initialize the Chip Addressing and Routing Module. + + // Ensure that station mode is enabled. + wfx_enable_sta_mode(); + + err = DeviceLayer::SystemLayer().ScheduleWork(DriveStationState, NULL); + + SuccessOrExit(err); + +exit: + return err; +} + +void ConnectivityManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) +{ + // Forward the event to the generic base classes as needed. + // Handle Wfx wifi events... + if (event->Type == DeviceEventType::kWFXSystemEvent) + { + if (event->Platform.WFXSystemEvent.eventBase == WIFI_EVENT) + { + switch (event->Platform.WFXSystemEvent.data.genericMsgEvent.header.id) + { + case SL_WFX_STARTUP_IND_ID: + ChipLogProgress(DeviceLayer, "WIFI_EVENT_STA_START"); + DriveStationState(); + break; + case SL_WFX_CONNECT_IND_ID: + ChipLogProgress(DeviceLayer, "WIFI_EVENT_STA_CONNECTED"); + if (mWiFiStationState == kWiFiStationState_Connecting) + { + if (event->Platform.WFXSystemEvent.data.connectEvent.body.status == 0) + { + ChangeWiFiStationState(kWiFiStationState_Connecting_Succeeded); + } + else + { + ChangeWiFiStationState(kWiFiStationState_Connecting_Failed); + } + } + DriveStationState(); + break; + case SL_WFX_DISCONNECT_IND_ID: + ChipLogProgress(DeviceLayer, "WIFI_EVENT_STA_DISCONNECTED"); + if (mWiFiStationState == kWiFiStationState_Connecting) + { + ChangeWiFiStationState(kWiFiStationState_Connecting_Failed); + } + DriveStationState(); + break; + default: + break; + } + } + else if (event->Platform.WFXSystemEvent.eventBase == IP_EVENT) + { + switch (event->Platform.WFXSystemEvent.data.genericMsgEvent.header.id) + { + case IP_EVENT_STA_GOT_IP: + ChipLogProgress(DeviceLayer, "IP_EVENT_STA_GOT_IP"); + UpdateInternetConnectivityState(); + break; + case IP_EVENT_STA_LOST_IP: + ChipLogProgress(DeviceLayer, "IP_EVENT_STA_LOST_IP"); + UpdateInternetConnectivityState(); + break; + case IP_EVENT_GOT_IP6: + ChipLogProgress(DeviceLayer, "IP_EVENT_GOT_IP6"); + UpdateInternetConnectivityState(); + break; + default: + break; + } + } + } +} +ConnectivityManager::WiFiStationMode ConnectivityManagerImpl::_GetWiFiStationMode(void) +{ + if (mWiFiStationMode != kWiFiStationMode_ApplicationControlled) + { + wifi_mode_t curWiFiMode = wfx_get_wifi_mode(); + if ((curWiFiMode == WIFI_MODE_STA) || (curWiFiMode == WIFI_MODE_APSTA)) + { + mWiFiStationMode = kWiFiStationMode_Enabled; + } + else + { + mWiFiStationMode = kWiFiStationMode_Disabled; + } + } + return mWiFiStationMode; +} + +bool ConnectivityManagerImpl::_IsWiFiStationProvisioned(void) +{ + char ssid[65]; + size_t len = 0; + + /* See if we have SSID in our Keys */ + if ((Internal::EFR32Config::ReadConfigValueStr(Internal::EFR32Config::kConfigKey_WiFiSSID, ssid, sizeof(ssid) - 1, len) == + CHIP_NO_ERROR) && + (ssid[0] != 0)) + { + return true; + } + + return false; +} + +bool ConnectivityManagerImpl::_IsWiFiStationEnabled(void) +{ + return wfx_is_sta_mode_enabled(); +} +CHIP_ERROR ConnectivityManagerImpl::_SetWiFiStationMode(ConnectivityManager::WiFiStationMode val) +{ + DeviceLayer::SystemLayer().ScheduleWork(DriveStationState, NULL); + + if (mWiFiStationMode != val) + { + ChipLogProgress(DeviceLayer, "WiFi station mode change: %s -> %s", WiFiStationModeToStr(mWiFiStationMode), + WiFiStationModeToStr(val)); + } + + mWiFiStationMode = val; + + return CHIP_NO_ERROR; +} +CHIP_ERROR ConnectivityManagerImpl::_SetWiFiStationReconnectInterval(System::Clock::Timeout val) +{ + mWiFiStationReconnectInterval = val; + return CHIP_NO_ERROR; +} +void ConnectivityManagerImpl::_ClearWiFiStationProvision(void) +{ + if (mWiFiStationMode != kWiFiStationMode_ApplicationControlled) + { + wfx_clear_wifi_provision(); + + DeviceLayer::SystemLayer().ScheduleWork(DriveStationState, NULL); + } +} + +CHIP_ERROR ConnectivityManagerImpl::_GetAndLogWifiStatsCounters(void) +{ + return CHIP_ERROR_NOT_IMPLEMENTED; +} + +void ConnectivityManagerImpl::_OnWiFiScanDone() +{ + // CHIP_ERROR_NOT_IMPLEMENTED +} + +void ConnectivityManagerImpl::_OnWiFiStationProvisionChange() +{ + // Schedule a call to the DriveStationState method to adjust the station state as needed. + ChipLogProgress(DeviceLayer, "_ON WIFI PROVISION CHANGE"); + DeviceLayer::SystemLayer().ScheduleWork(DriveStationState, NULL); +} + +// == == == == == == == == == == ConnectivityManager Private Methods == == == == == == == == == == + +void ConnectivityManagerImpl::DriveStationState() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + sl_status_t serr; + bool stationConnected; + + // Refresh the current station mode. + GetWiFiStationMode(); + + // If the station interface is NOT under application control... + if (mWiFiStationMode != kWiFiStationMode_ApplicationControlled) + { + // Ensure that the WFX is started. + if ((serr = wfx_wifi_start()) != SL_STATUS_OK) + { + ChipLogError(DeviceLayer, "WFX_wifi_start: FAIL: %s", chip::ErrorStr(err)); + return; + } + // Ensure that station mode is enabled in the WFX WiFi layer. + wfx_enable_sta_mode(); + } + + stationConnected = wfx_is_sta_connected(); + + // If the station interface is currently connected ... + if (stationConnected) + { + // Advance the station state to Connected if it was previously NotConnected or + // a previously initiated connect attempt succeeded. + if (mWiFiStationState == kWiFiStationState_NotConnected || mWiFiStationState == kWiFiStationState_Connecting_Succeeded) + { + ChangeWiFiStationState(kWiFiStationState_Connected); + ChipLogProgress(DeviceLayer, "WiFi station interface connected"); + mLastStationConnectFailTime = System::Clock::kZero; + OnStationConnected(); + } + + // If the WiFi station interface is no longer enabled, or no longer provisioned, + // disconnect the station from the AP, unless the WiFi station mode is currently + // under application control. + if (mWiFiStationMode != kWiFiStationMode_ApplicationControlled && + (mWiFiStationMode != kWiFiStationMode_Enabled || !IsWiFiStationProvisioned())) + { + ChipLogProgress(DeviceLayer, "Disconnecting WiFi station interface"); + serr = wfx_sta_discon(); + if (serr != SL_STATUS_OK) + { + ChipLogError(DeviceLayer, "wfx_wifi_disconnect() failed: %s", chip::ErrorStr(err)); + } + SuccessOrExit(serr); + + ChangeWiFiStationState(kWiFiStationState_Disconnecting); + } + } + // Otherwise the station interface is NOT connected to an AP, so... + else + { + System::Clock::Timestamp now = System::SystemClock().GetMonotonicTimestamp(); + + // Advance the station state to NotConnected if it was previously Connected or Disconnecting, + // or if a previous initiated connect attempt failed. + if (mWiFiStationState == kWiFiStationState_Connected || mWiFiStationState == kWiFiStationState_Disconnecting || + mWiFiStationState == kWiFiStationState_Connecting_Failed) + { + WiFiStationState prevState = mWiFiStationState; + ChangeWiFiStationState(kWiFiStationState_NotConnected); + if (prevState != kWiFiStationState_Connecting_Failed) + { + ChipLogProgress(DeviceLayer, "WiFi station interface disconnected"); + mLastStationConnectFailTime = System::Clock::kZero; + OnStationDisconnected(); + } + else + { + mLastStationConnectFailTime = now; + } + } + + // If the WiFi station interface is now enabled and provisioned (and by implication, + // not presently under application control), AND the system is not in the process of + // scanning, then... + if (mWiFiStationMode == kWiFiStationMode_Enabled && IsWiFiStationProvisioned()) + { + // Initiate a connection to the AP if we haven't done so before, or if enough + // time has passed since the last attempt. + if (mLastStationConnectFailTime == System::Clock::kZero || + now >= mLastStationConnectFailTime + mWiFiStationReconnectInterval) + { + if (mWiFiStationState != kWiFiStationState_Connecting) + { + wfx_wifi_provision_t wcfg; + size_t sz; + + (void) Internal::EFR32Config::ReadConfigValueStr(Internal::EFR32Config::kConfigKey_WiFiSSID, wcfg.ssid, + sizeof(wcfg.ssid), sz); + (void) Internal::EFR32Config::ReadConfigValueStr(Internal::EFR32Config::kConfigKey_WiFiPSK, wcfg.passkey, + sizeof(wcfg.passkey), sz); + (void) Internal::EFR32Config::ReadConfigValueBin(Internal::EFR32Config::kConfigKey_WiFiSEC, &wcfg.security, + sizeof(wcfg.security), sz); + wfx_set_wifi_provision(&wcfg); + + ChipLogProgress(DeviceLayer, "Attempting to connect WiFi (%s)", wcfg.ssid); + if ((serr = wfx_connect_to_ap()) != SL_STATUS_OK) + { + ChipLogError(DeviceLayer, "wfx_connect_to_ap failed"); + } + SuccessOrExit(serr); + + ChangeWiFiStationState(kWiFiStationState_Connecting); + } + } + + // Otherwise arrange another connection attempt at a suitable point in the future. + else + { + System::Clock::Timestamp timeToNextConnect = (mLastStationConnectFailTime + mWiFiStationReconnectInterval) - now; + + ChipLogProgress(DeviceLayer, "Next WiFi station reconnect in %" PRIu32 " ms", + System::Clock::Milliseconds32(timeToNextConnect).count()); + + ReturnOnFailure(DeviceLayer::SystemLayer().StartTimer(timeToNextConnect, DriveStationState, NULL)); + } + } + } + +exit: + + ChipLogProgress(DeviceLayer, "Done driving station state, nothing else to do..."); + // Kick-off any pending network scan that might have been deferred due to the activity + // of the WiFi station. +} + +void ConnectivityManagerImpl::OnStationConnected() +{ + ChipDeviceEvent event; + + wfx_setup_ip6_link_local(SL_WFX_STA_INTERFACE); + + // Alert other components of the new state. + event.Type = DeviceEventType::kWiFiConnectivityChange; + event.WiFiConnectivityChange.Result = kConnectivity_Established; + (void) PlatformMgr().PostEvent(&event); + + UpdateInternetConnectivityState(); +} + +void ConnectivityManagerImpl::OnStationDisconnected() +{ + // TODO Invoke WARM to perform actions that occur when the WiFi station interface goes down. + + // Alert other components of the new state. + ChipDeviceEvent event; + event.Type = DeviceEventType::kWiFiConnectivityChange; + event.WiFiConnectivityChange.Result = kConnectivity_Lost; + (void) PlatformMgr().PostEvent(&event); + + UpdateInternetConnectivityState(); +} +void ConnectivityManagerImpl::DriveStationState(::chip::System::Layer * aLayer, void * aAppState) +{ + sInstance.DriveStationState(); +} + +void ConnectivityManagerImpl::ChangeWiFiStationState(WiFiStationState newState) +{ + if (mWiFiStationState != newState) + { + ChipLogProgress(DeviceLayer, "WiFi station state change: %s -> %s", WiFiStationStateToStr(mWiFiStationState), + WiFiStationStateToStr(newState)); + mWiFiStationState = newState; + } +} + +void ConnectivityManagerImpl::UpdateInternetConnectivityState(void) +{ + bool haveIPv4Conn = false; + bool haveIPv6Conn = false; + bool hadIPv4Conn = mFlags.Has(ConnectivityFlags::kHaveIPv4InternetConnectivity); + bool hadIPv6Conn = mFlags.Has(ConnectivityFlags::kHaveIPv6InternetConnectivity); + IPAddress addr; + + // If the WiFi station is currently in the connected state... + if (mWiFiStationState == kWiFiStationState_Connected) + { +#if 1 //! defined (SL_WF200) || (SL_WF200 == 0) + + haveIPv4Conn = wfx_have_ipv4_addr(SL_WFX_STA_INTERFACE); + /* TODO - haveIPv6Conn */ +#else /* Old code that needed LWIP and its internals */ + // Get the LwIP netif for the WiFi station interface. + struct netif * netif = Internal::WFXUtils::GetStationNetif(); + + // If the WiFi station interface is up... + if (netif != NULL && netif_is_up(netif) && netif_is_link_up(netif)) + { + // // Check if a DNS server is currently configured. If so... + // TODO + // ip_addr_t dnsServerAddr = *dns_getserver(0); + // if (!ip_addr_isany_val(dnsServerAddr)) + if (1) + { + // If the station interface has been assigned an IPv4 address, and has + // an IPv4 gateway, then presume that the device has IPv4 Internet + // connectivity. + if (!ip4_addr_isany_val(*netif_ip4_addr(netif)) && !ip4_addr_isany_val(*netif_ip4_gw(netif))) + { + haveIPv4Conn = true; + char addrStr[INET_ADDRSTRLEN]; + // TODO: change the code to using IPv6 address + sprintf(addrStr, "%d.%d.%d.%d", (int) (netif->ip_addr.u_addr.ip4.addr & 0xff), + (int) ((netif->ip_addr.u_addr.ip4.addr >> 8) & 0xff), + (int) ((netif->ip_addr.u_addr.ip4.addr >> 16) & 0xff), + (int) ((netif->ip_addr.u_addr.ip4.addr >> 24) & 0xff)); + IPAddress::FromString(addrStr, addr); + } + + // TODO + // Search among the IPv6 addresses assigned to the interface for a Global Unicast + // address (2000::/3) that is in the valid state. If such an address is found... + // for (uint8_t i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) + // { + // if (ip6_addr_isglobal(netif_ip6_addr(netif, i)) && ip6_addr_isvalid(netif_ip6_addr_state(netif, i))) + // { + // // Determine if there is a default IPv6 router that is currently reachable + // // via the station interface. If so, presume for now that the device has + // // IPv6 connectivity. + // struct netif * found_if = nd6_find_route(IP6_ADDR_ANY6); + // if (found_if && netif->num == found_if->num) + // { + // haveIPv6Conn = true; + // } + // } + // } + } + } +#endif /* OLD-Code */ + } + + // If the internet connectivity state has changed... + if (haveIPv4Conn != hadIPv4Conn || haveIPv6Conn != hadIPv6Conn) + { + // Update the current state. + mFlags.Set(ConnectivityFlags::kHaveIPv4InternetConnectivity, haveIPv4Conn) + .Set(ConnectivityFlags::kHaveIPv6InternetConnectivity, haveIPv6Conn); + + // Alert other components of the state change. + ChipDeviceEvent event; + event.Type = DeviceEventType::kInternetConnectivityChange; + event.InternetConnectivityChange.IPv4 = GetConnectivityChange(hadIPv4Conn, haveIPv4Conn); + event.InternetConnectivityChange.IPv6 = GetConnectivityChange(hadIPv6Conn, haveIPv6Conn); + addr.ToString(event.InternetConnectivityChange.address, sizeof(event.InternetConnectivityChange.address)); + (void) PlatformMgr().PostEvent(&event); + + if (haveIPv4Conn != hadIPv4Conn) + { + ChipLogProgress(DeviceLayer, "%s Internet connectivity %s", "IPv4", (haveIPv4Conn) ? "ESTABLISHED" : "LOST"); + } + + if (haveIPv6Conn != hadIPv6Conn) + { + ChipLogProgress(DeviceLayer, "%s Internet connectivity %s", "IPv6", (haveIPv6Conn) ? "ESTABLISHED" : "LOST"); + } + } +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/EFR32/DeviceNetworkProvisioningDelegateImpl.cpp b/src/platform/EFR32/DeviceNetworkProvisioningDelegateImpl.cpp index 0f87641906c80b..f01887563d3cdd 100644 --- a/src/platform/EFR32/DeviceNetworkProvisioningDelegateImpl.cpp +++ b/src/platform/EFR32/DeviceNetworkProvisioningDelegateImpl.cpp @@ -16,6 +16,9 @@ */ #include "DeviceNetworkProvisioningDelegateImpl.h" +#include "ServiceProvisioning.h" +#include +#include #if CHIP_ENABLE_OPENTHREAD #include @@ -40,5 +43,21 @@ DeviceNetworkProvisioningDelegateImpl::_ProvisionThreadNetwork(ByteSpan threadDa #endif // CHIP_ENABLE_OPENTHREAD } +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION +CHIP_ERROR DeviceNetworkProvisioningDelegateImpl::_ProvisionWiFiNetwork(const char * ssid, const char * key) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + ChipLogProgress(NetworkProvisioning, "EFR Wifi provision: SSID: %s", ssid); + err = SetWiFiStationProvisioning(ssid, key); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NetworkProvisioning, "ERR:WiFi:Provision network: %s", chip::ErrorStr(err)); + } + + return err; +} +#endif + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/EFR32/DeviceNetworkProvisioningDelegateImpl.h b/src/platform/EFR32/DeviceNetworkProvisioningDelegateImpl.h index e799358e4b7536..6eb53530c0c8d1 100644 --- a/src/platform/EFR32/DeviceNetworkProvisioningDelegateImpl.h +++ b/src/platform/EFR32/DeviceNetworkProvisioningDelegateImpl.h @@ -35,7 +35,11 @@ class DeviceNetworkProvisioningDelegateImpl final friend class GenericDeviceNetworkProvisioningDelegateImpl; private: +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + CHIP_ERROR _ProvisionWiFiNetwork(const char * ssid, const char * passwd); +#else CHIP_ERROR _ProvisionWiFiNetwork(const char * ssid, const char * passwd) { return CHIP_ERROR_NOT_IMPLEMENTED; } +#endif CHIP_ERROR _ProvisionThreadNetwork(ByteSpan threadData); }; diff --git a/src/platform/EFR32/DiagnosticDataProviderImpl.cpp b/src/platform/EFR32/DiagnosticDataProviderImpl.cpp index e04a34057f8f4b..7c838ecb8633e7 100644 --- a/src/platform/EFR32/DiagnosticDataProviderImpl.cpp +++ b/src/platform/EFR32/DiagnosticDataProviderImpl.cpp @@ -25,8 +25,9 @@ #include #include +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD #include - +#endif #include #include "AppConfig.h" @@ -180,13 +181,16 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** { NetworkInterface * ifp = new NetworkInterface(); +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD const char * threadNetworkName = otThreadGetNetworkName(ThreadStackMgrImpl().OTInstance()); ifp->name = Span(threadNetworkName, strlen(threadNetworkName)); ifp->fabricConnected = true; ifp->offPremiseServicesReachableIPv4 = false; ifp->offPremiseServicesReachableIPv6 = false; ifp->type = InterfaceType::EMBER_ZCL_INTERFACE_TYPE_THREAD; - +#else + /* TODO */ +#endif uint8_t macBuffer[ConfigurationManager::kPrimaryMACAddressLength]; ConfigurationMgr().GetPrimary802154MACAddress(macBuffer); ifp->hardwareAddress = ByteSpan(macBuffer, ConfigurationManager::kPrimaryMACAddressLength); diff --git a/src/platform/EFR32/EFR32Config.h b/src/platform/EFR32/EFR32Config.h index 295c6f8e08af1d..ea66ef9cf92df5 100644 --- a/src/platform/EFR32/EFR32Config.h +++ b/src/platform/EFR32/EFR32Config.h @@ -95,8 +95,11 @@ class EFR32Config static constexpr Key kConfigKey_CountryCode = EFR32ConfigKey(kChipConfig_KeyBase, 0x0A); static constexpr Key kConfigKey_Breadcrumb = EFR32ConfigKey(kChipConfig_KeyBase, 0x0B); static constexpr Key kConfigKey_ActiveLocale = EFR32ConfigKey(kChipConfig_KeyBase, 0x0C); - static constexpr Key kConfigKey_GroupKeyBase = EFR32ConfigKey(kChipConfig_KeyBase, 0x0D); - static constexpr Key kConfigKey_GroupKeyMax = EFR32ConfigKey(kChipConfig_KeyBase, 0x1C); // Allows 16 Group Keys to be created. + static constexpr Key kConfigKey_WiFiSSID = EFR32ConfigKey(kChipConfig_KeyBase, 0x0D); + static constexpr Key kConfigKey_WiFiPSK = EFR32ConfigKey(kChipConfig_KeyBase, 0x0E); + static constexpr Key kConfigKey_WiFiSEC = EFR32ConfigKey(kChipConfig_KeyBase, 0x0F); + static constexpr Key kConfigKey_GroupKeyBase = EFR32ConfigKey(kChipConfig_KeyBase, 0x10); + static constexpr Key kConfigKey_GroupKeyMax = EFR32ConfigKey(kChipConfig_KeyBase, 0x1F); // Allows 16 Group Keys to be created. // CHIP Counter Keys static constexpr Key kConfigKey_BootCount = EFR32ConfigKey(kChipCounter_KeyBase, 0x00); diff --git a/src/platform/EFR32/InetPlatformConfig.h b/src/platform/EFR32/InetPlatformConfig.h index 87527cf1789e3e..3e8bb9a2f6d229 100644 --- a/src/platform/EFR32/InetPlatformConfig.h +++ b/src/platform/EFR32/InetPlatformConfig.h @@ -25,10 +25,21 @@ #pragma once +#include + // ==================== Platform Adaptations ==================== +#define INET_CONFIG_ERROR_TYPE int32_t +#define INET_CONFIG_NO_ERROR 0 +#define INET_CONFIG_ERROR_MIN 1000000 +#define INET_CONFIG_ERROR_MAX 1000999 + #ifndef INET_CONFIG_ENABLE_IPV4 -#error Inet IPv4 configuration should be configured at build generation time +#ifdef SL_WIFI +#define INET_CONFIG_ENABLE_IPV4 1 +#else /* For Thread only devices */ +#define INET_CONFIG_ENABLE_IPV4 0 +#endif #endif // ========== Platform-specific Configuration Overrides ========= @@ -38,5 +49,5 @@ #endif // INET_CONFIG_NUM_TCP_ENDPOINTS #ifndef INET_CONFIG_NUM_UDP_ENDPOINTS -#define INET_CONFIG_NUM_UDP_ENDPOINTS 4 +#define INET_CONFIG_NUM_UDP_ENDPOINTS 6 #endif // INET_CONFIG_NUM_UDP_ENDPOINTS diff --git a/src/platform/EFR32/PlatformManagerImpl.cpp b/src/platform/EFR32/PlatformManagerImpl.cpp index 790bf23da7ecca..14947f894681a4 100644 --- a/src/platform/EFR32/PlatformManagerImpl.cpp +++ b/src/platform/EFR32/PlatformManagerImpl.cpp @@ -84,6 +84,74 @@ CHIP_ERROR PlatformManagerImpl::_Shutdown() return Internal::GenericPlatformManagerImpl_FreeRTOS::_Shutdown(); } +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION +void PlatformManagerImpl::HandleWFXSystemEvent(wfx_event_base_t eventBase, sl_wfx_generic_message_t * eventData) +{ + ChipDeviceEvent event; + memset(&event, 0, sizeof(event)); + event.Type = DeviceEventType::kWFXSystemEvent; + event.Platform.WFXSystemEvent.eventBase = eventBase; + + if (eventBase == WIFI_EVENT) + { + switch (eventData->header.id) + { + case SL_WFX_STARTUP_IND_ID: + memcpy(&event.Platform.WFXSystemEvent.data.startupEvent, eventData, + sizeof(event.Platform.WFXSystemEvent.data.startupEvent)); + break; + case SL_WFX_CONNECT_IND_ID: + memcpy(&event.Platform.WFXSystemEvent.data.connectEvent, eventData, + sizeof(event.Platform.WFXSystemEvent.data.connectEvent)); + break; + case SL_WFX_DISCONNECT_IND_ID: + memcpy(&event.Platform.WFXSystemEvent.data.disconnectEvent, eventData, + sizeof(event.Platform.WFXSystemEvent.data.disconnectEvent)); + break; + // case SL_WFX_RECEIVED_IND_ID: + // memcpy(&event.Platform.WFXSystemEvent.data.receivedEvent, eventData, + // sizeof(event.Platform.WFXSystemEvent.data.receivedEvent)); + // break; + // case SL_WFX_GENERIC_IND_ID: + // memcpy(&event.Platform.WFXSystemEvent.data.genericEvent, eventData, + // sizeof(event.Platform.WFXSystemEvent.data.genericEvent)); + // break; + // case SL_WFX_EXCEPTION_IND_ID: + // memcpy(&event.Platform.WFXSystemEvent.data.exceptionEvent, eventData, + // sizeof(event.Platform.WFXSystemEvent.data.exceptionEvent)); + // break; + // case SL_WFX_ERROR_IND_ID: + // memcpy(&event.Platform.WFXSystemEvent.data.errorEvent, eventData, + // sizeof(event.Platform.WFXSystemEvent.data.errorEvent)); + // break; + default: + break; + } + } + else if (eventBase == IP_EVENT) + { + switch (eventData->header.id) + { + case IP_EVENT_STA_GOT_IP: + memcpy(&event.Platform.WFXSystemEvent.data.genericMsgEvent, eventData, + sizeof(event.Platform.WFXSystemEvent.data.genericMsgEvent)); + break; + case IP_EVENT_GOT_IP6: + memcpy(&event.Platform.WFXSystemEvent.data.genericMsgEvent, eventData, + sizeof(event.Platform.WFXSystemEvent.data.genericMsgEvent)); + break; + case IP_EVENT_STA_LOST_IP: + memcpy(&event.Platform.WFXSystemEvent.data.genericMsgEvent, eventData, + sizeof(event.Platform.WFXSystemEvent.data.genericMsgEvent)); + break; + default: + break; + } + } + + (void) sInstance.PostEvent(&event); +} +#endif } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/EFR32/PlatformManagerImpl.h b/src/platform/EFR32/PlatformManagerImpl.h index 63a3df6fc03eb8..975fd6ab3463e0 100644 --- a/src/platform/EFR32/PlatformManagerImpl.h +++ b/src/platform/EFR32/PlatformManagerImpl.h @@ -25,6 +25,9 @@ #pragma once #include +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION +#include "wfx_host_events.h" +#endif namespace chip { namespace DeviceLayer { @@ -46,6 +49,9 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener public: // ===== Platform-specific members that may be accessed directly by the application. +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION + void HandleWFXSystemEvent(wfx_event_base_t eventBase, sl_wfx_generic_message_t * eventData); +#endif System::Clock::Timestamp GetStartTime() { return mStartTime; } diff --git a/src/platform/EFR32/ServiceProvisioning.cpp b/src/platform/EFR32/ServiceProvisioning.cpp new file mode 100644 index 00000000000000..494c03b7ec2a61 --- /dev/null +++ b/src/platform/EFR32/ServiceProvisioning.cpp @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include + +#include "wfx_host_events.h" +#include + +#include "ServiceProvisioning.h" + +using namespace ::chip::DeviceLayer; + +CHIP_ERROR SetWiFiStationProvisioning(const char * ssid, const char * key) +{ + ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Disabled); + + CHIP_ERROR err = CHIP_NO_ERROR; + wfx_wifi_provision_t wifiConfig; + + // Set the wifi configuration + memset(&wifiConfig, 0, sizeof(wifiConfig)); + memcpy(wifiConfig.ssid, ssid, std::min(strlen(ssid) + 1, sizeof(wifiConfig.ssid))); + memcpy(wifiConfig.passkey, key, std::min(strlen(key) + 1, sizeof(wifiConfig.passkey))); + wifiConfig.security = WFX_SEC_WPA2; /* Need something better ? Scan? */ + + // Configure the WFX WiFi interface. + wfx_set_wifi_provision(&wifiConfig); + /* Save into internal Keys */ + (void) Internal::EFR32Config::WriteConfigValueStr(Internal::EFR32Config::kConfigKey_WiFiSSID, (char *) ssid); + (void) Internal::EFR32Config::WriteConfigValueStr(Internal::EFR32Config::kConfigKey_WiFiPSK, key); + (void) Internal::EFR32Config::WriteConfigValueBin(Internal::EFR32Config::kConfigKey_WiFiSEC, &wifiConfig.security, + sizeof(wifiConfig.security)); + + ChipLogProgress(DeviceLayer, "SP WiFi STA provision set (SSID: %s)", wifiConfig.ssid); + + ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Disabled); + ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Enabled); + + return err; +} diff --git a/src/platform/EFR32/ServiceProvisioning.h b/src/platform/EFR32/ServiceProvisioning.h new file mode 100644 index 00000000000000..109ec4ae33ea6c --- /dev/null +++ b/src/platform/EFR32/ServiceProvisioning.h @@ -0,0 +1,25 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _SERVICE_PROVISIONING_H +#define _SERVICE_PROVISIONING_H + +#include + +CHIP_ERROR SetWiFiStationProvisioning(const char * ssid, const char * key); + +#endif // _SERVICE_PROVISIONING_H diff --git a/src/platform/EFR32/wifi_args.gni b/src/platform/EFR32/wifi_args.gni new file mode 100644 index 00000000000000..fc6660bc825d73 --- /dev/null +++ b/src/platform/EFR32/wifi_args.gni @@ -0,0 +1,46 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") +import("//build_overrides/efr32_sdk.gni") +import("//build_overrides/pigweed.gni") + +import("${chip_root}/examples/platform/efr32/args.gni") + +# ARM architecture flags will be set based on efr32_family. +arm_platform_config = "${efr32_sdk_build_root}/efr32_arm.gni" + +mbedtls_target = "${efr32_sdk_build_root}:efr32_sdk" + +#lwip_platform = "external" +lwip_platform = "efr32" +lwip_ipv6 = true +lwip_ipv4 = true +lwip_api = true +lwip_ethernet = true + +chip_device_platform = "efr32" +chip_enable_openthread = false +chip_inet_config_enable_ipv4 = true +chip_inet_config_enable_dns_resolver = false + +chip_build_tests = false +chip_config_memory_management = "platform" +chip_mdns = "minimal" +chip_enable_pw_rpc = false + +pw_build_LINK_DEPS = [ + "$dir_pw_assert:impl", + "$dir_pw_log:impl", +] diff --git a/third_party/efr32_sdk/efr32_sdk.gni b/third_party/efr32_sdk/efr32_sdk.gni index 82191ec80ca1e1..0bd7a6faf8bd9d 100644 --- a/third_party/efr32_sdk/efr32_sdk.gni +++ b/third_party/efr32_sdk/efr32_sdk.gni @@ -38,6 +38,12 @@ template("efr32_sdk") { } assert(efr32_sdk_root != "", "efr32_sdk_root must be specified") + use_wf200 = false + if (defined(invoker.use_wf200)) { + if (invoker.use_wf200) { + use_wf200 = true + } + } sdk_target_name = target_name @@ -224,6 +230,15 @@ template("efr32_sdk") { "CHIP_KVS_SECTOR_COUNT=4", ] } + if (use_wf200) { + _include_dirs += [ + "${efr32_sdk_root}/platform/radio/wifi/wfx_fmac_driver", + "${efr32_sdk_root}/platform/radio/wifi/wfx_fmac_driver/bus", + "${efr32_sdk_root}/platform/radio/wifi/wfx_fmac_driver/firmware", + "${efr32_sdk_root}/platform/radio/wifi/wfx_fmac_driver/pds/brd8022a", + "${efr32_sdk_root}/platform/radio/wifi/wfx_fmac_driver/secure_link", + ] + } cflags = [] foreach(include_dir, _include_dirs) { @@ -443,6 +458,14 @@ template("efr32_sdk") { ] } } + if (use_wf200) { + sources += [ + "${efr32_sdk_root}/platform/radio/wifi/wfx_fmac_driver/bus/sl_wfx_bus.c", + "${efr32_sdk_root}/platform/radio/wifi/wfx_fmac_driver/bus/sl_wfx_bus_spi.c", + "${efr32_sdk_root}/platform/radio/wifi/wfx_fmac_driver/secure_link/sl_wfx_secure_link.c", + "${efr32_sdk_root}/platform/radio/wifi/wfx_fmac_driver/sl_wfx.c", + ] + } if (efr32_family == "efr32mg12") { sources += [ diff --git a/third_party/wiseconnect-wifi-bt-sdk b/third_party/wiseconnect-wifi-bt-sdk new file mode 120000 index 00000000000000..11fcb1f88f5c89 --- /dev/null +++ b/third_party/wiseconnect-wifi-bt-sdk @@ -0,0 +1 @@ +../../../wiseconnect-wifi-bt-sdk \ No newline at end of file From 5d2778fc647e8f6fd37d0ea816ba569f76e0a674 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Thu, 20 Jan 2022 22:40:30 +0100 Subject: [PATCH 094/124] Remove WriteClientHandle leftovers (followup of #13248) (#13774) --- src/app/WriteClient.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/app/WriteClient.h b/src/app/WriteClient.h index 43ab35df860148..90e3307eb875a9 100644 --- a/src/app/WriteClient.h +++ b/src/app/WriteClient.h @@ -42,7 +42,6 @@ namespace chip { namespace app { -class WriteClientHandle; class InteractionModelEngine; /** @@ -168,7 +167,6 @@ class WriteClient : public Messaging::ExchangeDelegate private: friend class TestWriteInteraction; friend class InteractionModelEngine; - friend class WriteClientHandle; enum class State { From 00f6d2574c0ba77cbd4d64b9e50ede72411a3dce Mon Sep 17 00:00:00 2001 From: Thomas Langewouters <82949801+q-thla@users.noreply.github.com> Date: Thu, 20 Jan 2022 23:04:26 +0100 Subject: [PATCH 095/124] Adopt new qpg SDK directory structure (#13762) Introduce qpg_sdk_lib_dir to override the subdirectory in qpg_sdk_root where the Qorvo platform libraries (.a) are to be found. Add an option (qpg_sdk_include_platform_libs) to disable referencing Qorvo platform libraries (useful to avoid missing unneeded paths when building //config/qpg/chip-gn). Update third_party/qpg_sdk/repo to a commit with the new directory structure. --- examples/lighting-app/qpg/BUILD.gn | 2 +- examples/lock-app/qpg/BUILD.gn | 2 +- examples/persistent-storage/qpg/BUILD.gn | 2 +- src/lwip/BUILD.gn | 11 ++-- third_party/openthread/platforms/qpg/BUILD.gn | 4 +- third_party/qpg_sdk/BUILD.gn | 4 +- third_party/qpg_sdk/qpg_sdk.gni | 51 ++++++++++++------- third_party/qpg_sdk/repo | 2 +- 8 files changed, 46 insertions(+), 32 deletions(-) diff --git a/examples/lighting-app/qpg/BUILD.gn b/examples/lighting-app/qpg/BUILD.gn index 428931ffcd2cdc..4b8c416fffdfa5 100644 --- a/examples/lighting-app/qpg/BUILD.gn +++ b/examples/lighting-app/qpg/BUILD.gn @@ -79,7 +79,7 @@ qpg_executable("lighting_app") { "${chip_root}/examples/lighting-app/lighting-common/color_format", ] - ldscript = "${qpg_sdk_root}/${qpg_target_ic}/ldscripts/chip-${qpg_target_ic}-example.ld" + ldscript = "${qpg_sdk_root}/Libraries/Qorvo/QorvoStack/gen/QorvoStack_${qpg_target_ic}/QorvoStack_${qpg_target_ic}.ld" inputs = [ ldscript ] diff --git a/examples/lock-app/qpg/BUILD.gn b/examples/lock-app/qpg/BUILD.gn index 0ba2a9729c709f..c25fe779b00dc0 100644 --- a/examples/lock-app/qpg/BUILD.gn +++ b/examples/lock-app/qpg/BUILD.gn @@ -75,7 +75,7 @@ qpg_executable("lock_app") { cflags = [ "-Wconversion" ] - ldscript = "${qpg_sdk_root}/${qpg_target_ic}/ldscripts/chip-${qpg_target_ic}-example.ld" + ldscript = "${qpg_sdk_root}/Libraries/Qorvo/QorvoStack/gen/QorvoStack_${qpg_target_ic}/QorvoStack_${qpg_target_ic}.ld" inputs = [ ldscript ] diff --git a/examples/persistent-storage/qpg/BUILD.gn b/examples/persistent-storage/qpg/BUILD.gn index 907dfba90e9a1b..19cfb9eb550549 100644 --- a/examples/persistent-storage/qpg/BUILD.gn +++ b/examples/persistent-storage/qpg/BUILD.gn @@ -63,7 +63,7 @@ qpg_executable("persistent_storage") { output_dir = root_out_dir - ldscript = "${qpg_sdk_root}/${qpg_target_ic}/ldscripts/chip-${qpg_target_ic}-example.ld" + ldscript = "${qpg_sdk_root}/Libraries/Qorvo/QorvoStack/gen/QorvoStack_${qpg_target_ic}/QorvoStack_${qpg_target_ic}.ld" inputs = [ ldscript ] diff --git a/src/lwip/BUILD.gn b/src/lwip/BUILD.gn index a038fe06875500..6fb03fc2768381 100644 --- a/src/lwip/BUILD.gn +++ b/src/lwip/BUILD.gn @@ -99,14 +99,13 @@ if (current_os == "zephyr" || current_os == "mbed") { lwip_target("lwip") { public = [ - "${qpg_sdk_build_root}/repo/${qpg_target_ic}/comps/lwip/arch/cc.h", - "${qpg_sdk_build_root}/repo/${qpg_target_ic}/comps/lwip/arch/perf.h", - "${qpg_sdk_build_root}/repo/${qpg_target_ic}/comps/lwip/lwipopts.h", - "${qpg_sdk_build_root}/repo/${qpg_target_ic}/comps/lwip/lwippools.h", + "${qpg_sdk_root}/Components/ThirdParty/Lwip/arch/cc.h", + "${qpg_sdk_root}/Components/ThirdParty/Lwip/arch/perf.h", + "${qpg_sdk_root}/Components/ThirdParty/Lwip/lwipopts.h", + "${qpg_sdk_root}/Components/ThirdParty/Lwip/lwippools.h", "freertos/arch/sys_arch.h", ] - sources = - [ "${qpg_sdk_build_root}/repo/${qpg_target_ic}/comps/lwip/sys_arch.c" ] + sources = [ "${qpg_sdk_root}/Components/ThirdParty/Lwip/sys_arch.c" ] public_deps = [ ":lwip_buildconfig" ] public_deps += [ "${qpg_sdk_build_root}:qpg_sdk" ] diff --git a/third_party/openthread/platforms/qpg/BUILD.gn b/third_party/openthread/platforms/qpg/BUILD.gn index f87607b062e249..4a3c7634b2f7d9 100644 --- a/third_party/openthread/platforms/qpg/BUILD.gn +++ b/third_party/openthread/platforms/qpg/BUILD.gn @@ -64,7 +64,9 @@ source_set("libopenthread-qpg") { ] include_dirs += [ "${openthread_root}/examples/apps" ] - libs = [ "${qpg_sdk_root}/${qpg_target_ic}/lib/libOpenThreadQorvoGlue_${qpg_target_ic}_mtd.a" ] + if (qpg_sdk_include_platform_libs) { + libs = [ "${qpg_sdk_root}/${qpg_sdk_lib_dir}/OpenThreadQorvoGlue_${qpg_target_ic}_mtd/libOpenThreadQorvoGlue_${qpg_target_ic}_mtd.a" ] + } public_deps = [ ":openthread_core_config_qpg", diff --git a/third_party/qpg_sdk/BUILD.gn b/third_party/qpg_sdk/BUILD.gn index ce2d987151e179..c7cf2b29d0b7bc 100755 --- a/third_party/qpg_sdk/BUILD.gn +++ b/third_party/qpg_sdk/BUILD.gn @@ -33,8 +33,8 @@ group("qpg_sdk") { config("qpg_freertos_config") { include_dirs = [ - "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/config", - "${chip_root}/third_party/qpg_sdk/repo/${qpg_target_ic}/comps/lwip", + "${qpg_sdk_root}/Applications/Matter/shared/config/inc", + "${qpg_sdk_root}/Components/ThirdParty/Lwip", "${freertos_root}/repo/portable/GCC/ARM_CM3", ] } diff --git a/third_party/qpg_sdk/qpg_sdk.gni b/third_party/qpg_sdk/qpg_sdk.gni index 5b8385cee44a91..9cae9288e36e14 100644 --- a/third_party/qpg_sdk/qpg_sdk.gni +++ b/third_party/qpg_sdk/qpg_sdk.gni @@ -22,8 +22,16 @@ declare_args() { # Location of the QPG SDK. qpg_sdk_root = "${chip_root}/third_party/qpg_sdk/repo" + # subdirectory in qpg_sdk_root where the binary library builds (.a) are to be found + # for connectedhomeip-qpg: Binaries (default) + # for matter endnodes sdk: Work + qpg_sdk_lib_dir = "Binaries" + # Target IC for QPG SDK qpg_target_ic = "qpg6105" + + # an option to disable referencing qorvo object archive files (*.a) + qpg_sdk_include_platform_libs = true } assert(qpg_sdk_root != "", "qpg_sdk_root must be specified") @@ -57,21 +65,25 @@ template("qpg_sdk") { } include_dirs += [ - "${qpg_sdk_root}/${qpg_target_ic}/comps/qvCHIP/inc", - "${qpg_sdk_root}/${qpg_target_ic}/comps/qvIO/inc", - "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/config", - "${qpg_sdk_root}/${qpg_target_ic}/comps/libmbedtls", + "${qpg_sdk_root}/Components/Qorvo/Matter/qvCHIP/inc", + "${qpg_sdk_root}/Components/Qorvo/BSP/qvIO/inc", + "${qpg_sdk_root}/Libraries/Qorvo/mbedtls_alt/inc", + "${qpg_sdk_root}/Components/ThirdParty/Silex/cryptosoc/mbedtls_alt", + "${qpg_sdk_root}/Components/ThirdParty/Lwip", + "${qpg_sdk_root}/Components/ThirdParty/Lwip/arch", "${mbedtls_root}/repo/include", "${openthread_root}/include", ] lib_dirs = [] - libs += [ - "${qpg_sdk_root}/${qpg_target_ic}/lib/libMatterQorvoGlue_${qpg_target_ic}_libbuild.a", - "${qpg_sdk_root}/${qpg_target_ic}/lib/libQorvoStack_${qpg_target_ic}.a", - "${qpg_sdk_root}/${qpg_target_ic}/lib/libmbedtls_alt_${qpg_target_ic}.a", - ] + if (qpg_sdk_include_platform_libs) { + libs += [ + "${qpg_sdk_root}/${qpg_sdk_lib_dir}/MatterQorvoGlue_${qpg_target_ic}_libbuild/libMatterQorvoGlue_${qpg_target_ic}_libbuild.a", + "${qpg_sdk_root}/${qpg_sdk_lib_dir}/QorvoStack_${qpg_target_ic}/libQorvoStack_${qpg_target_ic}.a", + "${qpg_sdk_root}/${qpg_sdk_lib_dir}/mbedtls_alt_${qpg_target_ic}/libmbedtls_alt_${qpg_target_ic}.a", + ] + } #MBed TLS built from third_party/mbedtls tree - OT config not used defines = [ @@ -177,18 +189,19 @@ template("qpg_sdk") { "${chip_root}/third_party/mbedtls/repo/library/x509write_crt.c", "${chip_root}/third_party/mbedtls/repo/library/x509write_csr.c", "${chip_root}/third_party/mbedtls/repo/library/xtea.c", - "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/config/FreeRTOSConfig.h", - "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/config/hooks.c", - "${qpg_sdk_root}/${qpg_target_ic}/comps/libmbedtls/${qpg_target_ic}-mbedtls-config.h", - "${qpg_sdk_root}/${qpg_target_ic}/comps/libmbedtls/aes_alt.h", - "${qpg_sdk_root}/${qpg_target_ic}/comps/libmbedtls/ccm_alt.h", - "${qpg_sdk_root}/${qpg_target_ic}/comps/libmbedtls/ecjpake_alt.h", - "${qpg_sdk_root}/${qpg_target_ic}/comps/libmbedtls/ecp_alt.h", - "${qpg_sdk_root}/${qpg_target_ic}/comps/libmbedtls/sha256_alt.h", - "${qpg_sdk_root}/${qpg_target_ic}/comps/libmbedtls/trng.c", #add this for + "${qpg_sdk_root}/Applications/Matter/shared/config/inc/FreeRTOSConfig.h", + "${qpg_sdk_root}/Applications/Matter/shared/config/src/hooks.c", + "${qpg_sdk_root}/Components/ThirdParty/Silex/cryptosoc/mbedtls_alt/aes_alt.h", + "${qpg_sdk_root}/Components/ThirdParty/Silex/cryptosoc/mbedtls_alt/ccm_alt.h", + "${qpg_sdk_root}/Components/ThirdParty/Silex/cryptosoc/mbedtls_alt/ecjpake_alt.h", + "${qpg_sdk_root}/Components/ThirdParty/Silex/cryptosoc/mbedtls_alt/ecp_alt.h", + "${qpg_sdk_root}/Components/ThirdParty/Silex/cryptosoc/mbedtls_alt/sha256_alt.h", + "${qpg_sdk_root}/Libraries/Qorvo/mbedtls_alt/inc/${qpg_target_ic}-mbedtls-config.h", + "${qpg_sdk_root}/Libraries/Qorvo/mbedtls_alt/src/trng.c", # mbedtls_hardware_poll - "${qpg_sdk_root}/${qpg_target_ic}/comps/qvCHIP/inc/qvCHIP.h", + "${qpg_sdk_root}/Components/Qorvo/BSP/qvIO/inc/qvIO.h", + "${qpg_sdk_root}/Components/Qorvo/Matter/qvCHIP/inc/qvCHIP.h", ] if (defined(invoker.sources)) { diff --git a/third_party/qpg_sdk/repo b/third_party/qpg_sdk/repo index 6bce6f11208c77..2b463adb2a9323 160000 --- a/third_party/qpg_sdk/repo +++ b/third_party/qpg_sdk/repo @@ -1 +1 @@ -Subproject commit 6bce6f11208c77dfc6bb1b9256bf01248ff002ab +Subproject commit 2b463adb2a9323fc54d435f359cd0f167845dfb1 From 9595afe47bf0c236eeca53d1b4661f8f2d59282e Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Thu, 20 Jan 2022 17:05:22 -0500 Subject: [PATCH 096/124] add scene callbacks for on-off (#13780) --- .../clusters/on-off-server/on-off-server.cpp | 76 ++++++++----------- .../clusters/on-off-server/on-off-server.h | 5 +- 2 files changed, 36 insertions(+), 45 deletions(-) diff --git a/src/app/clusters/on-off-server/on-off-server.cpp b/src/app/clusters/on-off-server/on-off-server.cpp index 4c35510fdf9f72..a7f8f1361fd405 100644 --- a/src/app/clusters/on-off-server/on-off-server.cpp +++ b/src/app/clusters/on-off-server/on-off-server.cpp @@ -41,26 +41,15 @@ #include "on-off-server.h" #include +#include #include #include #include -#include -#include -#include - #ifdef EMBER_AF_PLUGIN_SCENES #include #endif // EMBER_AF_PLUGIN_SCENES -#ifdef EMBER_AF_PLUGIN_ZLL_ON_OFF_SERVER -#include "../zll-on-off-server/zll-on-off-server.h" -#endif - -#ifdef EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER -#include "../zll-level-control-server/zll-level-control-server.h" -#endif - using namespace chip; using namespace chip::app::Clusters; using namespace chip::app::Clusters::OnOff; @@ -189,13 +178,6 @@ EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, uint8_t comm } } -#ifdef EMBER_AF_PLUGIN_ZLL_ON_OFF_SERVER - if (initiatedByLevelChange) - { - emberAfPluginZllOnOffServerLevelControlZllExtensions(endpoint); - } -#endif - #ifdef EMBER_AF_PLUGIN_SCENES // the scene has been changed (the value of on/off has changed) so // the current scene as described in the attribute table is invalid, @@ -273,12 +255,7 @@ void OnOffServer::initOnOffServer(chip::EndpointId endpoint) bool OnOffServer::offCommand(const app::ConcreteCommandPath & commandPath) { EmberAfStatus status = setOnOffValue(commandPath.mEndpointId, Commands::Off::Id, false); -#ifdef EMBER_AF_PLUGIN_ZLL_ON_OFF_SERVER - if (status == EMBER_ZCL_STATUS_SUCCESS) - { - emberAfPluginZllOnOffServerOffZllExtensions(emberAfCurrentCommand()); - } -#endif + emberAfSendImmediateDefaultResponse(status); return true; } @@ -287,13 +264,6 @@ bool OnOffServer::onCommand(const app::ConcreteCommandPath & commandPath) { EmberAfStatus status = setOnOffValue(commandPath.mEndpointId, Commands::On::Id, false); -#ifdef EMBER_AF_PLUGIN_ZLL_ON_OFF_SERVER - if (status == EMBER_ZCL_STATUS_SUCCESS) - { - emberAfPluginZllOnOffServerOnZllExtensions(emberAfCurrentCommand()); - } -#endif - emberAfSendImmediateDefaultResponse(status); return true; } @@ -301,24 +271,21 @@ bool OnOffServer::onCommand(const app::ConcreteCommandPath & commandPath) bool OnOffServer::toggleCommand(const app::ConcreteCommandPath & commandPath) { EmberAfStatus status = setOnOffValue(commandPath.mEndpointId, Commands::Toggle::Id, false); -#ifdef EMBER_AF_PLUGIN_ZLL_ON_OFF_SERVER - if (status == EMBER_ZCL_STATUS_SUCCESS) - { - emberAfPluginZllOnOffServerToggleZllExtensions(emberAfCurrentCommand()); - } -#endif + emberAfSendImmediateDefaultResponse(status); return true; } -bool OnOffServer::offWithEffectCommand(const app::ConcreteCommandPath & commandPath, +bool OnOffServer::offWithEffectCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::OffWithEffect::DecodableType & commandData) { OnOffEffectIdentifier effectId = commandData.effectId; uint8_t effectVariant = commandData.effectVariant; chip::EndpointId endpoint = commandPath.mEndpointId; EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS; - +#ifdef EMBER_AF_PLUGIN_SCENES + FabricIndex fabric = commandObj->GetAccessingFabricIndex(); +#endif // EMBER_AF_PLUGIN_SCENES bool globalSceneControl = false; OnOff::Attributes::GlobalSceneControl::Get(endpoint, &globalSceneControl); @@ -327,6 +294,16 @@ bool OnOffServer::offWithEffectCommand(const app::ConcreteCommandPath & commandP if (globalSceneControl) { +#ifdef EMBER_AF_PLUGIN_SCENES + GroupId groupId = ZCL_SCENES_GLOBAL_SCENE_GROUP_ID; + if (emberAfCurrentCommand()->type == EMBER_INCOMING_MULTICAST) + { + groupId = emberAfCurrentCommand()->source->GetSessionHandle()->AsGroupSession()->GetGroupId(); + } + + emberAfScenesClusterStoreCurrentSceneCallback(fabric, endpoint, groupId, ZCL_SCENES_GLOBAL_SCENE_SCENE_ID); +#endif // EMBER_AF_PLUGIN_SCENES + OnOff::Attributes::GlobalSceneControl::Set(endpoint, false); status = setOnOffValue(endpoint, Commands::Off::Id, false); @@ -355,10 +332,13 @@ bool OnOffServer::offWithEffectCommand(const app::ConcreteCommandPath & commandP return true; } -bool OnOffServer::OnWithRecallGlobalSceneCommand(const app::ConcreteCommandPath & commandPath) +bool OnOffServer::OnWithRecallGlobalSceneCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath) { chip::EndpointId endpoint = commandPath.mEndpointId; EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS; +#ifdef EMBER_AF_PLUGIN_SCENES + FabricIndex fabric = commandObj->GetAccessingFabricIndex(); +#endif // EMBER_AF_PLUGIN_SCENES bool globalSceneControl = false; OnOff::Attributes::GlobalSceneControl::Get(endpoint, &globalSceneControl); @@ -369,6 +349,16 @@ bool OnOffServer::OnWithRecallGlobalSceneCommand(const app::ConcreteCommandPath return true; } +#ifdef EMBER_AF_PLUGIN_SCENES + GroupId groupId = ZCL_SCENES_GLOBAL_SCENE_GROUP_ID; + if (emberAfCurrentCommand()->type == EMBER_INCOMING_MULTICAST) + { + groupId = emberAfCurrentCommand()->source->GetSessionHandle()->AsGroupSession()->GetGroupId(); + } + + emberAfScenesClusterRecallSavedSceneCallback(fabric, endpoint, groupId, ZCL_SCENES_GLOBAL_SCENE_SCENE_ID); +#endif // EMBER_AF_PLUGIN_SCENES + OnOff::Attributes::GlobalSceneControl::Set(endpoint, true); setOnOffValue(endpoint, Commands::On::Id, false); @@ -631,14 +621,14 @@ bool emberAfOnOffClusterToggleCallback(app::CommandHandler * commandObj, const a bool emberAfOnOffClusterOffWithEffectCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::OffWithEffect::DecodableType & commandData) { - return OnOffServer::Instance().offWithEffectCommand(commandPath, commandData); + return OnOffServer::Instance().offWithEffectCommand(commandObj, commandPath, commandData); } bool emberAfOnOffClusterOnWithRecallGlobalSceneCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::OnWithRecallGlobalScene::DecodableType & commandData) { - return OnOffServer::Instance().OnWithRecallGlobalSceneCommand(commandPath); + return OnOffServer::Instance().OnWithRecallGlobalSceneCommand(commandObj, commandPath); } bool emberAfOnOffClusterOnWithTimedOffCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, diff --git a/src/app/clusters/on-off-server/on-off-server.h b/src/app/clusters/on-off-server/on-off-server.h index 8e2502007f1a3c..043c3c8c52a932 100644 --- a/src/app/clusters/on-off-server/on-off-server.h +++ b/src/app/clusters/on-off-server/on-off-server.h @@ -18,6 +18,7 @@ #pragma once #include +#include #include #include #include @@ -49,9 +50,9 @@ class OnOffServer bool onCommand(const chip::app::ConcreteCommandPath & commandPath); bool toggleCommand(const chip::app::ConcreteCommandPath & commandPath); void initOnOffServer(chip::EndpointId endpoint); - bool offWithEffectCommand(const chip::app::ConcreteCommandPath & commandPath, + bool offWithEffectCommand(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::OnOff::Commands::OffWithEffect::DecodableType & commandData); - bool OnWithRecallGlobalSceneCommand(const chip::app::ConcreteCommandPath & commandPath); + bool OnWithRecallGlobalSceneCommand(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath); bool OnWithTimedOffCommand(const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::OnOff::Commands::OnWithTimedOff::DecodableType & commandData); void updateOnOffTimeCommand(chip::EndpointId endpoint); From 947d5bdcf61d22152750385cb58c8c8f7256049d Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Thu, 20 Jan 2022 14:06:29 -0800 Subject: [PATCH 097/124] Update the ACL event fields to align with the spec (#13738) --- .../all-clusters-app.matter | 12 +++---- .../chip/access-control-cluster.xml | 12 +++---- .../data_model/controller-clusters.matter | 12 +++---- .../python/chip/clusters/Objects.py | 24 +++++++------- .../zap-generated/cluster-objects.h | 32 +++++++++---------- 5 files changed, 46 insertions(+), 46 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index ffff2220bcbc6f..1f79cd561c30ad 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 @@ -48,18 +48,18 @@ server cluster AccessControl = 31 { info event AccessControlEntryChanged = 0 { fabric_idx adminFabricIndex = 0; - node_id adminNodeID = 1; - INT16U adminPasscodeID = 2; + nullable node_id adminNodeID = 1; + nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - AccessControlEntry latestValue = 4; + nullable AccessControlEntry latestValue = 4; } info event AccessControlExtensionChanged = 1 { fabric_idx adminFabricIndex = 0; - node_id adminNodeID = 1; - INT16U adminPasscodeID = 2; + nullable node_id adminNodeID = 1; + nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - ExtensionEntry latestValue = 4; + nullable ExtensionEntry latestValue = 4; } attribute AccessControlEntry acl[] = 0; diff --git a/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml index 6b912b1de27157..00405d84eec76a 100644 --- a/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml @@ -89,18 +89,18 @@ limitations under the License. The cluster SHALL send AccessControlEntryChanged events whenever its ACL attribute data is changed by an Administrator. - - + + - + The cluster SHALL send AccessControlExtensionChanged events whenever its extension attribute data is changed by an Administrator. - - + + - + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 680a495df9f7f7..a1ac966d363d2d 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -48,18 +48,18 @@ client cluster AccessControl = 31 { info event AccessControlEntryChanged = 0 { fabric_idx adminFabricIndex = 0; - node_id adminNodeID = 1; - INT16U adminPasscodeID = 2; + nullable node_id adminNodeID = 1; + nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - AccessControlEntry latestValue = 4; + nullable AccessControlEntry latestValue = 4; } info event AccessControlExtensionChanged = 1 { fabric_idx adminFabricIndex = 0; - node_id adminNodeID = 1; - INT16U adminPasscodeID = 2; + nullable node_id adminNodeID = 1; + nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - ExtensionEntry latestValue = 4; + nullable ExtensionEntry latestValue = 4; } attribute AccessControlEntry acl[] = 0; diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 51247828185d9f..f5d675ce4aba73 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -5297,17 +5297,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="adminFabricIndex", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="adminNodeID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="adminPasscodeID", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="adminNodeID", Tag=1, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="adminPasscodeID", Tag=2, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="changeType", Tag=3, Type=AccessControl.Enums.ChangeTypeEnum), - ClusterObjectFieldDescriptor(Label="latestValue", Tag=4, Type=AccessControl.Structs.AccessControlEntry), + ClusterObjectFieldDescriptor(Label="latestValue", Tag=4, Type=typing.Union[Nullable, AccessControl.Structs.AccessControlEntry]), ]) adminFabricIndex: 'uint' = 0 - adminNodeID: 'uint' = 0 - adminPasscodeID: 'uint' = 0 + adminNodeID: 'typing.Union[Nullable, uint]' = NullValue + adminPasscodeID: 'typing.Union[Nullable, uint]' = NullValue changeType: 'AccessControl.Enums.ChangeTypeEnum' = 0 - latestValue: 'AccessControl.Structs.AccessControlEntry' = field(default_factory=lambda: AccessControl.Structs.AccessControlEntry()) + latestValue: 'typing.Union[Nullable, AccessControl.Structs.AccessControlEntry]' = NullValue @dataclass class AccessControlExtensionChanged(ClusterEvent): @@ -5324,17 +5324,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="adminFabricIndex", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="adminNodeID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="adminPasscodeID", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="adminNodeID", Tag=1, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="adminPasscodeID", Tag=2, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="changeType", Tag=3, Type=AccessControl.Enums.ChangeTypeEnum), - ClusterObjectFieldDescriptor(Label="latestValue", Tag=4, Type=AccessControl.Structs.ExtensionEntry), + ClusterObjectFieldDescriptor(Label="latestValue", Tag=4, Type=typing.Union[Nullable, AccessControl.Structs.ExtensionEntry]), ]) adminFabricIndex: 'uint' = 0 - adminNodeID: 'uint' = 0 - adminPasscodeID: 'uint' = 0 + adminNodeID: 'typing.Union[Nullable, uint]' = NullValue + adminPasscodeID: 'typing.Union[Nullable, uint]' = NullValue changeType: 'AccessControl.Enums.ChangeTypeEnum' = 0 - latestValue: 'AccessControl.Structs.ExtensionEntry' = field(default_factory=lambda: AccessControl.Structs.ExtensionEntry()) + latestValue: 'typing.Union[Nullable, AccessControl.Structs.ExtensionEntry]' = NullValue @dataclass 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 73b7ac9929b77d..b7de5f24dad72b 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 @@ -6605,10 +6605,10 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } chip::FabricIndex adminFabricIndex = static_cast(0); - chip::NodeId adminNodeID = static_cast(0); - uint16_t adminPasscodeID = static_cast(0); - ChangeTypeEnum changeType = static_cast(0); - Structs::AccessControlEntry::Type latestValue; + DataModel::Nullable adminNodeID; + DataModel::Nullable adminPasscodeID; + ChangeTypeEnum changeType = static_cast(0); + DataModel::Nullable latestValue; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -6621,10 +6621,10 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } chip::FabricIndex adminFabricIndex = static_cast(0); - chip::NodeId adminNodeID = static_cast(0); - uint16_t adminPasscodeID = static_cast(0); - ChangeTypeEnum changeType = static_cast(0); - Structs::AccessControlEntry::DecodableType latestValue; + DataModel::Nullable adminNodeID; + DataModel::Nullable adminPasscodeID; + ChangeTypeEnum changeType = static_cast(0); + DataModel::Nullable latestValue; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -6650,10 +6650,10 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } chip::FabricIndex adminFabricIndex = static_cast(0); - chip::NodeId adminNodeID = static_cast(0); - uint16_t adminPasscodeID = static_cast(0); - ChangeTypeEnum changeType = static_cast(0); - Structs::ExtensionEntry::Type latestValue; + DataModel::Nullable adminNodeID; + DataModel::Nullable adminPasscodeID; + ChangeTypeEnum changeType = static_cast(0); + DataModel::Nullable latestValue; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; }; @@ -6666,10 +6666,10 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } chip::FabricIndex adminFabricIndex = static_cast(0); - chip::NodeId adminNodeID = static_cast(0); - uint16_t adminPasscodeID = static_cast(0); - ChangeTypeEnum changeType = static_cast(0); - Structs::ExtensionEntry::DecodableType latestValue; + DataModel::Nullable adminNodeID; + DataModel::Nullable adminPasscodeID; + ChangeTypeEnum changeType = static_cast(0); + DataModel::Nullable latestValue; CHIP_ERROR Decode(TLV::TLVReader & reader); }; From 161b81be611011f887ead115581e9004858dbb74 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Thu, 20 Jan 2022 23:07:30 +0100 Subject: [PATCH 098/124] Add ids/Events.h (#13689) * Add ids/Events.h * Update generated code --- src/app/common/templates/templates.json | 5 + .../templates/app/cluster-objects.zapt | 10 +- .../templates/app/ids/Events.zapt | 32 ++ src/platform/Linux/PlatformManagerImpl.cpp | 31 +- .../zap-generated/cluster-objects.h | 256 ++++++-------- .../app-common/zap-generated/ids/Events.h | 312 ++++++++++++++++++ 6 files changed, 473 insertions(+), 173 deletions(-) create mode 100644 src/app/zap-templates/templates/app/ids/Events.zapt create mode 100644 zzz_generated/app-common/app-common/zap-generated/ids/Events.h diff --git a/src/app/common/templates/templates.json b/src/app/common/templates/templates.json index 366ef0457fff13..6a7286ac922a0b 100644 --- a/src/app/common/templates/templates.json +++ b/src/app/common/templates/templates.json @@ -104,6 +104,11 @@ "name": "Commands Ids header", "output": "ids/Commands.h" }, + { + "path": "../../zap-templates/templates/app/ids/Events.zapt", + "name": "Events Ids header", + "output": "ids/Events.h" + }, { "path": "../../zap-templates/templates/app/cluster-objects.zapt", "name": "Cluster objects header for Interaction Model", diff --git a/src/app/zap-templates/templates/app/cluster-objects.zapt b/src/app/zap-templates/templates/app/cluster-objects.zapt index 79090e851e4ed3..bcc515dd53b298 100644 --- a/src/app/zap-templates/templates/app/cluster-objects.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects.zapt @@ -12,9 +12,10 @@ #include #include #include -#include -#include #include +#include +#include +#include namespace chip { namespace app { @@ -187,7 +188,6 @@ namespace Events { {{/first}} namespace {{asUpperCamelCase name}} { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::{{asUpperCamelCase priority}}; -static constexpr EventId kEventId = {{asMEI manufacturerCode code}}; enum class Fields { {{#zcl_event_fields}} @@ -199,7 +199,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::{{asUpperCamelCase name}}::Id; } static constexpr ClusterId GetClusterId() { return Clusters::{{asUpperCamelCase parent.name}}::Id; } {{#zcl_event_fields}} @@ -212,7 +212,7 @@ public: struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::{{asUpperCamelCase name}}::Id; } static constexpr ClusterId GetClusterId() { return Clusters::{{asUpperCamelCase parent.name}}::Id; } {{#zcl_event_fields}} diff --git a/src/app/zap-templates/templates/app/ids/Events.zapt b/src/app/zap-templates/templates/app/ids/Events.zapt new file mode 100644 index 00000000000000..dca5a226aa1c1c --- /dev/null +++ b/src/app/zap-templates/templates/app/ids/Events.zapt @@ -0,0 +1,32 @@ +{{> header}} + +#pragma once + +#include + +namespace chip { +namespace app { +namespace Clusters { + +{{#zcl_clusters}} +{{#zcl_events}} +{{#first}} +namespace {{asUpperCamelCase parent.label}} { +namespace Events { + +{{/first}} +namespace {{asUpperCamelCase name}} { +static constexpr EventId Id = {{asMEI manufacturerCode code}}; +} // namespace {{asUpperCamelCase name}} + +{{#last}} +} // namespace Events +} // namespace {{asUpperCamelCase parent.label}} + +{{/last}} +{{/zcl_events}} +{{/zcl_clusters}} + +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/platform/Linux/PlatformManagerImpl.cpp b/src/platform/Linux/PlatformManagerImpl.cpp index d9fbaeb9d32c1a..6b4ad3ebf17368 100644 --- a/src/platform/Linux/PlatformManagerImpl.cpp +++ b/src/platform/Linux/PlatformManagerImpl.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -88,19 +89,19 @@ void SignalHandler(int signum) err = CHIP_ERROR_REBOOT_SIGNAL_RECEIVED; break; case SIGTRAP: - PlatformMgrImpl().HandleSoftwareFault(SoftwareDiagnostics::Events::SoftwareFault::kEventId); + PlatformMgrImpl().HandleSoftwareFault(SoftwareDiagnostics::Events::SoftwareFault::Id); break; case SIGILL: - PlatformMgrImpl().HandleGeneralFault(GeneralDiagnostics::Events::HardwareFaultChange::kEventId); + PlatformMgrImpl().HandleGeneralFault(GeneralDiagnostics::Events::HardwareFaultChange::Id); break; case SIGALRM: - PlatformMgrImpl().HandleGeneralFault(GeneralDiagnostics::Events::RadioFaultChange::kEventId); + PlatformMgrImpl().HandleGeneralFault(GeneralDiagnostics::Events::RadioFaultChange::Id); break; case SIGVTALRM: - PlatformMgrImpl().HandleGeneralFault(GeneralDiagnostics::Events::NetworkFaultChange::kEventId); + PlatformMgrImpl().HandleGeneralFault(GeneralDiagnostics::Events::NetworkFaultChange::Id); break; case SIGIO: - PlatformMgrImpl().HandleSwitchEvent(Switch::Events::SwitchLatched::kEventId); + PlatformMgrImpl().HandleSwitchEvent(Switch::Events::SwitchLatched::Id); break; default: break; @@ -385,7 +386,7 @@ void PlatformManagerImpl::HandleGeneralFault(uint32_t EventId) return; } - if (EventId == GeneralDiagnostics::Events::HardwareFaultChange::kEventId) + if (EventId == GeneralDiagnostics::Events::HardwareFaultChange::Id) { GeneralFaults previous; GeneralFaults current; @@ -402,7 +403,7 @@ void PlatformManagerImpl::HandleGeneralFault(uint32_t EventId) #endif delegate->OnHardwareFaultsDetected(previous, current); } - else if (EventId == GeneralDiagnostics::Events::RadioFaultChange::kEventId) + else if (EventId == GeneralDiagnostics::Events::RadioFaultChange::Id) { GeneralFaults previous; GeneralFaults current; @@ -419,7 +420,7 @@ void PlatformManagerImpl::HandleGeneralFault(uint32_t EventId) #endif delegate->OnRadioFaultsDetected(previous, current); } - else if (EventId == GeneralDiagnostics::Events::NetworkFaultChange::kEventId) + else if (EventId == GeneralDiagnostics::Events::NetworkFaultChange::Id) { GeneralFaults previous; GeneralFaults current; @@ -470,7 +471,7 @@ void PlatformManagerImpl::HandleSwitchEvent(uint32_t EventId) return; } - if (EventId == Switch::Events::SwitchLatched::kEventId) + if (EventId == Switch::Events::SwitchLatched::Id) { uint8_t newPosition = 0; @@ -479,7 +480,7 @@ void PlatformManagerImpl::HandleSwitchEvent(uint32_t EventId) #endif delegate->OnSwitchLatched(newPosition); } - else if (EventId == Switch::Events::InitialPress::kEventId) + else if (EventId == Switch::Events::InitialPress::Id) { uint8_t newPosition = 0; @@ -488,7 +489,7 @@ void PlatformManagerImpl::HandleSwitchEvent(uint32_t EventId) #endif delegate->OnInitialPressed(newPosition); } - else if (EventId == Switch::Events::LongPress::kEventId) + else if (EventId == Switch::Events::LongPress::Id) { uint8_t newPosition = 0; @@ -497,7 +498,7 @@ void PlatformManagerImpl::HandleSwitchEvent(uint32_t EventId) #endif delegate->OnLongPressed(newPosition); } - else if (EventId == Switch::Events::ShortRelease::kEventId) + else if (EventId == Switch::Events::ShortRelease::Id) { uint8_t previousPosition = 0; @@ -506,7 +507,7 @@ void PlatformManagerImpl::HandleSwitchEvent(uint32_t EventId) #endif delegate->OnShortReleased(previousPosition); } - else if (EventId == Switch::Events::LongRelease::kEventId) + else if (EventId == Switch::Events::LongRelease::Id) { uint8_t previousPosition = 0; @@ -515,7 +516,7 @@ void PlatformManagerImpl::HandleSwitchEvent(uint32_t EventId) #endif delegate->OnLongReleased(previousPosition); } - else if (EventId == Switch::Events::MultiPressOngoing::kEventId) + else if (EventId == Switch::Events::MultiPressOngoing::Id) { uint8_t newPosition = 0; uint8_t currentNumberOfPressesCounted = 0; @@ -526,7 +527,7 @@ void PlatformManagerImpl::HandleSwitchEvent(uint32_t EventId) #endif delegate->OnMultiPressOngoing(newPosition, currentNumberOfPressesCounted); } - else if (EventId == Switch::Events::MultiPressComplete::kEventId) + else if (EventId == Switch::Events::MultiPressComplete::Id) { uint8_t newPosition = 0; uint8_t totalNumberOfPressesCounted = 0; 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 b7de5f24dad72b..64bbdcf3f43936 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 @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -6586,7 +6587,6 @@ struct TypeInfo namespace Events { namespace AccessControlEntryChanged { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000000; enum class Fields { @@ -6601,7 +6601,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::AccessControlEntryChanged::Id; } static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } chip::FabricIndex adminFabricIndex = static_cast(0); @@ -6617,7 +6617,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::AccessControlEntryChanged::Id; } static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } chip::FabricIndex adminFabricIndex = static_cast(0); @@ -6631,7 +6631,6 @@ struct DecodableType } // namespace AccessControlEntryChanged namespace AccessControlExtensionChanged { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000001; enum class Fields { @@ -6646,7 +6645,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::AccessControlExtensionChanged::Id; } static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } chip::FabricIndex adminFabricIndex = static_cast(0); @@ -6662,7 +6661,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::AccessControlExtensionChanged::Id; } static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } chip::FabricIndex adminFabricIndex = static_cast(0); @@ -7726,7 +7725,6 @@ struct TypeInfo namespace Events { namespace StateChanged { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000000; enum class Fields { @@ -7739,7 +7737,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::StateChanged::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } uint16_t actionID = static_cast(0); @@ -7753,7 +7751,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::StateChanged::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } uint16_t actionID = static_cast(0); @@ -7765,7 +7763,6 @@ struct DecodableType } // namespace StateChanged namespace ActionFailed { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000001; enum class Fields { @@ -7779,7 +7776,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::ActionFailed::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } uint16_t actionID = static_cast(0); @@ -7794,7 +7791,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::ActionFailed::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } uint16_t actionID = static_cast(0); @@ -8153,7 +8150,6 @@ struct TypeInfo namespace Events { namespace StartUp { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -static constexpr EventId kEventId = 0x00000000; enum class Fields { @@ -8164,7 +8160,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::StartUp::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Basic::Id; } uint32_t softwareVersion = static_cast(0); @@ -8176,7 +8172,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::StartUp::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Basic::Id; } uint32_t softwareVersion = static_cast(0); @@ -8186,7 +8182,6 @@ struct DecodableType } // namespace StartUp namespace ShutDown { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -static constexpr EventId kEventId = 0x00000001; enum class Fields { @@ -8196,7 +8191,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::ShutDown::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Basic::Id; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -8206,7 +8201,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::ShutDown::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Basic::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -8214,7 +8209,6 @@ struct DecodableType } // namespace ShutDown namespace Leave { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000002; enum class Fields { @@ -8224,7 +8218,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::Leave::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Basic::Id; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -8234,7 +8228,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::Leave::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Basic::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -8242,7 +8236,6 @@ struct DecodableType } // namespace Leave namespace ReachableChanged { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000003; enum class Fields { @@ -8253,7 +8246,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::ReachableChanged::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Basic::Id; } bool reachableNewValue = static_cast(0); @@ -8265,7 +8258,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::ReachableChanged::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Basic::Id; } bool reachableNewValue = static_cast(0); @@ -8823,7 +8816,6 @@ struct TypeInfo namespace Events { namespace StateTransition { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000000; enum class Fields { @@ -8837,7 +8829,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::StateTransition::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } DataModel::Nullable previousState; @@ -8852,7 +8844,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::StateTransition::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } DataModel::Nullable previousState; @@ -8865,7 +8857,6 @@ struct DecodableType } // namespace StateTransition namespace VersionApplied { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -static constexpr EventId kEventId = 0x00000001; enum class Fields { @@ -8877,7 +8868,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::VersionApplied::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } uint32_t softwareVersion = static_cast(0); @@ -8890,7 +8881,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::VersionApplied::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } uint32_t softwareVersion = static_cast(0); @@ -8901,7 +8892,6 @@ struct DecodableType } // namespace VersionApplied namespace DownloadError { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000002; enum class Fields { @@ -8915,7 +8905,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::DownloadError::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } uint32_t softwareVersion = static_cast(0); @@ -8930,7 +8920,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::DownloadError::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } uint32_t softwareVersion = static_cast(0); @@ -11185,7 +11175,6 @@ struct TypeInfo namespace Events { namespace HardwareFaultChange { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -static constexpr EventId kEventId = 0x00000000; enum class Fields { @@ -11197,7 +11186,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::HardwareFaultChange::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } DataModel::List current; @@ -11210,7 +11199,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::HardwareFaultChange::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } DataModel::DecodableList current; @@ -11221,7 +11210,6 @@ struct DecodableType } // namespace HardwareFaultChange namespace RadioFaultChange { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -static constexpr EventId kEventId = 0x00000001; enum class Fields { @@ -11233,7 +11221,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::RadioFaultChange::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } DataModel::List current; @@ -11246,7 +11234,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::RadioFaultChange::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } DataModel::DecodableList current; @@ -11257,7 +11245,6 @@ struct DecodableType } // namespace RadioFaultChange namespace NetworkFaultChange { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -static constexpr EventId kEventId = 0x00000002; enum class Fields { @@ -11269,7 +11256,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::NetworkFaultChange::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } DataModel::List current; @@ -11282,7 +11269,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::NetworkFaultChange::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } DataModel::DecodableList current; @@ -11293,7 +11280,6 @@ struct DecodableType } // namespace NetworkFaultChange namespace BootReason { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -static constexpr EventId kEventId = 0x00000003; enum class Fields { @@ -11304,7 +11290,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::BootReason::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } BootReasonType bootReason = static_cast(0); @@ -11316,7 +11302,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::BootReason::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } BootReasonType bootReason = static_cast(0); @@ -11530,7 +11516,6 @@ struct TypeInfo namespace Events { namespace SoftwareFault { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000000; enum class Fields { @@ -11541,7 +11526,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::SoftwareFault::Id; } static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } Structs::SoftwareFault::Type softwareFault; @@ -11553,7 +11538,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::SoftwareFault::Id; } static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } Structs::SoftwareFault::DecodableType softwareFault; @@ -12666,7 +12651,6 @@ struct TypeInfo namespace Events { namespace ConnectionStatus { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000000; enum class Fields { @@ -12677,7 +12661,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::ConnectionStatus::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } ThreadConnectionStatus connectionStatus = static_cast(0); @@ -12689,7 +12673,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::ConnectionStatus::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } ThreadConnectionStatus connectionStatus = static_cast(0); @@ -13013,7 +12997,6 @@ struct TypeInfo namespace Events { namespace Disconnection { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000000; enum class Fields { @@ -13024,7 +13007,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::Disconnection::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } uint16_t reasonCode = static_cast(0); @@ -13036,7 +13019,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::Disconnection::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } uint16_t reasonCode = static_cast(0); @@ -13046,7 +13029,6 @@ struct DecodableType } // namespace Disconnection namespace AssociationFailure { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000001; enum class Fields { @@ -13058,7 +13040,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::AssociationFailure::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } AssociationFailureCause associationFailure = static_cast(0); @@ -13071,7 +13053,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::AssociationFailure::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } AssociationFailureCause associationFailure = static_cast(0); @@ -13082,7 +13064,6 @@ struct DecodableType } // namespace AssociationFailure namespace ConnectionStatus { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000002; enum class Fields { @@ -13093,7 +13074,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::ConnectionStatus::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } WiFiConnectionStatus connectionStatus = static_cast(0); @@ -13105,7 +13086,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::ConnectionStatus::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } WiFiConnectionStatus connectionStatus = static_cast(0); @@ -13893,7 +13874,6 @@ struct TypeInfo namespace Events { namespace SwitchLatched { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000000; enum class Fields { @@ -13904,7 +13884,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::SwitchLatched::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } uint8_t newPosition = static_cast(0); @@ -13916,7 +13896,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::SwitchLatched::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } uint8_t newPosition = static_cast(0); @@ -13926,7 +13906,6 @@ struct DecodableType } // namespace SwitchLatched namespace InitialPress { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000001; enum class Fields { @@ -13937,7 +13916,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::InitialPress::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } uint8_t newPosition = static_cast(0); @@ -13949,7 +13928,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::InitialPress::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } uint8_t newPosition = static_cast(0); @@ -13959,7 +13938,6 @@ struct DecodableType } // namespace InitialPress namespace LongPress { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000002; enum class Fields { @@ -13970,7 +13948,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::LongPress::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } uint8_t newPosition = static_cast(0); @@ -13982,7 +13960,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::LongPress::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } uint8_t newPosition = static_cast(0); @@ -13992,7 +13970,6 @@ struct DecodableType } // namespace LongPress namespace ShortRelease { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000003; enum class Fields { @@ -14003,7 +13980,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::ShortRelease::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } uint8_t previousPosition = static_cast(0); @@ -14015,7 +13992,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::ShortRelease::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } uint8_t previousPosition = static_cast(0); @@ -14025,7 +14002,6 @@ struct DecodableType } // namespace ShortRelease namespace LongRelease { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000004; enum class Fields { @@ -14036,7 +14012,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::LongRelease::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } uint8_t previousPosition = static_cast(0); @@ -14048,7 +14024,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::LongRelease::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } uint8_t previousPosition = static_cast(0); @@ -14058,7 +14034,6 @@ struct DecodableType } // namespace LongRelease namespace MultiPressOngoing { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000005; enum class Fields { @@ -14070,7 +14045,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::MultiPressOngoing::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } uint8_t newPosition = static_cast(0); @@ -14083,7 +14058,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::MultiPressOngoing::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } uint8_t newPosition = static_cast(0); @@ -14094,7 +14069,6 @@ struct DecodableType } // namespace MultiPressOngoing namespace MultiPressComplete { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000006; enum class Fields { @@ -14106,7 +14080,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::MultiPressComplete::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } uint8_t newPosition = static_cast(0); @@ -14119,7 +14093,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::MultiPressComplete::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } uint8_t newPosition = static_cast(0); @@ -15928,7 +15902,6 @@ struct TypeInfo namespace Events { namespace StateChange { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000000; enum class Fields { @@ -15939,7 +15912,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::StateChange::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } bool stateValue = static_cast(0); @@ -15951,7 +15924,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::StateChange::Id; } static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } bool stateValue = static_cast(0); @@ -19255,7 +19228,6 @@ struct TypeInfo namespace Events { namespace DoorLockAlarm { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -static constexpr EventId kEventId = 0x00000000; enum class Fields { @@ -19266,7 +19238,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::DoorLockAlarm::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } DlAlarmCode alarmCode = static_cast(0); @@ -19278,7 +19250,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::DoorLockAlarm::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } DlAlarmCode alarmCode = static_cast(0); @@ -19288,7 +19260,6 @@ struct DecodableType } // namespace DoorLockAlarm namespace DoorStateChange { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -static constexpr EventId kEventId = 0x00000001; enum class Fields { @@ -19299,7 +19270,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::DoorStateChange::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } DlDoorState doorState = static_cast(0); @@ -19311,7 +19282,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::DoorStateChange::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } DlDoorState doorState = static_cast(0); @@ -19321,7 +19292,6 @@ struct DecodableType } // namespace DoorStateChange namespace LockOperation { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -static constexpr EventId kEventId = 0x00000002; enum class Fields { @@ -19337,7 +19307,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::LockOperation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } DlLockOperationType lockOperationType = static_cast(0); @@ -19354,7 +19324,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::LockOperation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } DlLockOperationType lockOperationType = static_cast(0); @@ -19369,7 +19339,6 @@ struct DecodableType } // namespace LockOperation namespace LockOperationError { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -static constexpr EventId kEventId = 0x00000003; enum class Fields { @@ -19386,7 +19355,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::LockOperationError::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } DlLockOperationType lockOperationType = static_cast(0); @@ -19404,7 +19373,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::LockOperationError::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } DlLockOperationType lockOperationType = static_cast(0); @@ -19420,7 +19389,6 @@ struct DecodableType } // namespace LockOperationError namespace LockUserChange { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000004; enum class Fields { @@ -19437,7 +19405,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::LockUserChange::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } DlLockDataType lockDataType = static_cast(0); @@ -19455,7 +19423,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::LockUserChange::Id; } static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } DlLockDataType lockDataType = static_cast(0); @@ -20796,7 +20764,6 @@ struct TypeInfo namespace Events { namespace SupplyVoltageLow { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000000; enum class Fields { @@ -20806,7 +20773,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::SupplyVoltageLow::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -20816,7 +20783,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::SupplyVoltageLow::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -20824,7 +20791,6 @@ struct DecodableType } // namespace SupplyVoltageLow namespace SupplyVoltageHigh { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000001; enum class Fields { @@ -20834,7 +20800,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::SupplyVoltageHigh::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -20844,7 +20810,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::SupplyVoltageHigh::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -20852,7 +20818,6 @@ struct DecodableType } // namespace SupplyVoltageHigh namespace PowerMissingPhase { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000002; enum class Fields { @@ -20862,7 +20827,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::PowerMissingPhase::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -20872,7 +20837,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::PowerMissingPhase::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -20880,7 +20845,6 @@ struct DecodableType } // namespace PowerMissingPhase namespace SystemPressureLow { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000003; enum class Fields { @@ -20890,7 +20854,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::SystemPressureLow::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -20900,7 +20864,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::SystemPressureLow::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -20908,7 +20872,6 @@ struct DecodableType } // namespace SystemPressureLow namespace SystemPressureHigh { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000004; enum class Fields { @@ -20918,7 +20881,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::SystemPressureHigh::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -20928,7 +20891,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::SystemPressureHigh::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -20936,7 +20899,6 @@ struct DecodableType } // namespace SystemPressureHigh namespace DryRunning { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -static constexpr EventId kEventId = 0x00000005; enum class Fields { @@ -20946,7 +20908,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::DryRunning::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -20956,7 +20918,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::DryRunning::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -20964,7 +20926,6 @@ struct DecodableType } // namespace DryRunning namespace MotorTemperatureHigh { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000006; enum class Fields { @@ -20974,7 +20935,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::MotorTemperatureHigh::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -20984,7 +20945,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::MotorTemperatureHigh::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -20992,7 +20953,6 @@ struct DecodableType } // namespace MotorTemperatureHigh namespace PumpMotorFatalFailure { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -static constexpr EventId kEventId = 0x00000007; enum class Fields { @@ -21002,7 +20962,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::PumpMotorFatalFailure::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -21012,7 +20972,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::PumpMotorFatalFailure::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -21020,7 +20980,6 @@ struct DecodableType } // namespace PumpMotorFatalFailure namespace ElectronicTemperatureHigh { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000008; enum class Fields { @@ -21030,7 +20989,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::ElectronicTemperatureHigh::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -21040,7 +20999,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::ElectronicTemperatureHigh::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -21048,7 +21007,6 @@ struct DecodableType } // namespace ElectronicTemperatureHigh namespace PumpBlocked { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -static constexpr EventId kEventId = 0x00000009; enum class Fields { @@ -21058,7 +21016,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::PumpBlocked::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -21068,7 +21026,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::PumpBlocked::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -21076,7 +21034,6 @@ struct DecodableType } // namespace PumpBlocked namespace SensorFailure { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x0000000A; enum class Fields { @@ -21086,7 +21043,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::SensorFailure::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -21096,7 +21053,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::SensorFailure::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -21104,7 +21061,6 @@ struct DecodableType } // namespace SensorFailure namespace ElectronicNonFatalFailure { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x0000000B; enum class Fields { @@ -21114,7 +21070,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::ElectronicNonFatalFailure::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -21124,7 +21080,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::ElectronicNonFatalFailure::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -21132,7 +21088,6 @@ struct DecodableType } // namespace ElectronicNonFatalFailure namespace ElectronicFatalFailure { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -static constexpr EventId kEventId = 0x0000000C; enum class Fields { @@ -21142,7 +21097,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::ElectronicFatalFailure::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -21152,7 +21107,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::ElectronicFatalFailure::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -21160,7 +21115,6 @@ struct DecodableType } // namespace ElectronicFatalFailure namespace GeneralFault { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x0000000D; enum class Fields { @@ -21170,7 +21124,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::GeneralFault::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -21180,7 +21134,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::GeneralFault::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -21188,7 +21142,6 @@ struct DecodableType } // namespace GeneralFault namespace Leakage { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x0000000E; enum class Fields { @@ -21198,7 +21151,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::Leakage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -21208,7 +21161,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::Leakage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -21216,7 +21169,6 @@ struct DecodableType } // namespace Leakage namespace AirDetection { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x0000000F; enum class Fields { @@ -21226,7 +21178,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::AirDetection::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -21236,7 +21188,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::AirDetection::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -21244,7 +21196,6 @@ struct DecodableType } // namespace AirDetection namespace TurbineOperation { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000010; enum class Fields { @@ -21254,7 +21205,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::TurbineOperation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -21264,7 +21215,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::TurbineOperation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -36106,7 +36057,6 @@ struct TypeInfo namespace Events { namespace TestEvent { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -static constexpr EventId kEventId = 0x00000001; enum class Fields { @@ -36122,7 +36072,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::TestEvent::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } uint8_t arg1 = static_cast(0); @@ -36139,7 +36089,7 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return kEventId; } + static constexpr EventId GetEventId() { return Events::TestEvent::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } uint8_t arg1 = static_cast(0); 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 new file mode 100644 index 00000000000000..b42a2a5d588ad2 --- /dev/null +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Events.h @@ -0,0 +1,312 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +#pragma once + +#include + +namespace chip { +namespace app { +namespace Clusters { + +namespace AccessControl { +namespace Events { + +namespace AccessControlEntryChanged { +static constexpr EventId Id = 0x00000000; +} // namespace AccessControlEntryChanged + +namespace AccessControlExtensionChanged { +static constexpr EventId Id = 0x00000001; +} // namespace AccessControlExtensionChanged + +} // namespace Events +} // namespace AccessControl + +namespace BridgedActions { +namespace Events { + +namespace StateChanged { +static constexpr EventId Id = 0x00000000; +} // namespace StateChanged + +namespace ActionFailed { +static constexpr EventId Id = 0x00000001; +} // namespace ActionFailed + +} // namespace Events +} // namespace BridgedActions + +namespace Basic { +namespace Events { + +namespace StartUp { +static constexpr EventId Id = 0x00000000; +} // namespace StartUp + +namespace ShutDown { +static constexpr EventId Id = 0x00000001; +} // namespace ShutDown + +namespace Leave { +static constexpr EventId Id = 0x00000002; +} // namespace Leave + +namespace ReachableChanged { +static constexpr EventId Id = 0x00000003; +} // namespace ReachableChanged + +} // namespace Events +} // namespace Basic + +namespace OtaSoftwareUpdateRequestor { +namespace Events { + +namespace StateTransition { +static constexpr EventId Id = 0x00000000; +} // namespace StateTransition + +namespace VersionApplied { +static constexpr EventId Id = 0x00000001; +} // namespace VersionApplied + +namespace DownloadError { +static constexpr EventId Id = 0x00000002; +} // namespace DownloadError + +} // namespace Events +} // namespace OtaSoftwareUpdateRequestor + +namespace GeneralDiagnostics { +namespace Events { + +namespace HardwareFaultChange { +static constexpr EventId Id = 0x00000000; +} // namespace HardwareFaultChange + +namespace RadioFaultChange { +static constexpr EventId Id = 0x00000001; +} // namespace RadioFaultChange + +namespace NetworkFaultChange { +static constexpr EventId Id = 0x00000002; +} // namespace NetworkFaultChange + +namespace BootReason { +static constexpr EventId Id = 0x00000003; +} // namespace BootReason + +} // namespace Events +} // namespace GeneralDiagnostics + +namespace SoftwareDiagnostics { +namespace Events { + +namespace SoftwareFault { +static constexpr EventId Id = 0x00000000; +} // namespace SoftwareFault + +} // namespace Events +} // namespace SoftwareDiagnostics + +namespace ThreadNetworkDiagnostics { +namespace Events { + +namespace ConnectionStatus { +static constexpr EventId Id = 0x00000000; +} // namespace ConnectionStatus + +} // namespace Events +} // namespace ThreadNetworkDiagnostics + +namespace WiFiNetworkDiagnostics { +namespace Events { + +namespace Disconnection { +static constexpr EventId Id = 0x00000000; +} // namespace Disconnection + +namespace AssociationFailure { +static constexpr EventId Id = 0x00000001; +} // namespace AssociationFailure + +namespace ConnectionStatus { +static constexpr EventId Id = 0x00000002; +} // namespace ConnectionStatus + +} // namespace Events +} // namespace WiFiNetworkDiagnostics + +namespace Switch { +namespace Events { + +namespace SwitchLatched { +static constexpr EventId Id = 0x00000000; +} // namespace SwitchLatched + +namespace InitialPress { +static constexpr EventId Id = 0x00000001; +} // namespace InitialPress + +namespace LongPress { +static constexpr EventId Id = 0x00000002; +} // namespace LongPress + +namespace ShortRelease { +static constexpr EventId Id = 0x00000003; +} // namespace ShortRelease + +namespace LongRelease { +static constexpr EventId Id = 0x00000004; +} // namespace LongRelease + +namespace MultiPressOngoing { +static constexpr EventId Id = 0x00000005; +} // namespace MultiPressOngoing + +namespace MultiPressComplete { +static constexpr EventId Id = 0x00000006; +} // namespace MultiPressComplete + +} // namespace Events +} // namespace Switch + +namespace BooleanState { +namespace Events { + +namespace StateChange { +static constexpr EventId Id = 0x00000000; +} // namespace StateChange + +} // namespace Events +} // namespace BooleanState + +namespace DoorLock { +namespace Events { + +namespace DoorLockAlarm { +static constexpr EventId Id = 0x00000000; +} // namespace DoorLockAlarm + +namespace DoorStateChange { +static constexpr EventId Id = 0x00000001; +} // namespace DoorStateChange + +namespace LockOperation { +static constexpr EventId Id = 0x00000002; +} // namespace LockOperation + +namespace LockOperationError { +static constexpr EventId Id = 0x00000003; +} // namespace LockOperationError + +namespace LockUserChange { +static constexpr EventId Id = 0x00000004; +} // namespace LockUserChange + +} // namespace Events +} // namespace DoorLock + +namespace PumpConfigurationAndControl { +namespace Events { + +namespace SupplyVoltageLow { +static constexpr EventId Id = 0x00000000; +} // namespace SupplyVoltageLow + +namespace SupplyVoltageHigh { +static constexpr EventId Id = 0x00000001; +} // namespace SupplyVoltageHigh + +namespace PowerMissingPhase { +static constexpr EventId Id = 0x00000002; +} // namespace PowerMissingPhase + +namespace SystemPressureLow { +static constexpr EventId Id = 0x00000003; +} // namespace SystemPressureLow + +namespace SystemPressureHigh { +static constexpr EventId Id = 0x00000004; +} // namespace SystemPressureHigh + +namespace DryRunning { +static constexpr EventId Id = 0x00000005; +} // namespace DryRunning + +namespace MotorTemperatureHigh { +static constexpr EventId Id = 0x00000006; +} // namespace MotorTemperatureHigh + +namespace PumpMotorFatalFailure { +static constexpr EventId Id = 0x00000007; +} // namespace PumpMotorFatalFailure + +namespace ElectronicTemperatureHigh { +static constexpr EventId Id = 0x00000008; +} // namespace ElectronicTemperatureHigh + +namespace PumpBlocked { +static constexpr EventId Id = 0x00000009; +} // namespace PumpBlocked + +namespace SensorFailure { +static constexpr EventId Id = 0x0000000A; +} // namespace SensorFailure + +namespace ElectronicNonFatalFailure { +static constexpr EventId Id = 0x0000000B; +} // namespace ElectronicNonFatalFailure + +namespace ElectronicFatalFailure { +static constexpr EventId Id = 0x0000000C; +} // namespace ElectronicFatalFailure + +namespace GeneralFault { +static constexpr EventId Id = 0x0000000D; +} // namespace GeneralFault + +namespace Leakage { +static constexpr EventId Id = 0x0000000E; +} // namespace Leakage + +namespace AirDetection { +static constexpr EventId Id = 0x0000000F; +} // namespace AirDetection + +namespace TurbineOperation { +static constexpr EventId Id = 0x00000010; +} // namespace TurbineOperation + +} // namespace Events +} // namespace PumpConfigurationAndControl + +namespace TestCluster { +namespace Events { + +namespace TestEvent { +static constexpr EventId Id = 0x00000001; +} // namespace TestEvent + +} // namespace Events +} // namespace TestCluster + +} // namespace Clusters +} // namespace app +} // namespace chip From aa7285490be2caaa4702bccdec1b65cbc6d6b725 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 20 Jan 2022 17:28:50 -0500 Subject: [PATCH 099/124] Add global property for attributes (#13791) --- .../all-clusters-app.matter | 146 +++++----- .../bridge-common/bridge-app.matter | 48 ++-- .../door-lock-common/door-lock-app.matter | 46 ++-- .../lighting-common/lighting-app.matter | 62 ++--- examples/lock-app/lock-common/lock-app.matter | 48 ++-- .../log-source-common/log-source-app.matter | 6 +- .../ota-provider-app.matter | 16 +- .../ota-requestor-app.matter | 20 +- .../placeholder/linux/apps/app1/config.matter | 28 +- .../placeholder/linux/apps/app2/config.matter | 28 +- examples/pump-app/pump-common/pump-app.matter | 50 ++-- .../pump-controller-app.matter | 50 ++-- .../esp32/main/temperature-measurement.matter | 36 +-- .../thermostat-common/thermostat.matter | 56 ++-- examples/tv-app/tv-common/tv-app.matter | 88 +++--- .../tv-casting-common/tv-casting-app.matter | 110 ++++---- examples/window-app/common/window-app.matter | 48 ++-- .../templates/app/MatterIDL.zapt | 3 + .../data_model/controller-clusters.matter | 258 +++++++++--------- 19 files changed, 575 insertions(+), 572 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 1f79cd561c30ad..72d0a2fe9bc8c9 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 @@ -64,11 +64,11 @@ server cluster AccessControl = 31 { attribute AccessControlEntry acl[] = 0; attribute ExtensionEntry extension[] = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster AccountLogin = 1294 { - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster AdministratorCommissioning = 60 { @@ -87,7 +87,7 @@ server cluster AdministratorCommissioning = 60 { readonly attribute int8u windowStatus = 0; readonly attribute fabric_idx adminFabricIndex = 1; readonly attribute int16u adminVendorId = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -122,7 +122,7 @@ server cluster ApplicationBasic = 1293 { readonly attribute ApplicationStatusEnum applicationStatus = 5; readonly attribute char_string applicationVersion = 6; readonly attribute vendor_id allowedVendorList[] = 7; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster ApplicationLauncher = 1292 { @@ -138,7 +138,7 @@ server cluster ApplicationLauncher = 1292 { } readonly attribute INT16U applicationLauncherList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster AudioOutput = 1291 { @@ -159,7 +159,7 @@ server cluster AudioOutput = 1291 { readonly attribute OutputInfo audioOutputList[] = 0; readonly attribute int8u currentAudioOutput = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster BarrierControl = 259 { @@ -167,7 +167,7 @@ server cluster BarrierControl = 259 { readonly attribute bitmap16 barrierSafetyStatus = 2; readonly attribute bitmap8 barrierCapabilities = 3; readonly attribute int8u barrierPosition = 10; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct BarrierControlGoToPercentRequest { INT8U percentOpen = 0; @@ -211,7 +211,7 @@ server cluster Basic = 40 { attribute boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string uniqueID = 18; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } @@ -220,11 +220,11 @@ server cluster BinaryInputBasic = 15 { attribute boolean outOfService = 81; attribute boolean presentValue = 85; readonly attribute bitmap8 statusFlags = 111; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster Binding = 30 { - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct BindRequest { NODE_ID nodeId = 0; @@ -250,7 +250,7 @@ server cluster BooleanState = 69 { } readonly attribute boolean stateValue = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster BridgedActions = 37 { @@ -314,11 +314,11 @@ server cluster BridgedActions = 37 { readonly attribute ActionStruct actionList[] = 0; readonly attribute EndpointListStruct endpointList[] = 1; readonly attribute long_char_string setupUrl = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster BridgedDeviceBasic = 57 { - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster Channel = 1284 { @@ -340,7 +340,7 @@ server cluster Channel = 1284 { } readonly attribute ChannelInfo channelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster ColorControl = 768 { @@ -442,7 +442,7 @@ server cluster ColorControl = 768 { readonly attribute int16u colorTempPhysicalMax = 16396; readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; attribute int16u startUpColorTemperatureMireds = 16400; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct ColorLoopSetRequest { ColorLoopUpdateFlags updateFlags = 0; @@ -679,7 +679,7 @@ server cluster ContentLauncher = 1290 { readonly attribute CHAR_STRING acceptHeaderList[] = 0; attribute bitmap32 supportedStreamingProtocols = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster Descriptor = 29 { @@ -692,7 +692,7 @@ server cluster Descriptor = 29 { readonly attribute CLUSTER_ID serverList[] = 1; readonly attribute CLUSTER_ID clientList[] = 2; readonly attribute ENDPOINT_NO partsList[] = 3; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -988,7 +988,7 @@ server cluster DoorLock = 257 { attribute int8u wrongCodeEntryLimit = 48; attribute int8u userCodeTemporaryDisableTime = 49; attribute boolean requirePINforRemoteOperation = 51; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct ClearCredentialRequest { DlCredential credential = 0; @@ -1079,7 +1079,7 @@ server cluster ElectricalMeasurement = 2820 { readonly attribute int16s activePower = 1291; readonly attribute int16s activePowerMin = 1292; readonly attribute int16s activePowerMax = 1293; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster EthernetNetworkDiagnostics = 55 { @@ -1105,15 +1105,15 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute int64u overrunCount = 6; readonly attribute boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } server cluster FixedLabel = 64 { readonly attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster FlowMeasurement = 1028 { @@ -1121,7 +1121,7 @@ server cluster FlowMeasurement = 1028 { readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; readonly attribute int16u tolerance = 3; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -1146,8 +1146,8 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; readonly attribute enum8 regulatoryConfig = 2; readonly attribute enum8 locationCapability = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -1268,7 +1268,7 @@ server cluster GeneralDiagnostics = 51 { readonly attribute ENUM8 activeHardwareFaults[] = 5; readonly attribute ENUM8 activeRadioFaults[] = 6; readonly attribute ENUM8 activeNetworkFaults[] = 7; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster GroupKeyManagement = 63 { @@ -1305,7 +1305,7 @@ server cluster GroupKeyManagement = 63 { readonly attribute GroupInfo groupTable[] = 1; readonly attribute int16u maxGroupsPerFabric = 2; readonly attribute int16u maxGroupKeysPerFabric = 3; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct KeySetReadRequest { INT16U groupKeySetID = 0; @@ -1339,7 +1339,7 @@ server cluster GroupKeyManagement = 63 { server cluster Groups = 4 { readonly attribute bitmap8 nameSupport = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddGroupRequest { INT16U groupId = 0; @@ -1424,7 +1424,7 @@ server cluster IasZone = 1280 { readonly attribute bitmap16 zoneStatus = 2; attribute node_id iasCieAddress = 16; readonly attribute int8u zoneId = 17; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct ZoneEnrollRequestRequest { IasZoneType zoneType = 0; @@ -1472,7 +1472,7 @@ server cluster Identify = 3 { attribute int16u identifyTime = 0; readonly attribute enum8 identifyType = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -1503,7 +1503,7 @@ server cluster IlluminanceMeasurement = 1024 { readonly attribute int16u maxMeasuredValue = 2; readonly attribute int16u tolerance = 3; readonly attribute enum8 lightSensorType = 4; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster KeypadInput = 1289 { @@ -1602,7 +1602,7 @@ server cluster KeypadInput = 1289 { kInvalidKeyInCurrentState = 2; } - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster LevelControl = 8 { @@ -1630,8 +1630,8 @@ server cluster LevelControl = 8 { attribute int16u offTransitionTime = 19; attribute int8u defaultMoveRate = 20; attribute int8u startUpCurrentLevel = 16384; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -1692,7 +1692,7 @@ server cluster LocalizationConfiguration = 43 { } server cluster LowPower = 1288 { - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; command Sleep(): DefaultSuccess = 0; } @@ -1722,7 +1722,7 @@ server cluster MediaInput = 1287 { readonly attribute InputInfo mediaInputList[] = 0; readonly attribute int8u currentMediaInput = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster MediaPlayback = 1286 { @@ -1748,7 +1748,7 @@ server cluster MediaPlayback = 1286 { readonly attribute single playbackSpeed = 4; readonly attribute int64u seekRangeEnd = 5; readonly attribute int64u seekRangeStart = 6; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster ModeSelect = 80 { @@ -1763,7 +1763,7 @@ server cluster ModeSelect = 80 { attribute int8u onMode = 2; readonly attribute int8u startUpMode = 3; readonly attribute char_string description = 4; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct ChangeToModeRequest { INT8U newMode = 0; @@ -1830,8 +1830,8 @@ server cluster NetworkCommissioning = 49 { readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; readonly attribute octet_string lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -1912,7 +1912,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -2001,7 +2001,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute int8u updateStateProgress = 3; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AnnounceOtaProviderRequest { node_id providerNodeId = 0; @@ -2018,7 +2018,7 @@ server cluster OccupancySensing = 1030 { readonly attribute bitmap8 occupancy = 0; readonly attribute enum8 occupancySensorType = 1; readonly attribute bitmap8 occupancySensorTypeBitmap = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster OnOff = 6 { @@ -2042,8 +2042,8 @@ server cluster OnOff = 6 { attribute int16u onTime = 16385; attribute int16u offWaitTime = 16386; attribute enum8 startUpOnOff = 16387; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct OffWithEffectRequest { OnOffEffectIdentifier effectId = 0; @@ -2067,7 +2067,7 @@ server cluster OnOff = 6 { server cluster OnOffSwitchConfiguration = 7 { readonly attribute enum8 switchType = 0; attribute enum8 switchActions = 16; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster OperationalCredentials = 62 { @@ -2105,7 +2105,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; readonly attribute fabric_idx currentFabricIndex = 5; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -2189,20 +2189,20 @@ server cluster PowerSource = 47 { readonly attribute enum8 batteryChargeLevel = 14; readonly attribute ENUM8 activeBatteryFaults[] = 18; readonly attribute enum8 batteryChargeState = 26; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster PowerSourceConfiguration = 46 { readonly attribute INT8U sources[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster PressureMeasurement = 1027 { readonly attribute int16s measuredValue = 0; readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster PumpConfigurationAndControl = 512 { @@ -2297,8 +2297,8 @@ server cluster PumpConfigurationAndControl = 512 { attribute enum8 operationMode = 32; attribute enum8 controlMode = 33; readonly attribute bitmap16 alarmMask = 34; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster RelativeHumidityMeasurement = 1029 { @@ -2306,7 +2306,7 @@ server cluster RelativeHumidityMeasurement = 1029 { readonly attribute int16u minMeasuredValue = 1; readonly attribute int16u maxMeasuredValue = 2; readonly attribute int16u tolerance = 3; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster Scenes = 5 { @@ -2321,7 +2321,7 @@ server cluster Scenes = 5 { readonly attribute int16u currentGroup = 2; readonly attribute boolean sceneValid = 3; readonly attribute bitmap8 nameSupport = 4; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddSceneRequest { INT16U groupId = 0; @@ -2426,8 +2426,8 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute int64u currentHeapFree = 1; readonly attribute int64u currentHeapUsed = 2; readonly attribute int64u currentHeapHighWatermark = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; command ResetWatermarks(): DefaultSuccess = 0; } @@ -2466,8 +2466,8 @@ server cluster Switch = 59 { readonly attribute int8u numberOfPositions = 0; readonly attribute int8u currentPosition = 1; readonly attribute int8u multiPressMax = 2; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster TargetNavigator = 1285 { @@ -2484,7 +2484,7 @@ server cluster TargetNavigator = 1285 { readonly attribute TargetInfo targetNavigatorList[] = 0; readonly attribute int8u currentNavigatorTarget = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster TemperatureMeasurement = 1026 { @@ -2492,7 +2492,7 @@ server cluster TemperatureMeasurement = 1026 { readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; readonly attribute int16u tolerance = 3; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster TestCluster = 1295 { @@ -2636,7 +2636,7 @@ server cluster TestCluster = 1295 { attribute int8s nullableRangeRestrictedInt8s = 32807; attribute int16u nullableRangeRestrictedInt16u = 32808; attribute int16s nullableRangeRestrictedInt16s = 32809; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct SimpleStructEchoRequestRequest { SimpleStruct arg1 = 0; @@ -2769,15 +2769,15 @@ server cluster Thermostat = 513 { readonly attribute enum8 startOfWeek = 32; readonly attribute int8u numberOfWeeklyTransitions = 33; readonly attribute int8u numberOfDailyTransitions = 34; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster ThermostatUserInterfaceConfiguration = 516 { attribute enum8 temperatureDisplayMode = 0; attribute enum8 keypadLockout = 1; attribute enum8 scheduleProgrammingVisibility = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster ThreadNetworkDiagnostics = 53 { @@ -2920,20 +2920,20 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute octet_string channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } server cluster UserLabel = 65 { attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster WakeOnLan = 1283 { readonly attribute char_string wakeOnLanMacAddress = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -2993,8 +2993,8 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute int32u packetUnicastTxCount = 10; readonly attribute int64u currentMaxRate = 11; readonly attribute int64u overrunCount = 12; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } @@ -3018,8 +3018,8 @@ server cluster WindowCovering = 258 { readonly attribute int16u installedClosedLimitTilt = 19; attribute bitmap8 mode = 23; readonly attribute bitmap16 safetyStatus = 26; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; command DownOrClose(): DefaultSuccess = 1; command StopMotion(): DefaultSuccess = 2; diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 4a52bd4ce5ccc5..f8504f25addfa8 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -22,7 +22,7 @@ server cluster AdministratorCommissioning = 60 { readonly attribute int8u windowStatus = 0; readonly attribute fabric_idx adminFabricIndex = 1; readonly attribute int16u adminVendorId = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -68,7 +68,7 @@ server cluster Basic = 40 { readonly attribute char_string hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string softwareVersionString = 10; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster Descriptor = 29 { @@ -81,7 +81,7 @@ server cluster Descriptor = 29 { readonly attribute CLUSTER_ID serverList[] = 1; readonly attribute CLUSTER_ID clientList[] = 2; readonly attribute ENDPOINT_NO partsList[] = 3; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -137,13 +137,13 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute int64u overrunCount = 6; readonly attribute boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { readonly attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -168,8 +168,8 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; readonly attribute enum8 regulatoryConfig = 2; readonly attribute enum8 locationCapability = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -290,7 +290,7 @@ server cluster GeneralDiagnostics = 51 { readonly attribute ENUM8 activeHardwareFaults[] = 5; readonly attribute ENUM8 activeRadioFaults[] = 6; readonly attribute ENUM8 activeNetworkFaults[] = 7; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster LevelControl = 8 { @@ -318,8 +318,8 @@ server cluster LevelControl = 8 { attribute int16u offTransitionTime = 19; attribute int8u defaultMoveRate = 20; attribute int8u startUpCurrentLevel = 16384; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -437,8 +437,8 @@ server cluster NetworkCommissioning = 49 { readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; readonly attribute octet_string lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -515,7 +515,7 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -557,7 +557,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; readonly attribute fabric_idx currentFabricIndex = 5; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -648,8 +648,8 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute int64u currentHeapFree = 1; readonly attribute int64u currentHeapUsed = 2; readonly attribute int64u currentHeapHighWatermark = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster Switch = 59 { @@ -686,8 +686,8 @@ server cluster Switch = 59 { readonly attribute int8u numberOfPositions = 0; readonly attribute int8u currentPosition = 1; readonly attribute int8u multiPressMax = 2; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster ThreadNetworkDiagnostics = 53 { @@ -830,13 +830,13 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute octet_string channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster UserLabel = 65 { attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -896,8 +896,8 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute int32u packetUnicastTxCount = 10; readonly attribute int64u currentMaxRate = 11; readonly attribute int64u overrunCount = 12; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } diff --git a/examples/door-lock-app/door-lock-common/door-lock-app.matter b/examples/door-lock-app/door-lock-common/door-lock-app.matter index f06dc83c1b8c3e..2dbd6bc86aa468 100644 --- a/examples/door-lock-app/door-lock-common/door-lock-app.matter +++ b/examples/door-lock-app/door-lock-common/door-lock-app.matter @@ -22,7 +22,7 @@ server cluster AdministratorCommissioning = 60 { readonly attribute int8u windowStatus = 0; readonly attribute fabric_idx adminFabricIndex = 1; readonly attribute int16u adminVendorId = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -68,7 +68,7 @@ server cluster Basic = 40 { readonly attribute char_string hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string softwareVersionString = 10; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster Descriptor = 29 { @@ -81,7 +81,7 @@ server cluster Descriptor = 29 { readonly attribute CLUSTER_ID serverList[] = 1; readonly attribute CLUSTER_ID clientList[] = 2; readonly attribute ENDPOINT_NO partsList[] = 3; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -368,7 +368,7 @@ server cluster DoorLock = 257 { attribute boolean enablePrivacyModeButton = 43; attribute int8u wrongCodeEntryLimit = 48; attribute int8u userCodeTemporaryDisableTime = 49; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct ClearCredentialRequest { DlCredential credential = 0; @@ -470,13 +470,13 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute int64u overrunCount = 6; readonly attribute boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { readonly attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -501,8 +501,8 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; readonly attribute enum8 regulatoryConfig = 2; readonly attribute enum8 locationCapability = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -623,7 +623,7 @@ server cluster GeneralDiagnostics = 51 { readonly attribute ENUM8 activeHardwareFaults[] = 5; readonly attribute ENUM8 activeRadioFaults[] = 6; readonly attribute ENUM8 activeNetworkFaults[] = 7; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster LocalizationConfiguration = 43 { @@ -689,8 +689,8 @@ server cluster NetworkCommissioning = 49 { readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; readonly attribute octet_string lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -785,7 +785,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; readonly attribute fabric_idx currentFabricIndex = 5; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -868,13 +868,13 @@ server cluster PowerSource = 47 { readonly attribute boolean batteryReplacementNeeded = 15; readonly attribute enum8 batteryReplaceability = 16; readonly attribute char_string batteryReplacementDescription = 19; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster PowerSourceConfiguration = 46 { readonly attribute INT8U sources[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster SoftwareDiagnostics = 52 { @@ -894,8 +894,8 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute int64u currentHeapFree = 1; readonly attribute int64u currentHeapUsed = 2; readonly attribute int64u currentHeapHighWatermark = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster ThreadNetworkDiagnostics = 53 { @@ -1038,13 +1038,13 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute octet_string channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster UserLabel = 65 { attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -1104,8 +1104,8 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute int32u packetUnicastTxCount = 10; readonly attribute int64u currentMaxRate = 11; readonly attribute int64u overrunCount = 12; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index eea92f58f086ee..b2e216e95e5504 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -22,7 +22,7 @@ server cluster AdministratorCommissioning = 60 { readonly attribute int8u windowStatus = 0; readonly attribute fabric_idx adminFabricIndex = 1; readonly attribute int16u adminVendorId = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -76,7 +76,7 @@ server cluster Basic = 40 { attribute boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string uniqueID = 18; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster ColorControl = 768 { @@ -147,7 +147,7 @@ server cluster ColorControl = 768 { readonly attribute int16u colorTempPhysicalMax = 16396; readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; attribute int16u startUpColorTemperatureMireds = 16400; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct ColorLoopSetRequest { ColorLoopUpdateFlags updateFlags = 0; @@ -328,7 +328,7 @@ server cluster Descriptor = 29 { readonly attribute CLUSTER_ID serverList[] = 1; readonly attribute CLUSTER_ID clientList[] = 2; readonly attribute ENDPOINT_NO partsList[] = 3; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -384,15 +384,15 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute int64u overrunCount = 6; readonly attribute boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } server cluster FixedLabel = 64 { readonly attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -417,8 +417,8 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; readonly attribute enum8 regulatoryConfig = 2; readonly attribute enum8 locationCapability = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -539,7 +539,7 @@ server cluster GeneralDiagnostics = 51 { readonly attribute ENUM8 activeHardwareFaults[] = 5; readonly attribute ENUM8 activeRadioFaults[] = 6; readonly attribute ENUM8 activeNetworkFaults[] = 7; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster Identify = 3 { @@ -567,7 +567,7 @@ server cluster Identify = 3 { attribute int16u identifyTime = 0; readonly attribute enum8 identifyType = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -612,8 +612,8 @@ server cluster LevelControl = 8 { attribute int16u offTransitionTime = 19; attribute int8u defaultMoveRate = 20; attribute int8u startUpCurrentLevel = 16384; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -731,8 +731,8 @@ server cluster NetworkCommissioning = 49 { readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; readonly attribute octet_string lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -813,7 +813,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -913,7 +913,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute int8u updateStateProgress = 3; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AnnounceOtaProviderRequest { node_id providerNodeId = 0; @@ -930,7 +930,7 @@ server cluster OccupancySensing = 1030 { readonly attribute bitmap8 occupancy = 0; readonly attribute enum8 occupancySensorType = 1; readonly attribute bitmap8 occupancySensorTypeBitmap = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } client cluster OnOff = 6 { @@ -954,8 +954,8 @@ client cluster OnOff = 6 { attribute int16u onTime = 16385; attribute int16u offWaitTime = 16386; attribute enum8 startUpOnOff = 16387; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster OnOff = 6 { @@ -979,8 +979,8 @@ server cluster OnOff = 6 { attribute int16u onTime = 16385; attribute int16u offWaitTime = 16386; attribute enum8 startUpOnOff = 16387; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct OffWithEffectRequest { OnOffEffectIdentifier effectId = 0; @@ -1004,7 +1004,7 @@ server cluster OnOff = 6 { server cluster OnOffSwitchConfiguration = 7 { readonly attribute enum8 switchType = 0; attribute enum8 switchActions = 16; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster OperationalCredentials = 62 { @@ -1042,7 +1042,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; readonly attribute fabric_idx currentFabricIndex = 5; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -1133,8 +1133,8 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute int64u currentHeapFree = 1; readonly attribute int64u currentHeapUsed = 2; readonly attribute int64u currentHeapHighWatermark = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; command ResetWatermarks(): DefaultSuccess = 0; } @@ -1312,15 +1312,15 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute octet_string channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } server cluster UserLabel = 65 { attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -1380,8 +1380,8 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute int32u packetUnicastTxCount = 10; readonly attribute int64u currentMaxRate = 11; readonly attribute int64u overrunCount = 12; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 68d68747fa3d1b..fe6fecc6a9dd26 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -22,7 +22,7 @@ server cluster AdministratorCommissioning = 60 { readonly attribute int8u windowStatus = 0; readonly attribute fabric_idx adminFabricIndex = 1; readonly attribute int16u adminVendorId = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -68,7 +68,7 @@ server cluster Basic = 40 { readonly attribute char_string hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string softwareVersionString = 10; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster Descriptor = 29 { @@ -81,7 +81,7 @@ server cluster Descriptor = 29 { readonly attribute CLUSTER_ID serverList[] = 1; readonly attribute CLUSTER_ID clientList[] = 2; readonly attribute ENDPOINT_NO partsList[] = 3; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -137,13 +137,13 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute int64u overrunCount = 6; readonly attribute boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { readonly attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -168,8 +168,8 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; readonly attribute enum8 regulatoryConfig = 2; readonly attribute enum8 locationCapability = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -290,7 +290,7 @@ server cluster GeneralDiagnostics = 51 { readonly attribute ENUM8 activeHardwareFaults[] = 5; readonly attribute ENUM8 activeRadioFaults[] = 6; readonly attribute ENUM8 activeNetworkFaults[] = 7; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster LocalizationConfiguration = 43 { @@ -356,8 +356,8 @@ server cluster NetworkCommissioning = 49 { readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; readonly attribute octet_string lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -438,8 +438,8 @@ server cluster OnOff = 6 { attribute int16u onTime = 16385; attribute int16u offWaitTime = 16386; attribute enum8 startUpOnOff = 16387; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -481,7 +481,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; readonly attribute fabric_idx currentFabricIndex = 5; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -564,13 +564,13 @@ server cluster PowerSource = 47 { readonly attribute boolean batteryReplacementNeeded = 15; readonly attribute enum8 batteryReplaceability = 16; readonly attribute char_string batteryReplacementDescription = 19; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster PowerSourceConfiguration = 46 { readonly attribute INT8U sources[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster SoftwareDiagnostics = 52 { @@ -590,8 +590,8 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute int64u currentHeapFree = 1; readonly attribute int64u currentHeapUsed = 2; readonly attribute int64u currentHeapHighWatermark = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster ThreadNetworkDiagnostics = 53 { @@ -734,13 +734,13 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute octet_string channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster UserLabel = 65 { attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -800,8 +800,8 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute int32u packetUnicastTxCount = 10; readonly attribute int64u currentMaxRate = 11; readonly attribute int64u overrunCount = 12; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index 118db74926951c..e30623a820f786 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -80,7 +80,7 @@ server cluster GeneralCommissioning = 48 { attribute int64u breadcrumb = 0; readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -160,7 +160,7 @@ server cluster NetworkCommissioning = 49 { INT8U lqi = 7; } - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -247,7 +247,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; 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 362dc798456791..09b4f798d20c84 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 @@ -8,7 +8,7 @@ struct LabelStruct { server cluster FixedLabel = 64 { readonly attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -33,8 +33,8 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; readonly attribute enum8 regulatoryConfig = 2; readonly attribute enum8 locationCapability = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -132,8 +132,8 @@ server cluster NetworkCommissioning = 49 { readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; readonly attribute octet_string lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -214,7 +214,7 @@ server cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -293,7 +293,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; readonly attribute fabric_idx currentFabricIndex = 5; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -358,7 +358,7 @@ server cluster OperationalCredentials = 62 { server cluster UserLabel = 65 { attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } 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 483e85870e6687..fae07dd1a603d8 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 @@ -32,14 +32,14 @@ server cluster Basic = 40 { readonly attribute char_string hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string softwareVersionString = 10; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } server cluster FixedLabel = 64 { readonly attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -64,8 +64,8 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; readonly attribute enum8 regulatoryConfig = 2; readonly attribute enum8 locationCapability = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -163,8 +163,8 @@ server cluster NetworkCommissioning = 49 { readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; readonly attribute octet_string lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -245,7 +245,7 @@ client cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -345,7 +345,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute int8u updateStateProgress = 3; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AnnounceOtaProviderRequest { node_id providerNodeId = 0; @@ -393,7 +393,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; readonly attribute fabric_idx currentFabricIndex = 5; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -469,7 +469,7 @@ server cluster OperationalCredentials = 62 { server cluster UserLabel = 65 { attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 764bbe9a482b79..07f3fde86630e9 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -35,7 +35,7 @@ server cluster Basic = 40 { attribute boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string uniqueID = 18; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster ColorControl = 768 { @@ -90,7 +90,7 @@ server cluster ColorControl = 768 { attribute bitmap8 colorControlOptions = 15; readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; attribute int16u startUpColorTemperatureMireds = 16400; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct MoveColorRequest { INT16S rateX = 0; @@ -130,7 +130,7 @@ server cluster Descriptor = 29 { readonly attribute CLUSTER_ID serverList[] = 1; readonly attribute CLUSTER_ID clientList[] = 2; readonly attribute ENDPOINT_NO partsList[] = 3; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -153,7 +153,7 @@ server cluster GeneralCommissioning = 48 { attribute int64u breadcrumb = 0; readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -190,7 +190,7 @@ server cluster GeneralCommissioning = 48 { server cluster Groups = 4 { readonly attribute bitmap8 nameSupport = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddGroupRequest { INT16U groupId = 0; @@ -268,7 +268,7 @@ server cluster Identify = 3 { attribute int16u identifyTime = 0; readonly attribute enum8 identifyType = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -294,7 +294,7 @@ server cluster LevelControl = 8 { } readonly attribute int8u currentLevel = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -407,8 +407,8 @@ server cluster NetworkCommissioning = 49 { readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; readonly attribute octet_string lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -485,7 +485,7 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -520,7 +520,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; readonly attribute fabric_idx currentFabricIndex = 5; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -606,7 +606,7 @@ server cluster Scenes = 5 { readonly attribute int16u currentGroup = 2; readonly attribute boolean sceneValid = 3; readonly attribute bitmap8 nameSupport = 4; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddSceneRequest { INT16U groupId = 0; @@ -698,14 +698,14 @@ client cluster TemperatureMeasurement = 1026 { readonly attribute int16s measuredValue = 0; readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster TemperatureMeasurement = 1026 { readonly attribute int16s measuredValue = 0; readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 764bbe9a482b79..07f3fde86630e9 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -35,7 +35,7 @@ server cluster Basic = 40 { attribute boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string uniqueID = 18; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster ColorControl = 768 { @@ -90,7 +90,7 @@ server cluster ColorControl = 768 { attribute bitmap8 colorControlOptions = 15; readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; attribute int16u startUpColorTemperatureMireds = 16400; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct MoveColorRequest { INT16S rateX = 0; @@ -130,7 +130,7 @@ server cluster Descriptor = 29 { readonly attribute CLUSTER_ID serverList[] = 1; readonly attribute CLUSTER_ID clientList[] = 2; readonly attribute ENDPOINT_NO partsList[] = 3; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -153,7 +153,7 @@ server cluster GeneralCommissioning = 48 { attribute int64u breadcrumb = 0; readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -190,7 +190,7 @@ server cluster GeneralCommissioning = 48 { server cluster Groups = 4 { readonly attribute bitmap8 nameSupport = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddGroupRequest { INT16U groupId = 0; @@ -268,7 +268,7 @@ server cluster Identify = 3 { attribute int16u identifyTime = 0; readonly attribute enum8 identifyType = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -294,7 +294,7 @@ server cluster LevelControl = 8 { } readonly attribute int8u currentLevel = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -407,8 +407,8 @@ server cluster NetworkCommissioning = 49 { readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; readonly attribute octet_string lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -485,7 +485,7 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -520,7 +520,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; readonly attribute fabric_idx currentFabricIndex = 5; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -606,7 +606,7 @@ server cluster Scenes = 5 { readonly attribute int16u currentGroup = 2; readonly attribute boolean sceneValid = 3; readonly attribute bitmap8 nameSupport = 4; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddSceneRequest { INT16U groupId = 0; @@ -698,14 +698,14 @@ client cluster TemperatureMeasurement = 1026 { readonly attribute int16s measuredValue = 0; readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster TemperatureMeasurement = 1026 { readonly attribute int16s measuredValue = 0; readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 86eac98eddf62d..058c65c234e391 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -22,7 +22,7 @@ server cluster AdministratorCommissioning = 60 { readonly attribute int8u windowStatus = 0; readonly attribute fabric_idx adminFabricIndex = 1; readonly attribute int16u adminVendorId = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -68,7 +68,7 @@ server cluster Basic = 40 { readonly attribute char_string hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string softwareVersionString = 10; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } @@ -83,7 +83,7 @@ server cluster Descriptor = 29 { readonly attribute CLUSTER_ID serverList[] = 1; readonly attribute CLUSTER_ID clientList[] = 2; readonly attribute ENDPOINT_NO partsList[] = 3; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -118,21 +118,21 @@ server cluster DiagnosticLogs = 50 { server cluster FixedLabel = 64 { readonly attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } client cluster FlowMeasurement = 1028 { readonly attribute int16s measuredValue = 0; readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster FlowMeasurement = 1028 { readonly attribute int16s measuredValue = 0; readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -157,8 +157,8 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; readonly attribute enum8 regulatoryConfig = 2; readonly attribute enum8 locationCapability = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -279,7 +279,7 @@ server cluster GeneralDiagnostics = 51 { readonly attribute ENUM8 activeHardwareFaults[] = 5; readonly attribute ENUM8 activeRadioFaults[] = 6; readonly attribute ENUM8 activeNetworkFaults[] = 7; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster LevelControl = 8 { @@ -294,7 +294,7 @@ server cluster LevelControl = 8 { } readonly attribute int8u currentLevel = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -412,8 +412,8 @@ server cluster NetworkCommissioning = 49 { readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; readonly attribute octet_string lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -490,7 +490,7 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -532,7 +532,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; readonly attribute fabric_idx currentFabricIndex = 5; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -610,14 +610,14 @@ client cluster PressureMeasurement = 1027 { readonly attribute int16s measuredValue = 0; readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster PressureMeasurement = 1027 { readonly attribute int16s measuredValue = 0; readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster PumpConfigurationAndControl = 512 { @@ -712,8 +712,8 @@ server cluster PumpConfigurationAndControl = 512 { attribute enum8 operationMode = 32; attribute enum8 controlMode = 33; readonly attribute bitmap16 alarmMask = 34; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster SoftwareDiagnostics = 52 { @@ -733,22 +733,22 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute int64u currentHeapFree = 1; readonly attribute int64u currentHeapUsed = 2; readonly attribute int64u currentHeapHighWatermark = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } client cluster TemperatureMeasurement = 1026 { readonly attribute int16s measuredValue = 0; readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster TemperatureMeasurement = 1026 { readonly attribute int16s measuredValue = 0; readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster ThreadNetworkDiagnostics = 53 { @@ -891,13 +891,13 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute octet_string channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster UserLabel = 65 { attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } 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 7d0b9ce9b97746..fcc69efb730f52 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 @@ -22,7 +22,7 @@ server cluster AdministratorCommissioning = 60 { readonly attribute int8u windowStatus = 0; readonly attribute fabric_idx adminFabricIndex = 1; readonly attribute int16u adminVendorId = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -68,7 +68,7 @@ server cluster Basic = 40 { readonly attribute char_string hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string softwareVersionString = 10; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } @@ -83,7 +83,7 @@ server cluster Descriptor = 29 { readonly attribute CLUSTER_ID serverList[] = 1; readonly attribute CLUSTER_ID clientList[] = 2; readonly attribute ENDPOINT_NO partsList[] = 3; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -139,20 +139,20 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute int64u overrunCount = 6; readonly attribute boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { readonly attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } client cluster FlowMeasurement = 1028 { readonly attribute int16s measuredValue = 0; readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -177,8 +177,8 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; readonly attribute enum8 regulatoryConfig = 2; readonly attribute enum8 locationCapability = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -299,7 +299,7 @@ server cluster GeneralDiagnostics = 51 { readonly attribute ENUM8 activeHardwareFaults[] = 5; readonly attribute ENUM8 activeRadioFaults[] = 6; readonly attribute ENUM8 activeNetworkFaults[] = 7; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } client cluster LevelControl = 8 { @@ -314,7 +314,7 @@ client cluster LevelControl = 8 { } readonly attribute int8u currentLevel = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -432,8 +432,8 @@ server cluster NetworkCommissioning = 49 { readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; readonly attribute octet_string lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -510,7 +510,7 @@ client cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -552,7 +552,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; readonly attribute fabric_idx currentFabricIndex = 5; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -630,7 +630,7 @@ client cluster PressureMeasurement = 1027 { readonly attribute int16s measuredValue = 0; readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } client cluster PumpConfigurationAndControl = 512 { @@ -708,7 +708,7 @@ client cluster PumpConfigurationAndControl = 512 { readonly attribute enum8 effectiveControlMode = 18; readonly attribute int16s capacity = 19; attribute enum8 operationMode = 32; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster SoftwareDiagnostics = 52 { @@ -728,15 +728,15 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute int64u currentHeapFree = 1; readonly attribute int64u currentHeapUsed = 2; readonly attribute int64u currentHeapHighWatermark = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } client cluster TemperatureMeasurement = 1026 { readonly attribute int16s measuredValue = 0; readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster ThreadNetworkDiagnostics = 53 { @@ -879,13 +879,13 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute octet_string channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster UserLabel = 65 { attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -945,8 +945,8 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute int32u packetUnicastTxCount = 10; readonly attribute int64u currentMaxRate = 11; readonly attribute int64u overrunCount = 12; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index 905bde4e91c56c..1943328215ef9a 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -22,7 +22,7 @@ server cluster AdministratorCommissioning = 60 { readonly attribute int8u windowStatus = 0; readonly attribute fabric_idx adminFabricIndex = 1; readonly attribute int16u adminVendorId = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -68,7 +68,7 @@ server cluster Basic = 40 { readonly attribute char_string hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string softwareVersionString = 10; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster Descriptor = 29 { @@ -81,7 +81,7 @@ server cluster Descriptor = 29 { readonly attribute CLUSTER_ID serverList[] = 1; readonly attribute CLUSTER_ID clientList[] = 2; readonly attribute ENDPOINT_NO partsList[] = 3; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -137,13 +137,13 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute int64u overrunCount = 6; readonly attribute boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { readonly attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -168,8 +168,8 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; readonly attribute enum8 regulatoryConfig = 2; readonly attribute enum8 locationCapability = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -290,7 +290,7 @@ server cluster GeneralDiagnostics = 51 { readonly attribute ENUM8 activeHardwareFaults[] = 5; readonly attribute ENUM8 activeRadioFaults[] = 6; readonly attribute ENUM8 activeNetworkFaults[] = 7; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster LocalizationConfiguration = 43 { @@ -356,8 +356,8 @@ server cluster NetworkCommissioning = 49 { readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; readonly attribute octet_string lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct AddOrUpdateWiFiNetworkRequest { OCTET_STRING ssid = 0; @@ -446,7 +446,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; readonly attribute fabric_idx currentFabricIndex = 5; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -526,20 +526,20 @@ server cluster SoftwareDiagnostics = 52 { } readonly attribute int64u currentHeapHighWatermark = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster TemperatureMeasurement = 1026 { readonly attribute int16s measuredValue = 0; readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster UserLabel = 65 { attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -599,8 +599,8 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute int32u packetUnicastTxCount = 10; readonly attribute int64u currentMaxRate = 11; readonly attribute int64u overrunCount = 12; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 9019756ebabaa4..08678f8f9dd7f5 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -22,7 +22,7 @@ server cluster AdministratorCommissioning = 60 { readonly attribute int8u windowStatus = 0; readonly attribute fabric_idx adminFabricIndex = 1; readonly attribute int16u adminVendorId = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -76,13 +76,13 @@ server cluster Basic = 40 { attribute boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string uniqueID = 18; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } server cluster Binding = 30 { - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct BindRequest { NODE_ID nodeId = 0; @@ -112,7 +112,7 @@ server cluster Descriptor = 29 { readonly attribute CLUSTER_ID serverList[] = 1; readonly attribute CLUSTER_ID clientList[] = 2; readonly attribute ENDPOINT_NO partsList[] = 3; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -168,13 +168,13 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute int64u overrunCount = 6; readonly attribute boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { readonly attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -199,8 +199,8 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; readonly attribute enum8 regulatoryConfig = 2; readonly attribute enum8 locationCapability = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -321,7 +321,7 @@ server cluster GeneralDiagnostics = 51 { readonly attribute ENUM8 activeHardwareFaults[] = 5; readonly attribute ENUM8 activeRadioFaults[] = 6; readonly attribute ENUM8 activeNetworkFaults[] = 7; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster GroupKeyManagement = 63 { @@ -345,12 +345,12 @@ server cluster GroupKeyManagement = 63 { readonly attribute GroupKey groupKeyMap[] = 0; readonly attribute GroupInfo groupTable[] = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster Groups = 4 { readonly attribute bitmap8 nameSupport = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddGroupRequest { INT16U groupId = 0; @@ -428,7 +428,7 @@ client cluster Identify = 3 { attribute int16u identifyTime = 0; readonly attribute enum8 identifyType = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -467,7 +467,7 @@ server cluster Identify = 3 { attribute int16u identifyTime = 0; readonly attribute enum8 identifyType = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -544,8 +544,8 @@ server cluster NetworkCommissioning = 49 { readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; readonly attribute octet_string lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -626,7 +626,7 @@ server cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -705,7 +705,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; readonly attribute fabric_idx currentFabricIndex = 5; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -791,7 +791,7 @@ server cluster Scenes = 5 { readonly attribute int16u currentGroup = 2; readonly attribute boolean sceneValid = 3; readonly attribute bitmap8 nameSupport = 4; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddSceneRequest { INT16U groupId = 0; @@ -896,8 +896,8 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute int64u currentHeapFree = 1; readonly attribute int64u currentHeapUsed = 2; readonly attribute int64u currentHeapHighWatermark = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster Thermostat = 513 { @@ -924,8 +924,8 @@ server cluster Thermostat = 513 { readonly attribute enum8 startOfWeek = 32; readonly attribute int8u numberOfWeeklyTransitions = 33; readonly attribute int8u numberOfDailyTransitions = 34; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct GetWeeklyScheduleRequest { DayOfWeek daysToReturn = 0; @@ -1107,13 +1107,13 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute octet_string channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster UserLabel = 65 { attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -1173,8 +1173,8 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute int32u packetUnicastTxCount = 10; readonly attribute int64u currentMaxRate = 11; readonly attribute int64u overrunCount = 12; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index fab11b136b0664..2b896b3e017f27 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -7,7 +7,7 @@ struct LabelStruct { } server cluster AccountLogin = 1294 { - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct GetSetupPINRequestRequest { CHAR_STRING tempAccountIdentifier = 0; @@ -43,7 +43,7 @@ server cluster AdministratorCommissioning = 60 { readonly attribute int8u windowStatus = 0; readonly attribute fabric_idx adminFabricIndex = 1; readonly attribute int16u adminVendorId = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -84,7 +84,7 @@ server cluster ApplicationBasic = 1293 { readonly attribute ApplicationStatusEnum applicationStatus = 5; readonly attribute char_string applicationVersion = 6; readonly attribute vendor_id allowedVendorList[] = 7; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster ApplicationLauncher = 1292 { @@ -106,7 +106,7 @@ server cluster ApplicationLauncher = 1292 { readonly attribute INT16U applicationLauncherList[] = 0; attribute ApplicationEP applicationLauncherApp = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct HideAppRequestRequest { ApplicationLauncherApplication application = 0; @@ -149,7 +149,7 @@ server cluster AudioOutput = 1291 { readonly attribute OutputInfo audioOutputList[] = 0; readonly attribute int8u currentAudioOutput = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct RenameOutputRequestRequest { INT8U index = 0; @@ -197,13 +197,13 @@ server cluster Basic = 40 { readonly attribute char_string serialNumber = 15; attribute boolean localConfigDisabled = 16; readonly attribute char_string uniqueID = 18; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } client cluster Binding = 30 { - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct BindRequest { NODE_ID nodeId = 0; @@ -224,7 +224,7 @@ client cluster Binding = 30 { } server cluster Binding = 30 { - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct BindRequest { NODE_ID nodeId = 0; @@ -272,7 +272,7 @@ server cluster Channel = 1284 { readonly attribute ChannelInfo channelList[] = 0; attribute LineupInfo channelLineup = 1; attribute ChannelInfo currentChannel = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct ChangeChannelByNumberRequestRequest { INT16U majorNumber = 0; @@ -363,7 +363,7 @@ server cluster ContentLauncher = 1290 { readonly attribute CHAR_STRING acceptHeaderList[] = 0; attribute bitmap32 supportedStreamingProtocols = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct LaunchContentRequestRequest { BOOLEAN autoPlay = 0; @@ -396,7 +396,7 @@ server cluster Descriptor = 29 { readonly attribute CLUSTER_ID serverList[] = 1; readonly attribute CLUSTER_ID clientList[] = 2; readonly attribute ENDPOINT_NO partsList[] = 3; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -452,13 +452,13 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute int64u overrunCount = 6; readonly attribute boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { readonly attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } client cluster GeneralCommissioning = 48 { @@ -483,8 +483,8 @@ client cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; readonly attribute enum8 regulatoryConfig = 2; readonly attribute enum8 locationCapability = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -541,8 +541,8 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; readonly attribute enum8 regulatoryConfig = 2; readonly attribute enum8 locationCapability = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -663,7 +663,7 @@ server cluster GeneralDiagnostics = 51 { readonly attribute ENUM8 activeHardwareFaults[] = 5; readonly attribute ENUM8 activeRadioFaults[] = 6; readonly attribute ENUM8 activeNetworkFaults[] = 7; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster GroupKeyManagement = 63 { @@ -687,7 +687,7 @@ server cluster GroupKeyManagement = 63 { readonly attribute GroupKey groupKeyMap[] = 0; readonly attribute GroupInfo groupTable[] = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster KeypadInput = 1289 { @@ -786,7 +786,7 @@ server cluster KeypadInput = 1289 { kInvalidKeyInCurrentState = 2; } - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct SendKeyRequestRequest { CecKeyCode keyCode = 0; @@ -820,8 +820,8 @@ server cluster LevelControl = 8 { attribute int16u offTransitionTime = 19; attribute int8u defaultMoveRate = 20; attribute int8u startUpCurrentLevel = 16384; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -882,7 +882,7 @@ server cluster LocalizationConfiguration = 43 { } server cluster LowPower = 1288 { - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; command Sleep(): DefaultSuccess = 0; } @@ -912,7 +912,7 @@ server cluster MediaInput = 1287 { readonly attribute InputInfo mediaInputList[] = 0; readonly attribute int8u currentMediaInput = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct RenameInputRequestRequest { INT8U index = 0; @@ -958,7 +958,7 @@ server cluster MediaPlayback = 1286 { readonly attribute single playbackSpeed = 4; readonly attribute int64u seekRangeEnd = 5; readonly attribute int64u seekRangeStart = 6; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct SeekRequestRequest { INT64U position = 0; @@ -1047,8 +1047,8 @@ client cluster NetworkCommissioning = 49 { readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; readonly attribute octet_string lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -1166,8 +1166,8 @@ server cluster NetworkCommissioning = 49 { readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; readonly attribute octet_string lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -1248,7 +1248,7 @@ server cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -1309,7 +1309,7 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -1351,7 +1351,7 @@ client cluster OperationalCredentials = 62 { readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; readonly attribute fabric_idx currentFabricIndex = 5; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -1449,7 +1449,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; readonly attribute fabric_idx currentFabricIndex = 5; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -1527,7 +1527,7 @@ server cluster RelativeHumidityMeasurement = 1029 { readonly attribute int16u measuredValue = 0; readonly attribute int16u minMeasuredValue = 1; readonly attribute int16u maxMeasuredValue = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster SoftwareDiagnostics = 52 { @@ -1547,8 +1547,8 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute int64u currentHeapFree = 1; readonly attribute int64u currentHeapUsed = 2; readonly attribute int64u currentHeapHighWatermark = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster TargetNavigator = 1285 { @@ -1565,7 +1565,7 @@ server cluster TargetNavigator = 1285 { readonly attribute TargetInfo targetNavigatorList[] = 0; readonly attribute int8u currentNavigatorTarget = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct NavigateTargetRequestRequest { INT8U target = 0; @@ -1720,18 +1720,18 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute octet_string channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster UserLabel = 65 { attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster WakeOnLan = 1283 { readonly attribute char_string wakeOnLanMacAddress = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -1791,8 +1791,8 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute int32u packetUnicastTxCount = 10; readonly attribute int64u currentMaxRate = 11; readonly attribute int64u overrunCount = 12; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } 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 b380967a5dbdc1..ed780da7f8b1a4 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 @@ -7,7 +7,7 @@ struct LabelStruct { } client cluster AccountLogin = 1294 { - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct GetSetupPINRequestRequest { CHAR_STRING tempAccountIdentifier = 0; @@ -39,7 +39,7 @@ server cluster AdministratorCommissioning = 60 { readonly attribute int8u windowStatus = 0; readonly attribute fabric_idx adminFabricIndex = 1; readonly attribute int16u adminVendorId = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -73,7 +73,7 @@ client cluster ApplicationBasic = 1293 { readonly attribute int16u productId = 3; readonly attribute ApplicationStatusEnum applicationStatus = 5; readonly attribute char_string applicationVersion = 6; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } client cluster ApplicationLauncher = 1292 { @@ -89,7 +89,7 @@ client cluster ApplicationLauncher = 1292 { } readonly attribute INT16U applicationLauncherList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct HideAppRequestRequest { ApplicationLauncherApplication application = 0; @@ -126,7 +126,7 @@ client cluster AudioOutput = 1291 { } readonly attribute OutputInfo audioOutputList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct RenameOutputRequestRequest { INT8U index = 0; @@ -146,7 +146,7 @@ server cluster BarrierControl = 259 { readonly attribute bitmap16 barrierSafetyStatus = 2; readonly attribute bitmap8 barrierCapabilities = 3; readonly attribute int8u barrierPosition = 10; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct BarrierControlGoToPercentRequest { INT8U percentOpen = 0; @@ -190,7 +190,7 @@ server cluster Basic = 40 { attribute boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string uniqueID = 18; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } @@ -199,11 +199,11 @@ server cluster BinaryInputBasic = 15 { attribute boolean outOfService = 81; attribute boolean presentValue = 85; readonly attribute bitmap8 statusFlags = 111; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster Binding = 30 { - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct BindRequest { NODE_ID nodeId = 0; @@ -238,7 +238,7 @@ server cluster BridgedDeviceBasic = 57 { readonly attribute char_string productLabel = 14; readonly attribute char_string serialNumber = 15; readonly attribute boolean reachable = 17; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; command Leave(): DefaultSuccess = 2; command ReachableChanged(): DefaultSuccess = 3; @@ -274,7 +274,7 @@ client cluster Channel = 1284 { readonly attribute ChannelInfo channelList[] = 0; attribute LineupInfo channelLineup = 1; attribute ChannelInfo currentChannel = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct ChangeChannelByNumberRequestRequest { INT16U majorNumber = 0; @@ -391,7 +391,7 @@ server cluster ColorControl = 768 { readonly attribute int16u colorTempPhysicalMax = 16396; readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; attribute int16u startUpColorTemperatureMireds = 16400; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct MoveColorRequest { INT16S rateX = 0; @@ -582,7 +582,7 @@ client cluster ContentLauncher = 1290 { readonly attribute CHAR_STRING acceptHeaderList[] = 0; attribute bitmap32 supportedStreamingProtocols = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct LaunchContentRequestRequest { BOOLEAN autoPlay = 0; @@ -610,7 +610,7 @@ server cluster Descriptor = 29 { readonly attribute CLUSTER_ID serverList[] = 1; readonly attribute CLUSTER_ID clientList[] = 2; readonly attribute ENDPOINT_NO partsList[] = 3; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster DiagnosticLogs = 50 { @@ -906,7 +906,7 @@ server cluster DoorLock = 257 { attribute int8u wrongCodeEntryLimit = 48; attribute int8u userCodeTemporaryDisableTime = 49; attribute boolean requirePINforRemoteOperation = 51; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct ClearCredentialRequest { DlCredential credential = 0; @@ -1008,20 +1008,20 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute int64u overrunCount = 6; readonly attribute boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { readonly attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster FlowMeasurement = 1028 { readonly attribute int16s measuredValue = 0; readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -1046,8 +1046,8 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; readonly attribute enum8 regulatoryConfig = 2; readonly attribute enum8 locationCapability = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -1168,7 +1168,7 @@ server cluster GeneralDiagnostics = 51 { readonly attribute ENUM8 activeHardwareFaults[] = 5; readonly attribute ENUM8 activeRadioFaults[] = 6; readonly attribute ENUM8 activeNetworkFaults[] = 7; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster GroupKeyManagement = 63 { @@ -1192,12 +1192,12 @@ server cluster GroupKeyManagement = 63 { readonly attribute GroupKey groupKeyMap[] = 0; readonly attribute GroupInfo groupTable[] = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster Groups = 4 { readonly attribute bitmap8 nameSupport = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddGroupRequest { INT16U groupId = 0; @@ -1282,7 +1282,7 @@ server cluster IasZone = 1280 { readonly attribute bitmap16 zoneStatus = 2; attribute node_id iasCieAddress = 16; readonly attribute int8u zoneId = 17; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct ZoneEnrollRequestRequest { IasZoneType zoneType = 0; @@ -1329,7 +1329,7 @@ server cluster Identify = 3 { } attribute int16u identifyTime = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -1439,7 +1439,7 @@ client cluster KeypadInput = 1289 { kInvalidKeyInCurrentState = 2; } - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct SendKeyRequestRequest { CecKeyCode keyCode = 0; @@ -1473,7 +1473,7 @@ server cluster LevelControl = 8 { attribute int16u offTransitionTime = 19; attribute int8u defaultMoveRate = 20; attribute int8u startUpCurrentLevel = 16384; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -1557,7 +1557,7 @@ client cluster MediaInput = 1287 { } readonly attribute InputInfo mediaInputList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct RenameInputRequestRequest { INT8U index = 0; @@ -1591,7 +1591,7 @@ client cluster MediaPlayback = 1286 { kSeekOutOfRange = 5; } - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct SeekRequestRequest { INT64U position = 0; @@ -1676,8 +1676,8 @@ server cluster NetworkCommissioning = 49 { readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; readonly attribute octet_string lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -1758,7 +1758,7 @@ server cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -1806,7 +1806,7 @@ server cluster OccupancySensing = 1030 { readonly attribute bitmap8 occupancy = 0; readonly attribute enum8 occupancySensorType = 1; readonly attribute bitmap8 occupancySensorTypeBitmap = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster OnOff = 6 { @@ -1830,8 +1830,8 @@ server cluster OnOff = 6 { attribute int16u onTime = 16385; attribute int16u offWaitTime = 16386; attribute enum8 startUpOnOff = 16387; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -1873,7 +1873,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; readonly attribute fabric_idx currentFabricIndex = 5; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -1951,14 +1951,14 @@ server cluster PressureMeasurement = 1027 { readonly attribute int16s measuredValue = 0; readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster RelativeHumidityMeasurement = 1029 { readonly attribute int16u measuredValue = 0; readonly attribute int16u minMeasuredValue = 1; readonly attribute int16u maxMeasuredValue = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster Scenes = 5 { @@ -1973,7 +1973,7 @@ server cluster Scenes = 5 { readonly attribute int16u currentGroup = 2; readonly attribute boolean sceneValid = 3; readonly attribute bitmap8 nameSupport = 4; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddSceneRequest { INT16U groupId = 0; @@ -2078,8 +2078,8 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute int64u currentHeapFree = 1; readonly attribute int64u currentHeapUsed = 2; readonly attribute int64u currentHeapHighWatermark = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster Switch = 59 { @@ -2115,7 +2115,7 @@ server cluster Switch = 59 { readonly attribute int8u numberOfPositions = 0; readonly attribute int8u currentPosition = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } client cluster TargetNavigator = 1285 { @@ -2131,7 +2131,7 @@ client cluster TargetNavigator = 1285 { } readonly attribute TargetInfo targetNavigatorList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct NavigateTargetRequestRequest { INT8U target = 0; @@ -2145,7 +2145,7 @@ server cluster TemperatureMeasurement = 1026 { readonly attribute int16s measuredValue = 0; readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster TestCluster = 1295 { @@ -2190,7 +2190,7 @@ server cluster TestCluster = 1295 { attribute OCTET_STRING listOctetString[] = 27; attribute TestListStructOctet listStructOctetString[] = 28; attribute long_octet_string longOctetString = 29; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; response struct TestSpecificResponse { INT8U returnValue = 0; @@ -2216,8 +2216,8 @@ server cluster Thermostat = 513 { readonly attribute enum8 startOfWeek = 32; readonly attribute int8u numberOfWeeklyTransitions = 33; readonly attribute int8u numberOfDailyTransitions = 34; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; response struct GetWeeklyScheduleResponse { ENUM8 numberOfTransitionsForSequence = 0; @@ -2367,18 +2367,18 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute octet_string channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster UserLabel = 65 { attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster WakeOnLan = 1283 { readonly attribute char_string wakeOnLanMacAddress = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -2438,8 +2438,8 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute int32u packetUnicastTxCount = 10; readonly attribute int64u currentMaxRate = 11; readonly attribute int64u overrunCount = 12; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster WindowCovering = 258 { @@ -2461,7 +2461,7 @@ server cluster WindowCovering = 258 { readonly attribute int16u installedClosedLimitTilt = 19; attribute bitmap8 mode = 23; readonly attribute bitmap16 safetyStatus = 26; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 36bfd10e7adadf..c7206c376b16e3 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -22,7 +22,7 @@ server cluster AdministratorCommissioning = 60 { readonly attribute int8u windowStatus = 0; readonly attribute fabric_idx adminFabricIndex = 1; readonly attribute int16u adminVendorId = 2; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -75,7 +75,7 @@ server cluster Basic = 40 { readonly attribute char_string serialNumber = 15; attribute boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster Descriptor = 29 { @@ -88,7 +88,7 @@ server cluster Descriptor = 29 { readonly attribute CLUSTER_ID serverList[] = 1; readonly attribute CLUSTER_ID clientList[] = 2; readonly attribute ENDPOINT_NO partsList[] = 3; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster EthernetNetworkDiagnostics = 55 { @@ -114,13 +114,13 @@ server cluster EthernetNetworkDiagnostics = 55 { readonly attribute int64u overrunCount = 6; readonly attribute boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster FixedLabel = 64 { readonly attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -145,8 +145,8 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; readonly attribute enum8 regulatoryConfig = 2; readonly attribute enum8 locationCapability = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -267,7 +267,7 @@ server cluster GeneralDiagnostics = 51 { readonly attribute ENUM8 activeHardwareFaults[] = 5; readonly attribute ENUM8 activeRadioFaults[] = 6; readonly attribute ENUM8 activeNetworkFaults[] = 7; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster Identify = 3 { @@ -295,7 +295,7 @@ server cluster Identify = 3 { attribute int16u identifyTime = 0; readonly attribute enum8 identifyType = 1; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -378,8 +378,8 @@ server cluster NetworkCommissioning = 49 { readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; readonly attribute octet_string lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -474,7 +474,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; readonly attribute fabric_idx currentFabricIndex = 5; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -558,8 +558,8 @@ server cluster PowerSource = 47 { readonly attribute enum8 batteryChargeLevel = 14; readonly attribute ENUM8 activeBatteryFaults[] = 18; readonly attribute enum8 batteryChargeState = 26; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster SoftwareDiagnostics = 52 { @@ -579,8 +579,8 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute int64u currentHeapFree = 1; readonly attribute int64u currentHeapUsed = 2; readonly attribute int64u currentHeapHighWatermark = 3; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster ThreadNetworkDiagnostics = 53 { @@ -723,13 +723,13 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute octet_string channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster UserLabel = 65 { attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } server cluster WiFiNetworkDiagnostics = 54 { @@ -789,8 +789,8 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute int32u packetUnicastTxCount = 10; readonly attribute int64u currentMaxRate = 11; readonly attribute int64u overrunCount = 12; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } server cluster WindowCovering = 258 { @@ -812,8 +812,8 @@ server cluster WindowCovering = 258 { readonly attribute int16u installedClosedLimitTilt = 19; attribute bitmap8 mode = 23; readonly attribute bitmap16 safetyStatus = 26; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct GoToLiftPercentageRequest { Percent liftPercentageValue = 0; diff --git a/src/app/zap-templates/templates/app/MatterIDL.zapt b/src/app/zap-templates/templates/app/MatterIDL.zapt index e1f01ae81fde56..efa88f812e1126 100644 --- a/src/app/zap-templates/templates/app/MatterIDL.zapt +++ b/src/app/zap-templates/templates/app/MatterIDL.zapt @@ -35,6 +35,9 @@ readonly {{!marker to place a space even with whitespace removal~}} {{~/unless~}} {{~!TODO: write only attributes should also be supported~}} + {{#if isGlobalAttribute~}} + global {{!marker to place a space even with whitespace removal~}} + {{~/if~}} {{~#unless isReportableAttribute~}} nosubscribe {{!marker to place a space even with whitespace removal~}} {{~/unless~}} diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index a1ac966d363d2d..dca196240a3623 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -64,13 +64,13 @@ client cluster AccessControl = 31 { attribute AccessControlEntry acl[] = 0; attribute ExtensionEntry extension[] = 1; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; } client cluster AccountLogin = 1294 { - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct GetSetupPINRequestRequest { CHAR_STRING tempAccountIdentifier = 0; @@ -106,8 +106,8 @@ client cluster AdministratorCommissioning = 60 { readonly attribute int8u windowStatus = 0; readonly attribute fabric_idx adminFabricIndex = 1; readonly attribute int16u adminVendorId = 2; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct OpenBasicCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -148,8 +148,8 @@ client cluster ApplicationBasic = 1293 { readonly attribute ApplicationStatusEnum applicationStatus = 5; readonly attribute char_string applicationVersion = 6; readonly attribute vendor_id allowedVendorList[] = 7; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; } client cluster ApplicationLauncher = 1292 { @@ -165,8 +165,8 @@ client cluster ApplicationLauncher = 1292 { } readonly attribute INT16U applicationLauncherList[] = 0; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct HideAppRequestRequest { ApplicationLauncherApplication application = 0; @@ -209,8 +209,8 @@ client cluster AudioOutput = 1291 { readonly attribute OutputInfo audioOutputList[] = 0; readonly attribute int8u currentAudioOutput = 1; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct RenameOutputRequestRequest { INT8U index = 0; @@ -230,8 +230,8 @@ client cluster BarrierControl = 259 { readonly attribute bitmap16 barrierSafetyStatus = 2; readonly attribute bitmap8 barrierCapabilities = 3; readonly attribute int8u barrierPosition = 10; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct BarrierControlGoToPercentRequest { INT8U percentOpen = 0; @@ -275,8 +275,8 @@ client cluster Basic = 40 { attribute boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string uniqueID = 18; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; } @@ -285,13 +285,13 @@ client cluster BinaryInputBasic = 15 { attribute boolean outOfService = 81; attribute boolean presentValue = 85; readonly attribute bitmap8 statusFlags = 111; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; } client cluster Binding = 30 { - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct BindRequest { NODE_ID nodeId = 0; @@ -317,8 +317,8 @@ client cluster BooleanState = 69 { } readonly attribute boolean stateValue = 0; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; } client cluster BridgedActions = 37 { @@ -382,8 +382,8 @@ client cluster BridgedActions = 37 { readonly attribute ActionStruct actionList[] = 0; readonly attribute EndpointListStruct endpointList[] = 1; readonly attribute long_char_string setupUrl = 2; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct DisableActionRequest { INT16U actionID = 0; @@ -465,8 +465,8 @@ client cluster BridgedActions = 37 { } client cluster BridgedDeviceBasic = 57 { - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; } client cluster Channel = 1284 { @@ -488,8 +488,8 @@ client cluster Channel = 1284 { } readonly attribute ChannelInfo channelList[] = 0; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct ChangeChannelByNumberRequestRequest { INT16U majorNumber = 0; @@ -613,8 +613,8 @@ client cluster ColorControl = 768 { readonly attribute int16u colorTempPhysicalMax = 16396; readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; attribute int16u startUpColorTemperatureMireds = 16400; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct ColorLoopSetRequest { ColorLoopUpdateFlags updateFlags = 0; @@ -851,8 +851,8 @@ client cluster ContentLauncher = 1290 { readonly attribute CHAR_STRING acceptHeaderList[] = 0; attribute bitmap32 supportedStreamingProtocols = 1; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct LaunchContentRequestRequest { BOOLEAN autoPlay = 0; @@ -885,8 +885,8 @@ client cluster Descriptor = 29 { readonly attribute CLUSTER_ID serverList[] = 1; readonly attribute CLUSTER_ID clientList[] = 2; readonly attribute ENDPOINT_NO partsList[] = 3; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; } client cluster DiagnosticLogs = 50 { @@ -909,7 +909,7 @@ client cluster DiagnosticLogs = 50 { kBdx = 1; } - readonly attribute attrib_id attributeList[] = 65531; + readonly global attribute attrib_id attributeList[] = 65531; request struct RetrieveLogsRequestRequest { LogsIntent intent = 0; @@ -1179,8 +1179,8 @@ client cluster DoorLock = 257 { attribute boolean enableOneTouchLocking = 41; attribute boolean enablePrivacyModeButton = 43; attribute int8u wrongCodeEntryLimit = 48; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct ClearCredentialRequest { DlCredential credential = 0; @@ -1271,8 +1271,8 @@ client cluster ElectricalMeasurement = 2820 { readonly attribute int16s activePower = 1291; readonly attribute int16s activePowerMin = 1292; readonly attribute int16s activePowerMax = 1293; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; } client cluster EthernetNetworkDiagnostics = 55 { @@ -1298,17 +1298,17 @@ client cluster EthernetNetworkDiagnostics = 55 { readonly attribute int64u overrunCount = 6; readonly attribute boolean carrierDetect = 7; readonly attribute int64u timeSinceReset = 8; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } client cluster FixedLabel = 64 { readonly attribute LabelStruct labelList[] = 0; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; } client cluster FlowMeasurement = 1028 { @@ -1316,8 +1316,8 @@ client cluster FlowMeasurement = 1028 { readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; readonly attribute int16u tolerance = 3; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; } client cluster GeneralCommissioning = 48 { @@ -1342,8 +1342,8 @@ client cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfoType basicCommissioningInfoList[] = 1; readonly attribute enum8 regulatoryConfig = 2; readonly attribute enum8 locationCapability = 3; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; @@ -1464,8 +1464,8 @@ client cluster GeneralDiagnostics = 51 { readonly attribute ENUM8 activeHardwareFaults[] = 5; readonly attribute ENUM8 activeRadioFaults[] = 6; readonly attribute ENUM8 activeNetworkFaults[] = 7; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; } client cluster GroupKeyManagement = 63 { @@ -1502,8 +1502,8 @@ client cluster GroupKeyManagement = 63 { readonly attribute GroupInfo groupTable[] = 1; readonly attribute int16u maxGroupsPerFabric = 2; readonly attribute int16u maxGroupKeysPerFabric = 3; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct KeySetReadRequest { INT16U groupKeySetID = 0; @@ -1537,8 +1537,8 @@ client cluster GroupKeyManagement = 63 { client cluster Groups = 4 { readonly attribute bitmap8 nameSupport = 0; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct AddGroupRequest { INT16U groupId = 0; @@ -1616,8 +1616,8 @@ client cluster Identify = 3 { attribute int16u identifyTime = 0; readonly attribute enum8 identifyType = 1; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; @@ -1648,8 +1648,8 @@ client cluster IlluminanceMeasurement = 1024 { readonly attribute int16u maxMeasuredValue = 2; readonly attribute int16u tolerance = 3; readonly attribute enum8 lightSensorType = 4; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; } client cluster KeypadInput = 1289 { @@ -1748,8 +1748,8 @@ client cluster KeypadInput = 1289 { kInvalidKeyInCurrentState = 2; } - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct SendKeyRequestRequest { CecKeyCode keyCode = 0; @@ -1787,9 +1787,9 @@ client cluster LevelControl = 8 { attribute int16u offTransitionTime = 19; attribute int8u defaultMoveRate = 20; attribute int8u startUpCurrentLevel = 16384; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct MoveRequest { MoveMode moveMode = 0; @@ -1850,8 +1850,8 @@ client cluster LocalizationConfiguration = 43 { } client cluster LowPower = 1288 { - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; command Sleep(): DefaultSuccess = 0; } @@ -1881,8 +1881,8 @@ client cluster MediaInput = 1287 { readonly attribute InputInfo mediaInputList[] = 0; readonly attribute int8u currentMediaInput = 1; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct RenameInputRequestRequest { INT8U index = 0; @@ -1922,8 +1922,8 @@ client cluster MediaPlayback = 1286 { readonly attribute single playbackSpeed = 4; readonly attribute int64u seekRangeEnd = 5; readonly attribute int64u seekRangeStart = 6; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct SeekRequestRequest { INT64U position = 0; @@ -1966,8 +1966,8 @@ client cluster ModeSelect = 80 { attribute int8u onMode = 2; readonly attribute int8u startUpMode = 3; readonly attribute char_string description = 4; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct ChangeToModeRequest { INT8U newMode = 0; @@ -2034,8 +2034,8 @@ client cluster NetworkCommissioning = 49 { readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; readonly attribute octet_string lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct AddOrUpdateThreadNetworkRequest { OCTET_STRING operationalDataset = 0; @@ -2116,8 +2116,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { kDownloadProtocolNotSupported = 3; } - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct ApplyUpdateRequestRequest { OCTET_STRING updateToken = 0; @@ -2217,8 +2217,8 @@ client cluster OtaSoftwareUpdateRequestor = 42 { readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute int8u updateStateProgress = 3; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct AnnounceOtaProviderRequest { node_id providerNodeId = 0; @@ -2235,8 +2235,8 @@ client cluster OccupancySensing = 1030 { readonly attribute bitmap8 occupancy = 0; readonly attribute enum8 occupancySensorType = 1; readonly attribute bitmap8 occupancySensorTypeBitmap = 2; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; } client cluster OnOff = 6 { @@ -2260,9 +2260,9 @@ client cluster OnOff = 6 { attribute int16u onTime = 16385; attribute int16u offWaitTime = 16386; attribute enum8 startUpOnOff = 16387; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct OffWithEffectRequest { OnOffEffectIdentifier effectId = 0; @@ -2286,8 +2286,8 @@ client cluster OnOff = 6 { client cluster OnOffSwitchConfiguration = 7 { readonly attribute enum8 switchType = 0; attribute enum8 switchActions = 16; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; } client cluster OperationalCredentials = 62 { @@ -2325,8 +2325,8 @@ client cluster OperationalCredentials = 62 { readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; readonly attribute fabric_idx currentFabricIndex = 5; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -2410,23 +2410,23 @@ client cluster PowerSource = 47 { readonly attribute enum8 batteryChargeLevel = 14; readonly attribute ENUM8 activeBatteryFaults[] = 18; readonly attribute enum8 batteryChargeState = 26; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } client cluster PowerSourceConfiguration = 46 { readonly attribute INT8U sources[] = 0; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; } client cluster PressureMeasurement = 1027 { readonly attribute int16s measuredValue = 0; readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; } client cluster PumpConfigurationAndControl = 512 { @@ -2521,9 +2521,9 @@ client cluster PumpConfigurationAndControl = 512 { attribute enum8 operationMode = 32; attribute enum8 controlMode = 33; readonly attribute bitmap16 alarmMask = 34; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } client cluster RelativeHumidityMeasurement = 1029 { @@ -2531,8 +2531,8 @@ client cluster RelativeHumidityMeasurement = 1029 { readonly attribute int16u minMeasuredValue = 1; readonly attribute int16u maxMeasuredValue = 2; readonly attribute int16u tolerance = 3; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; } client cluster Scenes = 5 { @@ -2547,8 +2547,8 @@ client cluster Scenes = 5 { readonly attribute int16u currentGroup = 2; readonly attribute boolean sceneValid = 3; readonly attribute bitmap8 nameSupport = 4; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct AddSceneRequest { INT16U groupId = 0; @@ -2653,9 +2653,9 @@ client cluster SoftwareDiagnostics = 52 { readonly attribute int64u currentHeapFree = 1; readonly attribute int64u currentHeapUsed = 2; readonly attribute int64u currentHeapHighWatermark = 3; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; command ResetWatermarks(): DefaultSuccess = 0; } @@ -2694,9 +2694,9 @@ client cluster Switch = 59 { readonly attribute int8u numberOfPositions = 0; readonly attribute int8u currentPosition = 1; readonly attribute int8u multiPressMax = 2; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; } client cluster TargetNavigator = 1285 { @@ -2713,8 +2713,8 @@ client cluster TargetNavigator = 1285 { readonly attribute TargetInfo targetNavigatorList[] = 0; readonly attribute int8u currentNavigatorTarget = 1; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct NavigateTargetRequestRequest { INT8U target = 0; @@ -2734,8 +2734,8 @@ client cluster TemperatureMeasurement = 1026 { readonly attribute int16s minMeasuredValue = 1; readonly attribute int16s maxMeasuredValue = 2; readonly attribute int16u tolerance = 3; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; } client cluster TestCluster = 1295 { @@ -2880,8 +2880,8 @@ client cluster TestCluster = 1295 { attribute int8s nullableRangeRestrictedInt8s = 32807; attribute int16u nullableRangeRestrictedInt16u = 32808; attribute int16s nullableRangeRestrictedInt16s = 32809; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; request struct SimpleStructEchoRequestRequest { SimpleStruct arg1 = 0; @@ -3019,9 +3019,9 @@ client cluster Thermostat = 513 { readonly attribute enum8 startOfWeek = 32; readonly attribute int8u numberOfWeeklyTransitions = 33; readonly attribute int8u numberOfDailyTransitions = 34; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct GetWeeklyScheduleRequest { DayOfWeek daysToReturn = 0; @@ -3067,8 +3067,8 @@ client cluster ThermostatUserInterfaceConfiguration = 516 { attribute enum8 temperatureDisplayMode = 0; attribute enum8 keypadLockout = 1; attribute enum8 scheduleProgrammingVisibility = 2; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; } client cluster ThreadNetworkDiagnostics = 53 { @@ -3211,22 +3211,22 @@ client cluster ThreadNetworkDiagnostics = 53 { readonly attribute octet_string channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } client cluster UserLabel = 65 { attribute LabelStruct labelList[] = 0; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute int16u clusterRevision = 65533; } client cluster WakeOnLan = 1283 { readonly attribute char_string wakeOnLanMacAddress = 0; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; } client cluster WiFiNetworkDiagnostics = 54 { @@ -3286,9 +3286,9 @@ client cluster WiFiNetworkDiagnostics = 54 { readonly attribute int32u packetUnicastTxCount = 10; readonly attribute int64u currentMaxRate = 11; readonly attribute int64u overrunCount = 12; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; command ResetCounts(): DefaultSuccess = 0; } @@ -3312,9 +3312,9 @@ client cluster WindowCovering = 258 { readonly attribute int16u installedClosedLimitTilt = 19; attribute bitmap8 mode = 23; readonly attribute bitmap16 safetyStatus = 26; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; request struct GoToLiftPercentageRequest { Percent liftPercentageValue = 0; From d9b77e908fe1836e1f8b9f6f8c9819c43e9f3c0c Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 20 Jan 2022 17:56:39 -0500 Subject: [PATCH 100/124] Add workflow for doing fuzzing builds. (#13670) * Add workflow for doing fuzzing builds. Summary of changes: 1) examples/all-clusters-app/all-clusters-common/BUILD.gn: Makes all-clusters-app compile when compiled on its own, without any client apps (like chip-tool) as part of the same build. It used to be sneaking in a use_default_client_callbacks from someone else's configuration, as best I can tell. 2) build/config/compiler/BUILD.gn: Add a define in the fuzzer config so we can compile slightly different main() code. 3) examples/all-clusters-app/linux/main.cpp: Add a fuzzer hook that tries to process the fuzzer-provided data as a message. 4) scripts/build: Add support for a "libfuzzer" variant. * Addressing review comments. * Add clean shutdown when the fuzzer decides to stop. --- .github/workflows/fuzzing-build.yaml | 131 ++++++++++++++++++ build/config/compiler/BUILD.gn | 3 - build/config/compiler/compiler.gni | 3 + .../all-clusters-common/BUILD.gn | 1 + examples/all-clusters-app/linux/BUILD.gn | 43 +++++- .../all-clusters-app/linux/fuzzing-main.cpp | 73 ++++++++++ .../all-clusters-app/linux/main-common.cpp | 118 ++++++++++++++++ examples/all-clusters-app/linux/main.cpp | 95 ------------- scripts/build/build/targets.py | 1 + scripts/build/builders/host.py | 8 +- 10 files changed, 373 insertions(+), 103 deletions(-) create mode 100644 .github/workflows/fuzzing-build.yaml create mode 100644 examples/all-clusters-app/linux/fuzzing-main.cpp create mode 100644 examples/all-clusters-app/linux/main-common.cpp diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml new file mode 100644 index 00000000000000..ea96c4d94413e1 --- /dev/null +++ b/.github/workflows/fuzzing-build.yaml @@ -0,0 +1,131 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Fuzzing Builds + +on: + # For now, only manual triggers. + workflow_dispatch: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +jobs: + build_linux_fuzzing: + name: Build on Linux + timeout-minutes: 90 + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: connectedhomeip/chip-build:0.5.48 + volumes: + - "/tmp/log_output:/tmp/test_logs" + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: true + - run: apt-get update + - run: apt-get install --fix-missing llvm-10 clang-10 + - name: + Try to ensure the objdir-clone dir exists + run: | + mkdir objdir-clone || true + - name: Bootstrap + timeout-minutes: 10 + run: scripts/build/gn_bootstrap.sh + - name: Uploading bootstrap logs + uses: actions/upload-artifact@v2 + if: ${{ always() }} && ${{ !env.ACT }} + with: + name: bootstrap-logs + path: | + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log + - name: Build all-clusters-app + timeout-minutes: 20 + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-all-clusters-no-ble-libfuzzer-test-group \ + build \ + --copy-artifacts-to objdir-clone \ + " + - name: Uploading binaries + uses: actions/upload-artifact@v2 + if: ${{ !env.ACT }} + with: + name: + objdir-linux + path: objdir-clone/ + # objdirs are big; don't hold on to them too long. + retention-days: 5 + + build_darwin_fuzzing: + name: Build on Darwin + timeout-minutes: 90 + runs-on: macos-latest + if: github.actor != 'restyled-io[bot]' + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: true + - name: Setup Environment + run: brew install openssl pkg-config llvm + - name: Try to ensure the objdir-clone dir exists + run: | + mkdir objdir-clone || true + - name: Fix pkgconfig link + working-directory: /usr/local/lib/pkgconfig + run: | + pwd + ls -la /usr/local/Cellar/ + ls -la /usr/local/Cellar/openssl@1.1 + OPEN_SSL_VERSION=`ls -la /usr/local/Cellar/openssl@1.1 | cat | tail -n1 | awk '{print $NF}'` + ln -s /usr/local/Cellar/openssl@1.1/$OPEN_SSL_VERSION/lib/pkgconfig/* . + - name: Bootstrap + timeout-minutes: 25 + run: scripts/build/gn_bootstrap.sh + - name: Uploading bootstrap logs + uses: actions/upload-artifact@v2 + if: ${{ always() }} && ${{ !env.ACT }} + with: + name: bootstrap-logs + path: | + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log + - name: Build all-clusters-app + timeout-minutes: 20 + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target darwin-x64-all-clusters-no-ble-asan-libfuzzer \ + build \ + --copy-artifacts-to objdir-clone \ + " + - name: Uploading binaries + uses: actions/upload-artifact@v2 + if: ${{ !env.ACT }} + with: + name: + crash-darwin + path: objdir-clone/ + # objdirs are big; don't hold on to them too long. + retention-days: 5 diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 9df167b4f83234..f08497920fa488 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -307,9 +307,6 @@ declare_args() { # enable undefined behavior sanitizer is_ubsan = false - # enable libfuzzer - is_libfuzzer = false - # Exit on sanitize error. Generally standard libraries may get errors # so not stopping on the first error is often useful is_sanitize_fatal = true diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni index 00bb1317576a26..f5b6414eca8ee4 100644 --- a/build/config/compiler/compiler.gni +++ b/build/config/compiler/compiler.gni @@ -41,4 +41,7 @@ declare_args() { # C++ standard level (value for -std flag). cpp_standard = "gnu++14" + + # enable libfuzzer + is_libfuzzer = false } diff --git a/examples/all-clusters-app/all-clusters-common/BUILD.gn b/examples/all-clusters-app/all-clusters-common/BUILD.gn index 0210fcedb2c646..90751a8106cea9 100644 --- a/examples/all-clusters-app/all-clusters-common/BUILD.gn +++ b/examples/all-clusters-app/all-clusters-common/BUILD.gn @@ -22,4 +22,5 @@ chip_data_model("all-clusters-common") { zap_pregenerated_dir = "${chip_root}/zzz_generated/all-clusters-app/zap-generated" is_server = true + use_default_client_callbacks = true } diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index 563c101cb91e7b..36d3d0aa3c10a9 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -14,17 +14,18 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") +import("${build_root}/config/compiler/compiler.gni") import("${chip_root}/src/lib/lib.gni") -executable("chip-all-clusters-app") { +source_set("chip-all-clusters-common") { sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "include/tv-callbacks.cpp", "include/tv-callbacks.h", - "main.cpp", + "main-common.cpp", ] deps = [ @@ -41,10 +42,44 @@ executable("chip-all-clusters-app") { if (chip_build_libshell) { defines = [ "ENABLE_CHIP_SHELL" ] } +} + +if (is_libfuzzer) { + executable("chip-all-clusters-app-fuzzing") { + sources = [ "fuzzing-main.cpp" ] + + deps = [ + ":chip-all-clusters-common", + "${chip_root}/examples/platform/linux:app-main", + ] + + cflags = [ "-Wconversion" ] + + output_dir = root_out_dir + } +} else { + executable("chip-all-clusters-app") { + sources = [ "main.cpp" ] - output_dir = root_out_dir + deps = [ + ":chip-all-clusters-common", + "${chip_root}/examples/platform/linux:app-main", + ] + + cflags = [ "-Wconversion" ] + + include_dirs = + [ "${chip_root}/examples/all-clusters-app/all-clusters-common/include" ] + + output_dir = root_out_dir + } } group("linux") { - deps = [ ":chip-all-clusters-app" ] + deps = [] + if (is_libfuzzer) { + deps += [ ":chip-all-clusters-app-fuzzing" ] + } else { + deps += [ ":chip-all-clusters-app" ] + } } diff --git a/examples/all-clusters-app/linux/fuzzing-main.cpp b/examples/all-clusters-app/linux/fuzzing-main.cpp new file mode 100644 index 00000000000000..f7fef1bb214fb1 --- /dev/null +++ b/examples/all-clusters-app/linux/fuzzing-main.cpp @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "AppMain.h" +#include + +using namespace chip; +using namespace chip::DeviceLayer; + +void CleanShutdown() +{ + Server::GetInstance().Shutdown(); + PlatformMgr().Shutdown(); + // TODO: We don't Platform::MemoryShutdown because ~CASESessionManager calls + // Dnssd::ResolverProxy::Shutdown, which starts doing Platform::Delete. + // Platform::MemoryShutdown(); +} + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t * aData, size_t aSize) +{ + static bool matterStackInitialized = false; + if (!matterStackInitialized) + { + // Might be simpler to do ChipLinuxAppInit() with argc == 0, argv set to + // just a fake executable name? + VerifyOrDie(Platform::MemoryInit() == CHIP_NO_ERROR); + VerifyOrDie(PlatformMgr().InitChipStack() == CHIP_NO_ERROR); + + // ChipLinuxAppMainLoop blocks, and we don't want that here. + VerifyOrDie(Server::GetInstance().Init() == CHIP_NO_ERROR); + + ApplicationInit(); + + // We don't start the event loop task, because we don't plan to deliver + // data on a separate thread. + + matterStackInitialized = true; + + // The fuzzer does not have a way to tell us when it's done, so just + // shut down things on exit. + atexit(CleanShutdown); + } + + // For now, just dump the data as a UDP payload into the session manager. + // But maybe we should try to separately extract a PeerAddress and data from + // the incoming data? + Transport::PeerAddress peerAddr; + System::PacketBufferHandle buf = + System::PacketBufferHandle::NewWithData(aData, aSize, /* aAdditionalSize = */ 0, /* aReservedSize = */ 0); + + // Ignoring the return value from OnMessageReceived, because we might be + // passing it all sorts of garbage that will cause it to fail. + Server::GetInstance().GetSecureSessionManager().OnMessageReceived(peerAddr, std::move(buf)); + + // Now process pending events until our sentinel is reached. + PlatformMgr().ScheduleWork([](intptr_t) { PlatformMgr().StopEventLoopTask(); }); + PlatformMgr().RunEventLoop(); + return 0; +} diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp new file mode 100644 index 00000000000000..9497d1d0f5f072 --- /dev/null +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -0,0 +1,118 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "include/tv-callbacks.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::DeviceLayer; + +namespace { +static LowPowerManager lowPowerManager; +} // namespace + +bool emberAfBasicClusterMfgSpecificPingCallback(chip::app::CommandHandler * commandObj) +{ + emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); + return true; +} + +void OnIdentifyStart(::Identify *) +{ + ChipLogProgress(Zcl, "OnIdentifyStart"); +} + +void OnIdentifyStop(::Identify *) +{ + ChipLogProgress(Zcl, "OnIdentifyStop"); +} + +void OnTriggerEffect(::Identify * identify) +{ + switch (identify->mCurrentEffectIdentifier) + { + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: + ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK"); + break; + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: + ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE"); + break; + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY"); + break; + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: + ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE"); + break; + default: + ChipLogProgress(Zcl, "No identifier effect"); + return; + } +} + +static Identify gIdentify0 = { + chip::EndpointId{ 0 }, OnIdentifyStart, OnIdentifyStop, EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, OnTriggerEffect, +}; + +static Identify gIdentify1 = { + chip::EndpointId{ 1 }, OnIdentifyStart, OnIdentifyStop, EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, OnTriggerEffect, +}; + +// Network commissioning +namespace { +// This file is being used by platforms other than Linux, so we need this check to disable related features since we only +// implemented them on linux. +#if CHIP_DEVICE_LAYER_TARGET_LINUX +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +NetworkCommissioning::LinuxThreadDriver sLinuxThreadDriver; +Clusters::NetworkCommissioning::Instance sThreadNetworkCommissioningInstance(0 /* Endpoint Id */, &sLinuxThreadDriver); +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WPA +NetworkCommissioning::LinuxWiFiDriver sLinuxWiFiDriver; +Clusters::NetworkCommissioning::Instance sWiFiNetworkCommissioningInstance(1 /* Endpoint Id */, &sLinuxWiFiDriver); +#endif +#endif +} // namespace + +void ApplicationInit() +{ +#if CHIP_DEVICE_LAYER_TARGET_LINUX && defined(ZCL_USING_LEVEL_CONTROL_CLUSTER_SERVER) +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + sThreadNetworkCommissioningInstance.Init(); +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WPA + sWiFiNetworkCommissioningInstance.Init(); +#endif +#endif +} + +void emberAfLowPowerClusterInitCallback(EndpointId endpoint) +{ + ChipLogProgress(Zcl, "TV Linux App: LowPower::SetDefaultDelegate"); + chip::app::Clusters::LowPower::SetDefaultDelegate(endpoint, &lowPowerManager); +} diff --git a/examples/all-clusters-app/linux/main.cpp b/examples/all-clusters-app/linux/main.cpp index 2c02d212ac84f9..3ae4959c2a64fd 100644 --- a/examples/all-clusters-app/linux/main.cpp +++ b/examples/all-clusters-app/linux/main.cpp @@ -16,98 +16,9 @@ * limitations under the License. */ -#include "include/tv-callbacks.h" -#include -#include -#include -#include -#include - #include "AppMain.h" #include "binding-handler.h" -using namespace chip; -using namespace chip::app; -using namespace chip::DeviceLayer; - -namespace { -static LowPowerManager lowPowerManager; -} // namespace - -bool emberAfBasicClusterMfgSpecificPingCallback(chip::app::CommandHandler * commandObj) -{ - emberAfSendDefaultResponse(emberAfCurrentCommand(), EMBER_ZCL_STATUS_SUCCESS); - return true; -} - -void OnIdentifyStart(::Identify *) -{ - ChipLogProgress(Zcl, "OnIdentifyStart"); -} - -void OnIdentifyStop(::Identify *) -{ - ChipLogProgress(Zcl, "OnIdentifyStop"); -} - -void OnTriggerEffect(::Identify * identify) -{ - switch (identify->mCurrentEffectIdentifier) - { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK"); - break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE"); - break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY"); - break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE"); - break; - default: - ChipLogProgress(Zcl, "No identifier effect"); - return; - } -} - -static Identify gIdentify0 = { - chip::EndpointId{ 0 }, OnIdentifyStart, OnIdentifyStop, EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, OnTriggerEffect, -}; - -static Identify gIdentify1 = { - chip::EndpointId{ 1 }, OnIdentifyStart, OnIdentifyStop, EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, OnTriggerEffect, -}; - -// Network commissioning -namespace { -// This file is being used by platforms other than Linux, so we need this check to disable related features since we only -// implemented them on linux. -#if CHIP_DEVICE_LAYER_TARGET_LINUX -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD -NetworkCommissioning::LinuxThreadDriver sLinuxThreadDriver; -Clusters::NetworkCommissioning::Instance sThreadNetworkCommissioningInstance(0 /* Endpoint Id */, &sLinuxThreadDriver); -#endif -#if CHIP_DEVICE_CONFIG_ENABLE_WPA -NetworkCommissioning::LinuxWiFiDriver sLinuxWiFiDriver; -Clusters::NetworkCommissioning::Instance sWiFiNetworkCommissioningInstance(1 /* Endpoint Id */, &sLinuxWiFiDriver); -#endif -#endif -} // namespace - -void ApplicationInit() -{ -#if CHIP_DEVICE_LAYER_TARGET_LINUX && defined(ZCL_USING_LEVEL_CONTROL_CLUSTER_SERVER) -#if CHIP_DEVICE_CONFIG_ENABLE_THREAD - sThreadNetworkCommissioningInstance.Init(); -#endif -#if CHIP_DEVICE_CONFIG_ENABLE_WPA - sWiFiNetworkCommissioningInstance.Init(); -#endif -#endif -} - int main(int argc, char * argv[]) { VerifyOrDie(ChipLinuxAppInit(argc, argv) == 0); @@ -115,9 +26,3 @@ int main(int argc, char * argv[]) ChipLinuxAppMainLoop(); return 0; } - -void emberAfLowPowerClusterInitCallback(EndpointId endpoint) -{ - ChipLogProgress(Zcl, "TV Linux App: LowPower::SetDefaultDelegate"); - chip::app::Clusters::LowPower::SetDefaultDelegate(endpoint, &lowPowerManager); -} diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 8d38fbb20f8bf4..5e729c86d4fb23 100644 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -161,6 +161,7 @@ def HostTargets(): HostBuildVariant(name="no-ble", enable_ble=False), HostBuildVariant(name="tsan", conflicts=['asan'], use_tsan=True), HostBuildVariant(name="asan", conflicts=['tsan'], use_asan=True), + HostBuildVariant(name="libfuzzer", use_libfuzzer=True, use_clang=True), HostBuildVariant(name="test-group", validator=AcceptNameWithSubstrings(['-all-clusters', '-chip-tool']), test_group=True), HostBuildVariant(name="same-event-loop", diff --git a/scripts/build/builders/host.py b/scripts/build/builders/host.py index 047d7a2a959fef..58685b62092f5a 100644 --- a/scripts/build/builders/host.py +++ b/scripts/build/builders/host.py @@ -131,7 +131,7 @@ class HostBuilder(GnBuilder): def __init__(self, root, runner, app: HostApp, board=HostBoard.NATIVE, enable_ipv4=True, enable_ble=True, use_tsan=False, use_asan=False, separate_event_loop=True, - test_group=False): + test_group=False, use_libfuzzer=False, use_clang=False): super(HostBuilder, self).__init__( root=os.path.join(root, 'examples', app.ExamplePath()), runner=runner) @@ -159,6 +159,12 @@ def __init__(self, root, runner, app: HostApp, board=HostBoard.NATIVE, enable_ip self.extra_gn_options.append( 'chip_enable_group_messaging_tests=true') + if use_libfuzzer: + self.extra_gn_options.append('is_libfuzzer=true') + + if use_clang: + self.extra_gn_options.append('is_clang=true') + if app == HostApp.TESTS: self.extra_gn_options.append('chip_build_tests=true') self.build_command = 'check' From 3a2106c3fa2dccdc8fdff36bb48390525fd57d1d Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 20 Jan 2022 18:41:15 -0500 Subject: [PATCH 101/124] Ran zap regen (#13796) --- zzz_generated/app-common/app-common/zap-generated/ids/Events.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 b42a2a5d588ad2..c63d8e453a3397 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 @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * 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. From bdab6c5f40ee1ef2659249d45a336665e4a04b9d Mon Sep 17 00:00:00 2001 From: Yuanyao Zhong <82843247+yyzhong-g@users.noreply.github.com> Date: Thu, 20 Jan 2022 18:59:16 -0500 Subject: [PATCH 102/124] Add tracing instructions in ESP32 README.md (#13722) * Add tracing instructions in ESP32 README.md * Restyled by gn * Restyled by prettier-markdown * Add "tokenized" to wordlist.txt * Change in src/trace/BUILD.gn file for PW_TRACE_BACKEND_SET flag Co-authored-by: Restyled.io --- .github/.wordlist.txt | 1 + config/esp32/components/chip/component.mk | 1 + examples/all-clusters-app/esp32/README.md | 14 ++++++++++++++ src/trace/BUILD.gn | 7 +++++-- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index c811299aae330f..9886a40b4d99a9 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -993,6 +993,7 @@ TLV tmp tngvndl TODO +tokenized toolchain toolchains topologies diff --git a/config/esp32/components/chip/component.mk b/config/esp32/components/chip/component.mk index 6b8714b1db620e..61ab9100fa78e7 100644 --- a/config/esp32/components/chip/component.mk +++ b/config/esp32/components/chip/component.mk @@ -136,6 +136,7 @@ ifeq ($(is_debug),false) endif if [[ "$(CONFIG_ENABLE_PW_RPC)" = "y" ]]; then \ echo "chip_build_pw_rpc_lib = true" >> $(OUTPUT_DIR)/args.gn ;\ + echo "chip_build_pw_trace_lib = true" >> $(OUTPUT_DIR)/args.gn ;\ echo "remove_default_configs = [\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_build:cpp17\"]" >> $(OUTPUT_DIR)/args.gn ;\ echo "pw_log_BACKEND = \"//third_party/connectedhomeip/third_party/pigweed/repo/pw_log_basic\"" >> $(OUTPUT_DIR)/args.gn ;\ echo "pw_assert_BACKEND = \"//third_party/connectedhomeip/third_party/pigweed/repo/pw_assert_log\"" >> $(OUTPUT_DIR)/args.gn ;\ diff --git a/examples/all-clusters-app/esp32/README.md b/examples/all-clusters-app/esp32/README.md index 1f4ca1ca5a630e..cfb88c5606f70d 100644 --- a/examples/all-clusters-app/esp32/README.md +++ b/examples/all-clusters-app/esp32/README.md @@ -15,6 +15,7 @@ control. - [Flashing app using script](#flashing-app-using-script) - [Note](#note) - [Using the RPC console](#using-the-rpc-console) + - [Device Tracing](#device-tracing) --- @@ -295,3 +296,16 @@ From within the console you can then invoke rpcs: rpcs.chip.rpc.Lighting.Get() rpcs.chip.rpc.Lighting.Set(on=True, level=128, color=protos.chip.rpc.LightingColor(hue=5, saturation=5)) + +## Device Tracing + +Device tracing is available to analyze the device performance. To turn on +tracing, build with RPC enabled. See +[Using the RPC console](#using-the-rpc-console). + +Obtain tracing json file. + +``` + $ ./{PIGWEED_REPO}/pw_trace_tokenized/py/pw_trace_tokenized/get_trace.py -d {PORT} -o {OUTPUT_FILE} \ + -t {ELF_FILE} {PIGWEED_REPO}/pw_trace_tokenized/pw_trace_protos/trace_rpc.proto +``` diff --git a/src/trace/BUILD.gn b/src/trace/BUILD.gn index 546107ad45ce67..209909432dc0bd 100644 --- a/src/trace/BUILD.gn +++ b/src/trace/BUILD.gn @@ -18,11 +18,14 @@ declare_args() { chip_build_pw_trace_lib = false } +config("config") { + defines = [ "PW_TRACE_BACKEND_SET" ] +} + source_set("trace") { sources = [ "trace.h" ] - if (chip_build_pw_trace_lib) { - cflags = [ "-DPW_TRACE_BACKEND_SET=1" ] + public_configs = [ ":config" ] public_deps = [ "${dir_pigweed}/pw_trace" ] } } From 04f39b95919272038dfe185ae0fe858b6c756693 Mon Sep 17 00:00:00 2001 From: Chirag Atal <35214609+chiragatal@users.noreply.github.com> Date: Fri, 21 Jan 2022 05:34:46 +0530 Subject: [PATCH 103/124] Fix compilation errors in scenes-client and groups-client (#13754) --- src/app/clusters/groups-client/groups-client.cpp | 2 +- src/app/clusters/scenes-client/scenes-client.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/clusters/groups-client/groups-client.cpp b/src/app/clusters/groups-client/groups-client.cpp index 373561e115dde4..f69fa876dc43e3 100644 --- a/src/app/clusters/groups-client/groups-client.cpp +++ b/src/app/clusters/groups-client/groups-client.cpp @@ -76,7 +76,7 @@ bool emberAfGroupsClusterGetGroupMembershipResponseCallback(app::CommandHandler { emberAfGroupsClusterPrint(" [0x%2x]", emberAfGetInt16u(groupList + (i << 1), 0, 2)); } - emberAfGroupsClusterPrintln(""); + emberAfGroupsClusterPrintln("%s", ""); emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_SUCCESS); return true; } diff --git a/src/app/clusters/scenes-client/scenes-client.cpp b/src/app/clusters/scenes-client/scenes-client.cpp index 8a59aa0593c4ea..3f15fd9fe0f90b 100644 --- a/src/app/clusters/scenes-client/scenes-client.cpp +++ b/src/app/clusters/scenes-client/scenes-client.cpp @@ -42,7 +42,7 @@ #include #include -#include +#include using namespace chip; @@ -100,7 +100,7 @@ bool emberAfScenesClusterGetSceneMembershipResponseCallback(app::CommandHandler } } - emberAfScenesClusterPrintln(""); + emberAfScenesClusterPrintln("%s", ""); emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_SUCCESS); return true; } @@ -157,7 +157,7 @@ bool emberAfPluginScenesClientParseViewSceneResponse(const EmberAfClusterCommand } } - emberAfScenesClusterPrintln(""); + emberAfScenesClusterPrintln("%s", ""); emberAfSendDefaultResponse(cmd, EMBER_ZCL_STATUS_SUCCESS); return true; } From c24c34b0f94569ba31ffcda5ab76c98160136606 Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Fri, 21 Jan 2022 08:15:54 +0800 Subject: [PATCH 104/124] [Ameba] Update dockerfile for 'otar' name change (#13695) --- integrations/docker/images/chip-build-ameba/Dockerfile | 2 +- integrations/docker/images/chip-build/version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/docker/images/chip-build-ameba/Dockerfile b/integrations/docker/images/chip-build-ameba/Dockerfile index 1a0d97d29e5654..29127ce422c973 100644 --- a/integrations/docker/images/chip-build-ameba/Dockerfile +++ b/integrations/docker/images/chip-build-ameba/Dockerfile @@ -9,7 +9,7 @@ RUN set -x \ && cd ${AMEBA_DIR} \ && git clone --progress -b cmake_build https://github.com/pankore/ambd_sdk_with_chip_non_NDA.git \ && cd ambd_sdk_with_chip_non_NDA \ - && git reset --hard 4491131 \ + && git reset --hard 0eafdc7 \ && git submodule update --depth 1 --init --progress \ && cd project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/toolchain \ && cat asdk/asdk-10.3.0-linux-newlib-build-3638-x86_64.tar.bz2.part* > asdk/asdk-10.3.0-linux-newlib-build-3638-x86_64.tar.bz2 \ diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version index 4a9997ad0d2342..4a43b1aab9af3e 100644 --- a/integrations/docker/images/chip-build/version +++ b/integrations/docker/images/chip-build/version @@ -1 +1 @@ -0.5.48 Version bump reason: [nrf] Bump west version +0.5.49 Version bump reason: [Ameba] Revise 'otar' to 'ota_requestor' From cf1b25478bbcb93164b09f9546865430a3b7d8e7 Mon Sep 17 00:00:00 2001 From: Michael Sandstedt Date: Thu, 20 Jan 2022 19:24:10 -0600 Subject: [PATCH 105/124] add isShortDiscriminator to SetupPayload (#13671) The SetupPayload (Onboarding Payload in spec terminology) should be fully self describing, but isn't because it does not record whether the discriminator is the short or long version. This commit makes the necessary additions to expose that information. This improvement is then used to simplify the code in SetUpCodePairer, which was passing around its own isShort bool. Instead, it now just uses the SetupPayload struct in all interfaces. --- src/controller/SetUpCodePairer.cpp | 31 ++++++++++--------- src/controller/SetUpCodePairer.h | 8 ++--- .../ManualSetupPayloadParser.cpp | 3 +- src/setup_payload/SetupPayload.h | 1 + 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/src/controller/SetUpCodePairer.cpp b/src/controller/SetUpCodePairer.cpp index ddb460051b40b9..16e0e04d14900d 100644 --- a/src/controller/SetUpCodePairer.cpp +++ b/src/controller/SetUpCodePairer.cpp @@ -44,27 +44,27 @@ CHIP_ERROR SetUpCodePairer::PairDevice(NodeId remoteId, const char * setUpCode) mRemoteId = remoteId; mSetUpPINCode = payload.setUpPINCode; - return Connect(payload.rendezvousInformation, payload.discriminator, !isQRCode); + return Connect(payload); } -CHIP_ERROR SetUpCodePairer::Connect(RendezvousInformationFlag rendezvousInformation, uint16_t discriminator, bool isShort) +CHIP_ERROR SetUpCodePairer::Connect(SetupPayload & payload) { CHIP_ERROR err = CHIP_NO_ERROR; bool isRunning = false; - bool searchOverAll = rendezvousInformation == RendezvousInformationFlag::kNone; - if (searchOverAll || rendezvousInformation == RendezvousInformationFlag::kBLE) + bool searchOverAll = payload.rendezvousInformation == RendezvousInformationFlag::kNone; + if (searchOverAll || payload.rendezvousInformation == RendezvousInformationFlag::kBLE) { - if (CHIP_NO_ERROR == (err = StartDiscoverOverBle(discriminator, isShort))) + if (CHIP_NO_ERROR == (err = StartDiscoverOverBle(payload))) { isRunning = true; } VerifyOrReturnError(searchOverAll || CHIP_NO_ERROR == err, err); } - if (searchOverAll || rendezvousInformation == RendezvousInformationFlag::kSoftAP) + if (searchOverAll || payload.rendezvousInformation == RendezvousInformationFlag::kSoftAP) { - if (CHIP_NO_ERROR == (err = StartDiscoverOverSoftAP(discriminator, isShort))) + if (CHIP_NO_ERROR == (err = StartDiscoverOverSoftAP(payload))) { isRunning = true; } @@ -73,8 +73,7 @@ CHIP_ERROR SetUpCodePairer::Connect(RendezvousInformationFlag rendezvousInformat // We always want to search on network because any node that has already been commissioned will use on-network regardless of the // QR code flag. - if (CHIP_NO_ERROR == - (err = StartDiscoverOverIP(isShort ? static_cast((discriminator >> 8) & 0x0F) : discriminator, isShort))) + if (CHIP_NO_ERROR == (err = StartDiscoverOverIP(payload))) { isRunning = true; } @@ -83,11 +82,11 @@ CHIP_ERROR SetUpCodePairer::Connect(RendezvousInformationFlag rendezvousInformat return isRunning ? CHIP_NO_ERROR : CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } -CHIP_ERROR SetUpCodePairer::StartDiscoverOverBle(uint16_t discriminator, bool isShort) +CHIP_ERROR SetUpCodePairer::StartDiscoverOverBle(SetupPayload & payload) { #if CONFIG_NETWORK_LAYER_BLE VerifyOrReturnError(mBleLayer != nullptr, CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); - return mBleLayer->NewBleConnectionByDiscriminator(discriminator, this, OnDiscoveredDeviceOverBleSuccess, + return mBleLayer->NewBleConnectionByDiscriminator(payload.discriminator, this, OnDiscoveredDeviceOverBleSuccess, OnDiscoveredDeviceOverBleError); #else return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; @@ -104,11 +103,13 @@ CHIP_ERROR SetUpCodePairer::StopConnectOverBle() #endif // CONFIG_NETWORK_LAYER_BLE } -CHIP_ERROR SetUpCodePairer::StartDiscoverOverIP(uint16_t discriminator, bool isShort) +CHIP_ERROR SetUpCodePairer::StartDiscoverOverIP(SetupPayload & payload) { #if CHIP_DEVICE_CONFIG_ENABLE_DNSSD - currentFilter.type = isShort ? Dnssd::DiscoveryFilterType::kShortDiscriminator : Dnssd::DiscoveryFilterType::kLongDiscriminator; - currentFilter.code = discriminator; + currentFilter.type = payload.isShortDiscriminator ? Dnssd::DiscoveryFilterType::kShortDiscriminator + : Dnssd::DiscoveryFilterType::kLongDiscriminator; + currentFilter.code = + payload.isShortDiscriminator ? static_cast((payload.discriminator >> 8) & 0x0F) : payload.discriminator; return mCommissioner->DiscoverCommissionableNodes(currentFilter); #else return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; @@ -123,7 +124,7 @@ CHIP_ERROR SetUpCodePairer::StopConnectOverIP() return CHIP_NO_ERROR; } -CHIP_ERROR SetUpCodePairer::StartDiscoverOverSoftAP(uint16_t discriminator, bool isShort) +CHIP_ERROR SetUpCodePairer::StartDiscoverOverSoftAP(SetupPayload & payload) { return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } diff --git a/src/controller/SetUpCodePairer.h b/src/controller/SetUpCodePairer.h index 3b72831a331164..0ecd41c96b0597 100644 --- a/src/controller/SetUpCodePairer.h +++ b/src/controller/SetUpCodePairer.h @@ -65,12 +65,12 @@ class DLL_EXPORT SetUpCodePairer #endif // CONFIG_NETWORK_LAYER_BLE private: - CHIP_ERROR Connect(RendezvousInformationFlag rendezvousInformation, uint16_t discriminator, bool isShort); - CHIP_ERROR StartDiscoverOverBle(uint16_t discriminator, bool isShort); + CHIP_ERROR Connect(SetupPayload & paload); + CHIP_ERROR StartDiscoverOverBle(SetupPayload & payload); CHIP_ERROR StopConnectOverBle(); - CHIP_ERROR StartDiscoverOverIP(uint16_t discriminator, bool isShort); + CHIP_ERROR StartDiscoverOverIP(SetupPayload & payload); CHIP_ERROR StopConnectOverIP(); - CHIP_ERROR StartDiscoverOverSoftAP(uint16_t discriminator, bool isShort); + CHIP_ERROR StartDiscoverOverSoftAP(SetupPayload & payload); CHIP_ERROR StopConnectOverSoftAP(); void OnDeviceDiscovered(RendezvousParameters & params); diff --git a/src/setup_payload/ManualSetupPayloadParser.cpp b/src/setup_payload/ManualSetupPayloadParser.cpp index 0b59ffb53d2c16..6ef1f35ef636c6 100644 --- a/src/setup_payload/ManualSetupPayloadParser.cpp +++ b/src/setup_payload/ManualSetupPayloadParser.cpp @@ -193,7 +193,8 @@ CHIP_ERROR ManualSetupPayloadParser::populatePayload(SetupPayload & outPayload) static_assert(kSetupPINCodeFieldLengthInBits <= 32, "Won't fit in uint32_t"); outPayload.setUpPINCode = static_cast(setUpPINCode); static_assert(kManualSetupDiscriminatorFieldLengthInBits <= 16, "Won't fit in uint16_t"); - outPayload.discriminator = static_cast(discriminator); + outPayload.discriminator = static_cast(discriminator); + outPayload.isShortDiscriminator = true; return result; } diff --git a/src/setup_payload/SetupPayload.h b/src/setup_payload/SetupPayload.h index b6e000c2f0e131..298dd54ea12a69 100644 --- a/src/setup_payload/SetupPayload.h +++ b/src/setup_payload/SetupPayload.h @@ -119,6 +119,7 @@ struct PayloadContents bool isValidQRCodePayload() const; bool isValidManualCode() const; + bool isShortDiscriminator = false; bool operator==(PayloadContents & input) const; }; From 2f1301b4ab2df358a413cf19fb11e5c2dd66f845 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 20 Jan 2022 22:16:11 -0500 Subject: [PATCH 106/124] Expose array size limit in IDL where size limit seems intentional (#13699) * Expose array size limit in IDL where size limit seems intentional * Only use sizes for strings and place it together with the data type * Remove if_valid_list_size usage * ZAP regen * Fix removal of list sizes - had an extra maxLength remaining, now removed * Add unless check in structure member for string size. Not that no output diff * Add size info for attribute string types as well --- .../all-clusters-app.matter | 112 +++++++++--------- .../bridge-common/bridge-app.matter | 38 +++--- .../door-lock-common/door-lock-app.matter | 44 +++---- .../lighting-common/lighting-app.matter | 50 ++++---- examples/lock-app/lock-common/lock-app.matter | 42 +++---- .../log-source-common/log-source-app.matter | 4 +- .../ota-provider-app.matter | 12 +- .../ota-requestor-app.matter | 24 ++-- .../placeholder/linux/apps/app1/config.matter | 30 ++--- .../placeholder/linux/apps/app2/config.matter | 30 ++--- examples/pump-app/pump-common/pump-app.matter | 36 +++--- .../pump-controller-app.matter | 38 +++--- .../esp32/main/temperature-measurement.matter | 30 ++--- .../thermostat-common/thermostat.matter | 52 ++++---- examples/tv-app/tv-common/tv-app.matter | 80 ++++++------- .../tv-casting-common/tv-casting-app.matter | 104 ++++++++-------- examples/window-app/common/window-app.matter | 50 ++++---- .../partials/idl/structure_member.zapt | 9 +- .../templates/app/MatterIDL.zapt | 13 +- .../data_model/controller-clusters.matter | 112 +++++++++--------- 20 files changed, 461 insertions(+), 449 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 72d0a2fe9bc8c9..4ec59939789acb 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 @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 0; - CHAR_STRING value = 1; + CHAR_STRING<16> label = 0; + CHAR_STRING<16> value = 1; } server cluster AccessControl = 31 { @@ -43,7 +43,7 @@ server cluster AccessControl = 31 { struct ExtensionEntry { fabric_idx fabricIndex = 0; - OCTET_STRING data = 1; + OCTET_STRING<254> data = 1; } info event AccessControlEntryChanged = 0 { @@ -115,12 +115,12 @@ server cluster ApplicationBasic = 1293 { kActiveVisibleNotFocus = 3; } - readonly attribute char_string vendorName = 0; + readonly attribute char_string<32> vendorName = 0; readonly attribute int16u vendorId = 1; - readonly attribute char_string applicationName = 2; + readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productId = 3; readonly attribute ApplicationStatusEnum applicationStatus = 5; - readonly attribute char_string applicationVersion = 6; + readonly attribute char_string<32> applicationVersion = 6; readonly attribute vendor_id allowedVendorList[] = 7; readonly global attribute int16u clusterRevision = 65533; } @@ -154,7 +154,7 @@ server cluster AudioOutput = 1291 { struct OutputInfo { INT8U index = 0; OutputTypeEnum outputType = 1; - CHAR_STRING name = 2; + CHAR_STRING<32> name = 2; } readonly attribute OutputInfo audioOutputList[] = 0; @@ -193,24 +193,24 @@ server cluster Basic = 40 { } readonly attribute int16u interactionModelVersion = 0; - readonly attribute char_string vendorName = 1; + readonly attribute char_string<32> vendorName = 1; readonly attribute vendor_id vendorID = 2; - readonly attribute char_string productName = 3; + readonly attribute char_string<32> productName = 3; readonly attribute int16u productID = 4; - attribute char_string nodeLabel = 5; - attribute char_string location = 6; + attribute char_string<32> nodeLabel = 5; + attribute char_string<2> location = 6; readonly attribute int16u hardwareVersion = 7; - readonly attribute char_string hardwareVersionString = 8; + readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; - readonly attribute char_string softwareVersionString = 10; - readonly attribute char_string manufacturingDate = 11; - readonly attribute char_string partNumber = 12; - readonly attribute long_char_string productURL = 13; - readonly attribute char_string productLabel = 14; - readonly attribute char_string serialNumber = 15; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; attribute boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; - readonly attribute char_string uniqueID = 18; + readonly attribute char_string<32> uniqueID = 18; readonly global attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; @@ -284,7 +284,7 @@ server cluster BridgedActions = 37 { struct ActionStruct { INT16U actionID = 0; - CHAR_STRING name = 1; + CHAR_STRING<32> name = 1; ActionTypeEnum type = 2; INT16U endpointListID = 3; INT16U supportedCommands = 4; @@ -293,7 +293,7 @@ server cluster BridgedActions = 37 { struct EndpointListStruct { INT16U endpointListID = 0; - CHAR_STRING name = 1; + CHAR_STRING<32> name = 1; EndpointListTypeEnum type = 2; ENDPOINT_NO endpoints[] = 3; } @@ -313,7 +313,7 @@ server cluster BridgedActions = 37 { readonly attribute ActionStruct actionList[] = 0; readonly attribute EndpointListStruct endpointList[] = 1; - readonly attribute long_char_string setupUrl = 2; + readonly attribute long_char_string<512> setupUrl = 2; readonly global attribute int16u clusterRevision = 65533; } @@ -334,9 +334,9 @@ server cluster Channel = 1284 { struct ChannelInfo { INT16U majorNumber = 0; INT16U minorNumber = 1; - CHAR_STRING name = 2; - CHAR_STRING callSign = 3; - CHAR_STRING affiliateCallSign = 4; + CHAR_STRING<32> name = 2; + CHAR_STRING<32> callSign = 3; + CHAR_STRING<32> affiliateCallSign = 4; } readonly attribute ChannelInfo channelList[] = 0; @@ -396,7 +396,7 @@ server cluster ColorControl = 768 { readonly attribute int16u currentX = 3; readonly attribute int16u currentY = 4; readonly attribute enum8 driftCompensation = 5; - readonly attribute char_string compensationText = 6; + readonly attribute char_string<254> compensationText = 6; readonly attribute int16u colorTemperature = 7; readonly attribute enum8 colorMode = 8; attribute bitmap8 colorControlOptions = 15; @@ -976,7 +976,7 @@ server cluster DoorLock = 257 { readonly attribute int8u maxPINCodeLength = 23; readonly attribute int8u minPINCodeLength = 24; readonly attribute bitmap8 credentialRulesSupport = 27; - attribute char_string language = 33; + attribute char_string<3> language = 33; attribute int32u autoRelockTime = 35; attribute int8u soundVolume = 36; attribute DlOperatingMode operatingMode = 37; @@ -1233,11 +1233,11 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 0; + CHAR_STRING<32> name = 0; BOOLEAN fabricConnected = 1; BOOLEAN offPremiseServicesReachableIPv4 = 2; BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING hardwareAddress = 4; + OCTET_STRING<8> hardwareAddress = 4; InterfaceType type = 5; } @@ -1287,17 +1287,17 @@ server cluster GroupKeyManagement = 63 { INT16U fabricIndex = 0; INT16U groupId = 1; INT16U endpoints[] = 2; - CHAR_STRING groupName = 3; + CHAR_STRING<16> groupName = 3; } struct GroupKeySet { INT16U groupKeySetID = 0; GroupKeySecurityPolicy securityPolicy = 1; - OCTET_STRING epochKey0 = 2; + OCTET_STRING<16> epochKey0 = 2; INT64U epochStartTime0 = 3; - OCTET_STRING epochKey1 = 4; + OCTET_STRING<16> epochKey1 = 4; INT64U epochStartTime1 = 5; - OCTET_STRING epochKey2 = 6; + OCTET_STRING<16> epochKey2 = 6; INT64U epochStartTime2 = 7; } @@ -1687,7 +1687,7 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute char_string activeLocale = 1; + attribute char_string<35> activeLocale = 1; readonly attribute CHAR_STRING supportedLocales[] = 2; } @@ -1716,8 +1716,8 @@ server cluster MediaInput = 1287 { struct InputInfo { INT8U index = 0; InputTypeEnum inputType = 1; - CHAR_STRING name = 2; - CHAR_STRING description = 3; + CHAR_STRING<32> name = 2; + CHAR_STRING<32> description = 3; } readonly attribute InputInfo mediaInputList[] = 0; @@ -1753,7 +1753,7 @@ server cluster MediaPlayback = 1286 { server cluster ModeSelect = 80 { struct ModeOptionStruct { - CHAR_STRING label = 0; + CHAR_STRING<32> label = 0; INT8U mode = 1; INT32U semanticTag = 2; } @@ -1762,7 +1762,7 @@ server cluster ModeSelect = 80 { readonly attribute ModeOptionStruct supportedModes[] = 1; attribute int8u onMode = 2; readonly attribute int8u startUpMode = 3; - readonly attribute char_string description = 4; + readonly attribute char_string<32> description = 4; readonly global attribute int16u clusterRevision = 65533; request struct ChangeToModeRequest { @@ -1828,7 +1828,7 @@ server cluster NetworkCommissioning = 49 { readonly attribute int8u connectMaxTimeSeconds = 3; attribute boolean interfaceEnabled = 4; readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; - readonly attribute octet_string lastNetworkID = 6; + readonly attribute octet_string<32> lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; @@ -2092,11 +2092,11 @@ server cluster OperationalCredentials = 62 { struct FabricDescriptor { fabric_idx fabricIndex = 0; - OCTET_STRING rootPublicKey = 1; + OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; NODE_ID nodeId = 4; - CHAR_STRING label = 5; + CHAR_STRING<32> label = 5; } readonly attribute NOCStruct NOCs[] = 0; @@ -2182,7 +2182,7 @@ server cluster OperationalCredentials = 62 { server cluster PowerSource = 47 { readonly attribute enum8 status = 0; readonly attribute int8u order = 1; - readonly attribute char_string description = 2; + readonly attribute char_string<60> description = 2; readonly attribute int32u batteryVoltage = 11; readonly attribute int8u batteryPercentRemaining = 12; readonly attribute int32u batteryTimeRemaining = 13; @@ -2412,7 +2412,7 @@ server cluster Scenes = 5 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { INT64U id = 0; - CHAR_STRING name = 1; + CHAR_STRING<8> name = 1; INT32U stackFreeCurrent = 2; INT32U stackFreeMinimum = 3; INT32U stackSize = 4; @@ -2479,7 +2479,7 @@ server cluster TargetNavigator = 1285 { struct TargetInfo { INT8U identifier = 0; - CHAR_STRING name = 1; + CHAR_STRING<32> name = 1; } readonly attribute TargetInfo targetNavigatorList[] = 0; @@ -2505,7 +2505,7 @@ server cluster TestCluster = 1295 { struct TestListStructOctet { INT64U fabricIndex = 0; - OCTET_STRING operationalCert = 1; + OCTET_STRING<32> operationalCert = 1; } struct NullablesAndOptionalsStruct { @@ -2584,13 +2584,13 @@ server cluster TestCluster = 1295 { attribute enum16 enum16 = 22; attribute single floatSingle = 23; attribute double floatDouble = 24; - attribute octet_string octetString = 25; + attribute octet_string<10> octetString = 25; attribute INT8U listInt8u[] = 26; attribute OCTET_STRING listOctetString[] = 27; attribute TestListStructOctet listStructOctetString[] = 28; - attribute long_octet_string longOctetString = 29; - attribute char_string charString = 30; - attribute long_char_string longCharString = 31; + attribute long_octet_string<1000> longOctetString = 29; + attribute char_string<10> charString = 30; + attribute long_char_string<1000> longCharString = 31; attribute epoch_us epochUs = 32; attribute epoch_s epochS = 33; attribute vendor_id vendorId = 34; @@ -2628,8 +2628,8 @@ server cluster TestCluster = 1295 { attribute enum16 nullableEnum16 = 32790; attribute single nullableFloatSingle = 32791; attribute double nullableFloatDouble = 32792; - attribute octet_string nullableOctetString = 32793; - attribute char_string nullableCharString = 32798; + attribute octet_string<10> nullableOctetString = 32793; + attribute char_string<10> nullableCharString = 32798; attribute SimpleEnum nullableEnumAttr = 32804; attribute SimpleStruct nullableStruct = 32805; attribute int8u nullableRangeRestrictedInt8u = 32806; @@ -2859,10 +2859,10 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int16u channel = 0; readonly attribute enum8 routingRole = 1; - readonly attribute octet_string networkName = 2; + readonly attribute octet_string<16> networkName = 2; readonly attribute int16u panId = 3; readonly attribute int64u extendedPanId = 4; - readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute octet_string<17> meshLocalPrefix = 5; readonly attribute int64u overrunCount = 6; readonly attribute NeighborTable neighborTableList[] = 7; readonly attribute RouteTable routeTableList[] = 8; @@ -2917,7 +2917,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int64u pendingTimestamp = 57; readonly attribute int32u delay = 58; readonly attribute SecurityPolicy securityPolicy[] = 59; - readonly attribute octet_string channelMask = 60; + readonly attribute octet_string<4> channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; readonly global attribute bitmap32 featureMap = 65532; @@ -2932,7 +2932,7 @@ server cluster UserLabel = 65 { } server cluster WakeOnLan = 1283 { - readonly attribute char_string wakeOnLanMacAddress = 0; + readonly attribute char_string<32> wakeOnLanMacAddress = 0; readonly global attribute int16u clusterRevision = 65533; } @@ -2980,7 +2980,7 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - readonly attribute octet_string bssid = 0; + readonly attribute octet_string<6> bssid = 0; readonly attribute enum8 securityType = 1; readonly attribute enum8 wiFiVersion = 2; readonly attribute int16u channelNumber = 3; diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index f8504f25addfa8..5ec65851ef1a4f 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 0; - CHAR_STRING value = 1; + CHAR_STRING<16> label = 0; + CHAR_STRING<16> value = 1; } server cluster AdministratorCommissioning = 60 { @@ -58,16 +58,16 @@ server cluster Basic = 40 { } readonly attribute int16u interactionModelVersion = 0; - readonly attribute char_string vendorName = 1; + readonly attribute char_string<32> vendorName = 1; readonly attribute vendor_id vendorID = 2; - readonly attribute char_string productName = 3; + readonly attribute char_string<32> productName = 3; readonly attribute int16u productID = 4; - attribute char_string nodeLabel = 5; - attribute char_string location = 6; + attribute char_string<32> nodeLabel = 5; + attribute char_string<2> location = 6; readonly attribute int16u hardwareVersion = 7; - readonly attribute char_string hardwareVersionString = 8; + readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; - readonly attribute char_string softwareVersionString = 10; + readonly attribute char_string<64> softwareVersionString = 10; readonly global attribute int16u clusterRevision = 65533; } @@ -255,11 +255,11 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 0; + CHAR_STRING<32> name = 0; BOOLEAN fabricConnected = 1; BOOLEAN offPremiseServicesReachableIPv4 = 2; BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING hardwareAddress = 4; + OCTET_STRING<8> hardwareAddress = 4; InterfaceType type = 5; } @@ -375,7 +375,7 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute char_string activeLocale = 1; + attribute char_string<35> activeLocale = 1; readonly attribute CHAR_STRING supportedLocales[] = 2; } @@ -435,7 +435,7 @@ server cluster NetworkCommissioning = 49 { readonly attribute int8u connectMaxTimeSeconds = 3; attribute boolean interfaceEnabled = 4; readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; - readonly attribute octet_string lastNetworkID = 6; + readonly attribute octet_string<32> lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; @@ -544,11 +544,11 @@ server cluster OperationalCredentials = 62 { struct FabricDescriptor { fabric_idx fabricIndex = 0; - OCTET_STRING rootPublicKey = 1; + OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; NODE_ID nodeId = 4; - CHAR_STRING label = 5; + CHAR_STRING<32> label = 5; } readonly attribute NOCStruct NOCs[] = 0; @@ -634,7 +634,7 @@ server cluster OperationalCredentials = 62 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { INT64U id = 0; - CHAR_STRING name = 1; + CHAR_STRING<8> name = 1; INT32U stackFreeCurrent = 2; INT32U stackFreeMinimum = 3; INT32U stackSize = 4; @@ -769,10 +769,10 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int16u channel = 0; readonly attribute enum8 routingRole = 1; - readonly attribute octet_string networkName = 2; + readonly attribute octet_string<16> networkName = 2; readonly attribute int16u panId = 3; readonly attribute int64u extendedPanId = 4; - readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute octet_string<17> meshLocalPrefix = 5; readonly attribute int64u overrunCount = 6; readonly attribute NeighborTable neighborTableList[] = 7; readonly attribute RouteTable routeTableList[] = 8; @@ -827,7 +827,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int64u pendingTimestamp = 57; readonly attribute int32u delay = 58; readonly attribute SecurityPolicy securityPolicy[] = 59; - readonly attribute octet_string channelMask = 60; + readonly attribute octet_string<4> channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; readonly global attribute bitmap32 featureMap = 65532; @@ -883,7 +883,7 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - readonly attribute octet_string bssid = 0; + readonly attribute octet_string<6> bssid = 0; readonly attribute enum8 securityType = 1; readonly attribute enum8 wiFiVersion = 2; readonly attribute int16u channelNumber = 3; diff --git a/examples/door-lock-app/door-lock-common/door-lock-app.matter b/examples/door-lock-app/door-lock-common/door-lock-app.matter index 2dbd6bc86aa468..6e591f838c5aae 100644 --- a/examples/door-lock-app/door-lock-common/door-lock-app.matter +++ b/examples/door-lock-app/door-lock-common/door-lock-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 0; - CHAR_STRING value = 1; + CHAR_STRING<16> label = 0; + CHAR_STRING<16> value = 1; } server cluster AdministratorCommissioning = 60 { @@ -58,16 +58,16 @@ server cluster Basic = 40 { } readonly attribute int16u interactionModelVersion = 0; - readonly attribute char_string vendorName = 1; + readonly attribute char_string<32> vendorName = 1; readonly attribute vendor_id vendorID = 2; - readonly attribute char_string productName = 3; + readonly attribute char_string<32> productName = 3; readonly attribute int16u productID = 4; - attribute char_string nodeLabel = 5; - attribute char_string location = 6; + attribute char_string<32> nodeLabel = 5; + attribute char_string<2> location = 6; readonly attribute int16u hardwareVersion = 7; - readonly attribute char_string hardwareVersionString = 8; + readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; - readonly attribute char_string softwareVersionString = 10; + readonly attribute char_string<64> softwareVersionString = 10; readonly global attribute int16u clusterRevision = 65533; } @@ -359,7 +359,7 @@ server cluster DoorLock = 257 { readonly attribute int8u maxPINCodeLength = 23; readonly attribute int8u minPINCodeLength = 24; readonly attribute bitmap8 credentialRulesSupport = 27; - attribute char_string language = 33; + attribute char_string<3> language = 33; attribute int32u autoRelockTime = 35; attribute int8u soundVolume = 36; attribute DlOperatingMode operatingMode = 37; @@ -588,11 +588,11 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 0; + CHAR_STRING<32> name = 0; BOOLEAN fabricConnected = 1; BOOLEAN offPremiseServicesReachableIPv4 = 2; BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING hardwareAddress = 4; + OCTET_STRING<8> hardwareAddress = 4; InterfaceType type = 5; } @@ -627,7 +627,7 @@ server cluster GeneralDiagnostics = 51 { } server cluster LocalizationConfiguration = 43 { - attribute char_string activeLocale = 1; + attribute char_string<35> activeLocale = 1; readonly attribute CHAR_STRING supportedLocales[] = 2; } @@ -687,7 +687,7 @@ server cluster NetworkCommissioning = 49 { readonly attribute int8u connectMaxTimeSeconds = 3; attribute boolean interfaceEnabled = 4; readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; - readonly attribute octet_string lastNetworkID = 6; + readonly attribute octet_string<32> lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; @@ -772,11 +772,11 @@ server cluster OperationalCredentials = 62 { struct FabricDescriptor { fabric_idx fabricIndex = 0; - OCTET_STRING rootPublicKey = 1; + OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; NODE_ID nodeId = 4; - CHAR_STRING label = 5; + CHAR_STRING<32> label = 5; } readonly attribute NOCStruct NOCs[] = 0; @@ -862,12 +862,12 @@ server cluster OperationalCredentials = 62 { server cluster PowerSource = 47 { readonly attribute enum8 status = 0; readonly attribute int8u order = 1; - readonly attribute char_string description = 2; + readonly attribute char_string<60> description = 2; readonly attribute int32u wiredAssessedCurrent = 6; readonly attribute enum8 batteryChargeLevel = 14; readonly attribute boolean batteryReplacementNeeded = 15; readonly attribute enum8 batteryReplaceability = 16; - readonly attribute char_string batteryReplacementDescription = 19; + readonly attribute char_string<60> batteryReplacementDescription = 19; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; } @@ -880,7 +880,7 @@ server cluster PowerSourceConfiguration = 46 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { INT64U id = 0; - CHAR_STRING name = 1; + CHAR_STRING<8> name = 1; INT32U stackFreeCurrent = 2; INT32U stackFreeMinimum = 3; INT32U stackSize = 4; @@ -977,10 +977,10 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int16u channel = 0; readonly attribute enum8 routingRole = 1; - readonly attribute octet_string networkName = 2; + readonly attribute octet_string<16> networkName = 2; readonly attribute int16u panId = 3; readonly attribute int64u extendedPanId = 4; - readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute octet_string<17> meshLocalPrefix = 5; readonly attribute int64u overrunCount = 6; readonly attribute NeighborTable neighborTableList[] = 7; readonly attribute RouteTable routeTableList[] = 8; @@ -1035,7 +1035,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int64u pendingTimestamp = 57; readonly attribute int32u delay = 58; readonly attribute SecurityPolicy securityPolicy[] = 59; - readonly attribute octet_string channelMask = 60; + readonly attribute octet_string<4> channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; readonly global attribute bitmap32 featureMap = 65532; @@ -1091,7 +1091,7 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - readonly attribute octet_string bssid = 0; + readonly attribute octet_string<6> bssid = 0; readonly attribute enum8 securityType = 1; readonly attribute enum8 wiFiVersion = 2; readonly attribute int16u channelNumber = 3; diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index b2e216e95e5504..76c31b86d02b30 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 0; - CHAR_STRING value = 1; + CHAR_STRING<16> label = 0; + CHAR_STRING<16> value = 1; } server cluster AdministratorCommissioning = 60 { @@ -58,24 +58,24 @@ server cluster Basic = 40 { } readonly attribute int16u interactionModelVersion = 0; - readonly attribute char_string vendorName = 1; + readonly attribute char_string<32> vendorName = 1; readonly attribute vendor_id vendorID = 2; - readonly attribute char_string productName = 3; + readonly attribute char_string<32> productName = 3; readonly attribute int16u productID = 4; - attribute char_string nodeLabel = 5; - attribute char_string location = 6; + attribute char_string<32> nodeLabel = 5; + attribute char_string<2> location = 6; readonly attribute int16u hardwareVersion = 7; - readonly attribute char_string hardwareVersionString = 8; + readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; - readonly attribute char_string softwareVersionString = 10; - readonly attribute char_string manufacturingDate = 11; - readonly attribute char_string partNumber = 12; - readonly attribute long_char_string productURL = 13; - readonly attribute char_string productLabel = 14; - readonly attribute char_string serialNumber = 15; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; attribute boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; - readonly attribute char_string uniqueID = 18; + readonly attribute char_string<32> uniqueID = 18; readonly global attribute int16u clusterRevision = 65533; } @@ -504,11 +504,11 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 0; + CHAR_STRING<32> name = 0; BOOLEAN fabricConnected = 1; BOOLEAN offPremiseServicesReachableIPv4 = 2; BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING hardwareAddress = 4; + OCTET_STRING<8> hardwareAddress = 4; InterfaceType type = 5; } @@ -669,7 +669,7 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute char_string activeLocale = 1; + attribute char_string<35> activeLocale = 1; readonly attribute CHAR_STRING supportedLocales[] = 2; } @@ -729,7 +729,7 @@ server cluster NetworkCommissioning = 49 { readonly attribute int8u connectMaxTimeSeconds = 3; attribute boolean interfaceEnabled = 4; readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; - readonly attribute octet_string lastNetworkID = 6; + readonly attribute octet_string<32> lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; @@ -1029,11 +1029,11 @@ server cluster OperationalCredentials = 62 { struct FabricDescriptor { fabric_idx fabricIndex = 0; - OCTET_STRING rootPublicKey = 1; + OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; NODE_ID nodeId = 4; - CHAR_STRING label = 5; + CHAR_STRING<32> label = 5; } readonly attribute NOCStruct NOCs[] = 0; @@ -1119,7 +1119,7 @@ server cluster OperationalCredentials = 62 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { INT64U id = 0; - CHAR_STRING name = 1; + CHAR_STRING<8> name = 1; INT32U stackFreeCurrent = 2; INT32U stackFreeMinimum = 3; INT32U stackSize = 4; @@ -1251,10 +1251,10 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int16u channel = 0; readonly attribute enum8 routingRole = 1; - readonly attribute octet_string networkName = 2; + readonly attribute octet_string<16> networkName = 2; readonly attribute int16u panId = 3; readonly attribute int64u extendedPanId = 4; - readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute octet_string<17> meshLocalPrefix = 5; readonly attribute int64u overrunCount = 6; readonly attribute NeighborTable neighborTableList[] = 7; readonly attribute RouteTable routeTableList[] = 8; @@ -1309,7 +1309,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int64u pendingTimestamp = 57; readonly attribute int32u delay = 58; readonly attribute SecurityPolicy securityPolicy[] = 59; - readonly attribute octet_string channelMask = 60; + readonly attribute octet_string<4> channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; readonly global attribute bitmap32 featureMap = 65532; @@ -1367,7 +1367,7 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - readonly attribute octet_string bssid = 0; + readonly attribute octet_string<6> bssid = 0; readonly attribute enum8 securityType = 1; readonly attribute enum8 wiFiVersion = 2; readonly attribute int16u channelNumber = 3; diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index fe6fecc6a9dd26..39b212425bbdcc 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 0; - CHAR_STRING value = 1; + CHAR_STRING<16> label = 0; + CHAR_STRING<16> value = 1; } server cluster AdministratorCommissioning = 60 { @@ -58,16 +58,16 @@ server cluster Basic = 40 { } readonly attribute int16u interactionModelVersion = 0; - readonly attribute char_string vendorName = 1; + readonly attribute char_string<32> vendorName = 1; readonly attribute vendor_id vendorID = 2; - readonly attribute char_string productName = 3; + readonly attribute char_string<32> productName = 3; readonly attribute int16u productID = 4; - attribute char_string nodeLabel = 5; - attribute char_string location = 6; + attribute char_string<32> nodeLabel = 5; + attribute char_string<2> location = 6; readonly attribute int16u hardwareVersion = 7; - readonly attribute char_string hardwareVersionString = 8; + readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; - readonly attribute char_string softwareVersionString = 10; + readonly attribute char_string<64> softwareVersionString = 10; readonly global attribute int16u clusterRevision = 65533; } @@ -255,11 +255,11 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 0; + CHAR_STRING<32> name = 0; BOOLEAN fabricConnected = 1; BOOLEAN offPremiseServicesReachableIPv4 = 2; BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING hardwareAddress = 4; + OCTET_STRING<8> hardwareAddress = 4; InterfaceType type = 5; } @@ -294,7 +294,7 @@ server cluster GeneralDiagnostics = 51 { } server cluster LocalizationConfiguration = 43 { - attribute char_string activeLocale = 1; + attribute char_string<35> activeLocale = 1; readonly attribute CHAR_STRING supportedLocales[] = 2; } @@ -354,7 +354,7 @@ server cluster NetworkCommissioning = 49 { readonly attribute int8u connectMaxTimeSeconds = 3; attribute boolean interfaceEnabled = 4; readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; - readonly attribute octet_string lastNetworkID = 6; + readonly attribute octet_string<32> lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; @@ -468,11 +468,11 @@ server cluster OperationalCredentials = 62 { struct FabricDescriptor { fabric_idx fabricIndex = 0; - OCTET_STRING rootPublicKey = 1; + OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; NODE_ID nodeId = 4; - CHAR_STRING label = 5; + CHAR_STRING<32> label = 5; } readonly attribute NOCStruct NOCs[] = 0; @@ -558,12 +558,12 @@ server cluster OperationalCredentials = 62 { server cluster PowerSource = 47 { readonly attribute enum8 status = 0; readonly attribute int8u order = 1; - readonly attribute char_string description = 2; + readonly attribute char_string<60> description = 2; readonly attribute int32u wiredAssessedCurrent = 6; readonly attribute enum8 batteryChargeLevel = 14; readonly attribute boolean batteryReplacementNeeded = 15; readonly attribute enum8 batteryReplaceability = 16; - readonly attribute char_string batteryReplacementDescription = 19; + readonly attribute char_string<60> batteryReplacementDescription = 19; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; } @@ -576,7 +576,7 @@ server cluster PowerSourceConfiguration = 46 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { INT64U id = 0; - CHAR_STRING name = 1; + CHAR_STRING<8> name = 1; INT32U stackFreeCurrent = 2; INT32U stackFreeMinimum = 3; INT32U stackSize = 4; @@ -673,10 +673,10 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int16u channel = 0; readonly attribute enum8 routingRole = 1; - readonly attribute octet_string networkName = 2; + readonly attribute octet_string<16> networkName = 2; readonly attribute int16u panId = 3; readonly attribute int64u extendedPanId = 4; - readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute octet_string<17> meshLocalPrefix = 5; readonly attribute int64u overrunCount = 6; readonly attribute NeighborTable neighborTableList[] = 7; readonly attribute RouteTable routeTableList[] = 8; @@ -731,7 +731,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int64u pendingTimestamp = 57; readonly attribute int32u delay = 58; readonly attribute SecurityPolicy securityPolicy[] = 59; - readonly attribute octet_string channelMask = 60; + readonly attribute octet_string<4> channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; readonly global attribute bitmap32 featureMap = 65532; @@ -787,7 +787,7 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - readonly attribute octet_string bssid = 0; + readonly attribute octet_string<6> bssid = 0; readonly attribute enum8 securityType = 1; readonly attribute enum8 wiFiVersion = 2; readonly attribute int16u channelNumber = 3; diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index e30623a820f786..1280aec975ace0 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -236,11 +236,11 @@ server cluster OperationalCredentials = 62 { struct FabricDescriptor { fabric_idx fabricIndex = 0; - OCTET_STRING rootPublicKey = 1; + OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; NODE_ID nodeId = 4; - CHAR_STRING label = 5; + CHAR_STRING<32> label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; 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 09b4f798d20c84..24c3902d15b0d1 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 @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 0; - CHAR_STRING value = 1; + CHAR_STRING<16> label = 0; + CHAR_STRING<16> value = 1; } server cluster FixedLabel = 64 { @@ -70,7 +70,7 @@ server cluster GeneralCommissioning = 48 { } server cluster LocalizationConfiguration = 43 { - attribute char_string activeLocale = 1; + attribute char_string<35> activeLocale = 1; readonly attribute CHAR_STRING supportedLocales[] = 2; } @@ -130,7 +130,7 @@ server cluster NetworkCommissioning = 49 { readonly attribute int8u connectMaxTimeSeconds = 3; attribute boolean interfaceEnabled = 4; readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; - readonly attribute octet_string lastNetworkID = 6; + readonly attribute octet_string<32> lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; @@ -280,11 +280,11 @@ server cluster OperationalCredentials = 62 { struct FabricDescriptor { fabric_idx fabricIndex = 0; - OCTET_STRING rootPublicKey = 1; + OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; NODE_ID nodeId = 4; - CHAR_STRING label = 5; + CHAR_STRING<32> label = 5; } readonly attribute NOCStruct NOCs[] = 0; 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 fae07dd1a603d8..c523bf72140131 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 @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 0; - CHAR_STRING value = 1; + CHAR_STRING<16> label = 0; + CHAR_STRING<16> value = 1; } server cluster Basic = 40 { @@ -22,16 +22,16 @@ server cluster Basic = 40 { } readonly attribute int16u interactionModelVersion = 0; - readonly attribute char_string vendorName = 1; + readonly attribute char_string<32> vendorName = 1; readonly attribute vendor_id vendorID = 2; - readonly attribute char_string productName = 3; + readonly attribute char_string<32> productName = 3; readonly attribute int16u productID = 4; - attribute char_string nodeLabel = 5; - attribute char_string location = 6; + attribute char_string<32> nodeLabel = 5; + attribute char_string<2> location = 6; readonly attribute int16u hardwareVersion = 7; - readonly attribute char_string hardwareVersionString = 8; + readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; - readonly attribute char_string softwareVersionString = 10; + readonly attribute char_string<64> softwareVersionString = 10; readonly global attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; @@ -101,7 +101,7 @@ server cluster GeneralCommissioning = 48 { } server cluster LocalizationConfiguration = 43 { - attribute char_string activeLocale = 1; + attribute char_string<35> activeLocale = 1; readonly attribute CHAR_STRING supportedLocales[] = 2; } @@ -161,7 +161,7 @@ server cluster NetworkCommissioning = 49 { readonly attribute int8u connectMaxTimeSeconds = 3; attribute boolean interfaceEnabled = 4; readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; - readonly attribute octet_string lastNetworkID = 6; + readonly attribute octet_string<32> lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; @@ -380,11 +380,11 @@ server cluster OperationalCredentials = 62 { struct FabricDescriptor { fabric_idx fabricIndex = 0; - OCTET_STRING rootPublicKey = 1; + OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; NODE_ID nodeId = 4; - CHAR_STRING label = 5; + CHAR_STRING<32> label = 5; } readonly attribute NOCStruct NOCs[] = 0; diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 07f3fde86630e9..017ff384f4d258 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -17,24 +17,24 @@ server cluster Basic = 40 { } readonly attribute int16u interactionModelVersion = 0; - readonly attribute char_string vendorName = 1; + readonly attribute char_string<32> vendorName = 1; readonly attribute vendor_id vendorID = 2; - readonly attribute char_string productName = 3; + readonly attribute char_string<32> productName = 3; readonly attribute int16u productID = 4; - attribute char_string nodeLabel = 5; - attribute char_string location = 6; + attribute char_string<32> nodeLabel = 5; + attribute char_string<2> location = 6; readonly attribute int16u hardwareVersion = 7; - readonly attribute char_string hardwareVersionString = 8; + readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; - readonly attribute char_string softwareVersionString = 10; - readonly attribute char_string manufacturingDate = 11; - readonly attribute char_string partNumber = 12; - readonly attribute long_char_string productURL = 13; - readonly attribute char_string productLabel = 14; - readonly attribute char_string serialNumber = 15; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; attribute boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; - readonly attribute char_string uniqueID = 18; + readonly attribute char_string<32> uniqueID = 18; readonly global attribute int16u clusterRevision = 65533; } @@ -405,7 +405,7 @@ server cluster NetworkCommissioning = 49 { readonly attribute int8u connectMaxTimeSeconds = 3; attribute boolean interfaceEnabled = 4; readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; - readonly attribute octet_string lastNetworkID = 6; + readonly attribute octet_string<32> lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; @@ -508,11 +508,11 @@ server cluster OperationalCredentials = 62 { struct FabricDescriptor { fabric_idx fabricIndex = 0; - OCTET_STRING rootPublicKey = 1; + OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; NODE_ID nodeId = 4; - CHAR_STRING label = 5; + CHAR_STRING<32> label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 07f3fde86630e9..017ff384f4d258 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -17,24 +17,24 @@ server cluster Basic = 40 { } readonly attribute int16u interactionModelVersion = 0; - readonly attribute char_string vendorName = 1; + readonly attribute char_string<32> vendorName = 1; readonly attribute vendor_id vendorID = 2; - readonly attribute char_string productName = 3; + readonly attribute char_string<32> productName = 3; readonly attribute int16u productID = 4; - attribute char_string nodeLabel = 5; - attribute char_string location = 6; + attribute char_string<32> nodeLabel = 5; + attribute char_string<2> location = 6; readonly attribute int16u hardwareVersion = 7; - readonly attribute char_string hardwareVersionString = 8; + readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; - readonly attribute char_string softwareVersionString = 10; - readonly attribute char_string manufacturingDate = 11; - readonly attribute char_string partNumber = 12; - readonly attribute long_char_string productURL = 13; - readonly attribute char_string productLabel = 14; - readonly attribute char_string serialNumber = 15; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; attribute boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; - readonly attribute char_string uniqueID = 18; + readonly attribute char_string<32> uniqueID = 18; readonly global attribute int16u clusterRevision = 65533; } @@ -405,7 +405,7 @@ server cluster NetworkCommissioning = 49 { readonly attribute int8u connectMaxTimeSeconds = 3; attribute boolean interfaceEnabled = 4; readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; - readonly attribute octet_string lastNetworkID = 6; + readonly attribute octet_string<32> lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; @@ -508,11 +508,11 @@ server cluster OperationalCredentials = 62 { struct FabricDescriptor { fabric_idx fabricIndex = 0; - OCTET_STRING rootPublicKey = 1; + OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; NODE_ID nodeId = 4; - CHAR_STRING label = 5; + CHAR_STRING<32> label = 5; } readonly attribute FabricDescriptor fabricsList[] = 1; diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 058c65c234e391..77cdb21d6c9d85 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 0; - CHAR_STRING value = 1; + CHAR_STRING<16> label = 0; + CHAR_STRING<16> value = 1; } server cluster AdministratorCommissioning = 60 { @@ -58,16 +58,16 @@ server cluster Basic = 40 { } readonly attribute int16u interactionModelVersion = 0; - readonly attribute char_string vendorName = 1; + readonly attribute char_string<32> vendorName = 1; readonly attribute vendor_id vendorID = 2; - readonly attribute char_string productName = 3; + readonly attribute char_string<32> productName = 3; readonly attribute int16u productID = 4; - attribute char_string nodeLabel = 5; - attribute char_string location = 6; + attribute char_string<32> nodeLabel = 5; + attribute char_string<2> location = 6; readonly attribute int16u hardwareVersion = 7; - readonly attribute char_string hardwareVersionString = 8; + readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; - readonly attribute char_string softwareVersionString = 10; + readonly attribute char_string<64> softwareVersionString = 10; readonly global attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; @@ -244,11 +244,11 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 0; + CHAR_STRING<32> name = 0; BOOLEAN fabricConnected = 1; BOOLEAN offPremiseServicesReachableIPv4 = 2; BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING hardwareAddress = 4; + OCTET_STRING<8> hardwareAddress = 4; InterfaceType type = 5; } @@ -350,7 +350,7 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute char_string activeLocale = 1; + attribute char_string<35> activeLocale = 1; readonly attribute CHAR_STRING supportedLocales[] = 2; } @@ -410,7 +410,7 @@ server cluster NetworkCommissioning = 49 { readonly attribute int8u connectMaxTimeSeconds = 3; attribute boolean interfaceEnabled = 4; readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; - readonly attribute octet_string lastNetworkID = 6; + readonly attribute octet_string<32> lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; @@ -519,11 +519,11 @@ server cluster OperationalCredentials = 62 { struct FabricDescriptor { fabric_idx fabricIndex = 0; - OCTET_STRING rootPublicKey = 1; + OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; NODE_ID nodeId = 4; - CHAR_STRING label = 5; + CHAR_STRING<32> label = 5; } readonly attribute NOCStruct NOCs[] = 0; @@ -719,7 +719,7 @@ server cluster PumpConfigurationAndControl = 512 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { INT64U id = 0; - CHAR_STRING name = 1; + CHAR_STRING<8> name = 1; INT32U stackFreeCurrent = 2; INT32U stackFreeMinimum = 3; INT32U stackSize = 4; @@ -830,10 +830,10 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int16u channel = 0; readonly attribute enum8 routingRole = 1; - readonly attribute octet_string networkName = 2; + readonly attribute octet_string<16> networkName = 2; readonly attribute int16u panId = 3; readonly attribute int64u extendedPanId = 4; - readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute octet_string<17> meshLocalPrefix = 5; readonly attribute int64u overrunCount = 6; readonly attribute NeighborTable neighborTableList[] = 7; readonly attribute RouteTable routeTableList[] = 8; @@ -888,7 +888,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int64u pendingTimestamp = 57; readonly attribute int32u delay = 58; readonly attribute SecurityPolicy securityPolicy[] = 59; - readonly attribute octet_string channelMask = 60; + readonly attribute octet_string<4> channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; readonly global attribute bitmap32 featureMap = 65532; 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 fcc69efb730f52..799b1a2f3c2f8d 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 @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 0; - CHAR_STRING value = 1; + CHAR_STRING<16> label = 0; + CHAR_STRING<16> value = 1; } server cluster AdministratorCommissioning = 60 { @@ -58,16 +58,16 @@ server cluster Basic = 40 { } readonly attribute int16u interactionModelVersion = 0; - readonly attribute char_string vendorName = 1; + readonly attribute char_string<32> vendorName = 1; readonly attribute vendor_id vendorID = 2; - readonly attribute char_string productName = 3; + readonly attribute char_string<32> productName = 3; readonly attribute int16u productID = 4; - attribute char_string nodeLabel = 5; - attribute char_string location = 6; + attribute char_string<32> nodeLabel = 5; + attribute char_string<2> location = 6; readonly attribute int16u hardwareVersion = 7; - readonly attribute char_string hardwareVersionString = 8; + readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; - readonly attribute char_string softwareVersionString = 10; + readonly attribute char_string<64> softwareVersionString = 10; readonly global attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; @@ -264,11 +264,11 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 0; + CHAR_STRING<32> name = 0; BOOLEAN fabricConnected = 1; BOOLEAN offPremiseServicesReachableIPv4 = 2; BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING hardwareAddress = 4; + OCTET_STRING<8> hardwareAddress = 4; InterfaceType type = 5; } @@ -370,7 +370,7 @@ client cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute char_string activeLocale = 1; + attribute char_string<35> activeLocale = 1; readonly attribute CHAR_STRING supportedLocales[] = 2; } @@ -430,7 +430,7 @@ server cluster NetworkCommissioning = 49 { readonly attribute int8u connectMaxTimeSeconds = 3; attribute boolean interfaceEnabled = 4; readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; - readonly attribute octet_string lastNetworkID = 6; + readonly attribute octet_string<32> lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; @@ -539,11 +539,11 @@ server cluster OperationalCredentials = 62 { struct FabricDescriptor { fabric_idx fabricIndex = 0; - OCTET_STRING rootPublicKey = 1; + OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; NODE_ID nodeId = 4; - CHAR_STRING label = 5; + CHAR_STRING<32> label = 5; } readonly attribute NOCStruct NOCs[] = 0; @@ -714,7 +714,7 @@ client cluster PumpConfigurationAndControl = 512 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { INT64U id = 0; - CHAR_STRING name = 1; + CHAR_STRING<8> name = 1; INT32U stackFreeCurrent = 2; INT32U stackFreeMinimum = 3; INT32U stackSize = 4; @@ -818,10 +818,10 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int16u channel = 0; readonly attribute enum8 routingRole = 1; - readonly attribute octet_string networkName = 2; + readonly attribute octet_string<16> networkName = 2; readonly attribute int16u panId = 3; readonly attribute int64u extendedPanId = 4; - readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute octet_string<17> meshLocalPrefix = 5; readonly attribute int64u overrunCount = 6; readonly attribute NeighborTable neighborTableList[] = 7; readonly attribute RouteTable routeTableList[] = 8; @@ -876,7 +876,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int64u pendingTimestamp = 57; readonly attribute int32u delay = 58; readonly attribute SecurityPolicy securityPolicy[] = 59; - readonly attribute octet_string channelMask = 60; + readonly attribute octet_string<4> channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; readonly global attribute bitmap32 featureMap = 65532; @@ -932,7 +932,7 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - readonly attribute octet_string bssid = 0; + readonly attribute octet_string<6> bssid = 0; readonly attribute enum8 securityType = 1; readonly attribute enum8 wiFiVersion = 2; readonly attribute int16u channelNumber = 3; diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index 1943328215ef9a..b006355438a7df 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 0; - CHAR_STRING value = 1; + CHAR_STRING<16> label = 0; + CHAR_STRING<16> value = 1; } server cluster AdministratorCommissioning = 60 { @@ -58,16 +58,16 @@ server cluster Basic = 40 { } readonly attribute int16u interactionModelVersion = 0; - readonly attribute char_string vendorName = 1; + readonly attribute char_string<32> vendorName = 1; readonly attribute vendor_id vendorID = 2; - readonly attribute char_string productName = 3; + readonly attribute char_string<32> productName = 3; readonly attribute int16u productID = 4; - attribute char_string nodeLabel = 5; - attribute char_string location = 6; + attribute char_string<32> nodeLabel = 5; + attribute char_string<2> location = 6; readonly attribute int16u hardwareVersion = 7; - readonly attribute char_string hardwareVersionString = 8; + readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; - readonly attribute char_string softwareVersionString = 10; + readonly attribute char_string<64> softwareVersionString = 10; readonly global attribute int16u clusterRevision = 65533; } @@ -255,11 +255,11 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 0; + CHAR_STRING<32> name = 0; BOOLEAN fabricConnected = 1; BOOLEAN offPremiseServicesReachableIPv4 = 2; BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING hardwareAddress = 4; + OCTET_STRING<8> hardwareAddress = 4; InterfaceType type = 5; } @@ -294,7 +294,7 @@ server cluster GeneralDiagnostics = 51 { } server cluster LocalizationConfiguration = 43 { - attribute char_string activeLocale = 1; + attribute char_string<35> activeLocale = 1; readonly attribute CHAR_STRING supportedLocales[] = 2; } @@ -354,7 +354,7 @@ server cluster NetworkCommissioning = 49 { readonly attribute int8u connectMaxTimeSeconds = 3; attribute boolean interfaceEnabled = 4; readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; - readonly attribute octet_string lastNetworkID = 6; + readonly attribute octet_string<32> lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; @@ -433,11 +433,11 @@ server cluster OperationalCredentials = 62 { struct FabricDescriptor { fabric_idx fabricIndex = 0; - OCTET_STRING rootPublicKey = 1; + OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; NODE_ID nodeId = 4; - CHAR_STRING label = 5; + CHAR_STRING<32> label = 5; } readonly attribute NOCStruct NOCs[] = 0; @@ -586,7 +586,7 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - readonly attribute octet_string bssid = 0; + readonly attribute octet_string<6> bssid = 0; readonly attribute enum8 securityType = 1; readonly attribute enum8 wiFiVersion = 2; readonly attribute int16u channelNumber = 3; diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 08678f8f9dd7f5..78dae4064c3ebd 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 0; - CHAR_STRING value = 1; + CHAR_STRING<16> label = 0; + CHAR_STRING<16> value = 1; } server cluster AdministratorCommissioning = 60 { @@ -58,24 +58,24 @@ server cluster Basic = 40 { } readonly attribute int16u interactionModelVersion = 0; - readonly attribute char_string vendorName = 1; + readonly attribute char_string<32> vendorName = 1; readonly attribute vendor_id vendorID = 2; - readonly attribute char_string productName = 3; + readonly attribute char_string<32> productName = 3; readonly attribute int16u productID = 4; - attribute char_string nodeLabel = 5; - attribute char_string location = 6; + attribute char_string<32> nodeLabel = 5; + attribute char_string<2> location = 6; readonly attribute int16u hardwareVersion = 7; - readonly attribute char_string hardwareVersionString = 8; + readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; - readonly attribute char_string softwareVersionString = 10; - readonly attribute char_string manufacturingDate = 11; - readonly attribute char_string partNumber = 12; - readonly attribute long_char_string productURL = 13; - readonly attribute char_string productLabel = 14; - readonly attribute char_string serialNumber = 15; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; attribute boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; - readonly attribute char_string uniqueID = 18; + readonly attribute char_string<32> uniqueID = 18; readonly global attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; @@ -286,11 +286,11 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 0; + CHAR_STRING<32> name = 0; BOOLEAN fabricConnected = 1; BOOLEAN offPremiseServicesReachableIPv4 = 2; BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING hardwareAddress = 4; + OCTET_STRING<8> hardwareAddress = 4; InterfaceType type = 5; } @@ -340,7 +340,7 @@ server cluster GroupKeyManagement = 63 { INT16U fabricIndex = 0; INT16U groupId = 1; INT16U endpoints[] = 2; - CHAR_STRING groupName = 3; + CHAR_STRING<16> groupName = 3; } readonly attribute GroupKey groupKeyMap[] = 0; @@ -482,7 +482,7 @@ server cluster Identify = 3 { } server cluster LocalizationConfiguration = 43 { - attribute char_string activeLocale = 1; + attribute char_string<35> activeLocale = 1; readonly attribute CHAR_STRING supportedLocales[] = 2; } @@ -542,7 +542,7 @@ server cluster NetworkCommissioning = 49 { readonly attribute int8u connectMaxTimeSeconds = 3; attribute boolean interfaceEnabled = 4; readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; - readonly attribute octet_string lastNetworkID = 6; + readonly attribute octet_string<32> lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; @@ -692,11 +692,11 @@ server cluster OperationalCredentials = 62 { struct FabricDescriptor { fabric_idx fabricIndex = 0; - OCTET_STRING rootPublicKey = 1; + OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; NODE_ID nodeId = 4; - CHAR_STRING label = 5; + CHAR_STRING<32> label = 5; } readonly attribute NOCStruct NOCs[] = 0; @@ -882,7 +882,7 @@ server cluster Scenes = 5 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { INT64U id = 0; - CHAR_STRING name = 1; + CHAR_STRING<8> name = 1; INT32U stackFreeCurrent = 2; INT32U stackFreeMinimum = 3; INT32U stackSize = 4; @@ -1046,10 +1046,10 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int16u channel = 0; readonly attribute enum8 routingRole = 1; - readonly attribute octet_string networkName = 2; + readonly attribute octet_string<16> networkName = 2; readonly attribute int16u panId = 3; readonly attribute int64u extendedPanId = 4; - readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute octet_string<17> meshLocalPrefix = 5; readonly attribute int64u overrunCount = 6; readonly attribute NeighborTable neighborTableList[] = 7; readonly attribute RouteTable routeTableList[] = 8; @@ -1104,7 +1104,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int64u pendingTimestamp = 57; readonly attribute int32u delay = 58; readonly attribute SecurityPolicy securityPolicy[] = 59; - readonly attribute octet_string channelMask = 60; + readonly attribute octet_string<4> channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; readonly global attribute bitmap32 featureMap = 65532; @@ -1160,7 +1160,7 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - readonly attribute octet_string bssid = 0; + readonly attribute octet_string<6> bssid = 0; readonly attribute enum8 securityType = 1; readonly attribute enum8 wiFiVersion = 2; readonly attribute int16u channelNumber = 3; diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 2b896b3e017f27..5c437528c9034e 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 0; - CHAR_STRING value = 1; + CHAR_STRING<16> label = 0; + CHAR_STRING<16> value = 1; } server cluster AccountLogin = 1294 { @@ -76,13 +76,13 @@ server cluster ApplicationBasic = 1293 { CHAR_STRING applicationId = 1; } - readonly attribute char_string vendorName = 0; + readonly attribute char_string<32> vendorName = 0; readonly attribute int16u vendorId = 1; - readonly attribute char_string applicationName = 2; + readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productId = 3; attribute ApplicationBasicApplication applicationApp = 4; readonly attribute ApplicationStatusEnum applicationStatus = 5; - readonly attribute char_string applicationVersion = 6; + readonly attribute char_string<32> applicationVersion = 6; readonly attribute vendor_id allowedVendorList[] = 7; readonly global attribute int16u clusterRevision = 65533; } @@ -144,7 +144,7 @@ server cluster AudioOutput = 1291 { struct OutputInfo { INT8U index = 0; OutputTypeEnum outputType = 1; - CHAR_STRING name = 2; + CHAR_STRING<32> name = 2; } readonly attribute OutputInfo audioOutputList[] = 0; @@ -180,23 +180,23 @@ server cluster Basic = 40 { } readonly attribute int16u interactionModelVersion = 0; - readonly attribute char_string vendorName = 1; + readonly attribute char_string<32> vendorName = 1; readonly attribute vendor_id vendorID = 2; - readonly attribute char_string productName = 3; + readonly attribute char_string<32> productName = 3; readonly attribute int16u productID = 4; - attribute char_string nodeLabel = 5; - attribute char_string location = 6; + attribute char_string<32> nodeLabel = 5; + attribute char_string<2> location = 6; readonly attribute int16u hardwareVersion = 7; - readonly attribute char_string hardwareVersionString = 8; + readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; - readonly attribute char_string softwareVersionString = 10; - readonly attribute char_string manufacturingDate = 11; - readonly attribute char_string partNumber = 12; - readonly attribute long_char_string productURL = 13; - readonly attribute char_string productLabel = 14; - readonly attribute char_string serialNumber = 15; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; attribute boolean localConfigDisabled = 16; - readonly attribute char_string uniqueID = 18; + readonly attribute char_string<32> uniqueID = 18; readonly global attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; @@ -257,9 +257,9 @@ server cluster Channel = 1284 { struct ChannelInfo { INT16U majorNumber = 0; INT16U minorNumber = 1; - CHAR_STRING name = 2; - CHAR_STRING callSign = 3; - CHAR_STRING affiliateCallSign = 4; + CHAR_STRING<32> name = 2; + CHAR_STRING<32> callSign = 3; + CHAR_STRING<32> affiliateCallSign = 4; } struct LineupInfo { @@ -628,11 +628,11 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 0; + CHAR_STRING<32> name = 0; BOOLEAN fabricConnected = 1; BOOLEAN offPremiseServicesReachableIPv4 = 2; BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING hardwareAddress = 4; + OCTET_STRING<8> hardwareAddress = 4; InterfaceType type = 5; } @@ -682,7 +682,7 @@ server cluster GroupKeyManagement = 63 { INT16U fabricIndex = 0; INT16U groupId = 1; INT16U endpoints[] = 2; - CHAR_STRING groupName = 3; + CHAR_STRING<16> groupName = 3; } readonly attribute GroupKey groupKeyMap[] = 0; @@ -877,7 +877,7 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute char_string activeLocale = 1; + attribute char_string<35> activeLocale = 1; readonly attribute CHAR_STRING supportedLocales[] = 2; } @@ -906,8 +906,8 @@ server cluster MediaInput = 1287 { struct InputInfo { INT8U index = 0; InputTypeEnum inputType = 1; - CHAR_STRING name = 2; - CHAR_STRING description = 3; + CHAR_STRING<32> name = 2; + CHAR_STRING<32> description = 3; } readonly attribute InputInfo mediaInputList[] = 0; @@ -1045,7 +1045,7 @@ client cluster NetworkCommissioning = 49 { readonly attribute int8u connectMaxTimeSeconds = 3; attribute boolean interfaceEnabled = 4; readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; - readonly attribute octet_string lastNetworkID = 6; + readonly attribute octet_string<32> lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; @@ -1164,7 +1164,7 @@ server cluster NetworkCommissioning = 49 { readonly attribute int8u connectMaxTimeSeconds = 3; attribute boolean interfaceEnabled = 4; readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; - readonly attribute octet_string lastNetworkID = 6; + readonly attribute octet_string<32> lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; @@ -1338,11 +1338,11 @@ client cluster OperationalCredentials = 62 { struct FabricDescriptor { fabric_idx fabricIndex = 0; - OCTET_STRING rootPublicKey = 1; + OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; NODE_ID nodeId = 4; - CHAR_STRING label = 5; + CHAR_STRING<32> label = 5; } readonly attribute NOCStruct NOCs[] = 0; @@ -1436,11 +1436,11 @@ server cluster OperationalCredentials = 62 { struct FabricDescriptor { fabric_idx fabricIndex = 0; - OCTET_STRING rootPublicKey = 1; + OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; NODE_ID nodeId = 4; - CHAR_STRING label = 5; + CHAR_STRING<32> label = 5; } readonly attribute NOCStruct NOCs[] = 0; @@ -1533,7 +1533,7 @@ server cluster RelativeHumidityMeasurement = 1029 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { INT64U id = 0; - CHAR_STRING name = 1; + CHAR_STRING<8> name = 1; INT32U stackFreeCurrent = 2; INT32U stackFreeMinimum = 3; INT32U stackSize = 4; @@ -1560,7 +1560,7 @@ server cluster TargetNavigator = 1285 { struct TargetInfo { INT8U identifier = 0; - CHAR_STRING name = 1; + CHAR_STRING<32> name = 1; } readonly attribute TargetInfo targetNavigatorList[] = 0; @@ -1659,10 +1659,10 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int16u channel = 0; readonly attribute enum8 routingRole = 1; - readonly attribute octet_string networkName = 2; + readonly attribute octet_string<16> networkName = 2; readonly attribute int16u panId = 3; readonly attribute int64u extendedPanId = 4; - readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute octet_string<17> meshLocalPrefix = 5; readonly attribute int64u overrunCount = 6; readonly attribute NeighborTable neighborTableList[] = 7; readonly attribute RouteTable routeTableList[] = 8; @@ -1717,7 +1717,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int64u pendingTimestamp = 57; readonly attribute int32u delay = 58; readonly attribute SecurityPolicy securityPolicy[] = 59; - readonly attribute octet_string channelMask = 60; + readonly attribute octet_string<4> channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; readonly global attribute bitmap32 featureMap = 65532; @@ -1730,7 +1730,7 @@ server cluster UserLabel = 65 { } server cluster WakeOnLan = 1283 { - readonly attribute char_string wakeOnLanMacAddress = 0; + readonly attribute char_string<32> wakeOnLanMacAddress = 0; readonly global attribute int16u clusterRevision = 65533; } @@ -1778,7 +1778,7 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - readonly attribute octet_string bssid = 0; + readonly attribute octet_string<6> bssid = 0; readonly attribute enum8 securityType = 1; readonly attribute enum8 wiFiVersion = 2; readonly attribute int16u channelNumber = 3; 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 ed780da7f8b1a4..8febde8abf171a 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 @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 0; - CHAR_STRING value = 1; + CHAR_STRING<16> label = 0; + CHAR_STRING<16> value = 1; } client cluster AccountLogin = 1294 { @@ -67,12 +67,12 @@ client cluster ApplicationBasic = 1293 { kActiveVisibleNotFocus = 3; } - readonly attribute char_string vendorName = 0; + readonly attribute char_string<32> vendorName = 0; readonly attribute int16u vendorId = 1; - readonly attribute char_string applicationName = 2; + readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productId = 3; readonly attribute ApplicationStatusEnum applicationStatus = 5; - readonly attribute char_string applicationVersion = 6; + readonly attribute char_string<32> applicationVersion = 6; readonly global attribute int16u clusterRevision = 65533; } @@ -122,7 +122,7 @@ client cluster AudioOutput = 1291 { struct OutputInfo { INT8U index = 0; OutputTypeEnum outputType = 1; - CHAR_STRING name = 2; + CHAR_STRING<32> name = 2; } readonly attribute OutputInfo audioOutputList[] = 0; @@ -172,24 +172,24 @@ server cluster Basic = 40 { } readonly attribute int16u interactionModelVersion = 0; - readonly attribute char_string vendorName = 1; + readonly attribute char_string<32> vendorName = 1; readonly attribute vendor_id vendorID = 2; - readonly attribute char_string productName = 3; + readonly attribute char_string<32> productName = 3; readonly attribute int16u productID = 4; - attribute char_string nodeLabel = 5; - attribute char_string location = 6; + attribute char_string<32> nodeLabel = 5; + attribute char_string<2> location = 6; readonly attribute int16u hardwareVersion = 7; - readonly attribute char_string hardwareVersionString = 8; + readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; - readonly attribute char_string softwareVersionString = 10; - readonly attribute char_string manufacturingDate = 11; - readonly attribute char_string partNumber = 12; - readonly attribute long_char_string productURL = 13; - readonly attribute char_string productLabel = 14; - readonly attribute char_string serialNumber = 15; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; attribute boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; - readonly attribute char_string uniqueID = 18; + readonly attribute char_string<32> uniqueID = 18; readonly global attribute int16u clusterRevision = 65533; command MfgSpecificPing(): DefaultSuccess = 0; @@ -224,19 +224,19 @@ server cluster Binding = 30 { } server cluster BridgedDeviceBasic = 57 { - readonly attribute char_string vendorName = 1; + readonly attribute char_string<32> vendorName = 1; readonly attribute int16u vendorID = 2; - readonly attribute char_string productName = 3; - attribute char_string nodeLabel = 5; + readonly attribute char_string<32> productName = 3; + attribute char_string<32> nodeLabel = 5; readonly attribute int16u hardwareVersion = 7; - readonly attribute char_string hardwareVersionString = 8; + readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; - readonly attribute char_string softwareVersionString = 10; - readonly attribute char_string manufacturingDate = 11; - readonly attribute char_string partNumber = 12; - readonly attribute long_char_string productURL = 13; - readonly attribute char_string productLabel = 14; - readonly attribute char_string serialNumber = 15; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; readonly attribute boolean reachable = 17; readonly global attribute int16u clusterRevision = 65533; @@ -259,9 +259,9 @@ client cluster Channel = 1284 { struct ChannelInfo { INT16U majorNumber = 0; INT16U minorNumber = 1; - CHAR_STRING name = 2; - CHAR_STRING callSign = 3; - CHAR_STRING affiliateCallSign = 4; + CHAR_STRING<32> name = 2; + CHAR_STRING<32> callSign = 3; + CHAR_STRING<32> affiliateCallSign = 4; } struct LineupInfo { @@ -347,7 +347,7 @@ server cluster ColorControl = 768 { readonly attribute int16u currentX = 3; readonly attribute int16u currentY = 4; readonly attribute enum8 driftCompensation = 5; - readonly attribute char_string compensationText = 6; + readonly attribute char_string<254> compensationText = 6; readonly attribute int16u colorTemperature = 7; readonly attribute enum8 colorMode = 8; attribute bitmap8 colorControlOptions = 15; @@ -894,7 +894,7 @@ server cluster DoorLock = 257 { readonly attribute int8u maxPINCodeLength = 23; readonly attribute int8u minPINCodeLength = 24; readonly attribute bitmap8 credentialRulesSupport = 27; - attribute char_string language = 33; + attribute char_string<3> language = 33; attribute int32u autoRelockTime = 35; attribute int8u soundVolume = 36; attribute DlOperatingMode operatingMode = 37; @@ -1133,11 +1133,11 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 0; + CHAR_STRING<32> name = 0; BOOLEAN fabricConnected = 1; BOOLEAN offPremiseServicesReachableIPv4 = 2; BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING hardwareAddress = 4; + OCTET_STRING<8> hardwareAddress = 4; InterfaceType type = 5; } @@ -1187,7 +1187,7 @@ server cluster GroupKeyManagement = 63 { INT16U fabricIndex = 0; INT16U groupId = 1; INT16U endpoints[] = 2; - CHAR_STRING groupName = 3; + CHAR_STRING<16> groupName = 3; } readonly attribute GroupKey groupKeyMap[] = 0; @@ -1529,7 +1529,7 @@ server cluster LevelControl = 8 { } server cluster LocalizationConfiguration = 43 { - attribute char_string activeLocale = 1; + attribute char_string<35> activeLocale = 1; readonly attribute CHAR_STRING supportedLocales[] = 2; } @@ -1552,8 +1552,8 @@ client cluster MediaInput = 1287 { struct InputInfo { INT8U index = 0; InputTypeEnum inputType = 1; - CHAR_STRING name = 2; - CHAR_STRING description = 3; + CHAR_STRING<32> name = 2; + CHAR_STRING<32> description = 3; } readonly attribute InputInfo mediaInputList[] = 0; @@ -1674,7 +1674,7 @@ server cluster NetworkCommissioning = 49 { readonly attribute int8u connectMaxTimeSeconds = 3; attribute boolean interfaceEnabled = 4; readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; - readonly attribute octet_string lastNetworkID = 6; + readonly attribute octet_string<32> lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; @@ -1860,11 +1860,11 @@ server cluster OperationalCredentials = 62 { struct FabricDescriptor { fabric_idx fabricIndex = 0; - OCTET_STRING rootPublicKey = 1; + OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; NODE_ID nodeId = 4; - CHAR_STRING label = 5; + CHAR_STRING<32> label = 5; } readonly attribute NOCStruct NOCs[] = 0; @@ -2064,7 +2064,7 @@ server cluster Scenes = 5 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { INT64U id = 0; - CHAR_STRING name = 1; + CHAR_STRING<8> name = 1; INT32U stackFreeCurrent = 2; INT32U stackFreeMinimum = 3; INT32U stackSize = 4; @@ -2127,7 +2127,7 @@ client cluster TargetNavigator = 1285 { struct TargetInfo { INT8U identifier = 0; - CHAR_STRING name = 1; + CHAR_STRING<32> name = 1; } readonly attribute TargetInfo targetNavigatorList[] = 0; @@ -2158,7 +2158,7 @@ server cluster TestCluster = 1295 { struct TestListStructOctet { INT64U fabricIndex = 0; - OCTET_STRING operationalCert = 1; + OCTET_STRING<32> operationalCert = 1; } info event TestEvent = 1 { @@ -2185,11 +2185,11 @@ server cluster TestCluster = 1295 { attribute int64s int64s = 20; attribute enum8 enum8 = 21; attribute enum16 enum16 = 22; - attribute octet_string octetString = 25; + attribute octet_string<10> octetString = 25; attribute INT8U listInt8u[] = 26; attribute OCTET_STRING listOctetString[] = 27; attribute TestListStructOctet listStructOctetString[] = 28; - attribute long_octet_string longOctetString = 29; + attribute long_octet_string<1000> longOctetString = 29; readonly global attribute int16u clusterRevision = 65533; response struct TestSpecificResponse { @@ -2306,10 +2306,10 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int16u channel = 0; readonly attribute enum8 routingRole = 1; - readonly attribute octet_string networkName = 2; + readonly attribute octet_string<16> networkName = 2; readonly attribute int16u panId = 3; readonly attribute int64u extendedPanId = 4; - readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute octet_string<17> meshLocalPrefix = 5; readonly attribute int64u overrunCount = 6; readonly attribute NeighborTable neighborTableList[] = 7; readonly attribute RouteTable routeTableList[] = 8; @@ -2364,7 +2364,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int64u pendingTimestamp = 57; readonly attribute int32u delay = 58; readonly attribute SecurityPolicy securityPolicy[] = 59; - readonly attribute octet_string channelMask = 60; + readonly attribute octet_string<4> channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; readonly global attribute bitmap32 featureMap = 65532; @@ -2377,7 +2377,7 @@ server cluster UserLabel = 65 { } server cluster WakeOnLan = 1283 { - readonly attribute char_string wakeOnLanMacAddress = 0; + readonly attribute char_string<32> wakeOnLanMacAddress = 0; readonly global attribute int16u clusterRevision = 65533; } @@ -2425,7 +2425,7 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - readonly attribute octet_string bssid = 0; + readonly attribute octet_string<6> bssid = 0; readonly attribute enum8 securityType = 1; readonly attribute enum8 wiFiVersion = 2; readonly attribute int16u channelNumber = 3; diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index c7206c376b16e3..e71b4b3daa67f0 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 0; - CHAR_STRING value = 1; + CHAR_STRING<16> label = 0; + CHAR_STRING<16> value = 1; } server cluster AdministratorCommissioning = 60 { @@ -58,21 +58,21 @@ server cluster Basic = 40 { } readonly attribute int16u interactionModelVersion = 0; - readonly attribute char_string vendorName = 1; + readonly attribute char_string<32> vendorName = 1; readonly attribute vendor_id vendorID = 2; - readonly attribute char_string productName = 3; + readonly attribute char_string<32> productName = 3; readonly attribute int16u productID = 4; - attribute char_string nodeLabel = 5; - attribute char_string location = 6; + attribute char_string<32> nodeLabel = 5; + attribute char_string<2> location = 6; readonly attribute int16u hardwareVersion = 7; - readonly attribute char_string hardwareVersionString = 8; + readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; - readonly attribute char_string softwareVersionString = 10; - readonly attribute char_string manufacturingDate = 11; - readonly attribute char_string partNumber = 12; - readonly attribute long_char_string productURL = 13; - readonly attribute char_string productLabel = 14; - readonly attribute char_string serialNumber = 15; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; attribute boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly global attribute int16u clusterRevision = 65533; @@ -232,11 +232,11 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 0; + CHAR_STRING<32> name = 0; BOOLEAN fabricConnected = 1; BOOLEAN offPremiseServicesReachableIPv4 = 2; BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING hardwareAddress = 4; + OCTET_STRING<8> hardwareAddress = 4; InterfaceType type = 5; } @@ -316,7 +316,7 @@ server cluster Identify = 3 { } server cluster LocalizationConfiguration = 43 { - attribute char_string activeLocale = 1; + attribute char_string<35> activeLocale = 1; readonly attribute CHAR_STRING supportedLocales[] = 2; } @@ -376,7 +376,7 @@ server cluster NetworkCommissioning = 49 { readonly attribute int8u connectMaxTimeSeconds = 3; attribute boolean interfaceEnabled = 4; readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; - readonly attribute octet_string lastNetworkID = 6; + readonly attribute octet_string<32> lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; @@ -461,11 +461,11 @@ server cluster OperationalCredentials = 62 { struct FabricDescriptor { fabric_idx fabricIndex = 0; - OCTET_STRING rootPublicKey = 1; + OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; NODE_ID nodeId = 4; - CHAR_STRING label = 5; + CHAR_STRING<32> label = 5; } readonly attribute NOCStruct NOCs[] = 0; @@ -551,7 +551,7 @@ server cluster OperationalCredentials = 62 { server cluster PowerSource = 47 { readonly attribute enum8 status = 0; readonly attribute int8u order = 1; - readonly attribute char_string description = 2; + readonly attribute char_string<60> description = 2; readonly attribute int32u batteryVoltage = 11; readonly attribute int8u batteryPercentRemaining = 12; readonly attribute int32u batteryTimeRemaining = 13; @@ -565,7 +565,7 @@ server cluster PowerSource = 47 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { INT64U id = 0; - CHAR_STRING name = 1; + CHAR_STRING<8> name = 1; INT32U stackFreeCurrent = 2; INT32U stackFreeMinimum = 3; INT32U stackSize = 4; @@ -662,10 +662,10 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int16u channel = 0; readonly attribute enum8 routingRole = 1; - readonly attribute octet_string networkName = 2; + readonly attribute octet_string<16> networkName = 2; readonly attribute int16u panId = 3; readonly attribute int64u extendedPanId = 4; - readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute octet_string<17> meshLocalPrefix = 5; readonly attribute int64u overrunCount = 6; readonly attribute NeighborTable neighborTableList[] = 7; readonly attribute RouteTable routeTableList[] = 8; @@ -720,7 +720,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int64u pendingTimestamp = 57; readonly attribute int32u delay = 58; readonly attribute SecurityPolicy securityPolicy[] = 59; - readonly attribute octet_string channelMask = 60; + readonly attribute octet_string<4> channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; readonly global attribute bitmap32 featureMap = 65532; @@ -776,7 +776,7 @@ server cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - readonly attribute octet_string bssid = 0; + readonly attribute octet_string<6> bssid = 0; readonly attribute enum8 securityType = 1; readonly attribute enum8 wiFiVersion = 2; readonly attribute int16u channelNumber = 3; diff --git a/src/app/zap-templates/partials/idl/structure_member.zapt b/src/app/zap-templates/partials/idl/structure_member.zapt index d64eeefbc98d53..142c0ad8abadff 100644 --- a/src/app/zap-templates/partials/idl/structure_member.zapt +++ b/src/app/zap-templates/partials/idl/structure_member.zapt @@ -1,7 +1,14 @@ {{~#if isOptional~}} optional {{/if~}} {{~#if isNullable~}} nullable {{/if~}} -{{type}} {{asLowerCamelCase label~}} +{{type}} + {{~#unless isArray~}} + {{~#if (isString type)~}} + {{~#if maxLength~}} + <{{maxLength}}> + {{~/if~}} + {{~/if}} + {{~/unless}} {{asLowerCamelCase label~}} {{~#if isArray~}} [] diff --git a/src/app/zap-templates/templates/app/MatterIDL.zapt b/src/app/zap-templates/templates/app/MatterIDL.zapt index efa88f812e1126..e59f9f15e4d630 100644 --- a/src/app/zap-templates/templates/app/MatterIDL.zapt +++ b/src/app/zap-templates/templates/app/MatterIDL.zapt @@ -41,10 +41,15 @@ {{~#unless isReportableAttribute~}} nosubscribe {{!marker to place a space even with whitespace removal~}} {{~/unless~}} - {{~!Removes spaces~}} attribute {{type}} {{asLowerCamelCase name~}} - {{~#if isList~}} - [] - {{~/if}} = {{code}}; + {{~!Removes spaces~}} attribute {{type}} + {{~#unless isArray~}} + {{~#if (isString type)~}} + {{~#if maxLength~}} + <{{maxLength}}> + {{~/if~}} + {{~/if~}} + {{/unless}} {{asLowerCamelCase name~}} + {{~#if isList~}} [] {{~/if}} = {{code}}; {{/chip_server_cluster_attributes}} {{#chip_cluster_commands}} {{#if arguments}} diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index dca196240a3623..e479750003ce92 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING label = 0; - CHAR_STRING value = 1; + CHAR_STRING<16> label = 0; + CHAR_STRING<16> value = 1; } client cluster AccessControl = 31 { @@ -43,7 +43,7 @@ client cluster AccessControl = 31 { struct ExtensionEntry { fabric_idx fabricIndex = 0; - OCTET_STRING data = 1; + OCTET_STRING<254> data = 1; } info event AccessControlEntryChanged = 0 { @@ -140,13 +140,13 @@ client cluster ApplicationBasic = 1293 { CHAR_STRING applicationId = 1; } - readonly attribute char_string vendorName = 0; + readonly attribute char_string<32> vendorName = 0; readonly attribute int16u vendorId = 1; - readonly attribute char_string applicationName = 2; + readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productId = 3; attribute ApplicationBasicApplication applicationApp = 4; readonly attribute ApplicationStatusEnum applicationStatus = 5; - readonly attribute char_string applicationVersion = 6; + readonly attribute char_string<32> applicationVersion = 6; readonly attribute vendor_id allowedVendorList[] = 7; readonly global attribute attrib_id attributeList[] = 65531; readonly global attribute int16u clusterRevision = 65533; @@ -204,7 +204,7 @@ client cluster AudioOutput = 1291 { struct OutputInfo { INT8U index = 0; OutputTypeEnum outputType = 1; - CHAR_STRING name = 2; + CHAR_STRING<32> name = 2; } readonly attribute OutputInfo audioOutputList[] = 0; @@ -257,24 +257,24 @@ client cluster Basic = 40 { } readonly attribute int16u interactionModelVersion = 0; - readonly attribute char_string vendorName = 1; + readonly attribute char_string<32> vendorName = 1; readonly attribute vendor_id vendorID = 2; - readonly attribute char_string productName = 3; + readonly attribute char_string<32> productName = 3; readonly attribute int16u productID = 4; - attribute char_string nodeLabel = 5; - attribute char_string location = 6; + attribute char_string<32> nodeLabel = 5; + attribute char_string<2> location = 6; readonly attribute int16u hardwareVersion = 7; - readonly attribute char_string hardwareVersionString = 8; + readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; - readonly attribute char_string softwareVersionString = 10; - readonly attribute char_string manufacturingDate = 11; - readonly attribute char_string partNumber = 12; - readonly attribute long_char_string productURL = 13; - readonly attribute char_string productLabel = 14; - readonly attribute char_string serialNumber = 15; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; attribute boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; - readonly attribute char_string uniqueID = 18; + readonly attribute char_string<32> uniqueID = 18; readonly global attribute attrib_id attributeList[] = 65531; readonly global attribute int16u clusterRevision = 65533; @@ -352,7 +352,7 @@ client cluster BridgedActions = 37 { struct ActionStruct { INT16U actionID = 0; - CHAR_STRING name = 1; + CHAR_STRING<32> name = 1; ActionTypeEnum type = 2; INT16U endpointListID = 3; INT16U supportedCommands = 4; @@ -361,7 +361,7 @@ client cluster BridgedActions = 37 { struct EndpointListStruct { INT16U endpointListID = 0; - CHAR_STRING name = 1; + CHAR_STRING<32> name = 1; EndpointListTypeEnum type = 2; ENDPOINT_NO endpoints[] = 3; } @@ -381,7 +381,7 @@ client cluster BridgedActions = 37 { readonly attribute ActionStruct actionList[] = 0; readonly attribute EndpointListStruct endpointList[] = 1; - readonly attribute long_char_string setupUrl = 2; + readonly attribute long_char_string<512> setupUrl = 2; readonly global attribute attrib_id attributeList[] = 65531; readonly global attribute int16u clusterRevision = 65533; @@ -482,9 +482,9 @@ client cluster Channel = 1284 { struct ChannelInfo { INT16U majorNumber = 0; INT16U minorNumber = 1; - CHAR_STRING name = 2; - CHAR_STRING callSign = 3; - CHAR_STRING affiliateCallSign = 4; + CHAR_STRING<32> name = 2; + CHAR_STRING<32> callSign = 3; + CHAR_STRING<32> affiliateCallSign = 4; } readonly attribute ChannelInfo channelList[] = 0; @@ -567,7 +567,7 @@ client cluster ColorControl = 768 { readonly attribute int16u currentX = 3; readonly attribute int16u currentY = 4; readonly attribute enum8 driftCompensation = 5; - readonly attribute char_string compensationText = 6; + readonly attribute char_string<254> compensationText = 6; readonly attribute int16u colorTemperature = 7; readonly attribute enum8 colorMode = 8; attribute bitmap8 colorControlOptions = 15; @@ -1171,7 +1171,7 @@ client cluster DoorLock = 257 { readonly attribute int16u numberOfPINUsersSupported = 18; readonly attribute int8u maxPINCodeLength = 23; readonly attribute int8u minPINCodeLength = 24; - attribute char_string language = 33; + attribute char_string<3> language = 33; attribute int32u autoRelockTime = 35; attribute int8u soundVolume = 36; attribute DlOperatingMode operatingMode = 37; @@ -1429,11 +1429,11 @@ client cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING name = 0; + CHAR_STRING<32> name = 0; BOOLEAN fabricConnected = 1; BOOLEAN offPremiseServicesReachableIPv4 = 2; BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING hardwareAddress = 4; + OCTET_STRING<8> hardwareAddress = 4; InterfaceType type = 5; } @@ -1484,17 +1484,17 @@ client cluster GroupKeyManagement = 63 { INT16U fabricIndex = 0; INT16U groupId = 1; INT16U endpoints[] = 2; - CHAR_STRING groupName = 3; + CHAR_STRING<16> groupName = 3; } struct GroupKeySet { INT16U groupKeySetID = 0; GroupKeySecurityPolicy securityPolicy = 1; - OCTET_STRING epochKey0 = 2; + OCTET_STRING<16> epochKey0 = 2; INT64U epochStartTime0 = 3; - OCTET_STRING epochKey1 = 4; + OCTET_STRING<16> epochKey1 = 4; INT64U epochStartTime1 = 5; - OCTET_STRING epochKey2 = 6; + OCTET_STRING<16> epochKey2 = 6; INT64U epochStartTime2 = 7; } @@ -1845,7 +1845,7 @@ client cluster LevelControl = 8 { } client cluster LocalizationConfiguration = 43 { - attribute char_string activeLocale = 1; + attribute char_string<35> activeLocale = 1; readonly attribute CHAR_STRING supportedLocales[] = 2; } @@ -1875,8 +1875,8 @@ client cluster MediaInput = 1287 { struct InputInfo { INT8U index = 0; InputTypeEnum inputType = 1; - CHAR_STRING name = 2; - CHAR_STRING description = 3; + CHAR_STRING<32> name = 2; + CHAR_STRING<32> description = 3; } readonly attribute InputInfo mediaInputList[] = 0; @@ -1956,7 +1956,7 @@ client cluster MediaPlayback = 1286 { client cluster ModeSelect = 80 { struct ModeOptionStruct { - CHAR_STRING label = 0; + CHAR_STRING<32> label = 0; INT8U mode = 1; INT32U semanticTag = 2; } @@ -1965,7 +1965,7 @@ client cluster ModeSelect = 80 { readonly attribute ModeOptionStruct supportedModes[] = 1; attribute int8u onMode = 2; readonly attribute int8u startUpMode = 3; - readonly attribute char_string description = 4; + readonly attribute char_string<32> description = 4; readonly global attribute attrib_id attributeList[] = 65531; readonly global attribute int16u clusterRevision = 65533; @@ -2032,7 +2032,7 @@ client cluster NetworkCommissioning = 49 { readonly attribute int8u connectMaxTimeSeconds = 3; attribute boolean interfaceEnabled = 4; readonly attribute NetworkCommissioningStatus lastNetworkingStatus = 5; - readonly attribute octet_string lastNetworkID = 6; + readonly attribute octet_string<32> lastNetworkID = 6; readonly attribute int32u lastConnectErrorValue = 7; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; @@ -2312,11 +2312,11 @@ client cluster OperationalCredentials = 62 { struct FabricDescriptor { fabric_idx fabricIndex = 0; - OCTET_STRING rootPublicKey = 1; + OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; NODE_ID nodeId = 4; - CHAR_STRING label = 5; + CHAR_STRING<32> label = 5; } readonly nosubscribe attribute NOCStruct NOCs[] = 0; @@ -2403,7 +2403,7 @@ client cluster OperationalCredentials = 62 { client cluster PowerSource = 47 { readonly attribute enum8 status = 0; readonly attribute int8u order = 1; - readonly attribute char_string description = 2; + readonly attribute char_string<60> description = 2; readonly attribute int32u batteryVoltage = 11; readonly attribute int8u batteryPercentRemaining = 12; readonly attribute int32u batteryTimeRemaining = 13; @@ -2639,7 +2639,7 @@ client cluster Scenes = 5 { client cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { INT64U id = 0; - CHAR_STRING name = 1; + CHAR_STRING<8> name = 1; INT32U stackFreeCurrent = 2; INT32U stackFreeMinimum = 3; INT32U stackSize = 4; @@ -2708,7 +2708,7 @@ client cluster TargetNavigator = 1285 { struct TargetInfo { INT8U identifier = 0; - CHAR_STRING name = 1; + CHAR_STRING<32> name = 1; } readonly attribute TargetInfo targetNavigatorList[] = 0; @@ -2748,7 +2748,7 @@ client cluster TestCluster = 1295 { struct TestListStructOctet { INT64U fabricIndex = 0; - OCTET_STRING operationalCert = 1; + OCTET_STRING<32> operationalCert = 1; } struct NullablesAndOptionalsStruct { @@ -2827,13 +2827,13 @@ client cluster TestCluster = 1295 { attribute enum16 enum16 = 22; attribute single floatSingle = 23; attribute double floatDouble = 24; - attribute octet_string octetString = 25; + attribute octet_string<10> octetString = 25; attribute INT8U listInt8u[] = 26; attribute OCTET_STRING listOctetString[] = 27; attribute TestListStructOctet listStructOctetString[] = 28; - attribute long_octet_string longOctetString = 29; - attribute char_string charString = 30; - attribute long_char_string longCharString = 31; + attribute long_octet_string<1000> longOctetString = 29; + attribute char_string<10> charString = 30; + attribute long_char_string<1000> longCharString = 31; attribute epoch_us epochUs = 32; attribute epoch_s epochS = 33; attribute vendor_id vendorId = 34; @@ -2872,8 +2872,8 @@ client cluster TestCluster = 1295 { attribute enum16 nullableEnum16 = 32790; attribute single nullableFloatSingle = 32791; attribute double nullableFloatDouble = 32792; - attribute octet_string nullableOctetString = 32793; - attribute char_string nullableCharString = 32798; + attribute octet_string<10> nullableOctetString = 32793; + attribute char_string<10> nullableCharString = 32798; attribute SimpleEnum nullableEnumAttr = 32804; attribute SimpleStruct nullableStruct = 32805; attribute int8u nullableRangeRestrictedInt8u = 32806; @@ -3150,10 +3150,10 @@ client cluster ThreadNetworkDiagnostics = 53 { readonly attribute int16u channel = 0; readonly attribute enum8 routingRole = 1; - readonly attribute octet_string networkName = 2; + readonly attribute octet_string<16> networkName = 2; readonly attribute int16u panId = 3; readonly attribute int64u extendedPanId = 4; - readonly attribute octet_string meshLocalPrefix = 5; + readonly attribute octet_string<17> meshLocalPrefix = 5; readonly attribute int64u overrunCount = 6; readonly attribute NeighborTable neighborTableList[] = 7; readonly attribute RouteTable routeTableList[] = 8; @@ -3208,7 +3208,7 @@ client cluster ThreadNetworkDiagnostics = 53 { readonly attribute int64u pendingTimestamp = 57; readonly attribute int32u delay = 58; readonly attribute SecurityPolicy securityPolicy[] = 59; - readonly attribute octet_string channelMask = 60; + readonly attribute octet_string<4> channelMask = 60; readonly attribute OperationalDatasetComponents operationalDatasetComponents[] = 61; readonly attribute NetworkFault activeNetworkFaultsList[] = 62; readonly global attribute attrib_id attributeList[] = 65531; @@ -3224,7 +3224,7 @@ client cluster UserLabel = 65 { } client cluster WakeOnLan = 1283 { - readonly attribute char_string wakeOnLanMacAddress = 0; + readonly attribute char_string<32> wakeOnLanMacAddress = 0; readonly global attribute attrib_id attributeList[] = 65531; readonly global attribute int16u clusterRevision = 65533; } @@ -3273,7 +3273,7 @@ client cluster WiFiNetworkDiagnostics = 54 { WiFiConnectionStatus connectionStatus = 0; } - readonly attribute octet_string bssid = 0; + readonly attribute octet_string<6> bssid = 0; readonly attribute enum8 securityType = 1; readonly attribute enum8 wiFiVersion = 2; readonly attribute int16u channelNumber = 3; From 7e09d153c9a6178d37ab10ee975835a9ec77c484 Mon Sep 17 00:00:00 2001 From: Sergei Lissianoi <54454955+selissia@users.noreply.github.com> Date: Thu, 20 Jan 2022 22:34:14 -0500 Subject: [PATCH 107/124] [OTA] Update matter-devices.xml for OTA devices, update README for the OTA Requestor (#13718) * Correct the info for the OTA devices * Add clean-up steps and example for the OTA reference apps on Linux * Add steps for buildind the bootable image * Restyled by prettier-markdown * Fix typos * Restyled by prettier-markdown * Add gbl file extension * Add extra step description * Restyled by prettier-markdown Co-authored-by: Restyled.io --- .github/.wordlist.txt | 1 + examples/ota-requestor-app/efr32/README.md | 31 ++++++++++---- examples/ota-requestor-app/linux/README.md | 41 ++++++++++++++++--- .../zcl/data-model/chip/matter-devices.xml | 7 ++-- 4 files changed, 64 insertions(+), 16 deletions(-) diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 9886a40b4d99a9..decf90b2a8cbc7 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -416,6 +416,7 @@ fsl fstab fsync fullclean +gbl gcloud GDB GeneralCommissioning diff --git a/examples/ota-requestor-app/efr32/README.md b/examples/ota-requestor-app/efr32/README.md index b36f7606d37f81..17ff79afe3a1b2 100644 --- a/examples/ota-requestor-app/efr32/README.md +++ b/examples/ota-requestor-app/efr32/README.md @@ -1,4 +1,4 @@ -#CHIP EFR32 OTA Requestor Example +# CHIP EFR32 OTA Requestor Example An example showing the use of the Matter OTA Requestor functionality on the Silicon Labs EFR32 MG12. @@ -9,7 +9,7 @@ Silicon Labs EFR32 MG12. The EFR32 OTA Requestor example provides a baseline demonstration the Matter OTA Requestor functionality built with the Silicon Labs gecko SDK. It can be -controlled by a Chip controller over Openthread network.. +controlled by a Chip controller over OpenThread network.
@@ -48,6 +48,8 @@ examples/lighting-app/efr32/README.md $ cd ~/connectedhomeip $ rm -rf ./out/ + + ## Flashing the Application - On the command line: @@ -61,11 +63,13 @@ examples/lighting-app/efr32/README.md ## Viewing Logging Output -See examples/lighting-app/efr32/README.md +See `examples/lighting-app/efr32/README.md` + + ## Running the OTA Download scenario -- Bring up the Open Thread Border Router as discussed in +- Bring up the OpenThread Border Router as discussed in examples/lighting-app/efr32/README.md and get its operational dataset. - On a Linux or Darwin platform build the chip-tool and the ota-provider-app @@ -74,10 +78,19 @@ See examples/lighting-app/efr32/README.md scripts/examples/gn_build_example.sh examples/chip-tool out/ scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug chip_config_network_layer_ble=false -- In a terminal start the provider app passing to it the path to the image - file that the Requestor is supposed to download (for example /tmp/ota.out): +- Build or download the Gecko Bootloader binary. Bootloader should be built + with the Gecko SDK version 3.2.1 or earlier, type "external SPI" configured + with a single slot of at least 1000 KB. Using the commander tool upload the + bootloader to the device running the requestor application. + +- Create a bootable image file: + + commander gbl create chip-efr32-ota-requestor-example.gbl --app chip-efr32-ota-requestor-example.s37 + +- In a terminal start the provider app passing to it the path to the bootable + image file created in the previous step: - ./out/debug/chip-ota-provider-app -f /tmp/ota.out + ./out/debug/chip-ota-provider-app -f chip-efr32-ota-requestor-example.gbl - In a separate terminal run the chip-tool commands to provision the Provider: @@ -91,10 +104,12 @@ See examples/lighting-app/efr32/README.md ./out/chip-tool pairing ble-thread 2 hex: 73141520 3840 -where operationalDataset is obtained from the Open Thread Border Router. +where operationalDataset is obtained from the OpenThread Border Router. - Once the commissioning process completes enter: ./out/chip-tool otasoftwareupdaterequestor announce-ota-provider 1 0 0 0 2 0 - The Requestor will connect to the Provider and start the image download. + Once the image is downloaded the Requestor will reboot into the downloaded + image. diff --git a/examples/ota-requestor-app/linux/README.md b/examples/ota-requestor-app/linux/README.md index fed5e9462b264f..a00a608dda2ca9 100644 --- a/examples/ota-requestor-app/linux/README.md +++ b/examples/ota-requestor-app/linux/README.md @@ -57,6 +57,42 @@ In terminal 2: - `${REQUESTOR_LONG_DISCRIMINATOR}` is the long discriminator of the ota-requestor-app specified in terminal 3 above +``` +./chip-tool otasoftwareupdaterequestor announce-ota-provider ${PROVIDER_NODE_ID} 0 0 0 ${REQUESTOR_NODE_ID} 0 +``` + +- `${PROVIDER_NODE_ID}` is the node ID of the ota-provider-app assigned to it + during the pairing step above +- `${REQUESTOR_NODE_ID}` is the node ID of the ota-requestor-app assigned to + it during the pairing step above + +## Note + +When the Provider, Requestor and chip-tool are run on the same Linux node the +user must issue `rm -r /tmp/chip_*` before starting the Provider and +`rm /tmp/chip_kvs` before starting the Requestor. These commands reset the +shared Key Value Store to a consistent state. + +## Example + +Building: + +``` +scripts/examples/gn_build_example.sh examples/chip-tool out/ chip_config_network_layer_ble=false && scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug chip_config_network_layer_ble=false && scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug chip_config_network_layer_ble=false +``` + +Running (in separate terminals as described above): + +``` +rm -r /tmp/chip_* +./out/debug/chip-ota-provider-app -f /tmp/ota.txt +./out/chip-tool pairing onnetwork 1 20202021 +rm /tmp/chip_kvs +./out/debug/chip-ota-requestor-app -u 5560 -d 42 +./out/chip-tool pairing onnetwork-long 2 20202021 42 +./out/chip-tool otasoftwareupdaterequestor announce-ota-provider 1 0 0 0 2 0 +``` + ## Current Features / Limitations ### Features @@ -68,10 +104,5 @@ In terminal 2: ### Limitations -- Needs chip-tool to commission the OTA Provider device first because the Node - ID and IP Address of the OTA Provider must be supplied to this reference - application -- Does not verify QueryImageResponse message contents - Stores the downloaded file in the directory this reference app is launched from -- Does not support AnnounceOTAProvider command or OTA Requestor attributes diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index cbffc3de0cc5cc..80b9e817da4f4e 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -106,9 +106,9 @@ limitations under the License. - MA-otarequester + MA-otarequestor CHIP - Matter OTA Requester + Matter OTA Requestor 0x0103 0x0012 @@ -129,7 +129,7 @@ limitations under the License. BINDING - + @@ -156,6 +156,7 @@ limitations under the License. BINDING + From dd209ce270725a3e1be181494e0fe34eeebbae3e Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Fri, 21 Jan 2022 09:46:34 +0530 Subject: [PATCH 108/124] [ESP32] CLI option to set delayed action time in OTA Provider app and restart OTA Requestor once ApplyUpdate is successful (#13620) * [ESP32] CLI option to set delayedActionTime in OTA Provider app Also, modify Linux OTA Provider help for delayedActionTime cli option * [ESP32] Schedule the restart once OTA image apply is successful Also, Apply suggestion from #13484 in lighting-app * Review comments * Fix a small typo * Apply suggestions from code review Co-authored-by: Carol Yang Co-authored-by: Carol Yang --- .github/.wordlist.txt | 1 + examples/lighting-app/esp32/README.md | 11 +-- examples/lighting-app/esp32/main/main.cpp | 4 +- examples/ota-provider-app/esp32/README.md | 9 ++ .../esp32/main/CMakeLists.txt | 1 + .../esp32/main/OTAProviderCommands.cpp | 87 +++++++++++++++++++ .../esp32/main/include/OTAProviderCommands.h | 51 +++++++++++ examples/ota-provider-app/esp32/main/main.cpp | 36 +++----- .../ota-provider-app/esp32/sdkconfig.defaults | 3 + examples/ota-provider-app/linux/main.cpp | 3 +- examples/ota-requestor-app/esp32/README.md | 5 +- src/platform/ESP32/OTAImageProcessorImpl.cpp | 11 +++ 12 files changed, 185 insertions(+), 37 deletions(-) create mode 100644 examples/ota-provider-app/esp32/main/OTAProviderCommands.cpp create mode 100644 examples/ota-provider-app/esp32/main/include/OTAProviderCommands.h diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index decf90b2a8cbc7..ecb117a47dd600 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -726,6 +726,7 @@ OTA OTADownloader OTAImageProcessorDriver OTAImageProcessorInterface +OTAProvider OTAProviderIpAddress OTAProviderNodeId OTAProviderSerialPort diff --git a/examples/lighting-app/esp32/README.md b/examples/lighting-app/esp32/README.md index 534e6ec3df0c16..51ca945b63140d 100644 --- a/examples/lighting-app/esp32/README.md +++ b/examples/lighting-app/esp32/README.md @@ -142,10 +142,10 @@ scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug c hello-world.bin can be obtained from compiling the hello-world ESP-IDF example. -- Provision the Linux OTA Provider using chip-tool +- Commission the Linux OTA Provider using chip-tool ``` -./out/debug/chip-tool pairing onnetwork 12345 20202021 +./out/debug/chip-tool pairing onnetwork 12346 20202021 ``` ## Query for an OTA Image @@ -154,10 +154,11 @@ After commissioning is successful, press Enter in requestor device console and type below query. ``` ->matter ota query 1 12345 0 +>matter ota query 1 12346 0 ``` ## Apply update -Once transfer is complete, reboot the device manually to boot from upgraded OTA -image. +Once the transfer is complete, OTA requestor sends ApplyUpdateRequest command to +OTA provider for applying the image. Device will restart on successful +application of OTA image. diff --git a/examples/lighting-app/esp32/main/main.cpp b/examples/lighting-app/esp32/main/main.cpp index b26a2fa6afd2e6..c3114e04c2b363 100644 --- a/examples/lighting-app/esp32/main/main.cpp +++ b/examples/lighting-app/esp32/main/main.cpp @@ -57,12 +57,10 @@ static void InitOTARequestor(void) { #if CONFIG_ENABLE_OTA_REQUESTOR SetRequestorInstance(&gRequestorCore); - gRequestorCore.SetServerInstance(&Server::GetInstance()); - gRequestorCore.SetOtaRequestorDriver(&gRequestorUser); + gRequestorCore.Init(&Server::GetInstance(), &gRequestorUser, &gDownloader); gImageProcessor.SetOTADownloader(&gDownloader); gDownloader.SetImageProcessorDelegate(&gImageProcessor); gRequestorUser.Init(&gRequestorCore, &gImageProcessor); - gRequestorCore.SetBDXDownloader(&gDownloader); #endif } diff --git a/examples/ota-provider-app/esp32/README.md b/examples/ota-provider-app/esp32/README.md index c849db6afd95d6..af830a81c95c45 100644 --- a/examples/ota-provider-app/esp32/README.md +++ b/examples/ota-provider-app/esp32/README.md @@ -41,6 +41,15 @@ idf.py -p flash ./out/debug/chip-tool pairing ble-wifi 12345 20202021 3841 ``` +## Set delayed action time (Optional) + +- Set delayed action time in the Query Image Response and Apply Update + Response, default is zero. + +``` +> matter OTAProvider delay +``` + --- Once OTA provider is commissioned then head over to diff --git a/examples/ota-provider-app/esp32/main/CMakeLists.txt b/examples/ota-provider-app/esp32/main/CMakeLists.txt index 2d673860ea9668..bba24522ae33ad 100644 --- a/examples/ota-provider-app/esp32/main/CMakeLists.txt +++ b/examples/ota-provider-app/esp32/main/CMakeLists.txt @@ -48,6 +48,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/operational-credentials-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-provider" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/ota-provider-app/ota-provider-common" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension" EXCLUDE_SRCS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/ota-provider-app/ota-provider-common/BdxOtaSender.cpp" PRIV_REQUIRES chip QRCode bt console spiffs) diff --git a/examples/ota-provider-app/esp32/main/OTAProviderCommands.cpp b/examples/ota-provider-app/esp32/main/OTAProviderCommands.cpp new file mode 100644 index 00000000000000..58bf1ee1320f16 --- /dev/null +++ b/examples/ota-provider-app/esp32/main/OTAProviderCommands.cpp @@ -0,0 +1,87 @@ +/* + * + * 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 + +namespace chip { +namespace Shell { +namespace { + +OTAProviderExample * exampleOTAProvider = nullptr; +Shell::Engine sSubShell; + +CHIP_ERROR DelayedActionTimeHandler(int argc, char ** argv) +{ + VerifyOrReturnError(argc == 1, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(exampleOTAProvider != nullptr, CHIP_ERROR_INCORRECT_STATE); + + const uint32_t delay = strtoul(argv[0], nullptr, 10); + exampleOTAProvider->SetDelayedActionTimeSec(delay); + return CHIP_NO_ERROR; +} + +CHIP_ERROR OTAProviderHandler(int argc, char ** argv) +{ + if (argc == 0) + { + sSubShell.ForEachCommand(PrintCommandHelp, nullptr); + return CHIP_NO_ERROR; + } + + CHIP_ERROR error = sSubShell.ExecCommand(argc, argv); + + if (error != CHIP_NO_ERROR) + { + streamer_printf(streamer_get(), "Error: %" CHIP_ERROR_FORMAT "\r\n", error.Format()); + } + + return error; +} +} // namespace + +void OTAProviderCommands::Register() +{ + // These commands can be moved to src/lib/shell/commands/Ota.cpp along with the other OTA commands. + // But as of now only Linux and ESP32 platforms supports OTA provider + + // Register subcommands of the `OTAProvider` commands. + static const shell_command_t subCommands[] = { + { &DelayedActionTimeHandler, "delay", + "Set delayed action time for QueryImageResponse and ApplyUpdateResponse\n" + "Usage: OTAProvider delay " }, + }; + + sSubShell.RegisterCommands(subCommands, ArraySize(subCommands)); + + // Register the root `OTA Provider` command in the top-level shell. + static const shell_command_t otaProviderCommand = { &OTAProviderHandler, "OTAProvider", "OTA Provider commands" }; + + Engine::Root().RegisterCommands(&otaProviderCommand, 1); +} + +// Set Example OTA provider +void OTAProviderCommands::SetExampleOTAProvider(OTAProviderExample * otaProvider) +{ + exampleOTAProvider = otaProvider; +} + +} // namespace Shell +} // namespace chip diff --git a/examples/ota-provider-app/esp32/main/include/OTAProviderCommands.h b/examples/ota-provider-app/esp32/main/include/OTAProviderCommands.h new file mode 100644 index 00000000000000..25eaa0cea6262e --- /dev/null +++ b/examples/ota-provider-app/esp32/main/include/OTAProviderCommands.h @@ -0,0 +1,51 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once +#include + +namespace chip { +namespace Shell { + +class OTAProviderCommands +{ +public: + // delete the copy constructor + OTAProviderCommands(const OTAProviderCommands &) = delete; + // delete the move constructor + OTAProviderCommands(OTAProviderCommands &&) = delete; + // delete the assignment operator + OTAProviderCommands & operator=(const OTAProviderCommands &) = delete; + + static OTAProviderCommands & GetInstance() + { + static OTAProviderCommands instance; + return instance; + } + + // Register the OTA provider commands + void Register(); + + // Set Example OTA provider + void SetExampleOTAProvider(OTAProviderExample * otaProvider); + +private: + OTAProviderCommands() {} +}; + +} // namespace Shell +} // namespace chip diff --git a/examples/ota-provider-app/esp32/main/main.cpp b/examples/ota-provider-app/esp32/main/main.cpp index bd64837a3eb710..7c5ea0aa337e93 100644 --- a/examples/ota-provider-app/esp32/main/main.cpp +++ b/examples/ota-provider-app/esp32/main/main.cpp @@ -17,36 +17,25 @@ #include "CHIPDeviceManager.h" #include "DeviceCallbacks.h" -#include "esp_heap_caps_init.h" #include "esp_log.h" -#include "esp_netif.h" #include "esp_spi_flash.h" #include "esp_spiffs.h" -#include "esp_system.h" -#include "esp_wifi.h" -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" #include "nvs_flash.h" -#include #include -#include - -#include -#include -#include -#include - #include #include - #include +#include +#include #include #include #include +#include using chip::Callback::Callback; using namespace ::chip; +using namespace ::chip::Shell; using namespace ::chip::System; using namespace ::chip::Credentials; using namespace ::chip::DeviceManager; @@ -130,17 +119,6 @@ extern "C" void app_main() { ESP_LOGI(TAG, "OTA Provider!"); - /* Print chip information */ - esp_chip_info_t chip_info; - esp_chip_info(&chip_info); - ESP_LOGI(TAG, "This is ESP32 chip with %d CPU cores, WiFi%s%s, ", chip_info.cores, - (chip_info.features & CHIP_FEATURE_BT) ? "/BT" : "", (chip_info.features & CHIP_FEATURE_BLE) ? "/BLE" : ""); - - ESP_LOGI(TAG, "silicon revision %d, ", chip_info.revision); - - ESP_LOGI(TAG, "%dMB %s flash\n", spi_flash_get_chip_size() / (1024 * 1024), - (chip_info.features & CHIP_FEATURE_EMB_FLASH) ? "embedded" : "external"); - // Initialize the ESP NVS layer. esp_err_t err = nvs_flash_init(); if (err != ESP_OK) @@ -216,4 +194,10 @@ extern "C" void app_main() } chip::app::Clusters::OTAProvider::SetDelegate(kOtaProviderEndpoint, &otaProvider); + + // Launch a chip shell and register OTA Provider Commands + chip::LaunchShell(); + OTAProviderCommands & otaProviderCommands = OTAProviderCommands::GetInstance(); + otaProviderCommands.SetExampleOTAProvider(&otaProvider); + otaProviderCommands.Register(); } diff --git a/examples/ota-provider-app/esp32/sdkconfig.defaults b/examples/ota-provider-app/esp32/sdkconfig.defaults index aaae13fbb5c092..89258be810acd8 100644 --- a/examples/ota-provider-app/esp32/sdkconfig.defaults +++ b/examples/ota-provider-app/esp32/sdkconfig.defaults @@ -55,3 +55,6 @@ CONFIG_ESPTOOLPY_FLASHSIZE="4MB" # discriminator CONFIG_USE_TEST_SETUP_DISCRIMINATOR=0xF01 + +# Enable chip shell +CONFIG_ENABLE_CHIP_SHELL=y diff --git a/examples/ota-provider-app/linux/main.cpp b/examples/ota-provider-app/linux/main.cpp index 9242ab780e41ce..733d40f35b1283 100644 --- a/examples/ota-provider-app/linux/main.cpp +++ b/examples/ota-provider-app/linux/main.cpp @@ -124,7 +124,8 @@ OptionSet cmdLineOptions = { HandleOptions, cmdLineOptionsDef, "PROGRAM OPTIONS" " -q/--QueryImageBehavior \n" " Status value in the Query Image Response\n" " -d/--DelayedActionTimeSec