From b3d7632432035b55201e6059c4e7541b8a5a3025 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Wed, 25 May 2022 18:09:40 +0000 Subject: [PATCH 1/9] Use TestEventTriggerDelegate in General Diagnostics Cluster update xml and regenerate files --- .../all-clusters-app.matter | 113 ++++++ .../all-clusters-common/all-clusters-app.zap | 29 +- src/app/TestEventTriggerDelegate.h | 5 + .../general-diagnostics-server.cpp | 63 ++++ src/app/server/Server.cpp | 2 + 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 | 345 +++++++++--------- .../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 + 42 files changed, 1130 insertions(+), 182 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 fb6f5cb382b0c1..1c5e2950e7f9a3 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 { @@ -3823,6 +3934,7 @@ server cluster WindowCovering = 258 { endpoint 0 { binding cluster OtaSoftwareUpdateProvider; + binding cluster GeneralDiagnostics; server cluster Identify { ram attribute identifyTime; @@ -3974,6 +4086,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 4c34a523c26579..b27cb38297d22e 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 @@ -3338,8 +3338,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", @@ -3496,6 +3505,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/TestEventTriggerDelegate.h b/src/app/TestEventTriggerDelegate.h index c0ec5213b22794..140a5ed032495e 100644 --- a/src/app/TestEventTriggerDelegate.h +++ b/src/app/TestEventTriggerDelegate.h @@ -27,6 +27,11 @@ namespace chip { class TestEventTriggerDelegate { public: + + /* Expected byte size of the EnableKey */ + static constexpr size_t kExpectedEnableKeyLength = 16; + + virtual ~TestEventTriggerDelegate() {} /** * Checks to see if `enableKey` provided matches value chosen by the manufacturer. * 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..ac52da28c92948 100644 --- a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp +++ b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp @@ -20,8 +20,10 @@ #include #include #include +#include #include #include +#include "app/server/Server.h" #include #include #include @@ -162,6 +164,17 @@ CHIP_ERROR GeneralDiagosticsAttrAccess::Read(const ConcreteReadAttributePath & a case BootReasons::Id: { return ReadIfSupported(&DiagnosticDataProvider::GetBootReason, aEncoder); } + case TestEventTriggersEnabled::Id: { + auto * testEventTrigger = Server::GetInstance().GetTestEventTriggerDelegate(); + if (testEventTrigger == nullptr) { + return aEncoder.Encode(false); + } + uint8_t zeroByteSpanData[TestEventTriggerDelegate::kExpectedEnableKeyLength] = {0}; + if (testEventTrigger->DoesEnableKeyMatch(ByteSpan(zeroByteSpanData))) { + return aEncoder.Encode(false); + } + return aEncoder.Encode(true); + } default: { break; } @@ -288,8 +301,58 @@ class GeneralDiagnosticsDelegate : public DeviceLayer::ConnectivityManagerDelega GeneralDiagnosticsDelegate gDiagnosticDelegate; +bool IsByteSpanAllZeros(const ByteSpan & byteSpan) { + for (auto * it = byteSpan.begin(); it != byteSpan.end(); ++it) + { + if (*it != 0) { + return false; + } + } + return true; +} + } // 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)); + + if (commandData.enableKey.empty() || commandData.enableKey.size() != TestEventTriggerDelegate::kExpectedEnableKeyLength) { + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_VALUE); + return true; + } + + if (IsByteSpanAllZeros(commandData.enableKey)){ + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_VALUE); + return true; + } + + auto * testEventTrigger = Server::GetInstance().GetTestEventTriggerDelegate(); + if (testEventTrigger == nullptr) { + // TODO Is this the right error? + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_COMMAND); + return true; + } + + if (!testEventTrigger->DoesEnableKeyMatch(commandData.enableKey)) { + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS); + return true; + } + + if (CHIP_NO_ERROR != testEventTrigger->HandleEventTrigger(commandData.eventTrigger)) { + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_COMMAND); + return true; + } + + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_SUCCESS); + return true; +} + void MatterGeneralDiagnosticsPluginServerInitCallback() { registerAttributeAccessOverride(&gAttrAccess); diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 968e3f43ff8467..7786661dea2c4c 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -145,6 +145,8 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) mGroupsProvider = initParams.groupDataProvider; SetGroupDataProvider(mGroupsProvider); + mTestEventTriggerDelegate = initParams.testEventTriggerDelegate; + deviceInfoprovider = DeviceLayer::GetDeviceInfoProvider(); if (deviceInfoprovider) { 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 82e21bf6b093be..5005c47b5cf26c 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 eec368ab3f6bd7..8dd11e5e3d92eb 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -5212,7 +5212,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", @@ -5369,6 +5378,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 abe2ebf9f7089b..7c54be65489d94 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 0d3ebffc4b15ee..ffbb42d4cc4383 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 92c0485043dd01..3fd9b45f45d125 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 599b1382c11195..60593426ede6db 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -10244,6 +10244,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]), @@ -10259,6 +10260,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 @@ -10339,6 +10341,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 @@ -10469,6 +10489,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 d44eb3a6de6952..e4460fb66fe264 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 0703c595770dd1..f4fb6a438dc397 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 b3d1b264a9653e..63ce192356856a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h @@ -2876,6 +2876,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 12259c86a1440a..32a1c9a45697fd 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm @@ -1664,6 +1664,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 dac1bd94f25dac..1955af19ab60c1 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, @@ -2235,6 +2236,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 c9ab49649e15d2..e82e4bfd52a781 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) @@ -1867,6 +1904,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 e0a8d7773b57ca..83b12f1d5ff4b6 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 */ \ \ @@ -1628,30 +1630,34 @@ /* GeneratedCommandList (index=38)*/ \ 0x00000001 /* RetrieveLogsResponse */, \ chip::kInvalidCommandId /* end of list */, \ - /* Endpoint: 0, Cluster: Software Diagnostics (server) */\ + /* Endpoint: 0, Cluster: General Diagnostics (server) */\ /* AcceptedCommandList (index=40) */ \ + 0x00000000 /* TestEventTrigger */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Software Diagnostics (server) */\ + /* AcceptedCommandList (index=42) */ \ 0x00000000 /* ResetWatermarks */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */\ - /* AcceptedCommandList (index=42) */ \ + /* AcceptedCommandList (index=44) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */\ - /* AcceptedCommandList (index=44) */ \ + /* AcceptedCommandList (index=46) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */\ - /* AcceptedCommandList (index=46) */ \ + /* AcceptedCommandList (index=48) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */\ - /* AcceptedCommandList (index=48) */ \ + /* AcceptedCommandList (index=50) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000001 /* OpenBasicCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* AcceptedCommandList (index=52) */ \ + /* AcceptedCommandList (index=54) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -1662,30 +1668,30 @@ 0x0000000B /* AddTrustedRootCertificate */, \ 0x0000000C /* RemoveTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=62)*/ \ + /* GeneratedCommandList (index=64)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Group Key Management (server) */\ - /* AcceptedCommandList (index=67) */ \ + /* AcceptedCommandList (index=69) */ \ 0x00000000 /* KeySetWrite */, \ 0x00000001 /* KeySetRead */, \ 0x00000003 /* KeySetRemove */, \ 0x00000004 /* KeySetReadAllIndices */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=72)*/ \ + /* GeneratedCommandList (index=74)*/ \ 0x00000002 /* KeySetReadResponse */, \ 0x00000005 /* KeySetReadAllIndicesResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Identify (server) */\ - /* AcceptedCommandList (index=75) */ \ + /* AcceptedCommandList (index=77) */ \ 0x00000000 /* Identify */, \ 0x00000040 /* TriggerEffect */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Groups (server) */\ - /* AcceptedCommandList (index=78) */ \ + /* AcceptedCommandList (index=80) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -1693,14 +1699,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=85)*/ \ + /* GeneratedCommandList (index=87)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Scenes (server) */\ - /* AcceptedCommandList (index=90) */ \ + /* AcceptedCommandList (index=92) */ \ 0x00000000 /* AddScene */, \ 0x00000001 /* ViewScene */, \ 0x00000002 /* RemoveScene */, \ @@ -1709,7 +1715,7 @@ 0x00000005 /* RecallScene */, \ 0x00000006 /* GetSceneMembership */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=98)*/ \ + /* GeneratedCommandList (index=100)*/ \ 0x00000000 /* AddSceneResponse */, \ 0x00000001 /* ViewSceneResponse */, \ 0x00000002 /* RemoveSceneResponse */, \ @@ -1718,7 +1724,7 @@ 0x00000006 /* GetSceneMembershipResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: On/Off (server) */\ - /* AcceptedCommandList (index=105) */ \ + /* AcceptedCommandList (index=107) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ @@ -1727,7 +1733,7 @@ 0x00000042 /* OnWithTimedOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Level Control (server) */\ - /* AcceptedCommandList (index=112) */ \ + /* AcceptedCommandList (index=114) */ \ 0x00000000 /* MoveToLevel */, \ 0x00000001 /* Move */, \ 0x00000002 /* Step */, \ @@ -1738,11 +1744,11 @@ 0x00000007 /* StopWithOnOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Mode Select (server) */\ - /* AcceptedCommandList (index=121) */ \ + /* AcceptedCommandList (index=123) */ \ 0x00000000 /* ChangeToMode */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Door Lock (server) */\ - /* AcceptedCommandList (index=123) */ \ + /* AcceptedCommandList (index=125) */ \ 0x00000000 /* LockDoor */, \ 0x00000001 /* UnlockDoor */, \ 0x00000003 /* UnlockWithTimeout */, \ @@ -1758,7 +1764,7 @@ 0x00000024 /* GetCredentialStatus */, \ 0x00000026 /* ClearCredential */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=138)*/ \ + /* GeneratedCommandList (index=140)*/ \ 0x0000000C /* GetWeekDayScheduleResponse */, \ 0x0000000F /* GetYearDayScheduleResponse */, \ 0x0000001C /* GetUserResponse */, \ @@ -1766,7 +1772,7 @@ 0x00000025 /* GetCredentialStatusResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Window Covering (server) */\ - /* AcceptedCommandList (index=144) */ \ + /* AcceptedCommandList (index=146) */ \ 0x00000000 /* UpOrOpen */, \ 0x00000001 /* DownOrClose */, \ 0x00000002 /* StopMotion */, \ @@ -1776,16 +1782,16 @@ 0x00000008 /* GoToTiltPercentage */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Barrier Control (server) */\ - /* AcceptedCommandList (index=152) */ \ + /* AcceptedCommandList (index=154) */ \ 0x00000000 /* BarrierControlGoToPercent */, \ 0x00000001 /* BarrierControlStop */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Thermostat (server) */\ - /* AcceptedCommandList (index=155) */ \ + /* AcceptedCommandList (index=157) */ \ 0x00000000 /* SetpointRaiseLower */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Color Control (server) */\ - /* AcceptedCommandList (index=157) */ \ + /* AcceptedCommandList (index=159) */ \ 0x00000000 /* MoveToHue */, \ 0x00000001 /* MoveHue */, \ 0x00000002 /* StepHue */, \ @@ -1807,80 +1813,80 @@ 0x0000004C /* StepColorTemperature */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: IAS Zone (server) */\ - /* AcceptedCommandList (index=177) */ \ + /* AcceptedCommandList (index=179) */ \ 0x00000000 /* ZoneEnrollResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Channel (server) */\ - /* AcceptedCommandList (index=179) */ \ + /* AcceptedCommandList (index=181) */ \ 0x00000000 /* ChangeChannel */, \ 0x00000002 /* ChangeChannelByNumber */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=182)*/ \ + /* GeneratedCommandList (index=184)*/ \ 0x00000001 /* ChangeChannelResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Target Navigator (server) */\ - /* AcceptedCommandList (index=184) */ \ + /* AcceptedCommandList (index=186) */ \ 0x00000000 /* NavigateTarget */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=186)*/ \ + /* GeneratedCommandList (index=188)*/ \ 0x00000001 /* NavigateTargetResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Media Playback (server) */\ - /* AcceptedCommandList (index=188) */ \ + /* AcceptedCommandList (index=190) */ \ 0x00000000 /* Play */, \ 0x00000001 /* Pause */, \ 0x00000002 /* StopPlayback */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=192)*/ \ + /* GeneratedCommandList (index=194)*/ \ 0x0000000A /* PlaybackResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Media Input (server) */\ - /* AcceptedCommandList (index=194) */ \ + /* AcceptedCommandList (index=196) */ \ 0x00000000 /* SelectInput */, \ 0x00000001 /* ShowInputStatus */, \ 0x00000002 /* HideInputStatus */, \ 0x00000003 /* RenameInput */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Low Power (server) */\ - /* AcceptedCommandList (index=199) */ \ + /* AcceptedCommandList (index=201) */ \ 0x00000000 /* Sleep */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Keypad Input (server) */\ - /* AcceptedCommandList (index=201) */ \ + /* AcceptedCommandList (index=203) */ \ 0x00000000 /* SendKey */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=203)*/ \ + /* GeneratedCommandList (index=205)*/ \ 0x00000001 /* SendKeyResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Content Launcher (server) */\ - /* AcceptedCommandList (index=205) */ \ + /* AcceptedCommandList (index=207) */ \ 0x00000000 /* LaunchContent */, \ 0x00000001 /* LaunchURL */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=208)*/ \ + /* GeneratedCommandList (index=210)*/ \ 0x00000002 /* LaunchResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Audio Output (server) */\ - /* AcceptedCommandList (index=210) */ \ + /* AcceptedCommandList (index=212) */ \ 0x00000000 /* SelectOutput */, \ 0x00000001 /* RenameOutput */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Application Launcher (server) */\ - /* AcceptedCommandList (index=213) */ \ + /* AcceptedCommandList (index=215) */ \ 0x00000000 /* LaunchApp */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=215)*/ \ + /* GeneratedCommandList (index=217)*/ \ 0x00000003 /* LauncherResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Account Login (server) */\ - /* AcceptedCommandList (index=217) */ \ + /* AcceptedCommandList (index=219) */ \ 0x00000000 /* GetSetupPIN */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=219)*/ \ + /* GeneratedCommandList (index=221)*/ \ 0x00000001 /* GetSetupPINResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Test Cluster (server) */\ - /* AcceptedCommandList (index=221) */ \ + /* AcceptedCommandList (index=223) */ \ 0x00000000 /* Test */, \ 0x00000001 /* TestNotHandled */, \ 0x00000002 /* TestSpecific */, \ @@ -1900,7 +1906,7 @@ 0x00000014 /* TestEmitTestEventRequest */, \ 0x00000015 /* TestEmitTestFabricScopedEventRequest */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=240)*/ \ + /* GeneratedCommandList (index=242)*/ \ 0x00000000 /* TestSpecificResponse */, \ 0x00000001 /* TestAddArgumentsResponse */, \ 0x00000004 /* TestListInt8UReverseResponse */, \ @@ -1912,7 +1918,7 @@ 0x0000000B /* TestEmitTestFabricScopedEventResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: Groups (server) */\ - /* AcceptedCommandList (index=250) */ \ + /* AcceptedCommandList (index=252) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -1920,20 +1926,20 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=257)*/ \ + /* GeneratedCommandList (index=259)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: On/Off (server) */\ - /* AcceptedCommandList (index=262) */ \ + /* AcceptedCommandList (index=264) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */\ - /* AcceptedCommandList (index=266) */ \ + /* AcceptedCommandList (index=268) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -1941,7 +1947,7 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=273)*/ \ + /* GeneratedCommandList (index=275)*/ \ 0x00000001 /* ScanNetworksResponse */, \ 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ @@ -1951,7 +1957,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 { \ @@ -2131,98 +2137,109 @@ .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 36 ) ,\ .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 38 ) ,\ },\ + { \ + /* 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( 40 ) ,\ .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( 40 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 42 ) ,\ .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( 42 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 44 ) ,\ .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( 44 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 46 ) ,\ .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( 46 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 48 ) ,\ .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( 48 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 50 ) ,\ .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( 52 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 62 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 54 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 64 ) ,\ },\ { \ /* 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( 67 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 72 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 69 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 74 ) ,\ },\ { \ /* 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), \ @@ -2233,7 +2250,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), \ @@ -2244,7 +2261,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), \ @@ -2255,51 +2272,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( 75 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 77 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* 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( 78 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 85 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 80 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 87 ) ,\ },\ { \ /* 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( 90 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 98 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 92 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 100 ) ,\ },\ { \ /* 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( 105 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 107 ) ,\ .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), \ @@ -2310,18 +2327,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( 112 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 114 ) ,\ .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), \ @@ -2332,7 +2349,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), \ @@ -2343,7 +2360,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), \ @@ -2354,7 +2371,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), \ @@ -2365,7 +2382,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), \ @@ -2376,7 +2393,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), \ @@ -2387,7 +2404,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), \ @@ -2398,7 +2415,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), \ @@ -2409,7 +2426,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), \ @@ -2420,51 +2437,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( 121 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 123 ) ,\ .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( 123 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 138 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 125 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 140 ) ,\ },\ { \ /* 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( 144 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 146 ) ,\ .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( 152 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 154 ) ,\ .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), \ @@ -2475,18 +2492,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( 155 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 157 ) ,\ .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), \ @@ -2497,7 +2514,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), \ @@ -2508,18 +2525,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( 157 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 159 ) ,\ .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), \ @@ -2530,7 +2547,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), \ @@ -2541,7 +2558,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), \ @@ -2552,7 +2569,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), \ @@ -2563,7 +2580,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), \ @@ -2574,7 +2591,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), \ @@ -2585,18 +2602,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( 177 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 179 ) ,\ .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), \ @@ -2607,106 +2624,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( 179 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 182 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 181 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 184 ) ,\ },\ { \ /* 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( 184 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 186 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 186 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 188 ) ,\ },\ { \ /* 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( 188 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 192 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 190 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 194 ) ,\ },\ { \ /* 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( 194 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 196 ) ,\ .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( 199 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 201 ) ,\ .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( 201 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 203 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 203 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 205 ) ,\ },\ { \ /* 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( 205 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 208 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 207 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 210 ) ,\ },\ { \ /* 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( 210 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 212 ) ,\ .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( 213 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 215 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 215 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 217 ) ,\ },\ { \ /* 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), \ @@ -2717,29 +2734,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( 217 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 219 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 219 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 221 ) ,\ },\ { \ /* 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( 221 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 240 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 223 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 242 ) ,\ },\ { \ /* 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), \ @@ -2750,29 +2767,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( 250 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 257 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 252 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 259 ) ,\ },\ { \ /* 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( 262 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 264 ) ,\ .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), \ @@ -2783,7 +2800,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), \ @@ -2794,7 +2811,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), \ @@ -2805,13 +2822,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( 266 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 273 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 268 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 275 ) ,\ },\ } @@ -2824,8 +2841,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 a1a264bec3df9b..e89cab265fd80a 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -13002,6 +13002,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 95515c24504e34..3bb3972221e31e 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 @@ -8665,6 +8665,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 { @@ -8696,6 +8737,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 14c302815afb27..585de64a464696 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 @@ -11613,6 +11613,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 { @@ -11713,6 +11761,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 { @@ -11790,6 +11850,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 004f8a61d62162..adce46608297a5 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 @@ -185,6 +185,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 042e1717dd1670..205c96200efacf 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 @@ -607,6 +607,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 d9dcdccd5a4fba..39da5e4db773a2 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 */ @@ -98391,6 +98515,7 @@ void registerClusterGeneralDiagnostics(Commands & commands) commands_list clusterCommands = { make_unique(Id), // + make_unique(), // make_unique(Id), // make_unique(), // make_unique(Id), // @@ -98410,6 +98535,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 94e23a5844166c..7fe8c3ae2fd2cc 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -5991,6 +5991,7 @@ class DiagnosticLogsRetrieveLogsRequest : public ClusterCommand | Cluster GeneralDiagnostics | 0x0033 | |------------------------------------------------------------------------------| | Commands: | | +| * TestEventTrigger | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | | * NetworkInterfaces | 0x0000 | @@ -6001,6 +6002,7 @@ class DiagnosticLogsRetrieveLogsRequest : public ClusterCommand | * ActiveHardwareFaults | 0x0005 | | * ActiveRadioFaults | 0x0006 | | * ActiveNetworkFaults | 0x0007 | +| * TestEventTriggersEnabled | 0x0008 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -6014,6 +6016,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 | |------------------------------------------------------------------------------| @@ -21033,19 +21067,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), // @@ -21061,11 +21098,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 130c71a49aacd5..248f8da7664a14 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -6857,6 +6857,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 c23dffb918388be85eddb1aac79c1686446f5d3d Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Thu, 26 May 2022 17:45:03 +0000 Subject: [PATCH 2/9] small cleanup --- src/app/TestEventTriggerDelegate.h | 1 - .../general-diagnostics-server.cpp | 42 ++++++++++--------- src/app/server/Server.h | 2 +- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/src/app/TestEventTriggerDelegate.h b/src/app/TestEventTriggerDelegate.h index 140a5ed032495e..039f11b630840e 100644 --- a/src/app/TestEventTriggerDelegate.h +++ b/src/app/TestEventTriggerDelegate.h @@ -27,7 +27,6 @@ namespace chip { class TestEventTriggerDelegate { public: - /* Expected byte size of the EnableKey */ static constexpr size_t kExpectedEnableKeyLength = 16; 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 ac52da28c92948..5c84ebcd34dca4 100644 --- a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp +++ b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#include "app/server/Server.h" #include #include #include @@ -23,7 +24,6 @@ #include #include #include -#include "app/server/Server.h" #include #include #include @@ -166,11 +166,13 @@ CHIP_ERROR GeneralDiagosticsAttrAccess::Read(const ConcreteReadAttributePath & a } case TestEventTriggersEnabled::Id: { auto * testEventTrigger = Server::GetInstance().GetTestEventTriggerDelegate(); - if (testEventTrigger == nullptr) { + if (testEventTrigger == nullptr) + { return aEncoder.Encode(false); } - uint8_t zeroByteSpanData[TestEventTriggerDelegate::kExpectedEnableKeyLength] = {0}; - if (testEventTrigger->DoesEnableKeyMatch(ByteSpan(zeroByteSpanData))) { + uint8_t zeroByteSpanData[TestEventTriggerDelegate::kExpectedEnableKeyLength] = { 0 }; + if (testEventTrigger->DoesEnableKeyMatch(ByteSpan(zeroByteSpanData))) + { return aEncoder.Encode(false); } return aEncoder.Encode(true); @@ -301,10 +303,12 @@ class GeneralDiagnosticsDelegate : public DeviceLayer::ConnectivityManagerDelega GeneralDiagnosticsDelegate gDiagnosticDelegate; -bool IsByteSpanAllZeros(const ByteSpan & byteSpan) { +bool IsByteSpanAllZeros(const ByteSpan & byteSpan) +{ for (auto * it = byteSpan.begin(); it != byteSpan.end(); ++it) { - if (*it != 0) { + if (*it != 0) + { return false; } } @@ -313,38 +317,36 @@ bool IsByteSpanAllZeros(const ByteSpan & byteSpan) { } // 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!!!!!!!!!!!! commandData.eventTrigger=0x" ChipLogFormatX64, ChipLogValueX64(commandData.eventTrigger)); - - if (commandData.enableKey.empty() || commandData.enableKey.size() != TestEventTriggerDelegate::kExpectedEnableKeyLength) { + if (commandData.enableKey.empty() || commandData.enableKey.size() != TestEventTriggerDelegate::kExpectedEnableKeyLength) + { emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_VALUE); return true; } - if (IsByteSpanAllZeros(commandData.enableKey)){ + if (IsByteSpanAllZeros(commandData.enableKey)) + { emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_VALUE); return true; } auto * testEventTrigger = Server::GetInstance().GetTestEventTriggerDelegate(); - if (testEventTrigger == nullptr) { - // TODO Is this the right error? + if (testEventTrigger == nullptr) + { emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_COMMAND); return true; } - if (!testEventTrigger->DoesEnableKeyMatch(commandData.enableKey)) { + if (!testEventTrigger->DoesEnableKeyMatch(commandData.enableKey)) + { emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS); return true; } - if (CHIP_NO_ERROR != testEventTrigger->HandleEventTrigger(commandData.eventTrigger)) { + if (CHIP_NO_ERROR != testEventTrigger->HandleEventTrigger(commandData.eventTrigger)) + { emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_COMMAND); return true; } 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 From 653fdbe792f0ea58d22b766682e0d34fdcb312b3 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Thu, 26 May 2022 17:54:26 +0000 Subject: [PATCH 3/9] little more cleanup --- .../general-diagnostics-server.cpp | 5 +++-- src/app/server/Server.h | 3 ++- .../zcl/data-model/chip/general-diagnostics-cluster.xml | 1 - src/controller/data_model/controller-clusters.zap | 2 +- 4 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 5c84ebcd34dca4..8892cb820e21d5 100644 --- a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp +++ b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp @@ -168,12 +168,12 @@ CHIP_ERROR GeneralDiagosticsAttrAccess::Read(const ConcreteReadAttributePath & a auto * testEventTrigger = Server::GetInstance().GetTestEventTriggerDelegate(); if (testEventTrigger == nullptr) { - return aEncoder.Encode(false); + return aEncoder.Encode(false); } uint8_t zeroByteSpanData[TestEventTriggerDelegate::kExpectedEnableKeyLength] = { 0 }; if (testEventTrigger->DoesEnableKeyMatch(ByteSpan(zeroByteSpanData))) { - return aEncoder.Encode(false); + return aEncoder.Encode(false); } return aEncoder.Encode(true); } @@ -319,6 +319,7 @@ bool IsByteSpanAllZeros(const ByteSpan & byteSpan) bool emberAfGeneralDiagnosticsClusterTestEventTriggerCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, const Commands::TestEventTrigger::DecodableType & commandData) +{ if (commandData.enableKey.empty() || commandData.enableKey.size() != TestEventTriggerDelegate::kExpectedEnableKeyLength) { diff --git a/src/app/server/Server.h b/src/app/server/Server.h index 15959b1de5e0b7..1e9919f1767a88 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -106,7 +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 + // Optional. Support test event triggers when provided. Must be initialized before being + // provided. TestEventTriggerDelegate * testEventTriggerDelegate = nullptr; }; 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 405c16454fd0ec..e38bde96295c61 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 @@ -118,6 +118,5 @@ limitations under the License. Indicate the reason that caused the device to start-up. - diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 8dd11e5e3d92eb..501133c5976ab1 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -5220,7 +5220,7 @@ "source": "client", "incoming": 0, "outgoing": 1 - }, + } ], "attributes": [ { From fab59f02d6c583af52d2216abfdf03192b707b57 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Thu, 26 May 2022 19:05:20 +0000 Subject: [PATCH 4/9] Fix issue on ti CC26X2X7 and Ameba, regen files Also fixed an issue with some unit test failing --- .../all-clusters-app.matter | 104 ------------------ .../all-clusters-common/all-clusters-app.zap | 4 +- .../general-diagnostics-server.cpp | 52 +++++---- .../data_model/controller-clusters.matter | 7 ++ .../chip/devicecontroller/ChipClusters.java | 20 ++++ .../devicecontroller/ClusterInfoMapping.java | 25 +++++ .../python/chip/clusters/CHIPClusters.py | 8 ++ .../zap-generated/CHIPClientCallbacks.h | 16 --- .../zap-generated/CHIPClusters.h | 7 -- .../PluginApplicationCallbacks.h | 1 - .../zap-generated/endpoint_config.h | 17 +-- .../zap-generated/gen_config.h | 5 - 12 files changed, 94 insertions(+), 172 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 1c5e2950e7f9a3..cf4d5f19138137 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,109 +1512,6 @@ 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; @@ -3934,7 +3831,6 @@ server cluster WindowCovering = 258 { endpoint 0 { binding cluster OtaSoftwareUpdateProvider; - binding cluster GeneralDiagnostics; server cluster Identify { ram attribute identifyTime; 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 b27cb38297d22e..9ef7dadbd4e4b3 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 @@ -3338,7 +3338,7 @@ "mfgCode": null, "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "client", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "TestEventTrigger", @@ -3346,7 +3346,7 @@ "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 1 + "outgoing": 0 } ], "attributes": [ 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 8892cb820e21d5..d7130547fd49df 100644 --- a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp +++ b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp @@ -40,6 +40,33 @@ using chip::DeviceLayer::GetDiagnosticDataProvider; namespace { +bool isTestEventTriggerEnabled() +{ + auto * testEventTrigger = Server::GetInstance().GetTestEventTriggerDelegate(); + if (testEventTrigger == nullptr) + { + return false; + } + uint8_t zeroByteSpanData[TestEventTriggerDelegate::kExpectedEnableKeyLength] = { 0 }; + if (testEventTrigger->DoesEnableKeyMatch(ByteSpan(zeroByteSpanData))) + { + return false; + } + return true; +} + +bool IsByteSpanAllZeros(const ByteSpan & byteSpan) +{ + for (auto * it = byteSpan.begin(); it != byteSpan.end(); ++it) + { + if (*it != 0) + { + return false; + } + } + return true; +} + class GeneralDiagosticsAttrAccess : public AttributeAccessInterface { public: @@ -165,17 +192,8 @@ CHIP_ERROR GeneralDiagosticsAttrAccess::Read(const ConcreteReadAttributePath & a return ReadIfSupported(&DiagnosticDataProvider::GetBootReason, aEncoder); } case TestEventTriggersEnabled::Id: { - auto * testEventTrigger = Server::GetInstance().GetTestEventTriggerDelegate(); - if (testEventTrigger == nullptr) - { - return aEncoder.Encode(false); - } - uint8_t zeroByteSpanData[TestEventTriggerDelegate::kExpectedEnableKeyLength] = { 0 }; - if (testEventTrigger->DoesEnableKeyMatch(ByteSpan(zeroByteSpanData))) - { - return aEncoder.Encode(false); - } - return aEncoder.Encode(true); + bool isTestEventTriggersEnabled = isTestEventTriggerEnabled(); + return aEncoder.Encode(isTestEventTriggersEnabled); } default: { break; @@ -303,18 +321,6 @@ class GeneralDiagnosticsDelegate : public DeviceLayer::ConnectivityManagerDelega GeneralDiagnosticsDelegate gDiagnosticDelegate; -bool IsByteSpanAllZeros(const ByteSpan & byteSpan) -{ - for (auto * it = byteSpan.begin(); it != byteSpan.end(); ++it) - { - if (*it != 0) - { - return false; - } - } - return true; -} - } // anonymous namespace bool emberAfGeneralDiagnosticsClusterTestEventTriggerCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 5005c47b5cf26c..c7f20efe31fe6f 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -1964,6 +1964,13 @@ client cluster GeneralDiagnostics = 51 { 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; } client cluster GroupKeyManagement = 63 { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index ffbb42d4cc4383..964ea210a4ecd5 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -9053,6 +9053,26 @@ public GeneralDiagnosticsCluster(long devicePtr, int endpointId) { @Override public native long initWithDevice(long devicePtr, int endpointId); + public void testEventTrigger( + DefaultClusterCallback callback, byte[] enableKey, Long eventTrigger) { + testEventTrigger(chipClusterPtr, callback, enableKey, eventTrigger, null); + } + + public void testEventTrigger( + DefaultClusterCallback callback, + byte[] enableKey, + Long eventTrigger, + int timedInvokeTimeoutMs) { + testEventTrigger(chipClusterPtr, callback, enableKey, eventTrigger, timedInvokeTimeoutMs); + } + + private native void testEventTrigger( + long chipClusterPtr, + DefaultClusterCallback Callback, + byte[] enableKey, + Long eventTrigger, + @Nullable Integer timedInvokeTimeoutMs); + public interface NetworkInterfacesAttributeCallback { void onSuccess(List valueList); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index c9156547351ef2..f9c1e4af9d9495 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -9772,6 +9772,31 @@ public Map> getCommandMap() { commandMap.put("generalCommissioning", generalCommissioningClusterInteractionInfoMap); Map generalDiagnosticsClusterInteractionInfoMap = new LinkedHashMap<>(); + Map generalDiagnosticstestEventTriggerCommandParams = + new LinkedHashMap(); + CommandParameterInfo generalDiagnosticstestEventTriggerenableKeyCommandParameterInfo = + new CommandParameterInfo("enableKey", byte[].class); + generalDiagnosticstestEventTriggerCommandParams.put( + "enableKey", generalDiagnosticstestEventTriggerenableKeyCommandParameterInfo); + + CommandParameterInfo generalDiagnosticstestEventTriggereventTriggerCommandParameterInfo = + new CommandParameterInfo("eventTrigger", Long.class); + generalDiagnosticstestEventTriggerCommandParams.put( + "eventTrigger", generalDiagnosticstestEventTriggereventTriggerCommandParameterInfo); + + InteractionInfo generalDiagnosticstestEventTriggerInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.GeneralDiagnosticsCluster) cluster) + .testEventTrigger( + (DefaultClusterCallback) callback, + (byte[]) commandArguments.get("enableKey"), + (Long) commandArguments.get("eventTrigger")); + }, + () -> new DelegatedDefaultClusterCallback(), + generalDiagnosticstestEventTriggerCommandParams); + generalDiagnosticsClusterInteractionInfoMap.put( + "testEventTrigger", generalDiagnosticstestEventTriggerInteractionInfo); commandMap.put("generalDiagnostics", generalDiagnosticsClusterInteractionInfoMap); Map groupKeyManagementClusterInteractionInfoMap = new LinkedHashMap<>(); diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 3fd9b45f45d125..3c129220477866 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -2830,6 +2830,14 @@ class ChipClusters: "clusterName": "GeneralDiagnostics", "clusterId": 0x00000033, "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "TestEventTrigger", + "args": { + "enableKey": "bytes", + "eventTrigger": "int", + }, + }, }, "attributes": { 0x00000000: { diff --git a/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h index 1964ba03c40a94..4458f51745a59b 100644 --- a/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h @@ -30,19 +30,3 @@ #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 91c5114d9f9b06..15ec5aca34a215 100644 --- a/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.h @@ -30,13 +30,6 @@ 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/PluginApplicationCallbacks.h b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h index bdeab637c46baa..685fedf234d2bd 100644 --- a/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/all-clusters-app/zap-generated/PluginApplicationCallbacks.h @@ -46,7 +46,6 @@ 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 83b12f1d5ff4b6..23550d9bb8506a 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -1957,7 +1957,7 @@ // clang-format on #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 79 +#define GENERATED_CLUSTER_COUNT 78 // clang-format off #define GENERATED_CLUSTERS { \ @@ -2137,17 +2137,6 @@ .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 36 ) ,\ .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 38 ) ,\ },\ - { \ - /* 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, \ @@ -2841,8 +2830,8 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 28, 596 }, { ZAP_CLUSTER_INDEX(28), 45, 3473 }, { ZAP_CLUSTER_INDEX(73), 5, 105 }, \ - { ZAP_CLUSTER_INDEX(78), 1, 0 }, \ + { ZAP_CLUSTER_INDEX(0), 27, 596 }, { ZAP_CLUSTER_INDEX(27), 45, 3473 }, { ZAP_CLUSTER_INDEX(72), 5, 105 }, \ + { ZAP_CLUSTER_INDEX(77), 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 513cca92da4385..626f71c78b82f9 100644 --- a/zzz_generated/all-clusters-app/zap-generated/gen_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/gen_config.h @@ -53,7 +53,6 @@ #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) @@ -221,10 +220,6 @@ #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 From 25a630ba4987c3c7f421a33299a9692fecc36706 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Fri, 27 May 2022 13:47:51 +0000 Subject: [PATCH 5/9] Address PR comments --- .../general-diagnostics-server.cpp | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 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 d7130547fd49df..44678fcc42505d 100644 --- a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp +++ b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -37,6 +36,7 @@ using namespace chip::DeviceLayer; using chip::DeviceLayer::ConnectivityMgr; using chip::DeviceLayer::DiagnosticDataProvider; using chip::DeviceLayer::GetDiagnosticDataProvider; +using chip::Protocols::InteractionModel::Status; namespace { @@ -327,38 +327,44 @@ bool emberAfGeneralDiagnosticsClusterTestEventTriggerCallback(CommandHandler * c const Commands::TestEventTrigger::DecodableType & commandData) { - if (commandData.enableKey.empty() || commandData.enableKey.size() != TestEventTriggerDelegate::kExpectedEnableKeyLength) + if (commandData.enableKey.size() != TestEventTriggerDelegate::kExpectedEnableKeyLength) { - emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_VALUE); + commandObj->AddStatus(commandPath, Status::ConstraintError); return true; } if (IsByteSpanAllZeros(commandData.enableKey)) { - emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_VALUE); + commandObj->AddStatus(commandPath, Status::ConstraintError); return true; } auto * testEventTrigger = Server::GetInstance().GetTestEventTriggerDelegate(); if (testEventTrigger == nullptr) { - emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_COMMAND); + commandObj->AddStatus(commandPath, Status::InvalidCommand); return true; } if (!testEventTrigger->DoesEnableKeyMatch(commandData.enableKey)) { - emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS); + commandObj->AddStatus(commandPath, Status::UnsupportedAccess); return true; } - if (CHIP_NO_ERROR != testEventTrigger->HandleEventTrigger(commandData.eventTrigger)) + Status returnStatus = Status::Failure; + CHIP_ERROR handleEventTriggerResult = testEventTrigger->HandleEventTrigger(commandData.eventTrigger); + + if (handleEventTriggerResult == CHIP_NO_ERROR) { - emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_COMMAND); - return true; + returnStatus = Status::Success; + } + else if (handleEventTriggerResult == CHIP_ERROR_INVALID_ARGUMENT) + { + returnStatus = Status::InvalidCommand; } - emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_SUCCESS); + commandObj->AddStatus(commandPath, returnStatus); return true; } From bdcd87faf78244ac3219d1d98a4eb592079f685d Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Fri, 27 May 2022 13:53:54 +0000 Subject: [PATCH 6/9] Fix couple more PR comments --- src/app/TestEventTriggerDelegate.h | 2 +- .../general-diagnostics-server.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/TestEventTriggerDelegate.h b/src/app/TestEventTriggerDelegate.h index 039f11b630840e..5186fc473fd0cc 100644 --- a/src/app/TestEventTriggerDelegate.h +++ b/src/app/TestEventTriggerDelegate.h @@ -28,7 +28,7 @@ class TestEventTriggerDelegate { public: /* Expected byte size of the EnableKey */ - static constexpr size_t kExpectedEnableKeyLength = 16; + static constexpr size_t kEnableKeyLength = 16; virtual ~TestEventTriggerDelegate() {} /** 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 44678fcc42505d..7b491a1aefabde 100644 --- a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp +++ b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp @@ -40,14 +40,14 @@ using chip::Protocols::InteractionModel::Status; namespace { -bool isTestEventTriggerEnabled() +bool IsTestEventTriggerEnabled() { auto * testEventTrigger = Server::GetInstance().GetTestEventTriggerDelegate(); if (testEventTrigger == nullptr) { return false; } - uint8_t zeroByteSpanData[TestEventTriggerDelegate::kExpectedEnableKeyLength] = { 0 }; + uint8_t zeroByteSpanData[TestEventTriggerDelegate::kEnableKeyLength] = { 0 }; if (testEventTrigger->DoesEnableKeyMatch(ByteSpan(zeroByteSpanData))) { return false; @@ -192,7 +192,7 @@ CHIP_ERROR GeneralDiagosticsAttrAccess::Read(const ConcreteReadAttributePath & a return ReadIfSupported(&DiagnosticDataProvider::GetBootReason, aEncoder); } case TestEventTriggersEnabled::Id: { - bool isTestEventTriggersEnabled = isTestEventTriggerEnabled(); + bool isTestEventTriggersEnabled = IsTestEventTriggerEnabled(); return aEncoder.Encode(isTestEventTriggersEnabled); } default: { @@ -327,7 +327,7 @@ bool emberAfGeneralDiagnosticsClusterTestEventTriggerCallback(CommandHandler * c const Commands::TestEventTrigger::DecodableType & commandData) { - if (commandData.enableKey.size() != TestEventTriggerDelegate::kExpectedEnableKeyLength) + if (commandData.enableKey.size() != TestEventTriggerDelegate::kEnableKeyLength) { commandObj->AddStatus(commandPath, Status::ConstraintError); return true; From 7b7d18aa0255054bc16443bc5adcb3b5b38a6109 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Fri, 27 May 2022 14:04:29 +0000 Subject: [PATCH 7/9] Address a few more PR comments --- .../general-diagnostics-server.cpp | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 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 7b491a1aefabde..bd20b33f2bfe65 100644 --- a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp +++ b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp @@ -42,13 +42,13 @@ namespace { bool IsTestEventTriggerEnabled() { - auto * testEventTrigger = Server::GetInstance().GetTestEventTriggerDelegate(); - if (testEventTrigger == nullptr) + auto * triggerDelegate = Server::GetInstance().GetTestEventTriggerDelegate(); + if (triggerDelegate == nullptr) { return false; } uint8_t zeroByteSpanData[TestEventTriggerDelegate::kEnableKeyLength] = { 0 }; - if (testEventTrigger->DoesEnableKeyMatch(ByteSpan(zeroByteSpanData))) + if (triggerDelegate->DoesEnableKeyMatch(ByteSpan(zeroByteSpanData))) { return false; } @@ -339,21 +339,16 @@ bool emberAfGeneralDiagnosticsClusterTestEventTriggerCallback(CommandHandler * c return true; } - auto * testEventTrigger = Server::GetInstance().GetTestEventTriggerDelegate(); - if (testEventTrigger == nullptr) - { - commandObj->AddStatus(commandPath, Status::InvalidCommand); - return true; - } + auto * triggerDelegate = Server::GetInstance().GetTestEventTriggerDelegate(); - if (!testEventTrigger->DoesEnableKeyMatch(commandData.enableKey)) + if (triggerDelegate == nullptr || !triggerDelegate->DoesEnableKeyMatch(commandData.enableKey)) { commandObj->AddStatus(commandPath, Status::UnsupportedAccess); return true; } - Status returnStatus = Status::Failure; - CHIP_ERROR handleEventTriggerResult = testEventTrigger->HandleEventTrigger(commandData.eventTrigger); + Status returnStatus = Status::Success; + CHIP_ERROR handleEventTriggerResult = triggerDelegate->HandleEventTrigger(commandData.eventTrigger); if (handleEventTriggerResult == CHIP_NO_ERROR) { @@ -363,6 +358,10 @@ bool emberAfGeneralDiagnosticsClusterTestEventTriggerCallback(CommandHandler * c { returnStatus = Status::InvalidCommand; } + else + { + returnStatus = Status::Failure; + } commandObj->AddStatus(commandPath, returnStatus); return true; From 23802e9e51b179cdb463940103f97dd4f10e5271 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Mon, 30 May 2022 13:34:45 +0000 Subject: [PATCH 8/9] Address PR comment --- .../general-diagnostics-server.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 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 bd20b33f2bfe65..7cfb5c0f977c54 100644 --- a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp +++ b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp @@ -347,21 +347,15 @@ bool emberAfGeneralDiagnosticsClusterTestEventTriggerCallback(CommandHandler * c return true; } - Status returnStatus = Status::Success; CHIP_ERROR handleEventTriggerResult = triggerDelegate->HandleEventTrigger(commandData.eventTrigger); + Status returnStatus = StatusIB(handleEventTriggerResult).mStatus; - if (handleEventTriggerResult == CHIP_NO_ERROR) - { - returnStatus = Status::Success; - } - else if (handleEventTriggerResult == CHIP_ERROR_INVALID_ARGUMENT) + // When HandleEventTrigger returns INVALID_ARGUMENT we convert that into InvalidCommand to be spec + // compliant. + if (handleEventTriggerResult == CHIP_ERROR_INVALID_ARGUMENT) { returnStatus = Status::InvalidCommand; } - else - { - returnStatus = Status::Failure; - } commandObj->AddStatus(commandPath, returnStatus); return true; From 8f7723734cd3b7d1fe5303dbf87e76ab5aae3f86 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Mon, 30 May 2022 15:55:30 +0000 Subject: [PATCH 9/9] Add TestEventTrigger to the all-clusters-minimal-app.zap --- .../all-clusters-minimal-app.matter | 9 + .../all-clusters-minimal-app.zap | 27 +- .../zap-generated/IMClusterCommandHandler.cpp | 40 +++ .../zap-generated/endpoint_config.h | 280 +++++++++--------- 4 files changed, 218 insertions(+), 138 deletions(-) diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 842e54b3153f2b..8b50555214aad3 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -1223,11 +1223,19 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterfaceType networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; + 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 { @@ -3358,6 +3366,7 @@ endpoint 0 { server cluster GeneralDiagnostics { callback attribute networkInterfaces; callback attribute rebootCount; + callback attribute testEventTriggersEnabled; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index 592e1a357f797d..9f215c0867845d 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -3339,7 +3339,16 @@ "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "client", "enabled": 0, - "commands": [], + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], "attributes": [ { "name": "ClusterRevision", @@ -3496,6 +3505,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/zzz_generated/all-clusters-minimal-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/all-clusters-minimal-app/zap-generated/IMClusterCommandHandler.cpp index e8964b7c0ad5c4..adb0c4c1f924a4 100644 --- a/zzz_generated/all-clusters-minimal-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/all-clusters-minimal-app/zap-generated/IMClusterCommandHandler.cpp @@ -458,6 +458,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) @@ -1703,6 +1740,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-minimal-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h index 45b92920cac48e..7b3b17f1865b22 100644 --- a/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-minimal-app/zap-generated/endpoint_config.h @@ -296,7 +296,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 436 +#define GENERATED_ATTRIBUTE_COUNT 437 #define GENERATED_ATTRIBUTES \ { \ \ @@ -436,8 +436,10 @@ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ { 0x00000001, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RebootCount */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 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 */ \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ @@ -1141,17 +1143,21 @@ /* GeneratedCommandList (index=37)*/ \ 0x00000001 /* RetrieveLogsResponse */, \ chip::kInvalidCommandId /* end of list */, \ - /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */\ + /* Endpoint: 0, Cluster: General Diagnostics (server) */\ /* AcceptedCommandList (index=39) */ \ + 0x00000000 /* TestEventTrigger */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */\ + /* AcceptedCommandList (index=41) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */\ - /* AcceptedCommandList (index=41) */ \ + /* AcceptedCommandList (index=43) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* AcceptedCommandList (index=44) */ \ + /* AcceptedCommandList (index=46) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -1162,29 +1168,29 @@ 0x0000000B /* AddTrustedRootCertificate */, \ 0x0000000C /* RemoveTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=54)*/ \ + /* GeneratedCommandList (index=56)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Group Key Management (server) */\ - /* AcceptedCommandList (index=59) */ \ + /* AcceptedCommandList (index=61) */ \ 0x00000000 /* KeySetWrite */, \ 0x00000001 /* KeySetRead */, \ 0x00000003 /* KeySetRemove */, \ 0x00000004 /* KeySetReadAllIndices */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=64)*/ \ + /* GeneratedCommandList (index=66)*/ \ 0x00000002 /* KeySetReadResponse */, \ 0x00000005 /* KeySetReadAllIndicesResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Identify (server) */\ - /* AcceptedCommandList (index=67) */ \ + /* AcceptedCommandList (index=69) */ \ 0x00000000 /* Identify */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Groups (server) */\ - /* AcceptedCommandList (index=69) */ \ + /* AcceptedCommandList (index=71) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -1192,14 +1198,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=76)*/ \ + /* GeneratedCommandList (index=78)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Scenes (server) */\ - /* AcceptedCommandList (index=81) */ \ + /* AcceptedCommandList (index=83) */ \ 0x00000000 /* AddScene */, \ 0x00000001 /* ViewScene */, \ 0x00000002 /* RemoveScene */, \ @@ -1208,7 +1214,7 @@ 0x00000005 /* RecallScene */, \ 0x00000006 /* GetSceneMembership */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=89)*/ \ + /* GeneratedCommandList (index=91)*/ \ 0x00000000 /* AddSceneResponse */, \ 0x00000001 /* ViewSceneResponse */, \ 0x00000002 /* RemoveSceneResponse */, \ @@ -1217,13 +1223,13 @@ 0x00000006 /* GetSceneMembershipResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: On/Off (server) */\ - /* AcceptedCommandList (index=96) */ \ + /* AcceptedCommandList (index=98) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Level Control (server) */\ - /* AcceptedCommandList (index=100) */ \ + /* AcceptedCommandList (index=102) */ \ 0x00000000 /* MoveToLevel */, \ 0x00000001 /* Move */, \ 0x00000002 /* Step */, \ @@ -1234,86 +1240,86 @@ 0x00000007 /* StopWithOnOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Mode Select (server) */\ - /* AcceptedCommandList (index=109) */ \ + /* AcceptedCommandList (index=111) */ \ 0x00000000 /* ChangeToMode */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Door Lock (server) */\ - /* AcceptedCommandList (index=111) */ \ + /* AcceptedCommandList (index=113) */ \ 0x00000000 /* LockDoor */, \ 0x00000001 /* UnlockDoor */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Window Covering (server) */\ - /* AcceptedCommandList (index=114) */ \ + /* AcceptedCommandList (index=116) */ \ 0x00000000 /* UpOrOpen */, \ 0x00000001 /* DownOrClose */, \ 0x00000002 /* StopMotion */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Thermostat (server) */\ - /* AcceptedCommandList (index=118) */ \ + /* AcceptedCommandList (index=120) */ \ 0x00000000 /* SetpointRaiseLower */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Channel (server) */\ - /* AcceptedCommandList (index=120) */ \ + /* AcceptedCommandList (index=122) */ \ 0x00000002 /* ChangeChannelByNumber */, \ 0x00000003 /* SkipChannel */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Target Navigator (server) */\ - /* AcceptedCommandList (index=123) */ \ + /* AcceptedCommandList (index=125) */ \ 0x00000000 /* NavigateTarget */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=125)*/ \ + /* GeneratedCommandList (index=127)*/ \ 0x00000001 /* NavigateTargetResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Media Playback (server) */\ - /* AcceptedCommandList (index=127) */ \ + /* AcceptedCommandList (index=129) */ \ 0x00000000 /* Play */, \ 0x00000001 /* Pause */, \ 0x00000002 /* StopPlayback */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=131)*/ \ + /* GeneratedCommandList (index=133)*/ \ 0x0000000A /* PlaybackResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Media Input (server) */\ - /* AcceptedCommandList (index=133) */ \ + /* AcceptedCommandList (index=135) */ \ 0x00000000 /* SelectInput */, \ 0x00000001 /* ShowInputStatus */, \ 0x00000002 /* HideInputStatus */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Low Power (server) */\ - /* AcceptedCommandList (index=137) */ \ + /* AcceptedCommandList (index=139) */ \ 0x00000000 /* Sleep */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Keypad Input (server) */\ - /* AcceptedCommandList (index=139) */ \ + /* AcceptedCommandList (index=141) */ \ 0x00000000 /* SendKey */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=141)*/ \ + /* GeneratedCommandList (index=143)*/ \ 0x00000001 /* SendKeyResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Audio Output (server) */\ - /* AcceptedCommandList (index=143) */ \ + /* AcceptedCommandList (index=145) */ \ 0x00000000 /* SelectOutput */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Application Launcher (server) */\ - /* AcceptedCommandList (index=145) */ \ + /* AcceptedCommandList (index=147) */ \ 0x00000000 /* LaunchApp */, \ 0x00000001 /* StopApp */, \ 0x00000002 /* HideApp */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=149)*/ \ + /* GeneratedCommandList (index=151)*/ \ 0x00000003 /* LauncherResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Account Login (server) */\ - /* AcceptedCommandList (index=151) */ \ + /* AcceptedCommandList (index=153) */ \ 0x00000000 /* GetSetupPIN */, \ 0x00000002 /* Login */, \ 0x00000003 /* Logout */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=155)*/ \ + /* GeneratedCommandList (index=157)*/ \ 0x00000001 /* GetSetupPINResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Test Cluster (server) */\ - /* AcceptedCommandList (index=157) */ \ + /* AcceptedCommandList (index=159) */ \ 0x00000000 /* Test */, \ 0x00000001 /* TestNotHandled */, \ 0x00000002 /* TestSpecific */, \ @@ -1333,7 +1339,7 @@ 0x00000014 /* TestEmitTestEventRequest */, \ 0x00000015 /* TestEmitTestFabricScopedEventRequest */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=176)*/ \ + /* GeneratedCommandList (index=178)*/ \ 0x00000000 /* TestSpecificResponse */, \ 0x00000001 /* TestAddArgumentsResponse */, \ 0x00000004 /* TestListInt8UReverseResponse */, \ @@ -1345,7 +1351,7 @@ 0x0000000B /* TestEmitTestFabricScopedEventResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: Groups (server) */\ - /* AcceptedCommandList (index=186) */ \ + /* AcceptedCommandList (index=188) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -1353,20 +1359,20 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=193)*/ \ + /* GeneratedCommandList (index=195)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: On/Off (server) */\ - /* AcceptedCommandList (index=198) */ \ + /* AcceptedCommandList (index=200) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */\ - /* AcceptedCommandList (index=202) */ \ + /* AcceptedCommandList (index=204) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -1374,7 +1380,7 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=209)*/ \ + /* GeneratedCommandList (index=211)*/ \ 0x00000001 /* ScanNetworksResponse */, \ 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ @@ -1568,17 +1574,17 @@ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ .clusterId = 0x00000033, \ .attributes = ZAP_ATTRIBUTE_INDEX(78), \ - .attributeCount = 4, \ + .attributeCount = 5, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 39 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ .clusterId = 0x00000034, \ - .attributes = ZAP_ATTRIBUTE_INDEX(82), \ + .attributes = ZAP_ATTRIBUTE_INDEX(83), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1589,7 +1595,7 @@ { \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ .clusterId = 0x00000035, \ - .attributes = ZAP_ATTRIBUTE_INDEX(84), \ + .attributes = ZAP_ATTRIBUTE_INDEX(85), \ .attributeCount = 19, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1600,7 +1606,7 @@ { \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ .clusterId = 0x00000036, \ - .attributes = ZAP_ATTRIBUTE_INDEX(103), \ + .attributes = ZAP_ATTRIBUTE_INDEX(104), \ .attributeCount = 7, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1611,51 +1617,51 @@ { \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ .clusterId = 0x00000037, \ - .attributes = ZAP_ATTRIBUTE_INDEX(110), \ + .attributes = ZAP_ATTRIBUTE_INDEX(111), \ .attributeCount = 11, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 39 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 41 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ .clusterId = 0x0000003C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(121), \ + .attributes = ZAP_ATTRIBUTE_INDEX(122), \ .attributeCount = 5, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 41 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 43 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(126), \ + .attributes = ZAP_ATTRIBUTE_INDEX(127), \ .attributeCount = 8, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 44 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 54 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 46 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 56 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ .clusterId = 0x0000003F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(134), \ + .attributes = ZAP_ATTRIBUTE_INDEX(135), \ .attributeCount = 6, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 59 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 64 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 61 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 66 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(140), \ + .attributes = ZAP_ATTRIBUTE_INDEX(141), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1666,7 +1672,7 @@ { \ /* Endpoint: 0, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(143), \ + .attributes = ZAP_ATTRIBUTE_INDEX(144), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1677,7 +1683,7 @@ { \ /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ .clusterId = 0x00000405, \ - .attributes = ZAP_ATTRIBUTE_INDEX(146), \ + .attributes = ZAP_ATTRIBUTE_INDEX(147), \ .attributeCount = 5, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1688,62 +1694,62 @@ { \ /* Endpoint: 1, Cluster: Identify (server) */ \ .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(151), \ + .attributes = ZAP_ATTRIBUTE_INDEX(152), \ .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( 67 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 69 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(155), \ + .attributes = ZAP_ATTRIBUTE_INDEX(156), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 69 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 76 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 71 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 78 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Scenes (server) */ \ .clusterId = 0x00000005, \ - .attributes = ZAP_ATTRIBUTE_INDEX(158), \ + .attributes = ZAP_ATTRIBUTE_INDEX(159), \ .attributeCount = 7, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayScenesServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 81 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 89 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 83 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 91 ) ,\ },\ { \ /* Endpoint: 1, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(165), \ + .attributes = ZAP_ATTRIBUTE_INDEX(166), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 96 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 98 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Level Control (server) */ \ .clusterId = 0x00000008, \ - .attributes = ZAP_ATTRIBUTE_INDEX(168), \ + .attributes = ZAP_ATTRIBUTE_INDEX(169), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 100 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 102 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(173), \ + .attributes = ZAP_ATTRIBUTE_INDEX(174), \ .attributeCount = 6, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1754,7 +1760,7 @@ { \ /* Endpoint: 1, Cluster: Binding (server) */ \ .clusterId = 0x0000001E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(179), \ + .attributes = ZAP_ATTRIBUTE_INDEX(180), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1765,7 +1771,7 @@ { \ /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ .clusterId = 0x00000025, \ - .attributes = ZAP_ATTRIBUTE_INDEX(182), \ + .attributes = ZAP_ATTRIBUTE_INDEX(183), \ .attributeCount = 4, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1776,7 +1782,7 @@ { \ /* Endpoint: 1, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(186), \ + .attributes = ZAP_ATTRIBUTE_INDEX(187), \ .attributeCount = 5, \ .clusterSize = 69, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1787,7 +1793,7 @@ { \ /* Endpoint: 1, Cluster: Switch (server) */ \ .clusterId = 0x0000003B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(191), \ + .attributes = ZAP_ATTRIBUTE_INDEX(192), \ .attributeCount = 4, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1798,7 +1804,7 @@ { \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(195), \ + .attributes = ZAP_ATTRIBUTE_INDEX(196), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1809,7 +1815,7 @@ { \ /* Endpoint: 1, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(198), \ + .attributes = ZAP_ATTRIBUTE_INDEX(199), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1820,7 +1826,7 @@ { \ /* Endpoint: 1, Cluster: Boolean State (server) */ \ .clusterId = 0x00000045, \ - .attributes = ZAP_ATTRIBUTE_INDEX(201), \ + .attributes = ZAP_ATTRIBUTE_INDEX(202), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1831,40 +1837,40 @@ { \ /* Endpoint: 1, Cluster: Mode Select (server) */ \ .clusterId = 0x00000050, \ - .attributes = ZAP_ATTRIBUTE_INDEX(204), \ + .attributes = ZAP_ATTRIBUTE_INDEX(205), \ .attributeCount = 6, \ .clusterSize = 42, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayModeSelectServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 109 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 111 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ .clusterId = 0x00000101, \ - .attributes = ZAP_ATTRIBUTE_INDEX(210), \ + .attributes = ZAP_ATTRIBUTE_INDEX(211), \ .attributeCount = 8, \ .clusterSize = 16, \ .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( 111 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 113 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ .clusterId = 0x00000102, \ - .attributes = ZAP_ATTRIBUTE_INDEX(218), \ + .attributes = ZAP_ATTRIBUTE_INDEX(219), \ .attributeCount = 7, \ .clusterSize = 11, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayWindowCoveringServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 114 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 116 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ .clusterId = 0x00000200, \ - .attributes = ZAP_ATTRIBUTE_INDEX(225), \ + .attributes = ZAP_ATTRIBUTE_INDEX(226), \ .attributeCount = 9, \ .clusterSize = 17, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -1875,18 +1881,18 @@ { \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ .clusterId = 0x00000201, \ - .attributes = ZAP_ATTRIBUTE_INDEX(234), \ + .attributes = ZAP_ATTRIBUTE_INDEX(235), \ .attributeCount = 6, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayThermostatServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 118 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 120 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ .clusterId = 0x00000202, \ - .attributes = ZAP_ATTRIBUTE_INDEX(240), \ + .attributes = ZAP_ATTRIBUTE_INDEX(241), \ .attributeCount = 6, \ .clusterSize = 10, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -1897,7 +1903,7 @@ { \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ .clusterId = 0x00000204, \ - .attributes = ZAP_ATTRIBUTE_INDEX(246), \ + .attributes = ZAP_ATTRIBUTE_INDEX(247), \ .attributeCount = 4, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -1908,7 +1914,7 @@ { \ /* Endpoint: 1, Cluster: Color Control (server) */ \ .clusterId = 0x00000300, \ - .attributes = ZAP_ATTRIBUTE_INDEX(250), \ + .attributes = ZAP_ATTRIBUTE_INDEX(251), \ .attributeCount = 7, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1919,7 +1925,7 @@ { \ /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ .clusterId = 0x00000400, \ - .attributes = ZAP_ATTRIBUTE_INDEX(257), \ + .attributes = ZAP_ATTRIBUTE_INDEX(258), \ .attributeCount = 5, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1930,7 +1936,7 @@ { \ /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ .clusterId = 0x00000402, \ - .attributes = ZAP_ATTRIBUTE_INDEX(262), \ + .attributes = ZAP_ATTRIBUTE_INDEX(263), \ .attributeCount = 5, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1941,7 +1947,7 @@ { \ /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ .clusterId = 0x00000403, \ - .attributes = ZAP_ATTRIBUTE_INDEX(267), \ + .attributes = ZAP_ATTRIBUTE_INDEX(268), \ .attributeCount = 5, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1952,7 +1958,7 @@ { \ /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ .clusterId = 0x00000404, \ - .attributes = ZAP_ATTRIBUTE_INDEX(272), \ + .attributes = ZAP_ATTRIBUTE_INDEX(273), \ .attributeCount = 5, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1963,7 +1969,7 @@ { \ /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ .clusterId = 0x00000405, \ - .attributes = ZAP_ATTRIBUTE_INDEX(277), \ + .attributes = ZAP_ATTRIBUTE_INDEX(278), \ .attributeCount = 5, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1974,7 +1980,7 @@ { \ /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(282), \ + .attributes = ZAP_ATTRIBUTE_INDEX(283), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1985,7 +1991,7 @@ { \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ .clusterId = 0x00000503, \ - .attributes = ZAP_ATTRIBUTE_INDEX(287), \ + .attributes = ZAP_ATTRIBUTE_INDEX(288), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1996,73 +2002,73 @@ { \ /* Endpoint: 1, Cluster: Channel (server) */ \ .clusterId = 0x00000504, \ - .attributes = ZAP_ATTRIBUTE_INDEX(289), \ + .attributes = ZAP_ATTRIBUTE_INDEX(290), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 120 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 122 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ .clusterId = 0x00000505, \ - .attributes = ZAP_ATTRIBUTE_INDEX(291), \ + .attributes = ZAP_ATTRIBUTE_INDEX(292), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 123 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 125 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 125 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 127 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Media Playback (server) */ \ .clusterId = 0x00000506, \ - .attributes = ZAP_ATTRIBUTE_INDEX(294), \ + .attributes = ZAP_ATTRIBUTE_INDEX(295), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 127 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 131 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 129 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 133 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Media Input (server) */ \ .clusterId = 0x00000507, \ - .attributes = ZAP_ATTRIBUTE_INDEX(297), \ + .attributes = ZAP_ATTRIBUTE_INDEX(298), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 133 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 135 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Low Power (server) */ \ .clusterId = 0x00000508, \ - .attributes = ZAP_ATTRIBUTE_INDEX(301), \ + .attributes = ZAP_ATTRIBUTE_INDEX(302), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 137 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 139 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Keypad Input (server) */ \ .clusterId = 0x00000509, \ - .attributes = ZAP_ATTRIBUTE_INDEX(303), \ + .attributes = ZAP_ATTRIBUTE_INDEX(304), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 139 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 141 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 141 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 143 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ .clusterId = 0x0000050A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(305), \ + .attributes = ZAP_ATTRIBUTE_INDEX(306), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2073,29 +2079,29 @@ { \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ .clusterId = 0x0000050B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(307), \ + .attributes = ZAP_ATTRIBUTE_INDEX(308), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 143 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 145 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ .clusterId = 0x0000050C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(311), \ + .attributes = ZAP_ATTRIBUTE_INDEX(312), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 145 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 149 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 147 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 151 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ .clusterId = 0x0000050D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(313), \ + .attributes = ZAP_ATTRIBUTE_INDEX(314), \ .attributeCount = 7, \ .clusterSize = 73, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2106,51 +2112,51 @@ { \ /* Endpoint: 1, Cluster: Account Login (server) */ \ .clusterId = 0x0000050E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(320), \ + .attributes = ZAP_ATTRIBUTE_INDEX(321), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 151 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 155 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 153 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 157 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Test Cluster (server) */ \ .clusterId = 0x0000050F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(322), \ + .attributes = ZAP_ATTRIBUTE_INDEX(323), \ .attributeCount = 82, \ .clusterSize = 2289, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 157 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 176 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 159 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 178 ) ,\ },\ { \ /* Endpoint: 2, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(404), \ + .attributes = ZAP_ATTRIBUTE_INDEX(405), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 186 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 193 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 188 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 195 ) ,\ },\ { \ /* Endpoint: 2, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(407), \ + .attributes = ZAP_ATTRIBUTE_INDEX(408), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 198 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 200 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(410), \ + .attributes = ZAP_ATTRIBUTE_INDEX(411), \ .attributeCount = 6, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2161,7 +2167,7 @@ { \ /* Endpoint: 2, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(416), \ + .attributes = ZAP_ATTRIBUTE_INDEX(417), \ .attributeCount = 5, \ .clusterSize = 69, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2172,7 +2178,7 @@ { \ /* Endpoint: 2, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(421), \ + .attributes = ZAP_ATTRIBUTE_INDEX(422), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2183,13 +2189,13 @@ { \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(426), \ + .attributes = ZAP_ATTRIBUTE_INDEX(427), \ .attributeCount = 10, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 202 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 209 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 204 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 211 ) ,\ },\ }