From 739f54ee2df5ad75ebdda00b5245482759495406 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Wed, 25 May 2022 15:14:17 +0000 Subject: [PATCH 1/7] Interface for TestEventTriggerDelegate --- src/controller/TestEventTriggerDelegate.h | 69 +++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 src/controller/TestEventTriggerDelegate.h diff --git a/src/controller/TestEventTriggerDelegate.h b/src/controller/TestEventTriggerDelegate.h new file mode 100644 index 00000000000000..a96d28a1443395 --- /dev/null +++ b/src/controller/TestEventTriggerDelegate.h @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include + +namespace chip { + +class TestEventTriggerDelegate +{ +public: + /** + * This API can be used to retrieve the test enable key. The enable key is copied into `buffer` + * if the size is large enough. + * + * @param[out] enableKey Buffer to put the test enable key into + * + * @return CHIP_ERROR_BUFFER_TOO_SMALL the provided MutableByteSpan is not big enough. + */ + // TODO should I just use MutableByteSpan instead? + virtual CHIP_ERROR GetEnableKey(MutableByteSpan enableKey) = 0; + + /** + * Expectation is that the caller has already validated the test enable key before calling this. + * Configures the test event trigger based on `eventTrigger` provided. + * + * @param[in] eventTrigger Event trigger to configure + * + * @return CHIP_ERROR_INVALID_ARGUMENT when eventTrigger is not a valid test event trigger. + */ + virtual CHIP_ERROR ConfigureTestEventTrigger(uint64_t eventTrigger) = 0; + + /** + * Get the count of all configured test event triggers. + * + * @return count of configured event triggers. + */ + virtual size_t ConfiguredEventTriggerCount() = 0; +}; + +#if 0 +// This is a lighter weight interface from General Diagnostics Cluster perspective placing all the burden on each +// implementation to perform required validation. +class TestEventTriggerDelegate +{ +public: + virtual CHIP_ERROR ConfigureTestEventTrigger(const ByteSpan testEventKey, uint64_t eventTrigger) = 0; + virtual size_t ConfiguredEventTriggerCount() = 0; +}; +#endif + +} // namespace chip From 4026716e8a4cd0070b2019d0c9711472167d1b26 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Wed, 25 May 2022 15:23:35 +0000 Subject: [PATCH 2/7] remove completed TODO --- src/controller/TestEventTriggerDelegate.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/controller/TestEventTriggerDelegate.h b/src/controller/TestEventTriggerDelegate.h index a96d28a1443395..52c9ac44fda3bc 100644 --- a/src/controller/TestEventTriggerDelegate.h +++ b/src/controller/TestEventTriggerDelegate.h @@ -34,7 +34,6 @@ class TestEventTriggerDelegate * * @return CHIP_ERROR_BUFFER_TOO_SMALL the provided MutableByteSpan is not big enough. */ - // TODO should I just use MutableByteSpan instead? virtual CHIP_ERROR GetEnableKey(MutableByteSpan enableKey) = 0; /** From a201d57648db3fc6e939fbb6bef6b29d3ac1cbe7 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Wed, 25 May 2022 16:38:23 +0000 Subject: [PATCH 3/7] Address PR comments --- src/controller/TestEventTriggerDelegate.h | 32 ++++++----------------- 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/src/controller/TestEventTriggerDelegate.h b/src/controller/TestEventTriggerDelegate.h index 52c9ac44fda3bc..e85f97d05892b0 100644 --- a/src/controller/TestEventTriggerDelegate.h +++ b/src/controller/TestEventTriggerDelegate.h @@ -27,42 +27,26 @@ class TestEventTriggerDelegate { public: /** - * This API can be used to retrieve the test enable key. The enable key is copied into `buffer` - * if the size is large enough. + * Checks to see if `enableKey` provided matches value choosen by by the manufacturer. * - * @param[out] enableKey Buffer to put the test enable key into - * - * @return CHIP_ERROR_BUFFER_TOO_SMALL the provided MutableByteSpan is not big enough. + * @param[in] enableKey Buffer of the key to verify. */ - virtual CHIP_ERROR GetEnableKey(MutableByteSpan enableKey) = 0; + virtual bool DoesEnableKeyMatch(const ByteSpan & enableKey) const = 0; /** - * Expectation is that the caller has already validated the test enable key before calling this. - * Configures the test event trigger based on `eventTrigger` provided. + * Expectation is that the caller has already validated the enable key before calling this. + * Handles the test event trigger based on `eventTrigger` provided. * - * @param[in] eventTrigger Event trigger to configure + * @param[in] eventTrigger Event trigger to handle. * * @return CHIP_ERROR_INVALID_ARGUMENT when eventTrigger is not a valid test event trigger. */ - virtual CHIP_ERROR ConfigureTestEventTrigger(uint64_t eventTrigger) = 0; + virtual CHIP_ERROR HandleEventTrigger(uint64_t eventTrigger) = 0; /** * Get the count of all configured test event triggers. - * - * @return count of configured event triggers. */ - virtual size_t ConfiguredEventTriggerCount() = 0; -}; - -#if 0 -// This is a lighter weight interface from General Diagnostics Cluster perspective placing all the burden on each -// implementation to perform required validation. -class TestEventTriggerDelegate -{ -public: - virtual CHIP_ERROR ConfigureTestEventTrigger(const ByteSpan testEventKey, uint64_t eventTrigger) = 0; - virtual size_t ConfiguredEventTriggerCount() = 0; + virtual size_t ConfiguredEventTriggerCount() const = 0; }; -#endif } // namespace chip From 0e93e8a936745d6bf54679f69c51556ad7f357eb Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Wed, 25 May 2022 16:42:37 +0000 Subject: [PATCH 4/7] Move TestEventTriggerDelegate.h to src/app --- src/{controller => app}/TestEventTriggerDelegate.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/{controller => app}/TestEventTriggerDelegate.h (100%) diff --git a/src/controller/TestEventTriggerDelegate.h b/src/app/TestEventTriggerDelegate.h similarity index 100% rename from src/controller/TestEventTriggerDelegate.h rename to src/app/TestEventTriggerDelegate.h From 8804ea7db8601fba30df790fd59ecfc42407b90a Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Wed, 25 May 2022 18:09:40 +0000 Subject: [PATCH 5/7] update xml and regenerate files --- .../all-clusters-app.matter | 113 ++++++ .../all-clusters-common/all-clusters-app.zap | 29 +- .../general-diagnostics-server.cpp | 16 + src/app/server/Server.h | 7 + .../chip/general-diagnostics-cluster.xml | 9 + .../data_model/controller-clusters.matter | 1 + .../data_model/controller-clusters.zap | 27 +- .../CHIPAttributeTLVValueDecoder.cpp | 15 + .../java/zap-generated/CHIPCallbackTypes.h | 2 + .../chip/devicecontroller/ChipClusters.java | 16 + .../chip/devicecontroller/ChipIdLookup.java | 3 + .../devicecontroller/ClusterReadMapping.java | 14 + .../python/chip/clusters/CHIPClusters.py | 6 + .../python/chip/clusters/Objects.py | 36 ++ .../CHIPAttributeTLVValueDecoder.mm | 11 + .../CHIP/zap-generated/CHIPClustersObjc.h | 22 ++ .../CHIP/zap-generated/CHIPClustersObjc.mm | 90 +++++ .../zap-generated/CHIPCommandPayloadsObjc.h | 23 ++ .../zap-generated/CHIPCommandPayloadsObjc.mm | 13 + .../zap-generated/MatterClusterConstants.h | 4 + .../zap-generated/CHIPClientCallbacks.h | 16 + .../zap-generated/CHIPClusters.h | 7 + .../zap-generated/IMClusterCommandHandler.cpp | 40 ++ .../PluginApplicationCallbacks.h | 1 + .../zap-generated/endpoint_config.h | 349 +++++++++--------- .../zap-generated/gen_config.h | 5 + .../app-common/zap-generated/attribute-id.h | 1 + .../zap-generated/attributes/Accessors.cpp | 31 ++ .../zap-generated/attributes/Accessors.h | 5 + .../app-common/zap-generated/callback.h | 6 + .../zap-generated/cluster-objects.cpp | 44 +++ .../zap-generated/cluster-objects.h | 61 +++ .../app-common/zap-generated/command-id.h | 3 + .../app-common/zap-generated/ids/Attributes.h | 4 + .../app-common/zap-generated/ids/Commands.h | 10 + .../cluster/CHIPTestClustersObjc.h | 2 + .../cluster/CHIPTestClustersObjc.mm | 19 + .../zap-generated/cluster/Commands.h | 127 +++++++ .../zap-generated/cluster/Commands.h | 69 +++- .../cluster/logging/DataModelLogger.cpp | 5 + 40 files changed, 1078 insertions(+), 184 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 c063ae3315e437..14e440e3a1b08f 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 @@ -1512,6 +1512,109 @@ server cluster GeneralCommissioning = 48 { command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } +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<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceType type = 7; + } + + 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; + } + + 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 boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct TestEventTriggerRequest { + OCTET_STRING enableKey = 0; + INT64U eventTrigger = 1; + } + + command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; +} + server cluster GeneralDiagnostics = 51 { enum BootReasonType : ENUM8 { kUnspecified = 0; @@ -1600,11 +1703,19 @@ server cluster GeneralDiagnostics = 51 { readonly attribute ENUM8 activeHardwareFaults[] = 5; readonly attribute ENUM8 activeRadioFaults[] = 6; readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + + request struct TestEventTriggerRequest { + OCTET_STRING enableKey = 0; + INT64U eventTrigger = 1; + } + + command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } server cluster GroupKeyManagement = 63 { @@ -3828,6 +3939,7 @@ server cluster WindowCovering = 258 { endpoint 0 { binding cluster OtaSoftwareUpdateProvider; + binding cluster GeneralDiagnostics; server cluster Identify { ram attribute identifyTime; @@ -3979,6 +4091,7 @@ endpoint 0 { callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; 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 35d696265aebbe..51d70015525417 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 @@ -3355,8 +3355,17 @@ "mfgCode": null, "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "client", - "enabled": 0, - "commands": [], + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], "attributes": [ { "name": "ClusterRevision", @@ -3513,6 +3522,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "TestEventTriggersEnabled", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, diff --git a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp index cc6ec9d355f2ad..37083e23a2703b 100644 --- a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp +++ b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -162,6 +163,11 @@ CHIP_ERROR GeneralDiagosticsAttrAccess::Read(const ConcreteReadAttributePath & a case BootReasons::Id: { return ReadIfSupported(&DiagnosticDataProvider::GetBootReason, aEncoder); } + case TestEventTriggersEnabled::Id: { + // TODO actually implement this part + ChipLogDetail(Zcl, "TMsg!!!!!!!!!!!! Nice we are in here"); + return aEncoder.Encode(false); + } default: { break; } @@ -290,6 +296,16 @@ GeneralDiagnosticsDelegate gDiagnosticDelegate; } // anonymous namespace +bool emberAfGeneralDiagnosticsClusterTestEventTriggerCallback( + CommandHandler * commandObj, const ConcreteCommandPath & commandPath, + const Commands::TestEventTrigger::DecodableType & commandData) { + + ChipLogDetail(Zcl, "TMsg!!!!!!!!!!!! We got the TestEventTrigger command"); + ChipLogDetail(Zcl, "TMsg!!!!!!!!!!!! We got the TestEventTrigger commandData.enableKey.size()=%d", (int)(commandData.enableKey.size())); + ChipLogDetail(Zcl, "TMsg!!!!!!!!!!!! commandData.eventTrigger=0x" ChipLogFormatX64, ChipLogValueX64(commandData.eventTrigger)); + return false; +} + void MatterGeneralDiagnosticsPluginServerInitCallback() { registerAttributeAccessOverride(&gAttrAccess); diff --git a/src/app/server/Server.h b/src/app/server/Server.h index 68b8cc92a8f303..804e0b7bcdca7d 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -105,6 +106,8 @@ struct ServerInitParams // Network native params can be injected depending on the // selected Endpoint implementation void * endpointNativeParams = nullptr; + // TODO(thampson): comment here about what this does + TestEventTriggerDelegate * testEventTriggerDelegate = nullptr; }; /** @@ -242,6 +245,8 @@ class Server PersistentStorageDelegate & GetPersistentStorage() { return *mDeviceStorage; } + TestEventTriggerDelegate * GetTestEventTriggerDelegate() { return mTestEventTriggerDelegate; } + /** * This function send the ShutDown event before stopping * the event loop. @@ -381,6 +386,8 @@ class Server Access::AccessControl mAccessControl; app::AclStorage * mAclStorage; + TestEventTriggerDelegate * mTestEventTriggerDelegate; + uint16_t mOperationalServicePort; uint16_t mUserDirectedCommissioningPort; Inet::InterfaceId mInterfaceId; diff --git a/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml index 5b281da964289b..405c16454fd0ec 100644 --- a/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml @@ -91,6 +91,14 @@ limitations under the License. ActiveHardwareFaults ActiveRadioFaults ActiveNetworkFaults + TestEventTriggersEnabled + + + Provide a means for certification tests to trigger some test-plan-specific events + + + + Indicate a change in the set of hardware faults currently detected by the Node. @@ -110,5 +118,6 @@ limitations under the License. Indicate the reason that caused the device to start-up. + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index c934293050c8f6..aa5ca2fc2550cc 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -1958,6 +1958,7 @@ client cluster GeneralDiagnostics = 51 { readonly attribute ENUM8 activeHardwareFaults[] = 5; readonly attribute ENUM8 activeRadioFaults[] = 6; readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute attrib_id attributeList[] = 65531; diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index a8bf69532f75d5..5fd5c4025e6b99 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -5229,7 +5229,16 @@ "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "client", "enabled": 1, - "commands": [], + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + ], "attributes": [ { "name": "ClusterRevision", @@ -5386,6 +5395,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "TestEventTriggersEnabled", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 1d274b75bc886c..b96a577ea6796c 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -6940,6 +6940,21 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } + case Attributes::TestEventTriggersEnabled::Id: { + using TypeInfo = Attributes::TestEventTriggersEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), cppValue, + value); + return value; + } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h index f243c959269df2..8c808ae8effdde 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -730,6 +730,8 @@ typedef void (*CHIPGeneralDiagnosticsClusterActiveRadioFaultsAttributeCallbackTy void *, const chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo::DecodableType &); typedef void (*CHIPGeneralDiagnosticsClusterActiveNetworkFaultsAttributeCallbackType)( void *, const chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo::DecodableType &); +typedef void (*CHIPGeneralDiagnosticsClusterTestEventTriggersEnabledAttributeCallbackType)( + void *, chip::app::Clusters::GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo::DecodableArgType); typedef void (*CHIPGeneralDiagnosticsClusterGeneratedCommandListAttributeCallbackType)( void *, const chip::app::Clusters::GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo::DecodableType &); typedef void (*CHIPGeneralDiagnosticsClusterAcceptedCommandListAttributeCallbackType)( diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index cee1e4255a012d..d4ad5492d67175 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -9181,6 +9181,16 @@ public void subscribeActiveNetworkFaultsAttribute( subscribeActiveNetworkFaultsAttribute(chipClusterPtr, callback, minInterval, maxInterval); } + public void readTestEventTriggersEnabledAttribute(BooleanAttributeCallback callback) { + readTestEventTriggersEnabledAttribute(chipClusterPtr, callback); + } + + public void subscribeTestEventTriggersEnabledAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + subscribeTestEventTriggersEnabledAttribute( + chipClusterPtr, callback, minInterval, maxInterval); + } + public void readGeneratedCommandListAttribute(GeneratedCommandListAttributeCallback callback) { readGeneratedCommandListAttribute(chipClusterPtr, callback); } @@ -9285,6 +9295,12 @@ private native void subscribeActiveNetworkFaultsAttribute( int minInterval, int maxInterval); + private native void readTestEventTriggersEnabledAttribute( + long chipClusterPtr, BooleanAttributeCallback callback); + + private native void subscribeTestEventTriggersEnabledAttribute( + long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); + private native void readGeneratedCommandListAttribute( long chipClusterPtr, GeneratedCommandListAttributeCallback callback); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java index 2a92aacd382922..096a39974998ea 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java @@ -1282,6 +1282,9 @@ public static String attributeIdToName(long clusterId, long attributeId) { if (attributeId == 7L) { return "ActiveNetworkFaults"; } + if (attributeId == 8L) { + return "TestEventTriggersEnabled"; + } if (attributeId == 65528L) { return "GeneratedCommandList"; } diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index 255e855811356e..87c5672d165c45 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -4478,6 +4478,20 @@ public Map> getReadAttributeMap() { readGeneralDiagnosticsInteractionInfo.put( "readActiveNetworkFaultsAttribute", readGeneralDiagnosticsActiveNetworkFaultsAttributeInteractionInfo); + Map readGeneralDiagnosticsTestEventTriggersEnabledCommandParams = + new LinkedHashMap(); + InteractionInfo readGeneralDiagnosticsTestEventTriggersEnabledAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.GeneralDiagnosticsCluster) cluster) + .readTestEventTriggersEnabledAttribute( + (ChipClusters.BooleanAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readGeneralDiagnosticsTestEventTriggersEnabledCommandParams); + readGeneralDiagnosticsInteractionInfo.put( + "readTestEventTriggersEnabledAttribute", + readGeneralDiagnosticsTestEventTriggersEnabledAttributeInteractionInfo); Map readGeneralDiagnosticsGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readGeneralDiagnosticsGeneratedCommandListAttributeInteractionInfo = diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index d13f889796e7ff..d7632c77c4e453 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -2880,6 +2880,12 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x00000008: { + "attributeName": "TestEventTriggersEnabled", + "attributeId": 0x00000008, + "type": "bool", + "reportable": True, + }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 706f194ae0b808..25f1a7a31e8670 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -10272,6 +10272,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="activeHardwareFaults", Tag=0x00000005, Type=typing.Optional[typing.List[uint]]), ClusterObjectFieldDescriptor(Label="activeRadioFaults", Tag=0x00000006, Type=typing.Optional[typing.List[uint]]), ClusterObjectFieldDescriptor(Label="activeNetworkFaults", Tag=0x00000007, Type=typing.Optional[typing.List[uint]]), + ClusterObjectFieldDescriptor(Label="testEventTriggersEnabled", Tag=0x00000008, Type=bool), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), @@ -10287,6 +10288,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: activeHardwareFaults: 'typing.Optional[typing.List[uint]]' = None activeRadioFaults: 'typing.Optional[typing.List[uint]]' = None activeNetworkFaults: 'typing.Optional[typing.List[uint]]' = None + testEventTriggersEnabled: 'bool' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None attributeList: 'typing.List[uint]' = None @@ -10367,6 +10369,24 @@ def descriptor(cls) -> ClusterObjectDescriptor: + class Commands: + @dataclass + class TestEventTrigger(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0033 + command_id: typing.ClassVar[int] = 0x0000 + is_client: typing.ClassVar[bool] = True + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields = [ + ClusterObjectFieldDescriptor(Label="enableKey", Tag=0, Type=bytes), + ClusterObjectFieldDescriptor(Label="eventTrigger", Tag=1, Type=uint), + ]) + + enableKey: 'bytes' = b"" + eventTrigger: 'uint' = 0 + class Attributes: @dataclass @@ -10497,6 +10517,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[typing.List[uint]]' = None + @dataclass + class TestEventTriggersEnabled(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0033 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000008 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=bool) + + value: 'bool' = False + @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index 71425a9e1c4b9d..c55ebae85088f2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -7268,6 +7268,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::TestEventTriggersEnabled::Id: { + using TypeInfo = Attributes::TestEventTriggersEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::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 bb94e9a4641589..a48be76e5f957c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -9240,6 +9240,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPGeneralDiagnostics : CHIPCluster +- (void)testEventTriggerWithParams:(CHIPGeneralDiagnosticsClusterTestEventTriggerParams *)params + completionHandler:(StatusCompletion)completionHandler; + - (void)readAttributeNetworkInterfacesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -9382,6 +9385,25 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeTestEventTriggersEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeTestEventTriggersEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeTestEventTriggersEnabledWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 3e02cba7ca2617..eaac923a1a6b1c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -35000,6 +35000,33 @@ @implementation CHIPGeneralDiagnostics return &_cppCluster; } +- (void)testEventTriggerWithParams:(CHIPGeneralDiagnosticsClusterTestEventTriggerParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + GeneralDiagnostics::Commands::TestEventTrigger::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.enableKey = [self asByteSpan:params.enableKey]; + request.eventTrigger = params.eventTrigger.unsignedLongLongValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + - (void)readAttributeNetworkInterfacesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { @@ -35502,6 +35529,69 @@ new CHIPGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge( }); } +- (void)readAttributeTestEventTriggersEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeTestEventTriggersEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeTestEventTriggersEnabledWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h index 88ea6471c7363a..8207b804b38720 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h @@ -2916,6 +2916,29 @@ NS_ASSUME_NONNULL_BEGIN */ @property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; +- (instancetype)init; +@end +@interface CHIPGeneralDiagnosticsClusterTestEventTriggerParams : NSObject + +@property (strong, nonatomic) NSData * _Nonnull enableKey; + +@property (strong, nonatomic) NSNumber * _Nonnull eventTrigger; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (strong, nonatomic, nullable) NSNumber * timedInvokeTimeoutMs; + - (instancetype)init; @end @interface CHIPSoftwareDiagnosticsClusterResetWatermarksParams : NSObject diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm index 8129f6a2d08840..eabfbdd2849228 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm @@ -1684,6 +1684,19 @@ - (instancetype)init return self; } @end +@implementation CHIPGeneralDiagnosticsClusterTestEventTriggerParams +- (instancetype)init +{ + if (self = [super init]) { + + _enableKey = [NSData data]; + + _eventTrigger = @(0); + _timedInvokeTimeoutMs = nil; + } + return self; +} +@end @implementation CHIPSoftwareDiagnosticsClusterResetWatermarksParams - (instancetype)init { diff --git a/src/darwin/Framework/CHIP/zap-generated/MatterClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MatterClusterConstants.h index adeeb9a2e8b840..ee26edeeebeed4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MatterClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MatterClusterConstants.h @@ -594,6 +594,7 @@ typedef NS_ENUM(uint32_t, MatterClusterAttributeIDType) { kMatterClusterGeneralDiagnosticsAttributeActiveHardwareFaultsID = 0x00000005, kMatterClusterGeneralDiagnosticsAttributeActiveRadioFaultsID = 0x00000006, kMatterClusterGeneralDiagnosticsAttributeActiveNetworkFaultsID = 0x00000007, + kMatterClusterGeneralDiagnosticsAttributeTestEventTriggersEnabledID = 0x00000008, kMatterClusterGeneralDiagnosticsAttributeGeneratedCommandListID = kMatterClusterGlobalAttributeGeneratedCommandListID, kMatterClusterGeneralDiagnosticsAttributeAcceptedCommandListID = kMatterClusterGlobalAttributeAcceptedCommandListID, kMatterClusterGeneralDiagnosticsAttributeAttributeListID = kMatterClusterGlobalAttributeAttributeListID, @@ -2237,6 +2238,9 @@ typedef NS_ENUM(uint32_t, MatterClusterCommandIDType) { kMatterClusterDiagnosticLogsCommandRetrieveLogsRequestID = 0x00000000, kMatterClusterDiagnosticLogsCommandRetrieveLogsResponseID = 0x00000001, + // Cluster GeneralDiagnostics commands + kMatterClusterGeneralDiagnosticsCommandTestEventTriggerID = 0x00000000, + // Cluster SoftwareDiagnostics commands kMatterClusterSoftwareDiagnosticsCommandResetWatermarksID = 0x00000000, diff --git a/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h index 4458f51745a59b..1964ba03c40a94 100644 --- a/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h @@ -30,3 +30,19 @@ #include // List specific responses +typedef void (*GeneralDiagnosticsNetworkInterfacesListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::DecodableType> & data); +typedef void (*GeneralDiagnosticsActiveHardwareFaultsListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*GeneralDiagnosticsActiveRadioFaultsListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*GeneralDiagnosticsActiveNetworkFaultsListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*GeneralDiagnosticsGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*GeneralDiagnosticsAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*GeneralDiagnosticsAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); diff --git a/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h b/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h index 15ec5aca34a215..91c5114d9f9b06 100644 --- a/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h @@ -30,6 +30,13 @@ namespace chip { namespace Controller { +class DLL_EXPORT GeneralDiagnosticsCluster : public ClusterBase +{ +public: + GeneralDiagnosticsCluster() : ClusterBase(app::Clusters::GeneralDiagnostics::Id) {} + ~GeneralDiagnosticsCluster() {} +}; + class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: diff --git a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp index b3f1779b588ea7..7d8a37772268c2 100644 --- a/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp @@ -629,6 +629,43 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace GeneralCommissioning +namespace GeneralDiagnostics { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::TestEventTrigger::Id: { + Commands::TestEventTrigger::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfGeneralDiagnosticsClusterTestEventTriggerCallback(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 GeneralDiagnostics + namespace GroupKeyManagement { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -1876,6 +1913,9 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::GeneralCommissioning::Id: Clusters::GeneralCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; + case Clusters::GeneralDiagnostics::Id: + Clusters::GeneralDiagnostics::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; case Clusters::GroupKeyManagement::Id: Clusters::GroupKeyManagement::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; diff --git a/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h index 685fedf234d2bd..bdeab637c46baa 100644 --- a/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h @@ -46,6 +46,7 @@ MatterFixedLabelPluginServerInitCallback(); \ MatterFlowMeasurementPluginServerInitCallback(); \ MatterGeneralCommissioningPluginServerInitCallback(); \ + MatterGeneralDiagnosticsPluginClientInitCallback(); \ MatterGeneralDiagnosticsPluginServerInitCallback(); \ MatterGroupKeyManagementPluginServerInitCallback(); \ MatterGroupsPluginServerInitCallback(); \ 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 65c11ea90221e2..a8d461c1e4157a 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -416,7 +416,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 719 +#define GENERATED_ATTRIBUTE_COUNT 720 #define GENERATED_ATTRIBUTES \ { \ \ @@ -591,7 +591,9 @@ 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 */ \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ + { 0x00000008, ZAP_TYPE(BOOLEAN), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* TestEventTriggersEnabled */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ @@ -1632,30 +1634,34 @@ /* GeneratedCommandList (index=41)*/ \ 0x00000001 /* RetrieveLogsResponse */, \ chip::kInvalidCommandId /* end of list */, \ - /* Endpoint: 0, Cluster: Software Diagnostics (server) */\ + /* Endpoint: 0, Cluster: General Diagnostics (server) */\ /* AcceptedCommandList (index=43) */ \ + 0x00000000 /* TestEventTrigger */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Software Diagnostics (server) */\ + /* AcceptedCommandList (index=45) */ \ 0x00000000 /* ResetWatermarks */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */\ - /* AcceptedCommandList (index=45) */ \ + /* AcceptedCommandList (index=47) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */\ - /* AcceptedCommandList (index=47) */ \ + /* AcceptedCommandList (index=49) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */\ - /* AcceptedCommandList (index=49) */ \ + /* AcceptedCommandList (index=51) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */\ - /* AcceptedCommandList (index=51) */ \ + /* AcceptedCommandList (index=53) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000001 /* OpenBasicCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* AcceptedCommandList (index=55) */ \ + /* AcceptedCommandList (index=57) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -1666,34 +1672,34 @@ 0x0000000B /* AddTrustedRootCertificate */, \ 0x0000000C /* RemoveTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=65)*/ \ + /* GeneratedCommandList (index=67)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Group Key Management (server) */\ - /* AcceptedCommandList (index=70) */ \ + /* AcceptedCommandList (index=72) */ \ 0x00000000 /* KeySetWrite */, \ 0x00000001 /* KeySetRead */, \ 0x00000003 /* KeySetRemove */, \ 0x00000004 /* KeySetReadAllIndices */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=75)*/ \ + /* GeneratedCommandList (index=77)*/ \ 0x00000002 /* KeySetReadResponse */, \ 0x00000005 /* KeySetReadAllIndicesResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Identify (server) */\ - /* AcceptedCommandList (index=78) */ \ + /* AcceptedCommandList (index=80) */ \ 0x00000000 /* Identify */, \ 0x00000001 /* IdentifyQuery */, \ 0x00000040 /* TriggerEffect */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=82)*/ \ + /* GeneratedCommandList (index=84)*/ \ 0x00000000 /* IdentifyQueryResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Groups (server) */\ - /* AcceptedCommandList (index=84) */ \ + /* AcceptedCommandList (index=86) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -1701,14 +1707,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=91)*/ \ + /* GeneratedCommandList (index=93)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Scenes (server) */\ - /* AcceptedCommandList (index=96) */ \ + /* AcceptedCommandList (index=98) */ \ 0x00000000 /* AddScene */, \ 0x00000001 /* ViewScene */, \ 0x00000002 /* RemoveScene */, \ @@ -1717,7 +1723,7 @@ 0x00000005 /* RecallScene */, \ 0x00000006 /* GetSceneMembership */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=104)*/ \ + /* GeneratedCommandList (index=106)*/ \ 0x00000000 /* AddSceneResponse */, \ 0x00000001 /* ViewSceneResponse */, \ 0x00000002 /* RemoveSceneResponse */, \ @@ -1726,7 +1732,7 @@ 0x00000006 /* GetSceneMembershipResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: On/Off (server) */\ - /* AcceptedCommandList (index=111) */ \ + /* AcceptedCommandList (index=113) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ @@ -1735,7 +1741,7 @@ 0x00000042 /* OnWithTimedOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Level Control (server) */\ - /* AcceptedCommandList (index=118) */ \ + /* AcceptedCommandList (index=120) */ \ 0x00000000 /* MoveToLevel */, \ 0x00000001 /* Move */, \ 0x00000002 /* Step */, \ @@ -1746,11 +1752,11 @@ 0x00000007 /* StopWithOnOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Mode Select (server) */\ - /* AcceptedCommandList (index=127) */ \ + /* AcceptedCommandList (index=129) */ \ 0x00000000 /* ChangeToMode */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Door Lock (server) */\ - /* AcceptedCommandList (index=129) */ \ + /* AcceptedCommandList (index=131) */ \ 0x00000000 /* LockDoor */, \ 0x00000001 /* UnlockDoor */, \ 0x00000003 /* UnlockWithTimeout */, \ @@ -1766,7 +1772,7 @@ 0x00000024 /* GetCredentialStatus */, \ 0x00000026 /* ClearCredential */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=144)*/ \ + /* GeneratedCommandList (index=146)*/ \ 0x0000000C /* GetWeekDayScheduleResponse */, \ 0x0000000F /* GetYearDayScheduleResponse */, \ 0x0000001C /* GetUserResponse */, \ @@ -1774,7 +1780,7 @@ 0x00000025 /* GetCredentialStatusResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Window Covering (server) */\ - /* AcceptedCommandList (index=150) */ \ + /* AcceptedCommandList (index=152) */ \ 0x00000000 /* UpOrOpen */, \ 0x00000001 /* DownOrClose */, \ 0x00000002 /* StopMotion */, \ @@ -1784,16 +1790,16 @@ 0x00000008 /* GoToTiltPercentage */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Barrier Control (server) */\ - /* AcceptedCommandList (index=158) */ \ + /* AcceptedCommandList (index=160) */ \ 0x00000000 /* BarrierControlGoToPercent */, \ 0x00000001 /* BarrierControlStop */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Thermostat (server) */\ - /* AcceptedCommandList (index=161) */ \ + /* AcceptedCommandList (index=163) */ \ 0x00000000 /* SetpointRaiseLower */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Color Control (server) */\ - /* AcceptedCommandList (index=163) */ \ + /* AcceptedCommandList (index=165) */ \ 0x00000000 /* MoveToHue */, \ 0x00000001 /* MoveHue */, \ 0x00000002 /* StepHue */, \ @@ -1815,80 +1821,80 @@ 0x0000004C /* StepColorTemperature */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: IAS Zone (server) */\ - /* AcceptedCommandList (index=183) */ \ + /* AcceptedCommandList (index=185) */ \ 0x00000000 /* ZoneEnrollResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Channel (server) */\ - /* AcceptedCommandList (index=185) */ \ + /* AcceptedCommandList (index=187) */ \ 0x00000000 /* ChangeChannel */, \ 0x00000002 /* ChangeChannelByNumber */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=188)*/ \ + /* GeneratedCommandList (index=190)*/ \ 0x00000001 /* ChangeChannelResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Target Navigator (server) */\ - /* AcceptedCommandList (index=190) */ \ + /* AcceptedCommandList (index=192) */ \ 0x00000000 /* NavigateTarget */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=192)*/ \ + /* GeneratedCommandList (index=194)*/ \ 0x00000001 /* NavigateTargetResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Media Playback (server) */\ - /* AcceptedCommandList (index=194) */ \ + /* AcceptedCommandList (index=196) */ \ 0x00000000 /* Play */, \ 0x00000001 /* Pause */, \ 0x00000002 /* StopPlayback */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=198)*/ \ + /* GeneratedCommandList (index=200)*/ \ 0x0000000A /* PlaybackResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Media Input (server) */\ - /* AcceptedCommandList (index=200) */ \ + /* AcceptedCommandList (index=202) */ \ 0x00000000 /* SelectInput */, \ 0x00000001 /* ShowInputStatus */, \ 0x00000002 /* HideInputStatus */, \ 0x00000003 /* RenameInput */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Low Power (server) */\ - /* AcceptedCommandList (index=205) */ \ + /* AcceptedCommandList (index=207) */ \ 0x00000000 /* Sleep */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Keypad Input (server) */\ - /* AcceptedCommandList (index=207) */ \ + /* AcceptedCommandList (index=209) */ \ 0x00000000 /* SendKey */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=209)*/ \ + /* GeneratedCommandList (index=211)*/ \ 0x00000001 /* SendKeyResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Content Launcher (server) */\ - /* AcceptedCommandList (index=211) */ \ + /* AcceptedCommandList (index=213) */ \ 0x00000000 /* LaunchContent */, \ 0x00000001 /* LaunchURL */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=214)*/ \ + /* GeneratedCommandList (index=216)*/ \ 0x00000002 /* LaunchResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Audio Output (server) */\ - /* AcceptedCommandList (index=216) */ \ + /* AcceptedCommandList (index=218) */ \ 0x00000000 /* SelectOutput */, \ 0x00000001 /* RenameOutput */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Application Launcher (server) */\ - /* AcceptedCommandList (index=219) */ \ + /* AcceptedCommandList (index=221) */ \ 0x00000000 /* LaunchApp */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=221)*/ \ + /* GeneratedCommandList (index=223)*/ \ 0x00000003 /* LauncherResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Account Login (server) */\ - /* AcceptedCommandList (index=223) */ \ + /* AcceptedCommandList (index=225) */ \ 0x00000000 /* GetSetupPIN */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=225)*/ \ + /* GeneratedCommandList (index=227)*/ \ 0x00000001 /* GetSetupPINResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Test Cluster (server) */\ - /* AcceptedCommandList (index=227) */ \ + /* AcceptedCommandList (index=229) */ \ 0x00000000 /* Test */, \ 0x00000001 /* TestNotHandled */, \ 0x00000002 /* TestSpecific */, \ @@ -1908,7 +1914,7 @@ 0x00000014 /* TestEmitTestEventRequest */, \ 0x00000015 /* TestEmitTestFabricScopedEventRequest */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=246)*/ \ + /* GeneratedCommandList (index=248)*/ \ 0x00000000 /* TestSpecificResponse */, \ 0x00000001 /* TestAddArgumentsResponse */, \ 0x00000004 /* TestListInt8UReverseResponse */, \ @@ -1920,7 +1926,7 @@ 0x0000000B /* TestEmitTestFabricScopedEventResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: Groups (server) */\ - /* AcceptedCommandList (index=256) */ \ + /* AcceptedCommandList (index=258) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -1928,20 +1934,20 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=263)*/ \ + /* GeneratedCommandList (index=265)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: On/Off (server) */\ - /* AcceptedCommandList (index=268) */ \ + /* AcceptedCommandList (index=270) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */\ - /* AcceptedCommandList (index=272) */ \ + /* AcceptedCommandList (index=274) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -1949,7 +1955,7 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=279)*/ \ + /* GeneratedCommandList (index=281)*/ \ 0x00000001 /* ScanNetworksResponse */, \ 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ @@ -1959,7 +1965,7 @@ // clang-format on #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 78 +#define GENERATED_CLUSTER_COUNT 79 // clang-format off #define GENERATED_CLUSTERS { \ @@ -2139,98 +2145,109 @@ .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 39 ) ,\ .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 41 ) ,\ },\ + { \ + /* Endpoint: 0, Cluster: General Diagnostics (client) */ \ + .clusterId = 0x00000033, \ + .attributes = ZAP_ATTRIBUTE_INDEX(93), \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ + },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ .clusterId = 0x00000033, \ .attributes = ZAP_ATTRIBUTE_INDEX(93), \ - .attributeCount = 10, \ + .attributeCount = 11, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 43 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ .clusterId = 0x00000034, \ - .attributes = ZAP_ATTRIBUTE_INDEX(103), \ + .attributes = ZAP_ATTRIBUTE_INDEX(104), \ .attributeCount = 6, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 43 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 45 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ .clusterId = 0x00000035, \ - .attributes = ZAP_ATTRIBUTE_INDEX(109), \ + .attributes = ZAP_ATTRIBUTE_INDEX(110), \ .attributeCount = 65, \ .clusterSize = 247, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 45 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 47 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ .clusterId = 0x00000036, \ - .attributes = ZAP_ATTRIBUTE_INDEX(174), \ + .attributes = ZAP_ATTRIBUTE_INDEX(175), \ .attributeCount = 15, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 47 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 49 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ .clusterId = 0x00000037, \ - .attributes = ZAP_ATTRIBUTE_INDEX(189), \ + .attributes = ZAP_ATTRIBUTE_INDEX(190), \ .attributeCount = 11, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 49 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 51 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ .clusterId = 0x0000003C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(200), \ + .attributes = ZAP_ATTRIBUTE_INDEX(201), \ .attributeCount = 5, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 51 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 53 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(205), \ + .attributes = ZAP_ATTRIBUTE_INDEX(206), \ .attributeCount = 8, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 55 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 65 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 57 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 67 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ .clusterId = 0x0000003F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(213), \ + .attributes = ZAP_ATTRIBUTE_INDEX(214), \ .attributeCount = 6, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 70 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 75 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 72 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 77 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(219), \ + .attributes = ZAP_ATTRIBUTE_INDEX(220), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2241,7 +2258,7 @@ { \ /* Endpoint: 0, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(222), \ + .attributes = ZAP_ATTRIBUTE_INDEX(223), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2252,7 +2269,7 @@ { \ /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ .clusterId = 0x00000405, \ - .attributes = ZAP_ATTRIBUTE_INDEX(225), \ + .attributes = ZAP_ATTRIBUTE_INDEX(226), \ .attributeCount = 5, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2263,51 +2280,51 @@ { \ /* Endpoint: 1, Cluster: Identify (server) */ \ .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(230), \ + .attributes = ZAP_ATTRIBUTE_INDEX(231), \ .attributeCount = 4, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 78 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 82 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 80 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 84 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(234), \ + .attributes = ZAP_ATTRIBUTE_INDEX(235), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 84 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 91 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 86 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 93 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Scenes (server) */ \ .clusterId = 0x00000005, \ - .attributes = ZAP_ATTRIBUTE_INDEX(237), \ + .attributes = ZAP_ATTRIBUTE_INDEX(238), \ .attributeCount = 7, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayScenesServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 96 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 104 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 98 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 106 ) ,\ },\ { \ /* Endpoint: 1, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(244), \ + .attributes = ZAP_ATTRIBUTE_INDEX(245), \ .attributeCount = 7, \ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 111 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 113 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ .clusterId = 0x00000007, \ - .attributes = ZAP_ATTRIBUTE_INDEX(251), \ + .attributes = ZAP_ATTRIBUTE_INDEX(252), \ .attributeCount = 4, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2318,18 +2335,18 @@ { \ /* Endpoint: 1, Cluster: Level Control (server) */ \ .clusterId = 0x00000008, \ - .attributes = ZAP_ATTRIBUTE_INDEX(255), \ + .attributes = ZAP_ATTRIBUTE_INDEX(256), \ .attributeCount = 16, \ .clusterSize = 27, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 118 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 120 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ .clusterId = 0x0000000F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(271), \ + .attributes = ZAP_ATTRIBUTE_INDEX(272), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2340,7 +2357,7 @@ { \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(276), \ + .attributes = ZAP_ATTRIBUTE_INDEX(277), \ .attributeCount = 6, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2351,7 +2368,7 @@ { \ /* Endpoint: 1, Cluster: Binding (server) */ \ .clusterId = 0x0000001E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(282), \ + .attributes = ZAP_ATTRIBUTE_INDEX(283), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2362,7 +2379,7 @@ { \ /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ .clusterId = 0x00000025, \ - .attributes = ZAP_ATTRIBUTE_INDEX(285), \ + .attributes = ZAP_ATTRIBUTE_INDEX(286), \ .attributeCount = 5, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2373,7 +2390,7 @@ { \ /* Endpoint: 1, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(290), \ + .attributes = ZAP_ATTRIBUTE_INDEX(291), \ .attributeCount = 8, \ .clusterSize = 72, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2384,7 +2401,7 @@ { \ /* Endpoint: 1, Cluster: Switch (server) */ \ .clusterId = 0x0000003B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(298), \ + .attributes = ZAP_ATTRIBUTE_INDEX(299), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2395,7 +2412,7 @@ { \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(303), \ + .attributes = ZAP_ATTRIBUTE_INDEX(304), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2406,7 +2423,7 @@ { \ /* Endpoint: 1, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(306), \ + .attributes = ZAP_ATTRIBUTE_INDEX(307), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2417,7 +2434,7 @@ { \ /* Endpoint: 1, Cluster: Boolean State (server) */ \ .clusterId = 0x00000045, \ - .attributes = ZAP_ATTRIBUTE_INDEX(309), \ + .attributes = ZAP_ATTRIBUTE_INDEX(310), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2428,51 +2445,51 @@ { \ /* Endpoint: 1, Cluster: Mode Select (server) */ \ .clusterId = 0x00000050, \ - .attributes = ZAP_ATTRIBUTE_INDEX(312), \ + .attributes = ZAP_ATTRIBUTE_INDEX(313), \ .attributeCount = 8, \ .clusterSize = 44, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayModeSelectServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 127 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 129 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ .clusterId = 0x00000101, \ - .attributes = ZAP_ATTRIBUTE_INDEX(320), \ + .attributes = ZAP_ATTRIBUTE_INDEX(321), \ .attributeCount = 33, \ .clusterSize = 55, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayDoorLockServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 129 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 144 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 131 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 146 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ .clusterId = 0x00000102, \ - .attributes = ZAP_ATTRIBUTE_INDEX(353), \ + .attributes = ZAP_ATTRIBUTE_INDEX(354), \ .attributeCount = 20, \ .clusterSize = 35, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayWindowCoveringServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 150 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 152 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ .clusterId = 0x00000103, \ - .attributes = ZAP_ATTRIBUTE_INDEX(373), \ + .attributes = ZAP_ATTRIBUTE_INDEX(374), \ .attributeCount = 6, \ .clusterSize = 11, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 158 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 160 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ .clusterId = 0x00000200, \ - .attributes = ZAP_ATTRIBUTE_INDEX(379), \ + .attributes = ZAP_ATTRIBUTE_INDEX(380), \ .attributeCount = 25, \ .clusterSize = 52, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2483,18 +2500,18 @@ { \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ .clusterId = 0x00000201, \ - .attributes = ZAP_ATTRIBUTE_INDEX(404), \ + .attributes = ZAP_ATTRIBUTE_INDEX(405), \ .attributeCount = 19, \ .clusterSize = 34, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayThermostatServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 161 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 163 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ .clusterId = 0x00000202, \ - .attributes = ZAP_ATTRIBUTE_INDEX(423), \ + .attributes = ZAP_ATTRIBUTE_INDEX(424), \ .attributeCount = 13, \ .clusterSize = 17, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2505,7 +2522,7 @@ { \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ .clusterId = 0x00000204, \ - .attributes = ZAP_ATTRIBUTE_INDEX(436), \ + .attributes = ZAP_ATTRIBUTE_INDEX(437), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2516,18 +2533,18 @@ { \ /* Endpoint: 1, Cluster: Color Control (server) */ \ .clusterId = 0x00000300, \ - .attributes = ZAP_ATTRIBUTE_INDEX(441), \ + .attributes = ZAP_ATTRIBUTE_INDEX(442), \ .attributeCount = 54, \ .clusterSize = 345, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayColorControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 163 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 165 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ .clusterId = 0x00000400, \ - .attributes = ZAP_ATTRIBUTE_INDEX(495), \ + .attributes = ZAP_ATTRIBUTE_INDEX(496), \ .attributeCount = 7, \ .clusterSize = 15, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2538,7 +2555,7 @@ { \ /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ .clusterId = 0x00000402, \ - .attributes = ZAP_ATTRIBUTE_INDEX(502), \ + .attributes = ZAP_ATTRIBUTE_INDEX(503), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2549,7 +2566,7 @@ { \ /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ .clusterId = 0x00000403, \ - .attributes = ZAP_ATTRIBUTE_INDEX(508), \ + .attributes = ZAP_ATTRIBUTE_INDEX(509), \ .attributeCount = 5, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2560,7 +2577,7 @@ { \ /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ .clusterId = 0x00000404, \ - .attributes = ZAP_ATTRIBUTE_INDEX(513), \ + .attributes = ZAP_ATTRIBUTE_INDEX(514), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2571,7 +2588,7 @@ { \ /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ .clusterId = 0x00000405, \ - .attributes = ZAP_ATTRIBUTE_INDEX(519), \ + .attributes = ZAP_ATTRIBUTE_INDEX(520), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2582,7 +2599,7 @@ { \ /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(525), \ + .attributes = ZAP_ATTRIBUTE_INDEX(526), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2593,18 +2610,18 @@ { \ /* Endpoint: 1, Cluster: IAS Zone (server) */ \ .clusterId = 0x00000500, \ - .attributes = ZAP_ATTRIBUTE_INDEX(530), \ + .attributes = ZAP_ATTRIBUTE_INDEX(531), \ .attributeCount = 7, \ .clusterSize = 20, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ .functions = chipFuncArrayIasZoneServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 183 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 185 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ .clusterId = 0x00000503, \ - .attributes = ZAP_ATTRIBUTE_INDEX(537), \ + .attributes = ZAP_ATTRIBUTE_INDEX(538), \ .attributeCount = 3, \ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2615,106 +2632,106 @@ { \ /* Endpoint: 1, Cluster: Channel (server) */ \ .clusterId = 0x00000504, \ - .attributes = ZAP_ATTRIBUTE_INDEX(540), \ + .attributes = ZAP_ATTRIBUTE_INDEX(541), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 185 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 188 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 187 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 190 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ .clusterId = 0x00000505, \ - .attributes = ZAP_ATTRIBUTE_INDEX(543), \ + .attributes = ZAP_ATTRIBUTE_INDEX(544), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 190 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 192 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 192 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 194 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Media Playback (server) */ \ .clusterId = 0x00000506, \ - .attributes = ZAP_ATTRIBUTE_INDEX(547), \ + .attributes = ZAP_ATTRIBUTE_INDEX(548), \ .attributeCount = 8, \ .clusterSize = 43, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 194 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 198 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 196 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 200 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Media Input (server) */ \ .clusterId = 0x00000507, \ - .attributes = ZAP_ATTRIBUTE_INDEX(555), \ + .attributes = ZAP_ATTRIBUTE_INDEX(556), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 200 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 202 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Low Power (server) */ \ .clusterId = 0x00000508, \ - .attributes = ZAP_ATTRIBUTE_INDEX(559), \ + .attributes = ZAP_ATTRIBUTE_INDEX(560), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 205 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 207 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Keypad Input (server) */ \ .clusterId = 0x00000509, \ - .attributes = ZAP_ATTRIBUTE_INDEX(561), \ + .attributes = ZAP_ATTRIBUTE_INDEX(562), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 207 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 209 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 209 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 211 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ .clusterId = 0x0000050A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(563), \ + .attributes = ZAP_ATTRIBUTE_INDEX(564), \ .attributeCount = 4, \ .clusterSize = 10, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 211 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 214 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 213 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 216 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ .clusterId = 0x0000050B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(567), \ + .attributes = ZAP_ATTRIBUTE_INDEX(568), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 216 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 218 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ .clusterId = 0x0000050C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(571), \ + .attributes = ZAP_ATTRIBUTE_INDEX(572), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 219 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 221 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 221 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 223 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ .clusterId = 0x0000050D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(574), \ + .attributes = ZAP_ATTRIBUTE_INDEX(575), \ .attributeCount = 9, \ .clusterSize = 110, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2725,29 +2742,29 @@ { \ /* Endpoint: 1, Cluster: Account Login (server) */ \ .clusterId = 0x0000050E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(583), \ + .attributes = ZAP_ATTRIBUTE_INDEX(584), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 223 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 225 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 225 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 227 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Test Cluster (server) */ \ .clusterId = 0x0000050F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(585), \ + .attributes = ZAP_ATTRIBUTE_INDEX(586), \ .attributeCount = 82, \ .clusterSize = 2289, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 227 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 246 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 229 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 248 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ .clusterId = 0x00000B04, \ - .attributes = ZAP_ATTRIBUTE_INDEX(667), \ + .attributes = ZAP_ATTRIBUTE_INDEX(668), \ .attributeCount = 13, \ .clusterSize = 32, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2758,29 +2775,29 @@ { \ /* Endpoint: 2, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(680), \ + .attributes = ZAP_ATTRIBUTE_INDEX(681), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 256 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 263 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 258 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 265 ) ,\ },\ { \ /* Endpoint: 2, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(683), \ + .attributes = ZAP_ATTRIBUTE_INDEX(684), \ .attributeCount = 7, \ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 268 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 270 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(690), \ + .attributes = ZAP_ATTRIBUTE_INDEX(691), \ .attributeCount = 6, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2791,7 +2808,7 @@ { \ /* Endpoint: 2, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(696), \ + .attributes = ZAP_ATTRIBUTE_INDEX(697), \ .attributeCount = 8, \ .clusterSize = 72, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2802,7 +2819,7 @@ { \ /* Endpoint: 2, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(704), \ + .attributes = ZAP_ATTRIBUTE_INDEX(705), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2813,13 +2830,13 @@ { \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(709), \ + .attributes = ZAP_ATTRIBUTE_INDEX(710), \ .attributeCount = 10, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 272 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 279 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 274 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 281 ) ,\ },\ } @@ -2832,8 +2849,8 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 27, 596 }, { ZAP_CLUSTER_INDEX(27), 45, 3473 }, { ZAP_CLUSTER_INDEX(72), 5, 105 }, \ - { ZAP_CLUSTER_INDEX(77), 1, 0 }, \ + { ZAP_CLUSTER_INDEX(0), 28, 596 }, { ZAP_CLUSTER_INDEX(28), 45, 3473 }, { ZAP_CLUSTER_INDEX(73), 5, 105 }, \ + { ZAP_CLUSTER_INDEX(78), 1, 0 }, \ } // Largest attribute size is needed for various buffers 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 626f71c78b82f9..513cca92da4385 100644 --- a/zzz_generated/all-clusters-app/zap-generated/gen_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/gen_config.h @@ -53,6 +53,7 @@ #define EMBER_AF_FIXED_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_FLOW_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GROUP_KEY_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GROUPS_CLUSTER_SERVER_ENDPOINT_COUNT (3) @@ -220,6 +221,10 @@ #define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING_SERVER #define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING +// Use this macro to check if the client side of the General Diagnostics cluster is included +#define ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS_CLIENT + // Use this macro to check if the server side of the General Diagnostics cluster is included #define ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_SERVER #define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS_SERVER 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 9b2bea3e101d9b..ebcafe93a4558b 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 @@ -441,6 +441,7 @@ #define ZCL_ACTIVE_HARDWARE_FAULTS_ATTRIBUTE_ID (0x0005) #define ZCL_ACTIVE_RADIO_FAULTS_ATTRIBUTE_ID (0x0006) #define ZCL_ACTIVE_NETWORK_FAULTS_ATTRIBUTE_ID (0x0007) +#define ZCL_TEST_EVENT_TRIGGERS_ENABLED_ATTRIBUTE_ID (0x0008) // Attribute ids for cluster: Software Diagnostics 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 9fedc2abffae77..4de52e107bf0d4 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 @@ -8659,6 +8659,37 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) } // namespace BootReasons +namespace TestEventTriggersEnabled { + +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, bool value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); +} + +} // namespace TestEventTriggersEnabled + namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) 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 583c4eddf4ab64..a285167e0d5de6 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 @@ -1567,6 +1567,11 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace BootReasons +namespace TestEventTriggersEnabled { +EmberAfStatus Get(chip::EndpointId endpoint, bool * value); // boolean +EmberAfStatus Set(chip::EndpointId endpoint, bool value); +} // namespace TestEventTriggersEnabled + namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); 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 b82604017a5ce5..b8d8c858f6cd35 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -13013,6 +13013,12 @@ bool emberAfDiagnosticLogsClusterRetrieveLogsRequestCallback( bool emberAfDiagnosticLogsClusterRetrieveLogsResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, uint8_t status, chip::ByteSpan content, uint32_t timeStamp, uint32_t timeSinceBoot); +/** + * @brief General Diagnostics Cluster TestEventTrigger Command callback (from client) + */ +bool emberAfGeneralDiagnosticsClusterTestEventTriggerCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::DecodableType & commandData); /** * @brief Software Diagnostics Cluster ResetWatermarks Command callback (from client) */ diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 6133e43c0051fe..5a8372542efb88 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 @@ -8735,6 +8735,47 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } // namespace Structs namespace Commands { +namespace TestEventTrigger { +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::kEnableKey)), enableKey)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kEventTrigger)), eventTrigger)); + 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) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kEnableKey): + ReturnErrorOnFailure(DataModel::Decode(reader, enableKey)); + break; + case to_underlying(Fields::kEventTrigger): + ReturnErrorOnFailure(DataModel::Decode(reader, eventTrigger)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace TestEventTrigger. } // namespace Commands namespace Attributes { @@ -8766,6 +8807,9 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre case Attributes::ActiveNetworkFaults::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, activeNetworkFaults)); break; + case Attributes::TestEventTriggersEnabled::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, testEventTriggersEnabled)); + break; case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); 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 e107edb13595df..89557ca50bcfed 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 @@ -11683,6 +11683,54 @@ struct DecodableType } // namespace NetworkInterfaceType } // namespace Structs +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace TestEventTrigger { +struct Type; +struct DecodableType; +} // namespace TestEventTrigger + +} // namespace Commands + +namespace Commands { +namespace TestEventTrigger { +enum class Fields +{ + kEnableKey = 0, + kEventTrigger = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::TestEventTrigger::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + + chip::ByteSpan enableKey; + uint64_t eventTrigger = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::TestEventTrigger::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + + chip::ByteSpan enableKey; + uint64_t eventTrigger = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace TestEventTrigger +} // namespace Commands + namespace Attributes { namespace NetworkInterfaces { @@ -11783,6 +11831,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace ActiveNetworkFaults +namespace TestEventTriggersEnabled { +struct TypeInfo +{ + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; + + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TestEventTriggersEnabled::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TestEventTriggersEnabled namespace GeneratedCommandList { struct TypeInfo { @@ -11860,6 +11920,7 @@ struct TypeInfo Attributes::ActiveHardwareFaults::TypeInfo::DecodableType activeHardwareFaults; Attributes::ActiveRadioFaults::TypeInfo::DecodableType activeRadioFaults; Attributes::ActiveNetworkFaults::TypeInfo::DecodableType activeNetworkFaults; + Attributes::TestEventTriggersEnabled::TypeInfo::DecodableType testEventTriggersEnabled = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::AttributeList::TypeInfo::DecodableType attributeList; 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 cec0fa7a545b96..e35de8fc4b9600 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 @@ -187,6 +187,9 @@ #define ZCL_RETRIEVE_LOGS_REQUEST_COMMAND_ID (0x00) #define ZCL_RETRIEVE_LOGS_RESPONSE_COMMAND_ID (0x01) +// Commands for cluster: General Diagnostics +#define ZCL_TEST_EVENT_TRIGGER_COMMAND_ID (0x00) + // Commands for cluster: Software Diagnostics #define ZCL_RESET_WATERMARKS_COMMAND_ID (0x00) 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 f21eb136f4ecf3..2c0feba0554112 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 @@ -1742,6 +1742,10 @@ namespace ActiveNetworkFaults { static constexpr AttributeId Id = 0x00000007; } // namespace ActiveNetworkFaults +namespace TestEventTriggersEnabled { +static constexpr AttributeId Id = 0x00000008; +} // namespace TestEventTriggersEnabled + namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList 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 525740d29f0179..f4a3c855c0004a 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 @@ -615,6 +615,16 @@ static constexpr CommandId Id = 0x00000001; } // namespace Commands } // namespace DiagnosticLogs +namespace GeneralDiagnostics { +namespace Commands { + +namespace TestEventTrigger { +static constexpr CommandId Id = 0x00000000; +} // namespace TestEventTrigger + +} // namespace Commands +} // namespace GeneralDiagnostics + namespace SoftwareDiagnostics { namespace Commands { diff --git a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.h b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.h index 03b33c9847d21f..1c44ea89ff733b 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.h @@ -730,6 +730,8 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeActiveHardwareFaultsWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeActiveRadioFaultsWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeActiveNetworkFaultsWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeTestEventTriggersEnabledWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; diff --git a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm index 2c02c805f89134..276e88225d2ce7 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm +++ b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm @@ -9795,6 +9795,25 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeTestEventTriggersEnabledWithValue:(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 = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( diff --git a/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h index 943af11b1b89f9..927970b9e91909 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h @@ -41498,6 +41498,7 @@ class SubscribeAttributeGeneralCommissioningClusterRevision : public SubscribeAt | Cluster GeneralDiagnostics | 0x0033 | |------------------------------------------------------------------------------| | Commands: | | +| * TestEventTrigger | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | | * NetworkInterfaces | 0x0000 | @@ -41508,6 +41509,7 @@ class SubscribeAttributeGeneralCommissioningClusterRevision : public SubscribeAt | * ActiveHardwareFaults | 0x0005 | | * ActiveRadioFaults | 0x0006 | | * ActiveNetworkFaults | 0x0007 | +| * TestEventTriggersEnabled | 0x0008 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -41521,6 +41523,54 @@ class SubscribeAttributeGeneralCommissioningClusterRevision : public SubscribeAt | * BootReason | 0x0003 | \*----------------------------------------------------------------------------*/ +/* + * Command TestEventTrigger + */ +class GeneralDiagnosticsTestEventTrigger : public ClusterCommand { +public: + GeneralDiagnosticsTestEventTrigger() + : ClusterCommand("test-event-trigger") + { + AddArgument("EnableKey", &mRequest.enableKey); + AddArgument("EventTrigger", 0, UINT64_MAX, &mRequest.eventTrigger); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(CHIPDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000033) command (0x00000000) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + CHIPGeneralDiagnostics * cluster = [[CHIPGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + __auto_type * params = [[CHIPGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.enableKey = [NSData dataWithBytes:mRequest.enableKey.data() length:mRequest.enableKey.size()]; + params.eventTrigger = [NSNumber numberWithUnsignedLongLong:mRequest.eventTrigger]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster testEventTriggerWithParams:params + completionHandler:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type mRequest; +}; + /* * Attribute NetworkInterfaces */ @@ -42094,6 +42144,80 @@ class SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults : public Subscribe } }; +/* + * Attribute TestEventTriggersEnabled + */ +class ReadGeneralDiagnosticsTestEventTriggersEnabled : public ReadAttribute { +public: + ReadGeneralDiagnosticsTestEventTriggersEnabled() + : ReadAttribute("test-event-triggers-enabled") + { + } + + ~ReadGeneralDiagnosticsTestEventTriggersEnabled() {} + + CHIP_ERROR SendCommand(CHIPDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x00000008) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + CHIPGeneralDiagnostics * cluster = [[CHIPGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + [cluster + readAttributeTestEventTriggersEnabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.TestEventTriggersEnabled response %@", [value description]); + if (error != nil) { + LogNSError("GeneralDiagnostics TestEventTriggersEnabled read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled : public SubscribeAttribute { +public: + SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled() + : SubscribeAttribute("test-event-triggers-enabled") + { + } + + ~SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled() {} + + CHIP_ERROR SendCommand(CHIPDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x00000008) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + CHIPGeneralDiagnostics * cluster = [[CHIPGeneralDiagnostics alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + CHIPSubscribeParams * params = [[CHIPSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster + subscribeAttributeTestEventTriggersEnabledWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params + subscriptionEstablished:nullptr + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.TestEventTriggersEnabled response %@", + [value description]); + if (error || !mWait) { + SetCommandExitStatus(error); + } + }]; + + return CHIP_NO_ERROR; + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } +}; + /* * Attribute GeneratedCommandList */ @@ -98434,6 +98558,7 @@ void registerClusterGeneralDiagnostics(Commands & commands) commands_list clusterCommands = { make_unique(Id), // + make_unique(), // make_unique(Id), // make_unique(), // make_unique(Id), // @@ -98453,6 +98578,8 @@ void registerClusterGeneralDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index cd85d11deb0979..319c8db9abc776 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -6021,6 +6021,7 @@ class DiagnosticLogsRetrieveLogsRequest : public ClusterCommand | Cluster GeneralDiagnostics | 0x0033 | |------------------------------------------------------------------------------| | Commands: | | +| * TestEventTrigger | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | | * NetworkInterfaces | 0x0000 | @@ -6031,6 +6032,7 @@ class DiagnosticLogsRetrieveLogsRequest : public ClusterCommand | * ActiveHardwareFaults | 0x0005 | | * ActiveRadioFaults | 0x0006 | | * ActiveNetworkFaults | 0x0007 | +| * TestEventTriggersEnabled | 0x0008 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -6044,6 +6046,38 @@ class DiagnosticLogsRetrieveLogsRequest : public ClusterCommand | * BootReason | 0x0003 | \*----------------------------------------------------------------------------*/ +/* + * Command TestEventTrigger + */ +class GeneralDiagnosticsTestEventTrigger : public ClusterCommand +{ +public: + GeneralDiagnosticsTestEventTrigger(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("test-event-trigger", credsIssuerConfig) + { + AddArgument("EnableKey", &mRequest.enableKey); + AddArgument("EventTrigger", 0, UINT64_MAX, &mRequest.eventTrigger); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000033) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x00000033, 0x00000000, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000033) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x00000033, 0x00000000, mRequest); + } + +private: + chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type mRequest; +}; + /*----------------------------------------------------------------------------*\ | Cluster SoftwareDiagnostics | 0x0034 | |------------------------------------------------------------------------------| @@ -21064,19 +21098,22 @@ void registerClusterGeneralDiagnostics(Commands & commands, CredentialIssuerComm // // Commands // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "network-interfaces", Attributes::NetworkInterfaces::Id, credsIssuerConfig), // - make_unique(Id, "reboot-count", Attributes::RebootCount::Id, credsIssuerConfig), // - make_unique(Id, "up-time", Attributes::UpTime::Id, credsIssuerConfig), // - make_unique(Id, "total-operational-hours", Attributes::TotalOperationalHours::Id, credsIssuerConfig), // - make_unique(Id, "boot-reasons", Attributes::BootReasons::Id, credsIssuerConfig), // - make_unique(Id, "active-hardware-faults", Attributes::ActiveHardwareFaults::Id, credsIssuerConfig), // - make_unique(Id, "active-radio-faults", Attributes::ActiveRadioFaults::Id, credsIssuerConfig), // - make_unique(Id, "active-network-faults", Attributes::ActiveNetworkFaults::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "network-interfaces", Attributes::NetworkInterfaces::Id, credsIssuerConfig), // + make_unique(Id, "reboot-count", Attributes::RebootCount::Id, credsIssuerConfig), // + make_unique(Id, "up-time", Attributes::UpTime::Id, credsIssuerConfig), // + make_unique(Id, "total-operational-hours", Attributes::TotalOperationalHours::Id, credsIssuerConfig), // + make_unique(Id, "boot-reasons", Attributes::BootReasons::Id, credsIssuerConfig), // + make_unique(Id, "active-hardware-faults", Attributes::ActiveHardwareFaults::Id, credsIssuerConfig), // + make_unique(Id, "active-radio-faults", Attributes::ActiveRadioFaults::Id, credsIssuerConfig), // + make_unique(Id, "active-network-faults", Attributes::ActiveNetworkFaults::Id, credsIssuerConfig), // + make_unique(Id, "test-event-triggers-enabled", Attributes::TestEventTriggersEnabled::Id, + credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // @@ -21092,11 +21129,13 @@ void registerClusterGeneralDiagnostics(Commands & commands, CredentialIssuerComm make_unique(Id, "active-hardware-faults", Attributes::ActiveHardwareFaults::Id, credsIssuerConfig), // make_unique(Id, "active-radio-faults", Attributes::ActiveRadioFaults::Id, credsIssuerConfig), // make_unique(Id, "active-network-faults", Attributes::ActiveNetworkFaults::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique(Id, "test-event-triggers-enabled", Attributes::TestEventTriggersEnabled::Id, + credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // // // Events // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index a33d89f854aaa7..e3c3568a336a78 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -6865,6 +6865,11 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ActiveNetworkFaults", 1, value); } + case GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id: { + bool value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("TestEventTriggersEnabled", 1, value); + } case GeneralDiagnostics::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); From a90eb405a8e8b00efa3e740060fb8d80a439acdd Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Thu, 26 May 2022 13:29:04 +0000 Subject: [PATCH 6/7] Address comments from PR --- src/app/TestEventTriggerDelegate.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/app/TestEventTriggerDelegate.h b/src/app/TestEventTriggerDelegate.h index e85f97d05892b0..c0ec5213b22794 100644 --- a/src/app/TestEventTriggerDelegate.h +++ b/src/app/TestEventTriggerDelegate.h @@ -1,5 +1,6 @@ /* * 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. @@ -27,7 +28,7 @@ class TestEventTriggerDelegate { public: /** - * Checks to see if `enableKey` provided matches value choosen by by the manufacturer. + * Checks to see if `enableKey` provided matches value chosen by the manufacturer. * * @param[in] enableKey Buffer of the key to verify. */ @@ -42,11 +43,6 @@ class TestEventTriggerDelegate * @return CHIP_ERROR_INVALID_ARGUMENT when eventTrigger is not a valid test event trigger. */ virtual CHIP_ERROR HandleEventTrigger(uint64_t eventTrigger) = 0; - - /** - * Get the count of all configured test event triggers. - */ - virtual size_t ConfiguredEventTriggerCount() const = 0; }; } // namespace chip From f2c0e523004ce52818292fb3ecda9c55d7af5dc0 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Thu, 26 May 2022 13:30:50 +0000 Subject: [PATCH 7/7] Restyled by clang-format --- .../general-diagnostics-server.cpp | 9 +++++---- src/app/server/Server.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp index 37083e23a2703b..2b017eac6badf2 100644 --- a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp +++ b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp @@ -296,12 +296,13 @@ GeneralDiagnosticsDelegate gDiagnosticDelegate; } // anonymous namespace -bool emberAfGeneralDiagnosticsClusterTestEventTriggerCallback( - CommandHandler * commandObj, const ConcreteCommandPath & commandPath, - const Commands::TestEventTrigger::DecodableType & commandData) { +bool emberAfGeneralDiagnosticsClusterTestEventTriggerCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, + const Commands::TestEventTrigger::DecodableType & commandData) +{ ChipLogDetail(Zcl, "TMsg!!!!!!!!!!!! We got the TestEventTrigger command"); - ChipLogDetail(Zcl, "TMsg!!!!!!!!!!!! We got the TestEventTrigger commandData.enableKey.size()=%d", (int)(commandData.enableKey.size())); + ChipLogDetail(Zcl, "TMsg!!!!!!!!!!!! We got the TestEventTrigger commandData.enableKey.size()=%d", + (int) (commandData.enableKey.size())); ChipLogDetail(Zcl, "TMsg!!!!!!!!!!!! commandData.eventTrigger=0x" ChipLogFormatX64, ChipLogValueX64(commandData.eventTrigger)); return false; } diff --git a/src/app/server/Server.h b/src/app/server/Server.h index 804e0b7bcdca7d..15959b1de5e0b7 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -25,11 +25,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include